From 86f2f978351ef7983a8c287059a628bb5b149061 Mon Sep 17 00:00:00 2001 From: Peter <> Date: Sun, 7 Jul 2024 22:32:04 +0200 Subject: [PATCH] ui update --- .../{cssMode--K6PoFD1.js => cssMode-FMFZ6hYn.js} | 2 +- ...marker2-kSkPHUKw.js => freemarker2-kNKgHApm.js} | 2 +- ...ndlebars-v8YBrhth.js => handlebars-MvByOAAn.js} | 2 +- .../assets/{html-JYwd58v-.js => html-sxitC7lO.js} | 2 +- .../{htmlMode-7ibfD7kC.js => htmlMode-lYQslN8f.js} | 2 +- .../{index-b0PXBNwI.js => index-66H2BNEh.js} | 14 +++++++------- ...vascript-cfyOAlAk.js => javascript-G8ibxNWS.js} | 2 +- .../{jsonMode-gyZTIlQx.js => jsonMode-GZTrdMHu.js} | 2 +- .../{liquid-iWsMlhOa.js => liquid-Zy35w6eA.js} | 2 +- .../{python-n0zHsyM5.js => python-7RWCIHCj.js} | 2 +- .../{razor-2MoH6A7O.js => razor-JV-AagFB.js} | 2 +- .../{tsMode-721bft5-.js => tsMode-PBOrm3-u.js} | 2 +- ...pescript-5e93KqQu.js => typescript-2sy1hHBH.js} | 2 +- .../assets/{xml-pvMAvvEZ.js => xml-W8IHW2kN.js} | 2 +- .../assets/{yaml-WQY7k5Mr.js => yaml-_k6aUJBN.js} | 2 +- http/assets/index.html | 2 +- 16 files changed, 22 insertions(+), 22 deletions(-) rename http/assets/assets/{cssMode--K6PoFD1.js => cssMode-FMFZ6hYn.js} (99%) rename http/assets/assets/{freemarker2-kSkPHUKw.js => freemarker2-kNKgHApm.js} (99%) rename http/assets/assets/{handlebars-v8YBrhth.js => handlebars-MvByOAAn.js} (99%) rename http/assets/assets/{html-JYwd58v-.js => html-sxitC7lO.js} (98%) rename http/assets/assets/{htmlMode-7ibfD7kC.js => htmlMode-lYQslN8f.js} (99%) rename http/assets/assets/{index-b0PXBNwI.js => index-66H2BNEh.js} (99%) rename http/assets/assets/{javascript-cfyOAlAk.js => javascript-G8ibxNWS.js} (89%) rename http/assets/assets/{jsonMode-gyZTIlQx.js => jsonMode-GZTrdMHu.js} (99%) rename http/assets/assets/{liquid-iWsMlhOa.js => liquid-Zy35w6eA.js} (98%) rename http/assets/assets/{python-n0zHsyM5.js => python-7RWCIHCj.js} (98%) rename http/assets/assets/{razor-2MoH6A7O.js => razor-JV-AagFB.js} (99%) rename http/assets/assets/{tsMode-721bft5-.js => tsMode-PBOrm3-u.js} (99%) rename http/assets/assets/{typescript-5e93KqQu.js => typescript-2sy1hHBH.js} (98%) rename http/assets/assets/{xml-pvMAvvEZ.js => xml-W8IHW2kN.js} (97%) rename http/assets/assets/{yaml-WQY7k5Mr.js => yaml-_k6aUJBN.js} (98%) diff --git a/http/assets/assets/cssMode--K6PoFD1.js b/http/assets/assets/cssMode-FMFZ6hYn.js similarity index 99% rename from http/assets/assets/cssMode--K6PoFD1.js rename to http/assets/assets/cssMode-FMFZ6hYn.js index 39bbacb..82eb7c5 100644 --- a/http/assets/assets/cssMode--K6PoFD1.js +++ b/http/assets/assets/cssMode-FMFZ6hYn.js @@ -1,4 +1,4 @@ -var Le=Object.defineProperty;var je=(e,n,i)=>n in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +var Le=Object.defineProperty;var je=(e,n,i)=>n in e?Le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(je(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ne}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/freemarker2-kSkPHUKw.js b/http/assets/assets/freemarker2-kNKgHApm.js similarity index 99% rename from http/assets/assets/freemarker2-kSkPHUKw.js rename to http/assets/assets/freemarker2-kNKgHApm.js index 8bc2d8c..1f48415 100644 --- a/http/assets/assets/freemarker2-kSkPHUKw.js +++ b/http/assets/assets/freemarker2-kNKgHApm.js @@ -1,4 +1,4 @@ -import{m as F}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m as F}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/handlebars-v8YBrhth.js b/http/assets/assets/handlebars-MvByOAAn.js similarity index 99% rename from http/assets/assets/handlebars-v8YBrhth.js rename to http/assets/assets/handlebars-MvByOAAn.js index ad0177f..46a9353 100644 --- a/http/assets/assets/handlebars-v8YBrhth.js +++ b/http/assets/assets/handlebars-MvByOAAn.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/html-JYwd58v-.js b/http/assets/assets/html-sxitC7lO.js similarity index 98% rename from http/assets/assets/html-JYwd58v-.js rename to http/assets/assets/html-sxitC7lO.js index 9b8e093..0bf100f 100644 --- a/http/assets/assets/html-JYwd58v-.js +++ b/http/assets/assets/html-sxitC7lO.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/htmlMode-7ibfD7kC.js b/http/assets/assets/htmlMode-lYQslN8f.js similarity index 99% rename from http/assets/assets/htmlMode-7ibfD7kC.js rename to http/assets/assets/htmlMode-lYQslN8f.js index 1a8db54..3085f26 100644 --- a/http/assets/assets/htmlMode-7ibfD7kC.js +++ b/http/assets/assets/htmlMode-lYQslN8f.js @@ -1,4 +1,4 @@ -var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +var $e=Object.defineProperty;var qe=(e,n,i)=>n in e?$e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var k=(e,n,i)=>(qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Qe}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/index-b0PXBNwI.js b/http/assets/assets/index-66H2BNEh.js similarity index 99% rename from http/assets/assets/index-b0PXBNwI.js rename to http/assets/assets/index-66H2BNEh.js index d0f00a3..232debb 100644 --- a/http/assets/assets/index-b0PXBNwI.js +++ b/http/assets/assets/index-66H2BNEh.js @@ -1069,27 +1069,27 @@ ${e.toString()}`}}class gxe{constructor(e=new ove,i=!1,n,a=$Fi){var o;this._serv * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var u9i=Object.defineProperty,r9i=Object.getOwnPropertyDescriptor,a9i=Object.getOwnPropertyNames,o9i=Object.prototype.hasOwnProperty,fDt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of a9i(e))!o9i.call(r,a)&&a!==i&&u9i(r,a,{get:()=>e[a],enumerable:!(n=r9i(e,a))||n.enumerable});return r},s9i=(r,e,i)=>(fDt(r,e,"default"),i&&fDt(i,e,"default")),yne={};s9i(yne,Iae);var Ryt={},IRe={},Oyt=class{constructor(r){zc(this,"_languageId");zc(this,"_loadingTriggered");zc(this,"_lazyLoadPromise");zc(this,"_lazyLoadPromiseResolve");zc(this,"_lazyLoadPromiseReject");this._languageId=r,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,i)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=i})}static getOrCreate(r){return IRe[r]||(IRe[r]=new Oyt(r)),IRe[r]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Ryt[this._languageId].loader().then(r=>this._lazyLoadPromiseResolve(r),r=>this._lazyLoadPromiseReject(r))),this._lazyLoadPromise}};function Qa(r){const e=r.id;Ryt[e]=r,yne.languages.register(r);const i=Oyt.getOrCreate(e);yne.languages.registerTokensProviderFactory(e,{create:async()=>(await i.load()).language}),yne.languages.onLanguageEncountered(e,async()=>{const n=await i.load();yne.languages.setLanguageConfiguration(e,n.conf)})}Qa({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Ra(()=>import("./abap-tpSenF06.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Ra(()=>import("./apex-6BKJFAkE.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Ra(()=>import("./azcli-O9Lj4b_M.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Ra(()=>import("./bat-A9PiRsOi.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Ra(()=>import("./bicep-it4V5ulc.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Ra(()=>import("./cameligo-EZF0Qhy4.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Ra(()=>import("./clojure-ckW2oeYa.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Ra(()=>import("./coffee-Y8tTqwEk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Ra(()=>import("./cpp-MkflAQyk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Ra(()=>import("./cpp-MkflAQyk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Ra(()=>import("./csharp-EvjsIfVH.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Ra(()=>import("./csp-oRnIIgoX.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Ra(()=>import("./css-Dd6BQKIm.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Ra(()=>import("./cypher-642jv-SL.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Ra(()=>import("./dart--oh5nTyy.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Ra(()=>import("./dockerfile-LvEjKiHu.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Ra(()=>import("./ecl-GFGZIWyi.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Ra(()=>import("./elixir-UwPN-Rlt.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Ra(()=>import("./flow9-CgLYUr2P.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Ra(()=>import("./fsharp-OSWdaDvE.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Ra(()=>import("./freemarker2-kSkPHUKw.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAutoInterpolationDollar)});Qa({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Ra(()=>import("./freemarker2-kSkPHUKw.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAngleInterpolationDollar)});Qa({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Ra(()=>import("./freemarker2-kSkPHUKw.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagBracketInterpolationDollar)});Qa({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Ra(()=>import("./freemarker2-kSkPHUKw.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAngleInterpolationBracket)});Qa({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Ra(()=>import("./freemarker2-kSkPHUKw.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagBracketInterpolationBracket)});Qa({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Ra(()=>import("./freemarker2-kSkPHUKw.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAutoInterpolationDollar)});Qa({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Ra(()=>import("./freemarker2-kSkPHUKw.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAutoInterpolationBracket)});Qa({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Ra(()=>import("./go-5tF-fl5m.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Ra(()=>import("./graphql-Hw_-CHyi.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Ra(()=>import("./handlebars-v8YBrhth.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Ra(()=>import("./hcl-MnPuh_ws.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Ra(()=>import("./html-JYwd58v-.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Ra(()=>import("./ini-T6G25OpR.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Ra(()=>import("./java-C07s_84Q.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Ra(()=>import("./javascript-cfyOAlAk.js"),__vite__mapDeps([0,1]),import.meta.url)});Qa({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Ra(()=>import("./julia--X05kqT1.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Ra(()=>import("./kotlin--IhbTNF1.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Ra(()=>import("./less-88EdC67M.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Ra(()=>import("./lexon-MniWR1bD.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Ra(()=>import("./lua-bYlw05oY.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Ra(()=>import("./liquid-iWsMlhOa.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Ra(()=>import("./m3-xCaP759r.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Ra(()=>import("./markdown-rVkZudBB.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Ra(()=>import("./mips-SX-ofX2G.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Ra(()=>import("./msdax-46cGZiec.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Ra(()=>import("./mysql-cPR6LtRV.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Ra(()=>import("./objective-c-yVw_ot58.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Ra(()=>import("./pascal-gPd3YvqG.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Ra(()=>import("./pascaligo-qpmQPZ0u.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Ra(()=>import("./perl-Uj6qonV_.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Ra(()=>import("./pgsql-FwQ7fWHR.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Ra(()=>import("./php-ox1RFQl1.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pla",extensions:[".pla"],loader:()=>Ra(()=>import("./pla-ioQoEAH2.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Ra(()=>import("./postiats-rFhTgJ-3.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Ra(()=>import("./powerquery-SBeRwa7q.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Ra(()=>import("./powershell-BVxa2I_X.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Ra(()=>import("./protobuf-S72h9uI3.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Ra(()=>import("./pug-pFYpmxCe.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Ra(()=>import("./python-n0zHsyM5.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Ra(()=>import("./qsharp-dJE40yG7.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Ra(()=>import("./r-q7JnwB0_.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Ra(()=>import("./razor-2MoH6A7O.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Ra(()=>import("./redis-OCMhus96.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Ra(()=>import("./redshift-3M8Qbba0.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Ra(()=>import("./restructuredtext-iqrCt4Jk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Ra(()=>import("./ruby-nMCbZKZv.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Ra(()=>import("./rust-rRUnz4oa.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Ra(()=>import("./sb-POjlrAmS.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Ra(()=>import("./scala-eSAX5k-i.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Ra(()=>import("./scheme-MY7XLAOe.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Ra(()=>import("./scss-Ecf6GBR7.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Ra(()=>import("./shell-mOomC_YS.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Ra(()=>import("./solidity-NVKViCfT.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Ra(()=>import("./sophia-biC4I-9r.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Ra(()=>import("./sparql-mIpgwmxk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Ra(()=>import("./sql-0FQhBzpL.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>Ra(()=>import("./st-kZml91n2.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Ra(()=>import("./swift-s7cwkShL.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Ra(()=>import("./systemverilog-rnL6ckdb.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Ra(()=>import("./systemverilog-rnL6ckdb.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Ra(()=>import("./tcl-jAg7ZMBy.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Ra(()=>import("./twig-_mSnF2--.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Ra(()=>import("./typescript-5e93KqQu.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Ra(()=>import("./vb-duaPIj24.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Ra(()=>import("./wgsl-w-NQ_iIh.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Ra(()=>import("./xml-pvMAvvEZ.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Ra(()=>import("./yaml-WQY7k5Mr.js"),__vite__mapDeps([]),import.meta.url)});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var u9i=Object.defineProperty,r9i=Object.getOwnPropertyDescriptor,a9i=Object.getOwnPropertyNames,o9i=Object.prototype.hasOwnProperty,fDt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of a9i(e))!o9i.call(r,a)&&a!==i&&u9i(r,a,{get:()=>e[a],enumerable:!(n=r9i(e,a))||n.enumerable});return r},s9i=(r,e,i)=>(fDt(r,e,"default"),i&&fDt(i,e,"default")),yne={};s9i(yne,Iae);var Ryt={},IRe={},Oyt=class{constructor(r){zc(this,"_languageId");zc(this,"_loadingTriggered");zc(this,"_lazyLoadPromise");zc(this,"_lazyLoadPromiseResolve");zc(this,"_lazyLoadPromiseReject");this._languageId=r,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,i)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=i})}static getOrCreate(r){return IRe[r]||(IRe[r]=new Oyt(r)),IRe[r]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,Ryt[this._languageId].loader().then(r=>this._lazyLoadPromiseResolve(r),r=>this._lazyLoadPromiseReject(r))),this._lazyLoadPromise}};function Qa(r){const e=r.id;Ryt[e]=r,yne.languages.register(r);const i=Oyt.getOrCreate(e);yne.languages.registerTokensProviderFactory(e,{create:async()=>(await i.load()).language}),yne.languages.onLanguageEncountered(e,async()=>{const n=await i.load();yne.languages.setLanguageConfiguration(e,n.conf)})}Qa({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Ra(()=>import("./abap-tpSenF06.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Ra(()=>import("./apex-6BKJFAkE.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Ra(()=>import("./azcli-O9Lj4b_M.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Ra(()=>import("./bat-A9PiRsOi.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Ra(()=>import("./bicep-it4V5ulc.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Ra(()=>import("./cameligo-EZF0Qhy4.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Ra(()=>import("./clojure-ckW2oeYa.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Ra(()=>import("./coffee-Y8tTqwEk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Ra(()=>import("./cpp-MkflAQyk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Ra(()=>import("./cpp-MkflAQyk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Ra(()=>import("./csharp-EvjsIfVH.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Ra(()=>import("./csp-oRnIIgoX.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Ra(()=>import("./css-Dd6BQKIm.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Ra(()=>import("./cypher-642jv-SL.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Ra(()=>import("./dart--oh5nTyy.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Ra(()=>import("./dockerfile-LvEjKiHu.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Ra(()=>import("./ecl-GFGZIWyi.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Ra(()=>import("./elixir-UwPN-Rlt.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Ra(()=>import("./flow9-CgLYUr2P.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Ra(()=>import("./fsharp-OSWdaDvE.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Ra(()=>import("./freemarker2-kNKgHApm.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAutoInterpolationDollar)});Qa({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Ra(()=>import("./freemarker2-kNKgHApm.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAngleInterpolationDollar)});Qa({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Ra(()=>import("./freemarker2-kNKgHApm.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagBracketInterpolationDollar)});Qa({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Ra(()=>import("./freemarker2-kNKgHApm.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAngleInterpolationBracket)});Qa({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Ra(()=>import("./freemarker2-kNKgHApm.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagBracketInterpolationBracket)});Qa({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Ra(()=>import("./freemarker2-kNKgHApm.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAutoInterpolationDollar)});Qa({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Ra(()=>import("./freemarker2-kNKgHApm.js"),__vite__mapDeps([]),import.meta.url).then(r=>r.TagAutoInterpolationBracket)});Qa({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Ra(()=>import("./go-5tF-fl5m.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Ra(()=>import("./graphql-Hw_-CHyi.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Ra(()=>import("./handlebars-MvByOAAn.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Ra(()=>import("./hcl-MnPuh_ws.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>Ra(()=>import("./html-sxitC7lO.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Ra(()=>import("./ini-T6G25OpR.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Ra(()=>import("./java-C07s_84Q.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Ra(()=>import("./javascript-G8ibxNWS.js"),__vite__mapDeps([0,1]),import.meta.url)});Qa({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Ra(()=>import("./julia--X05kqT1.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Ra(()=>import("./kotlin--IhbTNF1.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Ra(()=>import("./less-88EdC67M.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Ra(()=>import("./lexon-MniWR1bD.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Ra(()=>import("./lua-bYlw05oY.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Ra(()=>import("./liquid-Zy35w6eA.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Ra(()=>import("./m3-xCaP759r.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Ra(()=>import("./markdown-rVkZudBB.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Ra(()=>import("./mips-SX-ofX2G.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Ra(()=>import("./msdax-46cGZiec.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Ra(()=>import("./mysql-cPR6LtRV.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Ra(()=>import("./objective-c-yVw_ot58.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Ra(()=>import("./pascal-gPd3YvqG.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Ra(()=>import("./pascaligo-qpmQPZ0u.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Ra(()=>import("./perl-Uj6qonV_.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Ra(()=>import("./pgsql-FwQ7fWHR.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Ra(()=>import("./php-ox1RFQl1.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pla",extensions:[".pla"],loader:()=>Ra(()=>import("./pla-ioQoEAH2.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Ra(()=>import("./postiats-rFhTgJ-3.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Ra(()=>import("./powerquery-SBeRwa7q.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Ra(()=>import("./powershell-BVxa2I_X.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Ra(()=>import("./protobuf-S72h9uI3.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Ra(()=>import("./pug-pFYpmxCe.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Ra(()=>import("./python-7RWCIHCj.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Ra(()=>import("./qsharp-dJE40yG7.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Ra(()=>import("./r-q7JnwB0_.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Ra(()=>import("./razor-JV-AagFB.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Ra(()=>import("./redis-OCMhus96.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Ra(()=>import("./redshift-3M8Qbba0.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Ra(()=>import("./restructuredtext-iqrCt4Jk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Ra(()=>import("./ruby-nMCbZKZv.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Ra(()=>import("./rust-rRUnz4oa.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Ra(()=>import("./sb-POjlrAmS.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>Ra(()=>import("./scala-eSAX5k-i.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Ra(()=>import("./scheme-MY7XLAOe.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Ra(()=>import("./scss-Ecf6GBR7.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Ra(()=>import("./shell-mOomC_YS.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Ra(()=>import("./solidity-NVKViCfT.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Ra(()=>import("./sophia-biC4I-9r.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Ra(()=>import("./sparql-mIpgwmxk.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Ra(()=>import("./sql-0FQhBzpL.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>Ra(()=>import("./st-kZml91n2.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Ra(()=>import("./swift-s7cwkShL.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Ra(()=>import("./systemverilog-rnL6ckdb.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Ra(()=>import("./systemverilog-rnL6ckdb.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Ra(()=>import("./tcl-jAg7ZMBy.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Ra(()=>import("./twig-_mSnF2--.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Ra(()=>import("./typescript-2sy1hHBH.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Ra(()=>import("./vb-duaPIj24.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Ra(()=>import("./wgsl-w-NQ_iIh.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Ra(()=>import("./xml-W8IHW2kN.js"),__vite__mapDeps([]),import.meta.url)});Qa({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Ra(()=>import("./yaml-_k6aUJBN.js"),__vite__mapDeps([]),import.meta.url)});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var l9i=Object.defineProperty,c9i=Object.getOwnPropertyDescriptor,d9i=Object.getOwnPropertyNames,h9i=Object.prototype.hasOwnProperty,mDt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of d9i(e))!h9i.call(r,a)&&a!==i&&l9i(r,a,{get:()=>e[a],enumerable:!(n=c9i(e,a))||n.enumerable});return r},f9i=(r,e,i)=>(mDt(r,e,"default"),i&&mDt(i,e,"default")),T$={};f9i(T$,Iae);var I$e=class{constructor(e,i,n){zc(this,"_onDidChange",new T$.Emitter);zc(this,"_options");zc(this,"_modeConfiguration");zc(this,"_languageId");this._languageId=e,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},R$e={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},O$e={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},jyt=new I$e("css",R$e,O$e),Vyt=new I$e("scss",R$e,O$e),Hyt=new I$e("less",R$e,O$e);T$.languages.css={cssDefaults:jyt,lessDefaults:Hyt,scssDefaults:Vyt};function j$e(){return Ra(()=>import("./cssMode--K6PoFD1.js"),__vite__mapDeps([]),import.meta.url)}T$.languages.onLanguage("less",()=>{j$e().then(r=>r.setupMode(Hyt))});T$.languages.onLanguage("scss",()=>{j$e().then(r=>r.setupMode(Vyt))});T$.languages.onLanguage("css",()=>{j$e().then(r=>r.setupMode(jyt))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var l9i=Object.defineProperty,c9i=Object.getOwnPropertyDescriptor,d9i=Object.getOwnPropertyNames,h9i=Object.prototype.hasOwnProperty,mDt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of d9i(e))!h9i.call(r,a)&&a!==i&&l9i(r,a,{get:()=>e[a],enumerable:!(n=c9i(e,a))||n.enumerable});return r},f9i=(r,e,i)=>(mDt(r,e,"default"),i&&mDt(i,e,"default")),T$={};f9i(T$,Iae);var I$e=class{constructor(e,i,n){zc(this,"_onDidChange",new T$.Emitter);zc(this,"_options");zc(this,"_modeConfiguration");zc(this,"_languageId");this._languageId=e,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},R$e={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},O$e={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},jyt=new I$e("css",R$e,O$e),Vyt=new I$e("scss",R$e,O$e),Hyt=new I$e("less",R$e,O$e);T$.languages.css={cssDefaults:jyt,lessDefaults:Hyt,scssDefaults:Vyt};function j$e(){return Ra(()=>import("./cssMode-FMFZ6hYn.js"),__vite__mapDeps([]),import.meta.url)}T$.languages.onLanguage("less",()=>{j$e().then(r=>r.setupMode(Hyt))});T$.languages.onLanguage("scss",()=>{j$e().then(r=>r.setupMode(Vyt))});T$.languages.onLanguage("css",()=>{j$e().then(r=>r.setupMode(jyt))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var m9i=Object.defineProperty,p9i=Object.getOwnPropertyDescriptor,g9i=Object.getOwnPropertyNames,E9i=Object.prototype.hasOwnProperty,pDt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of g9i(e))!E9i.call(r,a)&&a!==i&&m9i(r,a,{get:()=>e[a],enumerable:!(n=p9i(e,a))||n.enumerable});return r},_9i=(r,e,i)=>(pDt(r,e,"default"),i&&pDt(i,e,"default")),Bve={};_9i(Bve,Iae);var D9i=class{constructor(e,i,n){zc(this,"_onDidChange",new Bve.Emitter);zc(this,"_options");zc(this,"_modeConfiguration");zc(this,"_languageId");this._languageId=e,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},x9i={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},wve={format:x9i,suggest:{},data:{useDefaultDataProvider:!0}};function Tve(r){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:r===aue,documentFormattingEdits:r===aue,documentRangeFormattingEdits:r===aue}}var aue="html",gDt="handlebars",EDt="razor",Kyt=Lve(aue,wve,Tve(aue)),v9i=Kyt.defaults,Wyt=Lve(gDt,wve,Tve(gDt)),C9i=Wyt.defaults,Gyt=Lve(EDt,wve,Tve(EDt)),b9i=Gyt.defaults;Bve.languages.html={htmlDefaults:v9i,razorDefaults:b9i,handlebarDefaults:C9i,htmlLanguageService:Kyt,handlebarLanguageService:Wyt,razorLanguageService:Gyt,registerHTMLLanguageService:Lve};function y9i(){return Ra(()=>import("./htmlMode-7ibfD7kC.js"),__vite__mapDeps([]),import.meta.url)}function Lve(r,e=wve,i=Tve(r)){const n=new D9i(r,e,i);let a;const o=Bve.languages.onLanguage(r,async()=>{a=(await y9i()).setupMode(n)});return{defaults:n,dispose(){o.dispose(),a==null||a.dispose(),a=void 0}}}/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var m9i=Object.defineProperty,p9i=Object.getOwnPropertyDescriptor,g9i=Object.getOwnPropertyNames,E9i=Object.prototype.hasOwnProperty,pDt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of g9i(e))!E9i.call(r,a)&&a!==i&&m9i(r,a,{get:()=>e[a],enumerable:!(n=p9i(e,a))||n.enumerable});return r},_9i=(r,e,i)=>(pDt(r,e,"default"),i&&pDt(i,e,"default")),Bve={};_9i(Bve,Iae);var D9i=class{constructor(e,i,n){zc(this,"_onDidChange",new Bve.Emitter);zc(this,"_options");zc(this,"_modeConfiguration");zc(this,"_languageId");this._languageId=e,this.setOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},x9i={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},wve={format:x9i,suggest:{},data:{useDefaultDataProvider:!0}};function Tve(r){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:r===aue,documentFormattingEdits:r===aue,documentRangeFormattingEdits:r===aue}}var aue="html",gDt="handlebars",EDt="razor",Kyt=Lve(aue,wve,Tve(aue)),v9i=Kyt.defaults,Wyt=Lve(gDt,wve,Tve(gDt)),C9i=Wyt.defaults,Gyt=Lve(EDt,wve,Tve(EDt)),b9i=Gyt.defaults;Bve.languages.html={htmlDefaults:v9i,razorDefaults:b9i,handlebarDefaults:C9i,htmlLanguageService:Kyt,handlebarLanguageService:Wyt,razorLanguageService:Gyt,registerHTMLLanguageService:Lve};function y9i(){return Ra(()=>import("./htmlMode-lYQslN8f.js"),__vite__mapDeps([]),import.meta.url)}function Lve(r,e=wve,i=Tve(r)){const n=new D9i(r,e,i);let a;const o=Bve.languages.onLanguage(r,async()=>{a=(await y9i()).setupMode(n)});return{defaults:n,dispose(){o.dispose(),a==null||a.dispose(),a=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var k9i=Object.defineProperty,F9i=Object.getOwnPropertyDescriptor,A9i=Object.getOwnPropertyNames,S9i=Object.prototype.hasOwnProperty,_Dt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of A9i(e))!S9i.call(r,a)&&a!==i&&k9i(r,a,{get:()=>e[a],enumerable:!(n=F9i(e,a))||n.enumerable});return r},B9i=(r,e,i)=>(_Dt(r,e,"default"),i&&_Dt(i,e,"default")),Rae={};B9i(Rae,Iae);var w9i=class{constructor(e,i,n){zc(this,"_onDidChange",new Rae.Emitter);zc(this,"_diagnosticsOptions");zc(this,"_modeConfiguration");zc(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},T9i={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},L9i={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Jyt=new w9i("json",T9i,L9i);Rae.languages.json={jsonDefaults:Jyt};function N9i(){return Ra(()=>import("./jsonMode-gyZTIlQx.js"),__vite__mapDeps([]),import.meta.url)}Rae.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});Rae.languages.onLanguage("json",()=>{N9i().then(r=>r.setupMode(Jyt))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var k9i=Object.defineProperty,F9i=Object.getOwnPropertyDescriptor,A9i=Object.getOwnPropertyNames,S9i=Object.prototype.hasOwnProperty,_Dt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of A9i(e))!S9i.call(r,a)&&a!==i&&k9i(r,a,{get:()=>e[a],enumerable:!(n=F9i(e,a))||n.enumerable});return r},B9i=(r,e,i)=>(_Dt(r,e,"default"),i&&_Dt(i,e,"default")),Rae={};B9i(Rae,Iae);var w9i=class{constructor(e,i,n){zc(this,"_onDidChange",new Rae.Emitter);zc(this,"_diagnosticsOptions");zc(this,"_modeConfiguration");zc(this,"_languageId");this._languageId=e,this.setDiagnosticsOptions(i),this.setModeConfiguration(n)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},T9i={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},L9i={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Jyt=new w9i("json",T9i,L9i);Rae.languages.json={jsonDefaults:Jyt};function N9i(){return Ra(()=>import("./jsonMode-GZTrdMHu.js"),__vite__mapDeps([]),import.meta.url)}Rae.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});Rae.languages.onLanguage("json",()=>{N9i().then(r=>r.setupMode(Jyt))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var P9i=Object.defineProperty,M9i=Object.getOwnPropertyDescriptor,z9i=Object.getOwnPropertyNames,I9i=Object.prototype.hasOwnProperty,DDt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of z9i(e))!I9i.call(r,a)&&a!==i&&P9i(r,a,{get:()=>e[a],enumerable:!(n=M9i(e,a))||n.enumerable});return r},R9i=(r,e,i)=>(DDt(r,e,"default"),i&&DDt(i,e,"default")),O9i="5.0.2",u$={};R9i(u$,Iae);var $yt=(r=>(r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext",r))($yt||{}),Uyt=(r=>(r[r.None=0]="None",r[r.Preserve=1]="Preserve",r[r.React=2]="React",r[r.ReactNative=3]="ReactNative",r[r.ReactJSX=4]="ReactJSX",r[r.ReactJSXDev=5]="ReactJSXDev",r))(Uyt||{}),qyt=(r=>(r[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed",r))(qyt||{}),Zyt=(r=>(r[r.ES3=0]="ES3",r[r.ES5=1]="ES5",r[r.ES2015=2]="ES2015",r[r.ES2016=3]="ES2016",r[r.ES2017=4]="ES2017",r[r.ES2018=5]="ES2018",r[r.ES2019=6]="ES2019",r[r.ES2020=7]="ES2020",r[r.ESNext=99]="ESNext",r[r.JSON=100]="JSON",r[r.Latest=99]="Latest",r))(Zyt||{}),Yyt=(r=>(r[r.Classic=1]="Classic",r[r.NodeJs=2]="NodeJs",r))(Yyt||{}),Qyt=class{constructor(r,e,i,n,a){zc(this,"_onDidChange",new u$.Emitter);zc(this,"_onDidExtraLibsChange",new u$.Emitter);zc(this,"_extraLibs");zc(this,"_removedExtraLibs");zc(this,"_eagerModelSync");zc(this,"_compilerOptions");zc(this,"_diagnosticsOptions");zc(this,"_workerOptions");zc(this,"_onDidExtraLibsChangeTimeout");zc(this,"_inlayHintsOptions");zc(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(r),this.setDiagnosticsOptions(e),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(a),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(r,e){let i;if(typeof e>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=e,this._extraLibs[i]&&this._extraLibs[i].content===r)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:r,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let a=this._extraLibs[i];a&&a.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(r){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),r&&r.length>0)for(const e of r){const i=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let a=1;this._removedExtraLibs[i]&&(a=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:a}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(r){this._compilerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(r){this._diagnosticsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(r){this._workerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(r){this._inlayHintsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(r){}setEagerModelSync(r){this._eagerModelSync=r}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(r){this._modeConfiguration=r||Object.create(null),this._onDidChange.fire(void 0)}},j9i=O9i,Xyt={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},ekt=new Qyt({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},Xyt),tkt=new Qyt({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},Xyt),V9i=()=>Nve().then(r=>r.getTypeScriptWorker()),H9i=()=>Nve().then(r=>r.getJavaScriptWorker());u$.languages.typescript={ModuleKind:$yt,JsxEmit:Uyt,NewLineKind:qyt,ScriptTarget:Zyt,ModuleResolutionKind:Yyt,typescriptVersion:j9i,typescriptDefaults:ekt,javascriptDefaults:tkt,getTypeScriptWorker:V9i,getJavaScriptWorker:H9i};function Nve(){return Ra(()=>import("./tsMode-721bft5-.js"),__vite__mapDeps([]),import.meta.url)}u$.languages.onLanguage("typescript",()=>Nve().then(r=>r.setupTypeScript(ekt)));u$.languages.onLanguage("javascript",()=>Nve().then(r=>r.setupJavaScript(tkt)));var K9i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},W9i=function(r,e){return function(i,n){e(i,n,r)}},Pve=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const Mve=new Kr("selectionAnchorSet",!1);let u8=class ikt{static get(e){return e.getContribution(ikt.ID)}constructor(e,i){this.editor=e,this.selectionAnchorSetContextKey=Mve.bindTo(i),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(i=>{this.decorationId&&i.removeDecoration(this.decorationId),this.decorationId=i.addDecoration(Ea.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new M3().appendText(V("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),vp(V("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const i=this.editor.getPosition();this.editor.setSelection(Ea.fromPositions(e.getStartPosition(),i)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(i=>{i.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};u8.ID="editor.contrib.selectionAnchorController";u8=K9i([W9i(1,Wo)],u8);class G9i extends Vr{constructor(){super({id:"editor.action.setSelectionAnchor",label:V("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:Rt.editorTextFocus,primary:Fm(2089,2080),weight:100}})}run(e,i){var n;return Pve(this,void 0,void 0,function*(){(n=u8.get(i))===null||n===void 0||n.setSelectionAnchor()})}}class J9i extends Vr{constructor(){super({id:"editor.action.goToSelectionAnchor",label:V("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Mve})}run(e,i){var n;return Pve(this,void 0,void 0,function*(){(n=u8.get(i))===null||n===void 0||n.goToSelectionAnchor()})}}class $9i extends Vr{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:V("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Mve,kbOpts:{kbExpr:Rt.editorTextFocus,primary:Fm(2089,2089),weight:100}})}run(e,i){var n;return Pve(this,void 0,void 0,function*(){(n=u8.get(i))===null||n===void 0||n.selectFromAnchorToCursor()})}}class U9i extends Vr{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:V("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Mve,kbOpts:{kbExpr:Rt.editorTextFocus,primary:9,weight:100}})}run(e,i){var n;return Pve(this,void 0,void 0,function*(){(n=u8.get(i))===null||n===void 0||n.cancelSelectionAnchor()})}}fl(u8.ID,u8,4);Cu(G9i);Cu(J9i);Cu($9i);Cu(U9i);const q9i=Jt("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},V("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Z9i extends Vr{constructor(){super({id:"editor.action.jumpToBracket",label:V("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:Rt.editorTextFocus,primary:3160,weight:100}})}run(e,i){var n;(n=qC.get(i))===null||n===void 0||n.jumpToBracket()}}class Y9i extends Vr{constructor(){super({id:"editor.action.selectToBracket",label:V("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,i,n){var a;let o=!0;n&&n.selectBrackets===!1&&(o=!1),(a=qC.get(i))===null||a===void 0||a.selectToBracket(o)}}class Q9i extends Vr{constructor(){super({id:"editor.action.removeBrackets",label:V("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:Rt.editorTextFocus,primary:2561,weight:100}})}run(e,i){var n;(n=qC.get(i))===null||n===void 0||n.removeBrackets(this.id)}}class X9i{constructor(e,i,n){this.position=e,this.brackets=i,this.options=n}}class qC extends sn{static get(e){return e.getContribution(qC.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Zc(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(i=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(i=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(i=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(i=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(i=>{i.hasChanged(69)&&(this._matchBrackets=this._editor.getOption(69),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),i=this._editor.getSelections().map(n=>{const a=n.getStartPosition(),o=e.bracketPairs.matchBracket(a);let c=null;if(o)o[0].containsPosition(a)&&!o[1].containsPosition(a)?c=o[1].getStartPosition():o[1].containsPosition(a)&&(c=o[0].getStartPosition());else{const h=e.bracketPairs.findEnclosingBrackets(a);if(h)c=h[1].getStartPosition();else{const g=e.bracketPairs.findNextBracket(a);g&&g.range&&(c=g.range.getStartPosition())}}return c?new Ea(c.lineNumber,c.column,c.lineNumber,c.column):new Ea(a.lineNumber,a.column,a.lineNumber,a.column)});this._editor.setSelections(i),this._editor.revealRange(i[0])}selectToBracket(e){if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=[];this._editor.getSelections().forEach(a=>{const o=a.getStartPosition();let c=i.bracketPairs.matchBracket(o);if(!c&&(c=i.bracketPairs.findEnclosingBrackets(o),!c)){const _=i.bracketPairs.findNextBracket(o);_&&_.range&&(c=i.bracketPairs.matchBracket(_.range.getStartPosition()))}let h=null,g=null;if(c){c.sort(ot.compareRangesUsingStarts);const[_,x]=c;if(h=e?_.getStartPosition():_.getEndPosition(),g=e?x.getEndPosition():x.getStartPosition(),x.containsPosition(o)){const y=h;h=g,g=y}}h&&g&&n.push(new Ea(h.lineNumber,h.column,g.lineNumber,g.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const i=this._editor.getModel();this._editor.getSelections().forEach(n=>{const a=n.getPosition();let o=i.bracketPairs.matchBracket(a);o||(o=i.bracketPairs.findEnclosingBrackets(a)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let i=0;for(const n of this._lastBracketsData){const a=n.brackets;a&&(e[i++]={range:a[0],options:n.options},e[i++]={range:a[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const i=this._editor.getModel(),n=i.getVersionId();let a=[];this._lastVersionId===n&&(a=this._lastBracketsData);const o=[];let c=0;for(let y=0,S=e.length;y1&&o.sort(Vi.compare);const h=[];let g=0,_=0;const x=a.length;for(let y=0,S=o.length;y0&&(i.pushUndoStop(),i.executeCommands(this.id,a),i.pushUndoStop())}}Cu(nSi);var uSi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const vR="9_cutcopypaste",rSi=gy||document.queryCommandSupported("cut"),ukt=gy||document.queryCommandSupported("copy"),aSi=typeof navigator.clipboard>"u"||q6?document.queryCommandSupported("paste"):!0;function V$e(r){return r.register(),r}const oSi=rSi?V$e(new b$({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:gy?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Ht.MenubarEditMenu,group:"2_ccp",title:V({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Ht.EditorContext,group:vR,title:V("actions.clipboard.cutLabel","Cut"),when:Rt.writable,order:1},{menuId:Ht.CommandPalette,group:"",title:V("actions.clipboard.cutLabel","Cut"),order:1},{menuId:Ht.SimpleEditorContext,group:vR,title:V("actions.clipboard.cutLabel","Cut"),when:Rt.writable,order:1}]})):void 0,sSi=ukt?V$e(new b$({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:gy?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Ht.MenubarEditMenu,group:"2_ccp",title:V({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Ht.EditorContext,group:vR,title:V("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Ht.CommandPalette,group:"",title:V("actions.clipboard.copyLabel","Copy"),order:1},{menuId:Ht.SimpleEditorContext,group:vR,title:V("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;IE.appendMenuItem(Ht.MenubarEditMenu,{submenu:Ht.MenubarCopy,title:{value:V("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});IE.appendMenuItem(Ht.EditorContext,{submenu:Ht.EditorContextCopy,title:{value:V("copy as","Copy As"),original:"Copy As"},group:vR,order:3});IE.appendMenuItem(Ht.EditorContext,{submenu:Ht.EditorContextShare,title:{value:V("share","Share"),original:"Share"},group:"11_share",order:-1,when:pu.and(pu.notEquals("resourceScheme","output"),Rt.editorTextFocus)});IE.appendMenuItem(Ht.EditorTitleContext,{submenu:Ht.EditorTitleContextShare,title:{value:V("share","Share"),original:"Share"},group:"11_share",order:-1});IE.appendMenuItem(Ht.ExplorerContext,{submenu:Ht.ExplorerContextShare,title:{value:V("share","Share"),original:"Share"},group:"11_share",order:-1});const RRe=aSi?V$e(new b$({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:gy?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Ht.MenubarEditMenu,group:"2_ccp",title:V({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:Ht.EditorContext,group:vR,title:V("actions.clipboard.pasteLabel","Paste"),when:Rt.writable,order:4},{menuId:Ht.CommandPalette,group:"",title:V("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:Ht.SimpleEditorContext,group:vR,title:V("actions.clipboard.pasteLabel","Paste"),when:Rt.writable,order:4}]})):void 0;class lSi extends Vr{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:V("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:Rt.textInputFocus,primary:0,weight:100}})}run(e,i){!i.hasModel()||!i.getOption(35)&&i.getSelection().isEmpty()||(TVe.forceCopyWithSyntaxHighlighting=!0,i.focus(),document.execCommand("copy"),TVe.forceCopyWithSyntaxHighlighting=!1)}}function rkt(r,e){r&&(r.addImplementation(1e4,"code-editor",(i,n)=>{const a=i.get(wl).getFocusedCodeEditor();if(a&&a.hasTextFocus()){const o=a.getOption(35),c=a.getSelection();return c&&c.isEmpty()&&!o||document.execCommand(e),!0}return!1}),r.addImplementation(0,"generic-dom",(i,n)=>(document.execCommand(e),!0)))}rkt(oSi,"cut");rkt(sSi,"copy");RRe&&(RRe.addImplementation(1e4,"code-editor",(r,e)=>{const i=r.get(wl),n=r.get(d8),a=i.getFocusedCodeEditor();return a&&a.hasTextFocus()?!document.execCommand("paste")&&uN?uSi(void 0,void 0,void 0,function*(){const c=yield n.readText();if(c!==""){const h=Uue.INSTANCE.get(c);let g=!1,_=null,x=null;h&&(g=a.getOption(35)&&!!h.isFromEmptySelection,_=typeof h.multicursorText<"u"?h.multicursorText:null,x=h.mode),a.trigger("keyboard","paste",{text:c,pasteOnNewLine:g,multicursorText:_,mode:x})}}):!0:!1}),RRe.addImplementation(0,"generic-dom",(r,e)=>(document.execCommand("paste"),!0)));ukt&&Cu(lSi);var cSi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class es{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+es.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new es(this.value+es.sep+e)}}es.sep=".";es.None=new es("@@none@@");es.Empty=new es("");es.QuickFix=new es("quickfix");es.Refactor=new es("refactor");es.RefactorExtract=es.Refactor.append("extract");es.RefactorInline=es.Refactor.append("inline");es.RefactorMove=es.Refactor.append("move");es.RefactorRewrite=es.Refactor.append("rewrite");es.Source=new es("source");es.SourceOrganizeImports=es.Source.append("organizeImports");es.SourceFixAll=es.Source.append("fixAll");es.SurroundWith=es.Refactor.append("surround");var Ex;(function(r){r.Refactor="refactor",r.RefactorPreview="refactor preview",r.Lightbulb="lightbulb",r.Default="other (default)",r.SourceAction="source action",r.QuickFix="quick fix action",r.FixAll="fix all",r.OrganizeImports="organize imports",r.AutoFix="auto fix",r.QuickFixHover="quick fix hover window",r.OnSave="save participants",r.ProblemsView="problems view"})(Ex||(Ex={}));function dSi(r,e){return!(r.include&&!r.include.intersects(e)||r.excludes&&r.excludes.some(i=>akt(e,i,r.include))||!r.includeSourceActions&&es.Source.contains(e))}function hSi(r,e){const i=e.kind?new es(e.kind):void 0;return!(r.include&&(!i||!r.include.contains(i))||r.excludes&&i&&r.excludes.some(n=>akt(i,n,r.include))||!r.includeSourceActions&&i&&es.Source.contains(i)||r.onlyIncludePreferredActions&&!e.isPreferred)}function akt(r,e,i){return!(!e.contains(r)||i&&e.contains(i))}class nA{static fromUser(e,i){return!e||typeof e!="object"?new nA(i.kind,i.apply,!1):new nA(nA.getKindFromUser(e,i.kind),nA.getApplyFromUser(e,i.apply),nA.getPreferredUser(e))}static getApplyFromUser(e,i){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return i}}static getKindFromUser(e,i){return typeof e.kind=="string"?new es(e.kind):i}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,i,n){this.kind=e,this.apply=i,this.preferred=n}}class fSi{constructor(e,i){this.action=e,this.provider=i}resolve(e){var i;return cSi(this,void 0,void 0,function*(){if(!((i=this.provider)===null||i===void 0)&&i.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(a){z4(a)}n&&(this.action.edit=n.edit)}return this})}}var Dxe=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const okt="editor.action.codeAction",H$e="editor.action.quickFix",skt="editor.action.autoFix",lkt="editor.action.refactor",ckt="editor.action.sourceAction",K$e="editor.action.organizeImports",W$e="editor.action.fixAll";class oue extends sn{static codeActionsPreferredComparator(e,i){return e.isPreferred&&!i.isPreferred?-1:!e.isPreferred&&i.isPreferred?1:0}static codeActionsComparator({action:e},{action:i}){return Kg(e.diagnostics)?Kg(i.diagnostics)?oue.codeActionsPreferredComparator(e,i):-1:Kg(i.diagnostics)?1:oue.codeActionsPreferredComparator(e,i)}constructor(e,i,n){super(),this.documentation=i,this._register(n),this.allActions=[...e].sort(oue.codeActionsComparator),this.validActions=this.allActions.filter(({action:a})=>!a.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&es.QuickFix.contains(new es(e.kind))&&!!e.isPreferred)}}const xDt={actions:[],documentation:void 0};function G$e(r,e,i,n,a,o){var c;return Dxe(this,void 0,void 0,function*(){const h=n.filter||{},g={only:(c=h.include)===null||c===void 0?void 0:c.value,trigger:n.type},_=new M$e(e,o),x=mSi(r,e,h),y=new du,S=x.map(O=>Dxe(this,void 0,void 0,function*(){try{a.report(O);const G=yield O.provideCodeActions(e,i,g,_.token);if(G&&y.add(G),_.token.isCancellationRequested)return xDt;const ie=((G==null?void 0:G.actions)||[]).filter(re=>re&&hSi(h,re)),ue=gSi(O,ie,h.include);return{actions:ie.map(re=>new fSi(re,O)),documentation:ue}}catch(G){if(Ny(G))throw G;return z4(G),xDt}})),L=r.onDidChange(()=>{const O=r.all(e);tg(O,x)||_.cancel()});try{const O=yield Promise.all(S),G=O.map(ue=>ue.actions).flat(),ie=[..._$(O.map(ue=>ue.documentation)),...pSi(r,e,n,G)];return new oue(G,ie,y)}finally{L.dispose(),_.dispose()}})}function mSi(r,e,i){return r.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(a=>dSi(i,new es(a))):!0)}function*pSi(r,e,i,n){var a,o,c;if(e&&n.length)for(const h of r.all(e))h._getAdditionalMenuItems&&(yield*(a=h._getAdditionalMenuItems)===null||a===void 0?void 0:a.call(h,{trigger:i.type,only:(c=(o=i.filter)===null||o===void 0?void 0:o.include)===null||c===void 0?void 0:c.value},n.map(g=>g.action)))}function gSi(r,e,i){if(!r.documentation)return;const n=r.documentation.map(a=>({kind:new es(a.kind),command:a.command}));if(i){let a;for(const o of n)o.kind.contains(i)&&(a?a.kind.contains(o.kind)&&(a=o):a=o);if(a)return a==null?void 0:a.command}for(const a of e)if(a.kind){for(const o of n)if(o.kind.contains(new es(a.kind)))return o.command}}var xxe;(function(r){r.OnSave="onSave",r.FromProblemsView="fromProblemsView",r.FromCodeActions="fromCodeActions"})(xxe||(xxe={}));function ESi(r,e,i,n,a=g0.None){var o;return Dxe(this,void 0,void 0,function*(){const c=r.get(Tae),h=r.get(Zh),g=r.get(nv),_=r.get(Lf);if(g.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:i}),yield e.resolve(a),!a.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield c.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==xxe.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield h.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(x){const y=_Si(x);_.error(typeof y=="string"?y:V("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function _Si(r){return typeof r=="string"?r:r instanceof Error&&typeof r.message=="string"?r.message:void 0}O0.registerCommand("_executeCodeActionProvider",function(r,e,i,n,a){return Dxe(this,void 0,void 0,function*(){if(!(e instanceof to))throw cx();const{codeActionProvider:o}=r.get(ma),c=r.get(lh).getModel(e);if(!c)throw cx();const h=Ea.isISelection(i)?Ea.liftSelection(i):ot.isIRange(i)?c.validateRange(i):void 0;if(!h)throw cx();const g=typeof n=="string"?new es(n):void 0,_=yield G$e(o,c,h,{type:1,triggerAction:Ex.Default,filter:{includeSourceActions:!0,include:g}},XR.None,g0.None),x=[],y=Math.min(_.validActions.length,typeof a=="number"?a:0);for(let S=0;SS.action)}finally{setTimeout(()=>_.dispose(),100)}})});var DSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},xSi=function(r,e){return function(i,n){e(i,n,r)}};let vxe=class dkt{constructor(e){this.keybindingService=e}getResolver(){const e=new oN(()=>this.keybindingService.getKeybindings().filter(i=>dkt.codeActionCommands.indexOf(i.command)>=0).filter(i=>i.resolvedKeybinding).map(i=>{let n=i.commandArgs;return i.command===K$e?n={kind:es.SourceOrganizeImports.value}:i.command===W$e&&(n={kind:es.SourceFixAll.value}),Object.assign({resolvedKeybinding:i.resolvedKeybinding},nA.fromUser(n,{kind:es.None,apply:"never"}))}));return i=>{if(i.kind){const n=this.bestKeybindingForCodeAction(i,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,i){if(!e.kind)return;const n=new es(e.kind);return i.filter(a=>a.kind.contains(n)).filter(a=>a.preferred?e.isPreferred:!0).reduceRight((a,o)=>a?a.kind.contains(o.kind)?o:a:o,void 0)}};vxe.codeActionCommands=[lkt,okt,ckt,K$e,W$e];vxe=DSi([xSi(0,J1)],vxe);Jt("symbolIcon.arrayForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.booleanForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.colorForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.constantForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.fileForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.folderForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.keyForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.keywordForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.moduleForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.namespaceForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.nullForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.numberForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.objectForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.operatorForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.packageForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.propertyForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.referenceForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.snippetForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.stringForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.structForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.textForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.typeParameterForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.unitForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const hkt=Object.freeze({kind:es.Empty,title:V("codeAction.widget.id.more","More Actions...")}),vSi=Object.freeze([{kind:es.QuickFix,title:V("codeAction.widget.id.quickfix","Quick Fix...")},{kind:es.RefactorExtract,title:V("codeAction.widget.id.extract","Extract..."),icon:dr.wrench},{kind:es.RefactorInline,title:V("codeAction.widget.id.inline","Inline..."),icon:dr.wrench},{kind:es.RefactorRewrite,title:V("codeAction.widget.id.convert","Rewrite..."),icon:dr.wrench},{kind:es.RefactorMove,title:V("codeAction.widget.id.move","Move..."),icon:dr.wrench},{kind:es.SurroundWith,title:V("codeAction.widget.id.surround","Surround With..."),icon:dr.symbolSnippet},{kind:es.Source,title:V("codeAction.widget.id.source","Source Action..."),icon:dr.symbolFile},hkt]);function CSi(r,e,i){if(!e)return r.map(o=>({kind:"action",item:o,group:hkt,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));const n=vSi.map(o=>({group:o,actions:[]}));for(const o of r){const c=o.action.kind?new es(o.action.kind):es.None;for(const h of n)if(h.group.kind.contains(c)){h.actions.push(o);break}}const a=[];for(const o of n)if(o.actions.length){a.push({kind:"header",group:o.group});for(const c of o.actions)a.push({kind:"action",item:c,group:o.group,label:c.action.title,disabled:!!c.action.disabled,keybinding:i(c.action)})}return a}var bSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},ySi=function(r,e){return function(i,n){e(i,n,r)}};let GD=class cKe{static get(e){return e.getContribution(cKe.ID)}constructor(e,i){this._messageWidget=new M4,this._messageListeners=new du,this._editor=e,this._visible=cKe.MESSAGE_VISIBLE.bindTo(i)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,i){vp(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new vDt(this._editor,i,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new tv(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(a=>{a.target.position&&(n?n.containsPosition(a.target.position)||this.closeMessage():n=new ot(i.lineNumber-3,1,a.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(vDt.fadeOut(this._messageWidget.value))}};GD.ID="editor.contrib.messageController";GD.MESSAGE_VISIBLE=new Kr("messageVisible",!1,V("messageVisible","Whether the editor is currently showing an inline message"));GD=bSi([ySi(1,Wo)],GD);const kSi=Fp.bindToContribution(GD.get);Zu(new kSi({id:"leaveEditorMessage",precondition:GD.MESSAGE_VISIBLE,handler:r=>r.closeMessage(),kbOpts:{weight:130,primary:9}}));let vDt=class{static fadeOut(e){const i=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",i)},n=setTimeout(i,110);return e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}constructor(e,{lineNumber:i,column:n},a){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const c=document.createElement("div");c.classList.add("message"),c.textContent=a,this._domNode.appendChild(c);const h=document.createElement("div");h.classList.add("anchor","below"),this._domNode.appendChild(h),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};fl(GD.ID,GD,4);var fkt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},dKe=function(r,e){return function(i,n){e(i,n,r)}};const mkt="acceptSelectedCodeAction",pkt="previewSelectedCodeAction";class FSi{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const i=document.createElement("span");return e.append(i),{container:e,text:i}}renderElement(e,i,n){var a,o;n.text.textContent=(o=(a=e.group)===null||a===void 0?void 0:a.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}}let hKe=class{get templateId(){return"action"}constructor(e,i){this._supportsPreview=e,this._keybindingService=i}renderTemplate(e){e.classList.add(this.templateId);const i=document.createElement("div");i.className="icon",e.append(i);const n=document.createElement("span");n.className="title",e.append(n);const a=new Pae(e,ux);return{container:e,icon:i,text:n,keybinding:a}}renderElement(e,i,n){var a,o,c;if(!((a=e.group)===null||a===void 0)&&a.icon?(n.icon.className=_o.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Lr(e.group.icon.color.id))):(n.icon.className=_o.asClassName(dr.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=gkt(e.label),n.keybinding.set(e.keybinding),r_i(!!e.keybinding,n.keybinding.element);const h=(o=this._keybindingService.lookupKeybinding(mkt))===null||o===void 0?void 0:o.getLabel(),g=(c=this._keybindingService.lookupKeybinding(pkt))===null||c===void 0?void 0:c.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:h&&g?this._supportsPreview?n.container.title=V({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",h,g):n.container.title=V({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",h):n.container.title=""}disposeTemplate(e){}};hKe=fkt([dKe(1,J1)],hKe);class ASi extends UIEvent{constructor(){super("acceptSelectedAction")}}class CDt extends UIEvent{constructor(){super("previewSelectedAction")}}let fKe=class extends sn{constructor(e,i,n,a,o,c){super(),this._delegate=a,this._contextViewService=o,this._keybindingService=c,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const h={getHeight:g=>g.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:g=>g.kind};this._list=this._register(new n2(e,this.domNode,h,[new hKe(i,this._keybindingService),new FSi],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:g=>{if(g.kind==="action"){let _=g.label?gkt(g==null?void 0:g.label):"";return g.disabled&&(_=V({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",_,g.disabled)),_}return null},getWidgetAriaLabel:()=>V({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:g=>g.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(eO),this._register(this._list.onMouseClick(g=>this.onListClick(g))),this._register(this._list.onMouseOver(g=>this.onListHover(g))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(g=>this.onListSelection(g))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){const i=this._allMenuItems.filter(_=>_.kind==="header").length,a=this._allMenuItems.length*this._actionLineHeight+i*this._headerLineHeight-i*this._actionLineHeight;this._list.layout(a);const o=this._allMenuItems.map((_,x)=>{const y=document.getElementById(this._list.getElementID(x));if(y){y.style.width="auto";const S=y.getBoundingClientRect().width;return y.style.width="",S}return 0}),c=Math.max(...o,e),g=Math.min(a,document.body.clientHeight*.7);return this._list.layout(g,c),this.domNode.style.height=`${g}px`,this._list.domFocus(),c}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const i=this._list.getFocus();if(i.length===0)return;const n=i[0],a=this._list.element(n);if(!this.focusCondition(a))return;const o=e?new CDt:new ASi;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;const i=e.elements[0];i.item&&this.focusCondition(i)?this._delegate.onSelect(i.item,e.browserEvent instanceof CDt):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};fKe=fkt([dKe(4,h8),dKe(5,J1)],fKe);function gkt(r){return r.replace(/\r\n|\r|\n/g," ")}var SSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},ORe=function(r,e){return function(i,n){e(i,n,r)}};const CR={Visible:new Kr("codeActionMenuVisible",!1,V("codeActionMenuVisible","Whether the action widget list is visible"))},nO=y0("actionWidgetService");let bR=class extends sn{get isVisible(){return CR.Visible.getValue(this._contextKeyService)||!1}constructor(e,i,n){super(),this._contextViewService=e,this._contextKeyService=i,this._instantiationService=n,this._list=this._register(new M4)}show(e,i,n,a,o,c,h){const g=CR.Visible.bindTo(this._contextKeyService),_=this._instantiationService.createInstance(fKe,e,i,n,a);this._contextViewService.showContextView({getAnchor:()=>o,render:x=>(g.set(!0),this._renderWidget(x,_,h??[])),onHide:x=>{g.reset(),this._onWidgetClosed(x)}},c,!1)}acceptSelected(e){var i;(i=this._list.value)===null||i===void 0||i.acceptSelected(e)}focusPrevious(){var e,i;(i=(e=this._list)===null||e===void 0?void 0:e.value)===null||i===void 0||i.focusPrevious()}focusNext(){var e,i;(i=(e=this._list)===null||e===void 0?void 0:e.value)===null||i===void 0||i.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,i,n){var a;const o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=i,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");const c=new du,h=document.createElement("div"),g=e.appendChild(h);g.classList.add("context-view-block"),c.add(Vn(g,wr.MOUSE_DOWN,O=>O.stopPropagation()));const _=document.createElement("div"),x=e.appendChild(_);x.classList.add("context-view-pointerBlock"),c.add(Vn(x,wr.POINTER_MOVE,()=>x.remove())),c.add(Vn(x,wr.MOUSE_DOWN,()=>x.remove()));let y=0;if(n.length){const O=this._createActionBar(".action-widget-action-bar",n);O&&(o.appendChild(O.getContainer().parentElement),c.add(O),y=O.getContainer().offsetWidth)}const S=(a=this._list.value)===null||a===void 0?void 0:a.layout(y);o.style.width=`${S}px`;const L=c.add(i8(e));return c.add(L.onDidBlur(()=>this.hide())),c}_createActionBar(e,i){if(!i.length)return;const n=Pu(e),a=new ev(n);return a.push(i,{icon:!1,label:!0}),a}_onWidgetClosed(e){var i;(i=this._list.value)===null||i===void 0||i.hide(e)}};bR=SSi([ORe(0,h8),ORe(1,Wo),ORe(2,Ds)],bR);Z0(nO,bR,1);const Oae=1100;Am(class extends l8{constructor(){super({id:"hideCodeActionWidget",title:{value:V("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:CR.Visible,keybinding:{weight:Oae,primary:9,secondary:[1033]}})}run(r){r.get(nO).hide()}});Am(class extends l8{constructor(){super({id:"selectPrevCodeAction",title:{value:V("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:CR.Visible,keybinding:{weight:Oae,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(r){const e=r.get(nO);e instanceof bR&&e.focusPrevious()}});Am(class extends l8{constructor(){super({id:"selectNextCodeAction",title:{value:V("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:CR.Visible,keybinding:{weight:Oae,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(r){const e=r.get(nO);e instanceof bR&&e.focusNext()}});Am(class extends l8{constructor(){super({id:mkt,title:{value:V("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:CR.Visible,keybinding:{weight:Oae,primary:3,secondary:[2132]}})}run(r){const e=r.get(nO);e instanceof bR&&e.acceptSelected()}});Am(class extends l8{constructor(){super({id:pkt,title:{value:V("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:CR.Visible,keybinding:{weight:Oae,primary:2051}})}run(r){const e=r.get(nO);e instanceof bR&&e.acceptSelected(!0)}});var BSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},wSi=function(r,e){return function(i,n){e(i,n,r)}},HG;(function(r){r.Hidden={type:0};class e{constructor(n,a,o,c){this.actions=n,this.trigger=a,this.editorPosition=o,this.widgetPosition=c,this.type=1}}r.Showing=e})(HG||(HG={}));let yR=class Ekt extends sn{constructor(e,i){super(),this._editor=e,this._onClick=this._register(new yi),this.onClick=this._onClick.event,this._state=HG.Hidden,this._domNode=Pu("div.lightBulbWidget"),this._register(md.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const a=this._editor.getModel();(this.state.type!==1||!a||this.state.editorPosition.lineNumber>=a.getLineCount())&&this.hide()})),this._register(UEi(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:a,height:o}=N4(this._domNode),c=this._editor.getOption(64);let h=Math.floor(c/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(Ia.runAndSubscribe(i.onDidUpdateKeybindings,()=>{var n,a;this._preferredKbLabel=xp((n=i.lookupKeybinding(skt))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=xp((a=i.lookupKeybinding(H$e))===null||a===void 0?void 0:a.getLabel()),this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,i,n){if(e.validActions.length<=0)return this.hide();const a=this._editor.getOptions();if(!a.get(62).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:c,column:h}=o.validatePosition(n),g=o.getOptions().tabSize,_=a.get(48),x=o.getLineContent(c),y=ive(x,g),S=_.spaceWidth*y>22,L=G=>G>2&&this._editor.getTopForLineNumber(G)===this._editor.getTopForLineNumber(G-1);let O=c;if(!S){if(c>1&&!L(c-1))O-=1;else if(!L(c+1))O+=1;else if(h*_.spaceWidth<22)return this.hide()}this.state=new HG.Showing(e,i,n,{position:{lineNumber:O,column:1},preference:Ekt._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==HG.Hidden&&(this.state=HG.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(..._o.asClassNameArray(dr.lightBulb)),this._domNode.classList.add(..._o.asClassNameArray(dr.lightbulbAutofix)),this._preferredKbLabel)){this.title=V("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(..._o.asClassNameArray(dr.lightbulbAutofix)),this._domNode.classList.add(..._o.asClassNameArray(dr.lightBulb)),this._quickFixKbLabel?this.title=V("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=V("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};yR.ID="editor.contrib.lightbulbWidget";yR._posPref=[0];yR=BSi([wSi(1,J1)],yR);var TSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},f3e=function(r,e){return function(i,n){e(i,n,r)}},jRe=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})},LSi=function(r,e,i,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(r,i):a?a.value=i:e.set(r,i),i},NSi=function(r,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(r):n?n.value:e.get(r)},xDe;let mKe=class extends sn{constructor(e,i,n,a,o,c){super(),this._editor=e,this.delegate=i,this._configurationService=a,this._actionWidgetService=o,this._commandService=c,this._activeCodeActions=this._register(new M4),xDe.set(this,!1),this._showDisabled=!1,this._lightBulbWidget=new oN(()=>{const h=this._editor.getContribution(yR.ID);return h&&this._register(h.onClick(g=>this.showCodeActionList(g.actions,g,{includeDisabledActions:!1,fromLightbulb:!0}))),h}),this._resolver=n.createInstance(vxe),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){LSi(this,xDe,!0,"f"),super.dispose()}update(e){var i,n,a,o,c,h,g;return jRe(this,void 0,void 0,function*(){if(e.type!==1){(i=this._lightBulbWidget.rawValue)===null||i===void 0||i.hide();return}let _;try{_=yield e.actions}catch(x){Bs(x);return}if(!NSi(this,xDe,"f"))if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(_,e.trigger,e.position),e.trigger.type===1){if(!((a=e.trigger.filter)===null||a===void 0)&&a.include){const y=this.tryGetValidActionToApply(e.trigger,_);if(y){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this.delegate.applyCodeAction(y,!1,!1)}finally{_.dispose()}return}if(e.trigger.context){const S=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,_);if(S&&S.action.disabled){(c=GD.get(this._editor))===null||c===void 0||c.showMessage(S.action.disabled,e.trigger.context.position),_.dispose();return}}}const x=!!(!((h=e.trigger.filter)===null||h===void 0)&&h.include);if(e.trigger.context&&(!_.allActions.length||!x&&!_.validActions.length)){(g=GD.get(this._editor))===null||g===void 0||g.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=_,_.dispose();return}this._activeCodeActions.value=_,this.showCodeActionList(_,this.toCoords(e.position),{includeDisabledActions:x,fromLightbulb:!1})}else this._actionWidgetService.isVisible?_.dispose():this._activeCodeActions.value=_})}getInvalidActionThatWouldHaveBeenApplied(e,i){if(i.allActions.length&&(e.autoApply==="first"&&i.validActions.length===0||e.autoApply==="ifSingle"&&i.allActions.length===1))return i.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,i){if(i.validActions.length&&(e.autoApply==="first"&&i.validActions.length>0||e.autoApply==="ifSingle"&&i.validActions.length===1))return i.validActions[0]}showCodeActionList(e,i,n){return jRe(this,void 0,void 0,function*(){const a=this._editor.getDomNode();if(!a)return;const o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;const c=Vi.isIPosition(i)?this.toCoords(i):i,h={onSelect:(g,_)=>jRe(this,void 0,void 0,function*(){this.delegate.applyCodeAction(g,!0,!!_),this._actionWidgetService.hide()}),onHide:()=>{var g;(g=this._editor)===null||g===void 0||g.focus()}};this._actionWidgetService.show("codeActionWidget",!0,CSi(o,this._shouldShowHeaders(),this._resolver.getResolver()),h,c,a,this._getActionBarActions(e,i,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const i=this._editor.getScrolledVisiblePosition(e),n=N4(this._editor.getDomNode()),a=n.left+i.left,o=n.top+i.top+i.height;return{x:a,y:o}}_shouldShowHeaders(){var e;const i=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:i==null?void 0:i.uri})}_getActionBarActions(e,i,n){if(n.fromLightbulb)return[];const a=e.documentation.map(o=>{var c;return{id:o.id,label:o.title,tooltip:(c=o.tooltip)!==null&&c!==void 0?c:"",class:void 0,enabled:!0,run:()=>{var h;return this._commandService.executeCommand(o.id,...(h=o.arguments)!==null&&h!==void 0?h:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&a.push(this._showDisabled?{id:"hideMoreActions",label:V("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,i,n))}:{id:"showMoreActions",label:V("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,i,n))}),a}};xDe=new WeakMap;mKe=TSi([f3e(2,Ds),f3e(3,hl),f3e(4,nO),f3e(5,Zh)],mKe);var VRe=function(r,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(r):n?n.value:e.get(r)},PSi=function(r,e,i,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(r,i):a?a.value=i:e.set(r,i),i},gG;const _kt=new Kr("supportedCodeAction","");class MSi extends sn{constructor(e,i,n,a=250){super(),this._editor=e,this._markerService=i,this._signalChange=n,this._delay=a,this._autoTriggerTimer=this._register(new tv),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const i=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(i?{trigger:e,selection:i}:void 0)}_onMarkerChanges(e){const i=this._editor.getModel();i&&e.some(n=>uve(n,i.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Ex.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:a,column:o}=n.getPosition(),c=i.getLineContent(a);if(c.length===0)return;if(o===1){if(/\s/.test(c[0]))return}else if(o===i.getLineMaxColumn(a)){if(/\s/.test(c[c.length-1]))return}else if(/\s/.test(c[o-2])&&/\s/.test(c[o-1]))return}return n}}var AI;(function(r){r.Empty={type:0};class e{constructor(n,a,o){this.trigger=n,this.position=a,this._cancellablePromise=o,this.type=1,this.actions=o.catch(c=>{if(Ny(c))return zSi;throw c})}cancel(){this._cancellablePromise.cancel()}}r.Triggered=e})(AI||(AI={}));const zSi=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class ISi extends sn{constructor(e,i,n,a,o){super(),this._editor=e,this._registry=i,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new M4),this._state=AI.Empty,this._onDidChangeState=this._register(new yi),this.onDidChangeState=this._onDidChangeState.event,gG.set(this,!1),this._supportedCodeActions=_kt.bindTo(a),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){VRe(this,gG,"f")||(PSi(this,gG,!0,"f"),super.dispose(),this.setState(AI.Empty,!0))}_update(){if(VRe(this,gG,"f"))return;this._codeActionOracle.value=void 0,this.setState(AI.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(87)){const i=this._registry.all(e).flatMap(n=>{var a;return(a=n.providedCodeActionKinds)!==null&&a!==void 0?a:[]});this._supportedCodeActions.set(i.join(" ")),this._codeActionOracle.value=new MSi(this._editor,this._markerService,n=>{var a;if(!n){this.setState(AI.Empty);return}const o=u4(c=>G$e(this._registry,e,n.selection,n.trigger,XR.None,c));n.trigger.type===1&&((a=this._progressService)===null||a===void 0||a.showWhile(o,250)),this.setState(new AI.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Ex.Default})}else this._supportedCodeActions.reset()}trigger(e){var i;(i=this._codeActionOracle.value)===null||i===void 0||i.trigger(e)}setState(e,i){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!i&&!VRe(this,gG,"f")&&this._onDidChangeState.fire(e))}}gG=new WeakMap;var RSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Vie=function(r,e){return function(i,n){e(i,n,r)}},OSi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let kR=class Dkt extends sn{static get(e){return e.getContribution(Dkt.ID)}constructor(e,i,n,a,o,c){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new ISi(this._editor,c.codeActionProvider,i,n,a)),this._register(this._model.onDidChangeState(h=>this._ui.value.update(h))),this._ui=new oN(()=>this._register(o.createInstance(mKe,e,{applyCodeAction:(h,g,_)=>OSi(this,void 0,void 0,function*(){try{yield this._applyCodeAction(h,_)}finally{g&&this._trigger({type:2,triggerAction:Ex.QuickFix,filter:{}})}})})))}showCodeActions(e,i,n){return this._ui.value.showCodeActionList(i,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,i,n,a){var o;if(!this._editor.hasModel())return;(o=GD.get(this._editor))===null||o===void 0||o.closeMessage();const c=this._editor.getPosition();this._trigger({type:1,triggerAction:i,filter:n,autoApply:a,context:{notAvailableMessage:e,position:c}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,i){return this._instantiationService.invokeFunction(ESi,e,xxe.FromCodeActions,{preview:i,editor:this._editor})}};kR.ID="editor.contrib.codeActionController";kR=RSi([Vie(1,WA),Vie(2,Wo),Vie(3,hN),Vie(4,Ds),Vie(5,ma)],kR);function jae(r){return pu.regex(_kt.keys()[0],new RegExp("(\\s|^)"+mx(r.value)+"\\b"))}const J$e={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:V("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:V("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[V("args.schema.apply.first","Always apply the first returned code action."),V("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),V("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:V("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function uO(r,e,i,n,a=Ex.Default){if(r.hasModel()){const o=kR.get(r);o==null||o.manualTriggerAtCurrentPosition(e,a,i,n)}}class jSi extends Vr{constructor(){super({id:H$e,label:V("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:pu.and(Rt.writable,Rt.hasCodeActionsProvider),kbOpts:{kbExpr:Rt.textInputFocus,primary:2132,weight:100}})}run(e,i){return uO(i,V("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Ex.QuickFix)}}class VSi extends Fp{constructor(){super({id:okt,precondition:pu.and(Rt.writable,Rt.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:J$e}]}})}runEditorCommand(e,i,n){const a=nA.fromUser(n,{kind:es.Empty,apply:"ifSingle"});return uO(i,typeof(n==null?void 0:n.kind)=="string"?a.preferred?V("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):V("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):a.preferred?V("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):V("editor.action.codeAction.noneMessage","No code actions available"),{include:a.kind,includeSourceActions:!0,onlyIncludePreferredActions:a.preferred},a.apply)}}class HSi extends Vr{constructor(){super({id:lkt,label:V("refactor.label","Refactor..."),alias:"Refactor...",precondition:pu.and(Rt.writable,Rt.hasCodeActionsProvider),kbOpts:{kbExpr:Rt.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:pu.and(Rt.writable,jae(es.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:J$e}]}})}run(e,i,n){const a=nA.fromUser(n,{kind:es.Refactor,apply:"never"});return uO(i,typeof(n==null?void 0:n.kind)=="string"?a.preferred?V("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):V("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):a.preferred?V("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):V("editor.action.refactor.noneMessage","No refactorings available"),{include:es.Refactor.contains(a.kind)?a.kind:es.None,onlyIncludePreferredActions:a.preferred},a.apply,Ex.Refactor)}}class KSi extends Vr{constructor(){super({id:ckt,label:V("source.label","Source Action..."),alias:"Source Action...",precondition:pu.and(Rt.writable,Rt.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:pu.and(Rt.writable,jae(es.Source))},description:{description:"Source Action...",args:[{name:"args",schema:J$e}]}})}run(e,i,n){const a=nA.fromUser(n,{kind:es.Source,apply:"never"});return uO(i,typeof(n==null?void 0:n.kind)=="string"?a.preferred?V("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):V("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):a.preferred?V("editor.action.source.noneMessage.preferred","No preferred source actions available"):V("editor.action.source.noneMessage","No source actions available"),{include:es.Source.contains(a.kind)?a.kind:es.None,includeSourceActions:!0,onlyIncludePreferredActions:a.preferred},a.apply,Ex.SourceAction)}}class WSi extends Vr{constructor(){super({id:K$e,label:V("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:pu.and(Rt.writable,jae(es.SourceOrganizeImports)),kbOpts:{kbExpr:Rt.textInputFocus,primary:1581,weight:100}})}run(e,i){return uO(i,V("editor.action.organize.noneMessage","No organize imports action available"),{include:es.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Ex.OrganizeImports)}}class GSi extends Vr{constructor(){super({id:W$e,label:V("fixAll.label","Fix All"),alias:"Fix All",precondition:pu.and(Rt.writable,jae(es.SourceFixAll))})}run(e,i){return uO(i,V("fixAll.noneMessage","No fix all action available"),{include:es.SourceFixAll,includeSourceActions:!0},"ifSingle",Ex.FixAll)}}class JSi extends Vr{constructor(){super({id:skt,label:V("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:pu.and(Rt.writable,jae(es.QuickFix)),kbOpts:{kbExpr:Rt.textInputFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,i){return uO(i,V("editor.action.autoFix.noneMessage","No auto fixes available"),{include:es.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Ex.AutoFix)}}fl(kR.ID,kR,3);fl(yR.ID,yR,4);Cu(jSi);Cu(HSi);Cu(KSi);Cu(WSi);Cu(JSi);Cu(GSi);Zu(new VSi);G1.as(jA.Configuration).registerConfiguration(Object.assign(Object.assign({},o$e),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:V("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));var bDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class pKe{constructor(){this.lenses=[],this._disposables=new du}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,i){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:i})}}function xkt(r,e,i){return bDt(this,void 0,void 0,function*(){const n=r.ordered(e),a=new Map,o=new pKe,c=n.map((h,g)=>bDt(this,void 0,void 0,function*(){a.set(h,g);try{const _=yield Promise.resolve(h.provideCodeLenses(e,i));_&&o.add(_,h)}catch(_){z4(_)}}));return yield Promise.all(c),o.lenses=o.lenses.sort((h,g)=>h.symbol.range.startLineNumberg.symbol.range.startLineNumber?1:a.get(h.provider)a.get(g.provider)?1:h.symbol.range.startColumng.symbol.range.startColumn?1:0),o})}O0.registerCommand("_executeCodeLensProvider",function(r,...e){let[i,n]=e;bc(to.isUri(i)),bc(typeof n=="number"||!n);const{codeLensProvider:a}=r.get(ma),o=r.get(lh).getModel(i);if(!o)throw cx();const c=[],h=new du;return xkt(a,o,g0.None).then(g=>{h.add(g);const _=[];for(const x of g.lenses)n==null||x.symbol.command?c.push(x.symbol):n-- >0&&x.provider.resolveCodeLens&&_.push(Promise.resolve(x.provider.resolveCodeLens(o,x.symbol,g0.None)).then(y=>c.push(y||x.symbol)));return Promise.all(_)}).then(()=>c).finally(()=>{setTimeout(()=>h.dispose(),100)})});var $Si=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},USi=function(r,e){return function(i,n){e(i,n,r)}};const vkt=y0("ICodeLensCache");class yDt{constructor(e,i){this.lineCount=e,this.data=i}}let gKe=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new dN(20,.75);const i="codelens/cache";TS(()=>e.remove(i,1));const n="codelens/cache2",a=e.get(n,1,"{}");this._deserialize(a),AA(e.onWillSaveState)(o=>{o.reason===ixe.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,i){const n=i.lenses.map(c=>{var h;return{range:c.symbol.range,command:c.symbol.command&&{id:"",title:(h=c.symbol.command)===null||h===void 0?void 0:h.title}}}),a=new pKe;a.add({lenses:n,dispose:()=>{}},this._fakeProvider);const o=new yDt(e.getLineCount(),a);this._cache.set(e.uri.toString(),o)}get(e){const i=this._cache.get(e.uri.toString());return i&&i.lineCount===e.getLineCount()?i.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[i,n]of this._cache){const a=new Set;for(const o of n.data.lenses)a.add(o.symbol.range.startLineNumber);e[i]={lineCount:n.lineCount,lines:[...a.values()]}}return JSON.stringify(e)}_deserialize(e){try{const i=JSON.parse(e);for(const n in i){const a=i[n],o=[];for(const h of a.lines)o.push({range:new ot(h,1,h,11)});const c=new pKe;c.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(n,new yDt(a.lineCount,c))}}catch{}}};gKe=$Si([USi(0,r2)],gKe);Z0(vkt,gKe,1);class qSi{constructor(e,i,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=i,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class zve{constructor(e,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${zve._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,i){this._commands.clear();const n=[];let a=!1;for(let o=0;o{_.symbol.command&&g.push(_.symbol),n.addDecoration({range:_.symbol.range,options:kDt},y=>this._decorationIds[x]=y),h?h=ot.plusRange(h,_.symbol.range):h=ot.lift(_.symbol.range)}),this._viewZone=new qSi(h.startLineNumber-1,o,c),this._viewZoneId=a.addZone(this._viewZone),g.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(g,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new zve(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,i){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],i==null||i.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,i)=>{const n=this._editor.getModel().getDecorationRange(e),a=this._data[i].symbol;return!!(n&&ot.isEmpty(a.range)===n.isEmpty())})}updateCodeLensSymbols(e,i){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],this._data=e,this._data.forEach((n,a)=>{i.addDecoration({range:n.symbol.range,options:kDt},o=>this._decorationIds[a]=o)})}updateHeight(e,i){this._viewZone.heightInPx=e,i.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let i=0;i=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Hie=function(r,e){return function(i,n){e(i,n,r)}},YSi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let r$=class{constructor(e,i,n,a,o,c){this._editor=e,this._languageFeaturesService=i,this._commandService=a,this._notificationService=o,this._codeLensCache=c,this._disposables=new du,this._localToDispose=new du,this._lenses=[],this._oldCodeLensModels=new du,this._provideCodeLensDebounce=n.for(i.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(i.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Zc(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(h=>{(h.hasChanged(48)||h.hasChanged(17)||h.hasChanged(16))&&this._updateLensStyle(),h.hasChanged(15)&&this._onModelChange()})),this._disposables.add(i.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(64)/this._editor.getOption(50));let i=this._editor.getOption(17);return(!i||i<5)&&(i=this._editor.getOption(50)*.9|0),{fontSize:i,codeLensHeight:i*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:i}=this._getLayoutInfo(),n=this._editor.getOption(16),a=this._editor.getOption(48),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${i}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",a.fontFeatureSettings),n&&(o.setProperty("--vscode-editorCodeLens-fontFamily",n),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",VD.fontFamily)),this._editor.changeViewZones(c=>{for(const h of this._lenses)h.updateHeight(e,c)})}_localDispose(){var e,i,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(15))return;const i=this._codeLensCache.get(e);if(i&&this._renderCodeLensSymbols(i),!this._languageFeaturesService.codeLensProvider.has(e)){i&&this._localToDispose.add(lR(()=>{const a=this._codeLensCache.get(e);i===a&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const a of this._languageFeaturesService.codeLensProvider.all(e))if(typeof a.onDidChange=="function"){const o=a.onDidChange(()=>n.schedule());this._localToDispose.add(o)}const n=new Zc(()=>{var a;const o=Date.now();(a=this._getCodeLensModelPromise)===null||a===void 0||a.cancel(),this._getCodeLensModelPromise=u4(c=>xkt(this._languageFeaturesService.codeLensProvider,e,c)),this._getCodeLensModelPromise.then(c=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=c,this._codeLensCache.put(e,c);const h=this._provideCodeLensDebounce.update(e,Date.now()-o);n.delay=h,this._renderCodeLensSymbols(c),this._resolveCodeLensesInViewportSoon()},Bs)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(Ss(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(a=>{this._editor.changeViewZones(o=>{const c=[];let h=-1;this._lenses.forEach(_=>{!_.isValid()||h===_.getLineNumber()?c.push(_):(_.update(o),h=_.getLineNumber())});const g=new HRe;c.forEach(_=>{_.dispose(g,o),this._lenses.splice(this._lenses.indexOf(_),1)}),g.commit(a)})}),n.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(a=>{a.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Ss(()=>{if(this._editor.getModel()){const a=TA.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(c=>{this._disposeAllLenses(o,c)})}),a.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(a=>{if(a.target.type!==9)return;let o=a.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(const c of this._lenses){const h=c.getCommand(o);if(h){this._commandService.executeCommand(h.id,...h.arguments||[]).catch(g=>this._notificationService.error(g));break}}})),n.schedule()}_disposeAllLenses(e,i){const n=new HRe;for(const a of this._lenses)a.dispose(n,i);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const i=this._editor.getModel().getLineCount(),n=[];let a;for(const h of e.lenses){const g=h.symbol.range.startLineNumber;g<1||g>i||(a&&a[a.length-1].symbol.range.startLineNumber===g?a.push(h):(a=[h],n.push(a)))}if(!n.length&&!this._lenses.length)return;const o=TA.capture(this._editor),c=this._getLayoutInfo();this._editor.changeDecorations(h=>{this._editor.changeViewZones(g=>{const _=new HRe;let x=0,y=0;for(;ythis._resolveCodeLensesInViewportSoon())),x++,y++)}for(;xthis._resolveCodeLensesInViewportSoon())),y++;_.commit(h)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const i=this._editor.getModel();if(!i)return;const n=[],a=[];if(this._lenses.forEach(h=>{const g=h.computeIfNecessary(i);g&&(n.push(g),a.push(h))}),n.length===0)return;const o=Date.now(),c=u4(h=>{const g=n.map((_,x)=>{const y=new Array(_.length),S=_.map((L,O)=>!L.symbol.command&&typeof L.provider.resolveCodeLens=="function"?Promise.resolve(L.provider.resolveCodeLens(i,L.symbol,h)).then(G=>{y[O]=G},z4):(y[O]=L.symbol,Promise.resolve(void 0)));return Promise.all(S).then(()=>{!h.isCancellationRequested&&!a[x].isDisposed()&&a[x].updateCommands(y)})});return Promise.all(g)});this._resolveCodeLensesPromise=c,this._resolveCodeLensesPromise.then(()=>{const h=this._resolveCodeLensesDebounce.update(i,Date.now()-o);this._resolveCodeLensesScheduler.delay=h,this._currentCodeLensModel&&this._codeLensCache.put(i,this._currentCodeLensModel),this._oldCodeLensModels.clear(),c===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},h=>{Bs(h),c===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};r$.ID="css.editor.codeLens";r$=ZSi([Hie(1,ma),Hie(2,ov),Hie(3,Zh),Hie(4,Lf),Hie(5,vkt)],r$);fl(r$.ID,r$,1);Cu(class extends Vr{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Rt.hasCodeLensProvider,label:V("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,i){return YSi(this,void 0,void 0,function*(){if(!i.hasModel())return;const n=e.get(GA),a=e.get(Zh),o=e.get(Lf),c=i.getSelection().positionLineNumber,h=i.getContribution(r$.ID);if(!h)return;const g=h.getModel();if(!g)return;const _=[];for(const y of g.lenses)y.symbol.command&&y.symbol.range.startLineNumber===c&&_.push({label:y.symbol.command.title,command:y.symbol.command});if(_.length===0)return;const x=yield n.pick(_,{canPickMany:!1});if(x){if(g.isDisposed)return yield a.executeCommand(this.id);try{yield a.executeCommand(x.command.id,...x.command.arguments||[])}catch(y){o.error(y)}}})}});function QSi(r,e,i){const n=[],o=r.ordered(e).reverse().map(c=>Promise.resolve(c.provideDocumentColors(e,i)).then(h=>{if(Array.isArray(h))for(const g of h)n.push({colorInfo:g,provider:c})}));return Promise.all(o).then(()=>n)}function ADt(r,e,i,n){return Promise.resolve(i.provideColorPresentations(r,e,n))}O0.registerCommand("_executeDocumentColorProvider",function(r,...e){const[i]=e;if(!(i instanceof to))throw cx();const{colorProvider:n}=r.get(ma),a=r.get(lh).getModel(i);if(!a)throw cx();const o=[],h=n.ordered(a).reverse().map(g=>Promise.resolve(g.provideDocumentColors(a,g0.None)).then(_=>{if(Array.isArray(_))for(const x of _)o.push({range:x.range,color:[x.color.red,x.color.green,x.color.blue,x.color.alpha]})}));return Promise.all(h).then(()=>o)});O0.registerCommand("_executeColorPresentationProvider",function(r,...e){const[i,n]=e,{uri:a,range:o}=n;if(!(a instanceof to)||!Array.isArray(i)||i.length!==4||!ot.isIRange(o))throw cx();const[c,h,g,_]=i,{colorProvider:x}=r.get(ma),y=r.get(lh).getModel(a);if(!y)throw cx();const S={range:o,color:{red:c,green:h,blue:g,alpha:_}},L=[],G=x.ordered(y).reverse().map(ie=>Promise.resolve(ie.provideColorPresentations(y,S,g0.None)).then(ue=>{Array.isArray(ue)&&L.push(...ue)}));return Promise.all(G).then(()=>L)});var XSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},KRe=function(r,e){return function(i,n){e(i,n,r)}},e8i=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const Ckt=Object.create({});let FR=class bkt extends sn{constructor(e,i,n,a){super(),this._editor=e,this._configurationService=i,this._languageFeaturesService=n,this._localToDispose=this._register(new du),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Cae(this._editor),this._decoratorLimitReporter=new t8i,this._colorDecorationClassRefs=this._register(new du),this._debounceInformation=a.for(n.colorProvider,"Document Colors",{min:bkt.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(n.colorProvider.onDidChange(()=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(o=>{const c=this._isEnabled;this._isEnabled=this.isEnabled(),(c!==this._isEnabled||o.hasChanged(19))&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const i=e.getLanguageId(),n=this._configurationService.getValue(i);if(n&&typeof n=="object"){const a=n.colorDecorators;if(a&&a.enable!==void 0&&!a.enable)return a.enable}return this._editor.getOption(18)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new tv,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){this._computePromise=u4(e=>e8i(this,void 0,void 0,function*(){const i=this._editor.getModel();if(!i)return Promise.resolve([]);const n=new j3(!1),a=yield QSi(this._languageFeaturesService.colorProvider,i,e);return this._debounceInformation.update(i,n.elapsed()),a})),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},Bs)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const i=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:As.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,i),this._colorDatas=new Map,this._decorationsIds.forEach((a,o)=>this._colorDatas.set(a,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const i=[],n=this._editor.getOption(19);for(let o=0;othis._colorDatas.has(a.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};FR.ID="editor.contrib.colorDetector";FR.RECOMPUTE_TIME=1e3;FR=XSi([KRe(1,hl),KRe(2,ma),KRe(3,ov)],FR);class t8i{constructor(){this._onDidChange=new yi,this._computed=0,this._limited=!1}update(e,i){(e!==this._computed||i!==this._limited)&&(this._computed=e,this._limited=i,this._onDidChange.fire())}}fl(FR.ID,FR,1);class i8i{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,i,n){this.presentationIndex=n,this._onColorFlushed=new yi,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new yi,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new yi,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=i}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,i){let n=-1;for(let a=0;a{this.backgroundColor=c.getColor(v5e)||qi.white})),this._register(Vn(this.pickedColorNode,wr.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Vn(o,wr.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this._register(i.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=qi.Format.CSS.format(i.color)||"",this.pickedColorNode.classList.toggle("light",i.color.rgba.a<.5?this.backgroundColor.isLighter():i.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=qi.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(dy(".codicon.codicon-color-mode"))}}class u8i extends sn{constructor(e,i,n){super(),this.model=i,this.pixelRatio=n,this.domNode=dy(".colorpicker-body"),Yn(e,this.domNode),this.saturationBox=new r8i(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new a8i(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new o8i(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:i}){const n=this.model.color.hsva;this.model.color=new qi(new sA(n.h,e,i,n.a))}onDidOpacityChange(e){const i=this.model.color.hsva;this.model.color=new qi(new sA(i.h,i.s,i.v,e))}onDidHueChange(e){const i=this.model.color.hsva,n=(1-e)*360;this.model.color=new qi(new sA(n===360?0:n,i.s,i.v,i.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class r8i extends sn{constructor(e,i,n){super(),this.model=i,this.pixelRatio=n,this._onDidChange=new yi,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new yi,this.onColorFlushed=this._onColorFlushed.event,this.domNode=dy(".saturation-wrap"),Yn(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",Yn(this.domNode,this.canvas),this.selection=dy(".saturation-selection"),Yn(this.domNode,this.selection),this.layout(),this._register(Vn(this.domNode,wr.POINTER_DOWN,a=>this.onPointerDown(a))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new k$);const i=N4(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,a=>this.onDidChangePosition(a.pageX-i.left,a.pageY-i.top),()=>null);const n=Vn(document,wr.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,i){const n=Math.max(0,Math.min(1,e/this.width)),a=Math.max(0,Math.min(1,1-i/this.height));this.paintSelection(n,a),this._onDidChange.fire({s:n,v:a})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,i=new qi(new sA(e.h,1,1,1)),n=this.canvas.getContext("2d"),a=n.createLinearGradient(0,0,this.canvas.width,0);a.addColorStop(0,"rgba(255, 255, 255, 1)"),a.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),a.addColorStop(1,"rgba(255, 255, 255, 0)");const o=n.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this.canvas.width,this.canvas.height),n.fillStyle=qi.Format.CSS.format(i),n.fill(),n.fillStyle=a,n.fill(),n.fillStyle=o,n.fill()}paintSelection(e,i){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-i*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class ykt extends sn{constructor(e,i){super(),this.model=i,this._onDidChange=new yi,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new yi,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Yn(e,dy(".strip")),this.overlay=Yn(this.domNode,dy(".overlay")),this.slider=Yn(this.domNode,dy(".slider")),this.slider.style.top="0px",this._register(Vn(this.domNode,wr.POINTER_DOWN,n=>this.onPointerDown(n))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const i=this._register(new k$),n=N4(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),i.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-n.top),()=>null);const a=Vn(document,wr.POINTER_UP,()=>{this._onColorFlushed.fire(),a.dispose(),i.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const i=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(i),this._onDidChange.fire(i)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class a8i extends ykt{constructor(e,i){super(e,i),this.domNode.classList.add("opacity-strip"),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:i,g:n,b:a}=e.rgba,o=new qi(new L0(i,n,a,1)),c=new qi(new L0(i,n,a,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${c} 100%)`}getValue(e){return e.hsva.a}}class o8i extends ykt{constructor(e,i){super(e,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class s8i extends rv{constructor(e,i,n,a){super(),this.model=i,this.pixelRatio=n,this._register(PJ.onDidChange(()=>this.layout()));const o=dy(".colorpicker-widget");e.appendChild(o);const c=new n8i(o,this.model,a);this.body=new u8i(o,this.model,this.pixelRatio),this._register(c),this._register(this.body)}layout(){this.body.layout()}}var l8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},c8i=function(r,e){return function(i,n){e(i,n,r)}},SDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class d8i{constructor(e,i,n,a){this.owner=e,this.range=i,this.model=n,this.provider=a,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let EKe=class{constructor(e,i){this._editor=e,this._themeService=i,this.hoverOrdinal=2}computeSync(e,i){return[]}computeAsync(e,i,n){return Bf.fromPromise(this._computeAsync(e,i,n))}_computeAsync(e,i,n){return SDt(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const a=FR.get(this._editor);if(!a)return[];for(const o of i){if(!a.isColorDecoration(o))continue;const c=a.getColorData(o.range.getStartPosition());if(c)return[yield this._createColorHover(this._editor.getModel(),c.colorInfo,c.provider)]}return[]})}_createColorHover(e,i,n){return SDt(this,void 0,void 0,function*(){const a=e.getValueInRange(i.range),{red:o,green:c,blue:h,alpha:g}=i.color,_=new L0(Math.round(o*255),Math.round(c*255),Math.round(h*255),g),x=new qi(_),y=yield ADt(e,i,n,g0.None),S=new i8i(x,[],0);return S.colorPresentations=y||[],S.guessColorPresentation(x,a),new d8i(this,ot.lift(i.range),S,n)})}renderHoverParts(e,i){if(i.length===0||!this._editor.hasModel())return sn.None;const n=new du,a=i[0],o=this._editor.getModel(),c=a.model,h=n.add(new s8i(e.fragment,c,this._editor.getOption(137),this._themeService));e.setColorPicker(h);let g=new ot(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);const _=()=>{let y,S;if(c.presentation.textEdit){y=[c.presentation.textEdit],S=new ot(c.presentation.textEdit.range.startLineNumber,c.presentation.textEdit.range.startColumn,c.presentation.textEdit.range.endLineNumber,c.presentation.textEdit.range.endColumn);const L=this._editor.getModel()._setTrackedRange(null,S,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",y),S=this._editor.getModel()._getTrackedRange(L)||S}else y=[{range:g,text:c.presentation.label,forceMoveMarkers:!1}],S=g.setEndPosition(g.endLineNumber,g.startColumn+c.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",y);c.presentation.additionalTextEdits&&(y=[...c.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",y),e.hide()),this._editor.pushUndoStop(),g=S},x=y=>ADt(o,{range:g,color:{red:y.rgba.r/255,green:y.rgba.g/255,blue:y.rgba.b/255,alpha:y.rgba.a}},a.provider,g0.None).then(S=>{c.colorPresentations=S||[]});return n.add(c.onColorFlushed(y=>{x(y).then(_)})),n.add(c.onDidChangeColor(x)),n}};EKe=l8i([c8i(1,I4)],EKe);function _Ke(r,e){return!!r[e]}class WRe{constructor(e,i){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=_Ke(e.event,i.triggerModifier),this.hasSideBySideModifier=_Ke(e.event,i.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class BDt{constructor(e,i){this.keyCodeIsTriggerKey=e.keyCode===i.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===i.triggerSideBySideKey,this.hasTriggerModifier=_Ke(e,i.triggerModifier)}}class m3e{constructor(e,i,n,a){this.triggerKey=e,this.triggerModifier=i,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=a}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function wDt(r){return r==="altKey"?c0?new m3e(57,"metaKey",6,"altKey"):new m3e(5,"ctrlKey",6,"altKey"):c0?new m3e(6,"altKey",57,"metaKey"):new m3e(6,"altKey",5,"ctrlKey")}class Ive extends sn{constructor(e,i){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new yi),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new yi),this.onExecute=this._onExecute.event,this._onCancel=this._register(new yi),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=i,this._opts=wDt(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(75)){const a=wDt(this._editor.getOption(75));if(this._opts.equals(a))return;this._opts=a,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new WRe(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new WRe(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new WRe(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new BDt(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new BDt(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const i=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===i||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var h8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},lS=function(r,e){return function(i,n){e(i,n,r)}};let qL=class extends $J{constructor(e,i,n,a,o,c,h,g,_,x,y,S,L){super(e,Object.assign(Object.assign({},a.getRawOptions()),{overflowWidgetsDomNode:a.getOverflowWidgetsDomNode()}),n,o,c,h,g,_,x,y,S,L),this._parentEditor=a,this._overwriteOptions=i,super.updateOptions(this._overwriteOptions),this._register(a.onDidChangeConfiguration(O=>this._onParentConfigurationChanged(O)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){cae(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};qL=h8i([lS(4,Ds),lS(5,wl),lS(6,Zh),lS(7,Wo),lS(8,I4),lS(9,Lf),lS(10,sN),lS(11,B1),lS(12,ma)],qL);const TDt=new qi(new L0(0,122,204)),f8i={showArrow:!0,showFrame:!0,className:"",frameColor:TDt,arrowColor:TDt,keepEditorSelection:!1},m8i="vs.editor.contrib.zoneWidget";class p8i{constructor(e,i,n,a,o,c){this.id="",this.domNode=e,this.afterLineNumber=i,this.afterColumn=n,this.heightInLines=a,this._onDomNodeTop=o,this._onComputedHeight=c}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class g8i{constructor(e,i){this._id=e,this._domNode=i}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class Rve{constructor(e){this._editor=e,this._ruleName=Rve._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),CEt(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){CEt(this._ruleName),xVe(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:ot.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}Rve._IdGenerator=new t$e(".arrow-decoration-");class E8i{constructor(e,i={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new du,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=DS(i),cae(this.options,f8i,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const a=this._getWidth(n);this.domNode.style.width=a+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(a)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new Rve(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var i;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const a=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(a))}(i=this._resizeSash)===null||i===void 0||i.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,i){const n=ot.isIRange(e)?ot.lift(e):ot.fromPositions(e);this._isShowing=!0,this._showImpl(n,i),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:As.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(i=>{this._viewZone&&i.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide()}_decoratingElementsHeight(){const e=this.editor.getOption(64);let i=0;if(this.options.showArrow){const n=Math.round(e/3);i+=2*n}if(this.options.showFrame){const n=Math.round(e/9);i+=2*n}return i}_showImpl(e,i){const n=e.getStartPosition(),a=this.editor.getLayoutInfo(),o=this._getWidth(a);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(a)+"px";const c=document.createElement("div");c.style.overflow="hidden";const h=this.editor.getOption(64),g=Math.max(12,this.editor.getLayoutInfo().height/h*.8);i=Math.min(i,g);let _=0,x=0;if(this._arrow&&this.options.showArrow&&(_=Math.round(h/3),this._arrow.height=_,this._arrow.show(n)),this.options.showFrame&&(x=Math.round(h/9)),this.editor.changeViewZones(L=>{this._viewZone&&L.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new p8i(c,n.lineNumber,n.column,i,O=>this._onViewZoneTop(O),O=>this._onViewZoneHeight(O)),this._viewZone.id=L.addZone(this._viewZone),this._overlayWidget=new g8i(m8i+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const L=this.options.frameWidth?this.options.frameWidth:x;this.container.style.borderTopWidth=L+"px",this.container.style.borderBottomWidth=L+"px"}const y=i*h-this._decoratingElementsHeight();this.container&&(this.container.style.top=_+"px",this.container.style.height=y+"px",this.container.style.overflow="hidden"),this._doLayout(y,o),this.options.keepEditorSelection||this.editor.setSelection(e);const S=this.editor.getModel();if(S){const L=S.validateRange(new ot(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(L,L.endLineNumber===S.getLineCount())}}revealRange(e,i){i?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,i){this.container&&(i&&this.container.classList.remove(i),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,i){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(i=>{this._viewZone&&(this._viewZone.heightInLines=e,i.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Mg(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(i=>{this._viewZone&&(e={startY:i.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(i=>{if(e){const n=(i.currentY-e.startY)/this.editor.getOption(64),a=n<0?Math.ceil(n):Math.floor(n),o=e.heightInLines+a;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var kkt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Fkt=function(r,e){return function(i,n){e(i,n,r)}};const Akt=y0("IPeekViewService");Z0(Akt,class{constructor(){this._widgets=new Map}addExclusiveWidget(r,e){const i=this._widgets.get(r);i&&(i.listener.dispose(),i.widget.dispose());const n=()=>{const a=this._widgets.get(r);a&&a.widget===e&&(a.listener.dispose(),this._widgets.delete(r))};this._widgets.set(r,{widget:e,listener:e.onDidClose(n)})}},1);var K3;(function(r){r.inPeekEditor=new Kr("inReferenceSearchEditor",!0,V("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),r.notInPeekEditor=r.inPeekEditor.toNegated()})(K3||(K3={}));let Cre=class{constructor(e,i){e instanceof qL&&K3.inPeekEditor.bindTo(i)}dispose(){}};Cre.ID="editor.contrib.referenceController";Cre=kkt([Fkt(1,Wo)],Cre);fl(Cre.ID,Cre,0);function _8i(r){const e=r.get(wl).getFocusedCodeEditor();return e instanceof qL?e.getParentEditor():e}const D8i={headerBackgroundColor:qi.white,primaryHeadingColor:qi.fromHex("#333333"),secondaryHeadingColor:qi.fromHex("#6c6c6cb3")};let Cxe=class extends E8i{constructor(e,i,n){super(e,i),this.instantiationService=n,this._onDidClose=new yi,this.onDidClose=this._onDidClose.event,cae(this.options,D8i,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const i=this.options;e.headerBackgroundColor&&(i.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(i.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(i.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Pu(".head"),this._bodyElement=Pu(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,i){this._titleElement=Pu(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),pf(this._titleElement,"click",o=>this._onTitleClick(o))),Yn(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Pu("span.filename"),this._secondaryHeading=Pu("span.dirname"),this._metaHeading=Pu("span.meta"),Yn(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=Pu(".peekview-actions");Yn(this._headElement,n);const a=this._getActionBarOptions();this._actionbarWidget=new ev(n,a),this._disposables.add(this._actionbarWidget),i||this._actionbarWidget.push(new HD("peekview.close",V("label.close","Close"),_o.asClassName(dr.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Ryi.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,i){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),i?this._secondaryHeading.innerText=i:km(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,zD(this._metaHeading)):B_(this._metaHeading))}_doLayout(e,i){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(64)*1.2),a=Math.round(e-(n+2));this._doLayoutHead(n,i),this._doLayoutBody(a,i)}_doLayoutHead(e,i){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,i){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Cxe=kkt([Fkt(2,Ds)],Cxe);const x8i=Jt("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:qi.black,hcLight:qi.white},V("peekViewTitleBackground","Background color of the peek view title area.")),Skt=Jt("peekViewTitleLabel.foreground",{dark:qi.white,light:qi.black,hcDark:qi.white,hcLight:KC},V("peekViewTitleForeground","Color of the peek view title.")),Bkt=Jt("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},V("peekViewTitleInfoForeground","Color of the peek view title info.")),v8i=Jt("peekView.border",{dark:ox,light:ox,hcDark:v0,hcLight:v0},V("peekViewBorder","Color of the peek view borders and arrow.")),C8i=Jt("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:qi.black,hcLight:qi.white},V("peekViewResultsBackground","Background color of the peek view result list."));Jt("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:qi.white,hcLight:KC},V("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));Jt("peekViewResult.fileForeground",{dark:qi.white,light:"#1E1E1E",hcDark:qi.white,hcLight:KC},V("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));Jt("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},V("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));Jt("peekViewResult.selectionForeground",{dark:qi.white,light:"#6C6C6C",hcDark:qi.white,hcLight:KC},V("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const oL=Jt("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:qi.black,hcLight:qi.white},V("peekViewEditorBackground","Background color of the peek view editor."));Jt("peekViewEditorGutter.background",{dark:oL,light:oL,hcDark:oL,hcLight:oL},V("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));Jt("peekViewEditorStickyScroll.background",{dark:oL,light:oL,hcDark:oL,hcLight:oL},V("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));Jt("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},V("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));Jt("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},V("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));Jt("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Wd,hcLight:Wd},V("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var b8i=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class ZL{constructor(e,i,n,a){this.isProviderFirst=e,this.parent=i,this.link=n,this._rangeCallback=a,this.id=iHe.nextId()}get uri(){return this.link.uri}get range(){var e,i;return(i=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&i!==void 0?i:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const i=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return i?V({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",X6(this.uri),this.range.startLineNumber,this.range.startColumn,i.value):V("aria.oneReference","symbol in {0} on line {1} at column {2}",X6(this.uri),this.range.startLineNumber,this.range.startColumn)}}class y8i{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,i=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:a,startColumn:o,endLineNumber:c,endColumn:h}=e,g=n.getWordUntilPosition({lineNumber:a,column:o-i}),_=new ot(a,g.startColumn,a,o),x=new ot(c,h,c,1073741824),y=n.getValueInRange(_).replace(/^\s+/,""),S=n.getValueInRange(e),L=n.getValueInRange(x).replace(/\s+$/,"");return{value:y+S+L,highlight:{start:y.length,end:y.length+S.length}}}}class bre{constructor(e,i){this.parent=e,this.uri=i,this.children=[],this._previews=new jg}dispose(){nc(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?V("aria.fileReferences.1","1 symbol in {0}, full path {1}",X6(this.uri),this.uri.fsPath):V("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,X6(this.uri),this.uri.fsPath)}resolve(e){return b8i(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const i of this.children)if(!this._previews.has(i.uri))try{const n=yield e.createModelReference(i.uri);this._previews.set(i.uri,new y8i(n))}catch(n){Bs(n)}return this})}}class KD{constructor(e,i){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new yi,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=i;const[n]=e;e.sort(KD._compareReferences);let a;for(const o of e)if((!a||!Gd.isEqual(a.uri,o.uri,!0))&&(a=new bre(this,o.uri),this.groups.push(a)),a.children.length===0||KD._compareReferences(o,a.children[a.children.length-1])!==0){const c=new ZL(n===o,a,o,h=>this._onDidChangeReferenceRange.fire(h));this.references.push(c),a.children.push(c)}}dispose(){nc(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new KD(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?V("aria.result.0","No results found"):this.references.length===1?V("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?V("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):V("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,i){const{parent:n}=e;let a=n.children.indexOf(e);const o=n.children.length,c=n.parent.groups.length;return c===1||i&&a+10?(i?a=(a+1)%o:a=(a+o-1)%o,n.children[a]):(a=n.parent.groups.indexOf(n),i?(a=(a+1)%c,n.parent.groups[a].children[0]):(a=(a+c-1)%c,n.parent.groups[a].children[n.parent.groups[a].children.length-1]))}nearestReference(e,i){const n=this.references.map((a,o)=>({idx:o,prefixLen:oR(a.uri.toString(),e.toString()),offsetDist:Math.abs(a.range.startLineNumber-i.lineNumber)*100+Math.abs(a.range.startColumn-i.column)})).sort((a,o)=>a.prefixLen>o.prefixLen?-1:a.prefixLeno.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,i){for(const n of this.references)if(n.uri.toString()===e.toString()&&ot.containsPosition(n.range,i))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,i){return Gd.compare(e.uri,i.uri)||ot.compareRangesUsingStarts(e.range,i.range)}}var Ove=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},jve=function(r,e){return function(i,n){e(i,n,r)}};let DKe=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof KD||e instanceof bre}getChildren(e){if(e instanceof KD)return e.groups;if(e instanceof bre)return e.resolve(this._resolverService).then(i=>i.children);throw new Error("bad tree")}};DKe=Ove([jve(0,W3)],DKe);class k8i{getHeight(){return 23}getTemplateId(e){return e instanceof bre?yre.id:Vae.id}}let xKe=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var i;if(e instanceof ZL){const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(n)return n.value}return X6(e.uri)}};xKe=Ove([jve(0,J1)],xKe);class F8i{getId(e){return e instanceof ZL?e.id:e.uri}}let vKe=class extends sn{constructor(e,i){super(),this._labelService=i;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new mxe(n,{supportHighlights:!0})),this.badge=new OHe(Yn(n,Pu(".count")),{},Wbt),e.appendChild(n)}set(e,i){const n=rve(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:i});const a=e.children.length;this.badge.setCount(a),a>1?this.badge.setTitleFormat(V("referencesCount","{0} references",a)):this.badge.setTitleFormat(V("referenceCount","{0} reference",a))}};vKe=Ove([jve(1,ZJ)],vKe);let yre=class wkt{constructor(e){this._instantiationService=e,this.templateId=wkt.id}renderTemplate(e){return this._instantiationService.createInstance(vKe,e)}renderElement(e,i,n){n.set(e.element,cve(e.filterData))}disposeTemplate(e){e.dispose()}};yre.id="FileReferencesRenderer";yre=Ove([jve(0,Ds)],yre);class A8i{constructor(e){this.label=new FL(e)}set(e,i){var n;const a=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!a||!a.value)this.label.set(`${X6(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:o,highlight:c}=a;i&&!xy.isDefault(i)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,cve(i))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[c]))}}}class Vae{constructor(){this.templateId=Vae.id}renderTemplate(e){return new A8i(e)}renderElement(e,i,n){n.set(e.element,e.filterData)}disposeTemplate(){}}Vae.id="OneReferenceRenderer";class S8i{getWidgetAriaLabel(){return V("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var B8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},cS=function(r,e){return function(i,n){e(i,n,r)}},LDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class Vve{constructor(e,i){this._editor=e,this._model=i,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new du,this._callOnModelChange=new du,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const i of this._model.references)if(i.uri.toString()===e.uri.toString()){this._addDecorations(i.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const i=[],n=[];for(let a=0,o=e.children.length;a{const o=a.deltaDecorations([],i);for(let c=0;c{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(T8i,"ReferencesWidget",this._treeContainer,new k8i,[this._instantiationService.createInstance(yre),this._instantiationService.createInstance(Vae)],this._instantiationService.createInstance(DKe),n),this._splitView.addView({onDidChange:Ia.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},cxe.Distribute),this._splitView.addView({onDidChange:Ia.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},cxe.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const a=(o,c)=>{o instanceof ZL&&(c==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:c,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?a(o.element,"side"):o.editorOptions.pinned?a(o.element,"goto"):a(o.element,"show")}),B_(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,i){super._doLayoutBody(e,i),this._dim=new _d(i,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(i),this._splitView.resizeView(0,i*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=V("noResults","No results"),zD(this._messageContainer),Promise.resolve(void 0)):(B_(this._messageContainer),this._decorationsManager=new Vve(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:i,target:n}=e;if(i.detail!==2)return;const a=this._getFocusedReference();a&&this._onDidSelectReference.fire({element:{uri:a.uri,range:n.range},kind:i.ctrlKey||i.metaKey||i.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),zD(this._treeContainer),zD(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof ZL)return e;if(e instanceof bre&&e.children.length>0)return e.children[0]}revealReference(e){return LDt(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,i){return LDt(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Js.inMemory?this.setTitle(i6i(e.uri),this._uriLabel.getUriLabel(rve(e.uri))):this.setTitle(V("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(i&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const a=yield n;if(!this._model){a.dispose();return}nc(this._previewModelReference);const o=a.object;if(o){const c=this._preview.getModel()===o.textEditorModel?0:1,h=ot.lift(e.range).collapseToStart();this._previewModelReference=a,this._preview.setModel(o.textEditorModel),this._preview.setSelection(h),this._preview.revealRangeInCenter(h,c)}else this._preview.setModel(this._previewNotAvailableMessage),a.dispose()})}};CKe=B8i([cS(3,I4),cS(4,W3),cS(5,Ds),cS(6,Akt),cS(7,ZJ),cS(8,ave),cS(9,J1),cS(10,s1),cS(11,B1)],CKe);var L8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},tG=function(r,e){return function(i,n){e(i,n,r)}},NDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const rO=new Kr("referenceSearchVisible",!1,V("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let YL=class bKe{static get(e){return e.getContribution(bKe.ID)}constructor(e,i,n,a,o,c,h,g){this._defaultTreeKeyboardSupport=e,this._editor=i,this._editorService=a,this._notificationService=o,this._instantiationService=c,this._storageService=h,this._configurationService=g,this._disposables=new du,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=rO.bindTo(n)}dispose(){var e,i;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,i,n){let a;if(this._widget&&(a=this._widget.position),this.closeWidget(),a&&e.containsPosition(a))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const o="peekViewLayout",c=w8i.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(CKe,this._editor,this._defaultTreeKeyboardSupport,c),this._widget.setTitle(V("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{i.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(g=>{const{element:_,kind:x}=g;if(_)switch(x){case"open":(g.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(_,!1,!1);break;case"side":this.openReference(_,!0,!1);break;case"goto":n?this._gotoReference(_,!0):this.openReference(_,!1,!0);break}}));const h=++this._requestIdPool;i.then(g=>{var _;if(h!==this._requestIdPool||!this._widget){g.dispose();return}return(_=this._model)===null||_===void 0||_.dispose(),this._model=g,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(V("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const x=this._editor.getModel().uri,y=new Vi(e.startLineNumber,e.startColumn),S=this._model.nearestReference(x,y);if(S)return this._widget.setSelection(S).then(()=>{this._widget&&this._editor.getOption(83)==="editor"&&this._widget.focusOnPreviewEditor()})}})},g=>{this._notificationService.error(g)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return NDt(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const i=this._widget.position;if(!i)return;const n=this._model.nearestReference(this._editor.getModel().uri,i);if(!n)return;const a=this._model.nextOrPreviousReference(n,e),o=this._editor.hasTextFocus(),c=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(a),yield this._gotoReference(a,!1),o?this._editor.focus():this._widget&&c&&this._widget.focusOnPreviewEditor()})}revealReference(e){return NDt(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var i,n;(i=this._widget)===null||i===void 0||i.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,i){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const a=ot.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:a,selectionSource:"code.jump",pinned:i}},this._editor).then(o=>{var c;if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(a),this._widget.focusOnReferenceTree();else{const h=bKe.get(o),g=this._model.clone();this.closeWidget(),o.focus(),h==null||h.toggleWidget(a,u4(_=>Promise.resolve(g)),(c=this._peekMode)!==null&&c!==void 0?c:!1)}},o=>{this._ignoreModelChangeEvent=!1,Bs(o)})}openReference(e,i,n){i||this.closeWidget();const{uri:a,range:o}=e;this._editorService.openCodeEditor({resource:a,options:{selection:o,selectionSource:"code.jump",pinned:n}},this._editor,i)}};YL.ID="editor.contrib.referencesController";YL=L8i([tG(2,Wo),tG(3,wl),tG(4,Lf),tG(5,Ds),tG(6,r2),tG(7,hl)],YL);function aO(r,e){const i=_8i(r);if(!i)return;const n=YL.get(i);n&&e(n)}H3.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Fm(2089,60),when:pu.or(rO,K3.inPeekEditor),handler(r){aO(r,e=>{e.changeFocusBetweenPreviewAndReferences()})}});H3.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:pu.or(rO,K3.inPeekEditor),handler(r){aO(r,e=>{e.goToNextOrPreviousReference(!0)})}});H3.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:pu.or(rO,K3.inPeekEditor),handler(r){aO(r,e=>{e.goToNextOrPreviousReference(!1)})}});O0.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");O0.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");O0.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");O0.registerCommand("closeReferenceSearch",r=>aO(r,e=>e.closeWidget()));H3.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:pu.and(K3.inPeekEditor,pu.not("config.editor.stablePeek"))});H3.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:pu.and(rO,pu.not("config.editor.stablePeek"))});H3.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:pu.and(rO,cyt,C$e.negate(),b$e.negate()),handler(r){var e;const n=(e=r.get(sv).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof ZL&&aO(r,a=>a.revealReference(n[0]))}});H3.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:pu.and(rO,cyt,C$e.negate(),b$e.negate()),handler(r){var e;const n=(e=r.get(sv).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof ZL&&aO(r,a=>a.openReference(n[0],!0,!0))}});O0.registerCommand("openReference",r=>{var e;const n=(e=r.get(sv).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof ZL&&aO(r,a=>a.openReference(n[0],!1,!0))});var Tkt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},kne=function(r,e){return function(i,n){e(i,n,r)}};const $$e=new Kr("hasSymbols",!1,V("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Hve=y0("ISymbolNavigationService");let yKe=class{constructor(e,i,n,a){this._editorService=i,this._notificationService=n,this._keybindingService=a,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=$$e.bindTo(e)}reset(){var e,i;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(i=this._currentMessage)===null||i===void 0||i.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const i=e.parent.parent;if(i.references.length<=1){this.reset();return}this._currentModel=i,this._currentIdx=i.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new kKe(this._editorService),a=n.onDidChange(o=>{if(this._ignoreEditorChange)return;const c=this._editorService.getActiveCodeEditor();if(!c)return;const h=c.getModel(),g=c.getPosition();if(!h||!g)return;let _=!1,x=!1;for(const y of i.references)if(uve(y.uri,h.uri))_=!0,x=x||ot.containsPosition(y.range,g);else if(_)break;(!_||!x)&&this.reset()});this._currentState=UC(n,a)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const i=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:i.uri,options:{selection:ot.collapseToStart(i.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const i=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=i?V("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,i.getLabel()):V("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};yKe=Tkt([kne(0,Wo),kne(1,wl),kne(2,Lf),kne(3,J1)],yKe);Z0(Hve,yKe,1);Zu(new class extends Fp{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:$$e,kbOpts:{weight:100,primary:70}})}runEditorCommand(r,e){return r.get(Hve).revealNext(e)}});H3.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:$$e,primary:9,handler(r){r.get(Hve).reset()}});let kKe=class{constructor(e){this._listener=new Map,this._disposables=new du,this._onDidChange=new yi,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),nc(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,UC(e.onDidChangeCursorPosition(i=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(i=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var i;(i=this._listener.get(e))===null||i===void 0||i.dispose(),this._listener.delete(e)}};kKe=Tkt([kne(0,wl)],kKe);var U$e=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};function Hae(r,e,i,n){return U$e(this,void 0,void 0,function*(){const o=i.ordered(r).map(h=>Promise.resolve(n(h,r,e)).then(void 0,g=>{z4(g)})),c=yield Promise.all(o);return _$(c.flat())})}function Kve(r,e,i,n){return Hae(e,i,r,(a,o,c)=>a.provideDefinition(o,c,n))}function Lkt(r,e,i,n){return Hae(e,i,r,(a,o,c)=>a.provideDeclaration(o,c,n))}function Nkt(r,e,i,n){return Hae(e,i,r,(a,o,c)=>a.provideImplementation(o,c,n))}function Pkt(r,e,i,n){return Hae(e,i,r,(a,o,c)=>a.provideTypeDefinition(o,c,n))}function Wve(r,e,i,n,a){return Hae(e,i,r,(o,c,h)=>U$e(this,void 0,void 0,function*(){const g=yield o.provideReferences(c,h,{includeDeclaration:!0},a);if(!n||!g||g.length!==2)return g;const _=yield o.provideReferences(c,h,{includeDeclaration:!1},a);return _&&_.length===1?_:g}))}function Kae(r){return U$e(this,void 0,void 0,function*(){const e=yield r(),i=new KD(e,""),n=i.references.map(a=>a.link);return i.dispose(),n})}KA("_executeDefinitionProvider",(r,e,i)=>{const n=r.get(ma),a=Kve(n.definitionProvider,e,i,g0.None);return Kae(()=>a)});KA("_executeTypeDefinitionProvider",(r,e,i)=>{const n=r.get(ma),a=Pkt(n.typeDefinitionProvider,e,i,g0.None);return Kae(()=>a)});KA("_executeDeclarationProvider",(r,e,i)=>{const n=r.get(ma),a=Lkt(n.declarationProvider,e,i,g0.None);return Kae(()=>a)});KA("_executeReferenceProvider",(r,e,i)=>{const n=r.get(ma),a=Wve(n.referenceProvider,e,i,!1,g0.None);return Kae(()=>a)});KA("_executeImplementationProvider",(r,e,i)=>{const n=r.get(ma),a=Nkt(n.implementationProvider,e,i,g0.None);return Kae(()=>a)});var ZC=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})},GRe,JRe,$Re,URe,qRe,ZRe,YRe,QRe;IE.appendMenuItem(Ht.EditorContext,{submenu:Ht.EditorContextPeek,title:V("peek.submenu","Peek"),group:"navigation",order:100});class a${static is(e){return!e||typeof e!="object"?!1:!!(e instanceof a$||Vi.isIPosition(e.position)&&e.model)}constructor(e,i){this.model=e,this.position=i}}class zE extends y${static all(){return zE._allSymbolNavigationCommands.values()}static _patchConfig(e){const i=Object.assign(Object.assign({},e),{f1:!0});if(i.menu)for(const n of I0.wrap(i.menu))(n.id===Ht.EditorContext||n.id===Ht.EditorContextPeek)&&(n.when=pu.and(e.precondition,n.when));return i}constructor(e,i){super(zE._patchConfig(i)),this.configuration=e,zE._allSymbolNavigationCommands.set(i.id,this)}runEditorCommand(e,i,n,a){if(!i.hasModel())return Promise.resolve(void 0);const o=e.get(Lf),c=e.get(wl),h=e.get(hN),g=e.get(Hve),_=e.get(ma),x=e.get(Ds),y=i.getModel(),S=i.getPosition(),L=a$.is(n)?n:new a$(y,S),O=new DR(i,5),G=z6e(this._getLocationModel(_,L.model,L.position,O.token),O.token).then(ie=>ZC(this,void 0,void 0,function*(){var ue;if(!ie||O.token.isCancellationRequested)return;vp(ie.ariaMessage);let re;if(ie.referenceAt(y.uri,S)){const ye=this._getAlternativeCommand(i);!zE._activeAlternativeCommands.has(ye)&&zE._allSymbolNavigationCommands.has(ye)&&(re=zE._allSymbolNavigationCommands.get(ye))}const _e=ie.references.length;if(_e===0){if(!this.configuration.muteMessage){const ye=y.getWordAtPosition(S);(ue=GD.get(i))===null||ue===void 0||ue.showMessage(this._getNoResultFoundMessage(ye),S)}}else if(_e===1&&re)zE._activeAlternativeCommands.add(this.desc.id),x.invokeFunction(ye=>re.runEditorCommand(ye,i,n,a).finally(()=>{zE._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(c,g,i,ie,a)}),ie=>{o.error(ie)}).finally(()=>{O.dispose()});return h.showWhile(G,250),G}_onResult(e,i,n,a,o){return ZC(this,void 0,void 0,function*(){const c=this._getGoToPreference(n);if(!(n instanceof qL)&&(this.configuration.openInPeek||c==="peek"&&a.references.length>1))this._openInPeek(n,a,o);else{const h=a.firstReference(),g=a.references.length>1&&c==="gotoAndPeek",_=yield this._openReference(n,e,h,this.configuration.openToSide,!g);g&&_?this._openInPeek(_,a,o):a.dispose(),c==="goto"&&i.put(h)}})}_openReference(e,i,n,a,o){return ZC(this,void 0,void 0,function*(){let c;if(Xmi(n)&&(c=n.targetSelectionRange),c||(c=n.range),!c)return;const h=yield i.openCodeEditor({resource:n.uri,options:{selection:ot.collapseToStart(c),selectionRevealType:3,selectionSource:"code.jump"}},e,a);if(h){if(o){const g=h.getModel(),_=h.createDecorationsCollection([{range:c,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{h.getModel()===g&&_.clear()},350)}return h}})}_openInPeek(e,i,n){const a=YL.get(e);a&&e.hasModel()?a.toggleWidget(n??e.getSelection(),u4(o=>Promise.resolve(i)),this.configuration.openInPeek):i.dispose()}}zE._allSymbolNavigationCommands=new Map;zE._activeAlternativeCommands=new Set;class Wae extends zE{_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Kve(e.definitionProvider,i,n,a),V("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?V("noResultWord","No definition found for '{0}'",e.word):V("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleDefinitions}}const Mkt=uN&&!GGe()?2118:70;Am((GRe=class FKe extends Wae{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:FKe.id,title:{value:V("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:V({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:pu.and(Rt.hasDefinitionProvider,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:Mkt,weight:100},menu:[{id:Ht.EditorContext,group:"navigation",order:1.1},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),O0.registerCommandAlias("editor.action.goToDeclaration",FKe.id)}},GRe.id="editor.action.revealDefinition",GRe));Am((JRe=class AKe extends Wae{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:AKe.id,title:{value:V("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:pu.and(Rt.hasDefinitionProvider,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:Fm(2089,Mkt),weight:100}}),O0.registerCommandAlias("editor.action.openDeclarationToTheSide",AKe.id)}},JRe.id="editor.action.revealDefinitionAside",JRe));Am(($Re=class SKe extends Wae{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:SKe.id,title:{value:V("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:pu.and(Rt.hasDefinitionProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Ht.EditorContextPeek,group:"peek",order:2}}),O0.registerCommandAlias("editor.action.previewDeclaration",SKe.id)}},$Re.id="editor.action.peekDefinition",$Re));class zkt extends zE{_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Lkt(e.declarationProvider,i,n,a),V("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?V("decl.noResultWord","No declaration found for '{0}'",e.word):V("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(56).multipleDeclarations}}Am((URe=class Ikt extends zkt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Ikt.id,title:{value:V("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:V({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:pu.and(Rt.hasDeclarationProvider,Rt.isInWalkThroughSnippet.toNegated()),menu:[{id:Ht.EditorContext,group:"navigation",order:1.3},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?V("decl.noResultWord","No declaration found for '{0}'",e.word):V("decl.generic.noResults","No declaration found")}},URe.id="editor.action.revealDeclaration",URe));Am(class extends zkt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:V("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:pu.and(Rt.hasDeclarationProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),menu:{id:Ht.EditorContextPeek,group:"peek",order:3}})}});class Rkt extends zE{_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Pkt(e.typeDefinitionProvider,i,n,a),V("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?V("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):V("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleTypeDefinitions}}Am((qRe=class Okt extends Rkt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Okt.ID,title:{value:V("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:V({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:pu.and(Rt.hasTypeDefinitionProvider,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:0,weight:100},menu:[{id:Ht.EditorContext,group:"navigation",order:1.4},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},qRe.ID="editor.action.goToTypeDefinition",qRe));Am((ZRe=class jkt extends Rkt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:jkt.ID,title:{value:V("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:pu.and(Rt.hasTypeDefinitionProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),menu:{id:Ht.EditorContextPeek,group:"peek",order:4}})}},ZRe.ID="editor.action.peekTypeDefinition",ZRe));class Vkt extends zE{_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Nkt(e.implementationProvider,i,n,a),V("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?V("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):V("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(56).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(56).multipleImplementations}}Am((YRe=class Hkt extends Vkt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Hkt.ID,title:{value:V("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:V({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:pu.and(Rt.hasImplementationProvider,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:2118,weight:100},menu:[{id:Ht.EditorContext,group:"navigation",order:1.45},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},YRe.ID="editor.action.goToImplementation",YRe));Am((QRe=class Kkt extends Vkt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Kkt.ID,title:{value:V("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:pu.and(Rt.hasImplementationProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:3142,weight:100},menu:{id:Ht.EditorContextPeek,group:"peek",order:5}})}},QRe.ID="editor.action.peekImplementation",QRe));class Wkt extends zE{_getNoResultFoundMessage(e){return e?V("references.no","No references found for '{0}'",e.word):V("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(56).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(56).multipleReferences}}Am(class extends Wkt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:V("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:V({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:pu.and(Rt.hasReferenceProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:1094,weight:100},menu:[{id:Ht.EditorContext,group:"navigation",order:1.45},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Wve(e.referenceProvider,i,n,!0,a),V("ref.title","References"))})}});Am(class extends Wkt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:V("references.action.label","Peek References"),original:"Peek References"},precondition:pu.and(Rt.hasReferenceProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),menu:{id:Ht.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Wve(e.referenceProvider,i,n,!1,a),V("ref.title","References"))})}});class N8i extends zE{constructor(e,i,n){super(e,{id:"editor.action.goToLocation",title:{value:V("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:pu.and(K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated())}),this._references=i,this._gotoMultipleBehaviour=n}_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(this._references,V("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&V("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var i;return(i=this._gotoMultipleBehaviour)!==null&&i!==void 0?i:e.getOption(56).multipleReferences}_getAlternativeCommand(){return""}}O0.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:to},{name:"position",description:"The position at which to start",constraint:Vi.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(r,e,i,n,a,o,c)=>ZC(void 0,void 0,void 0,function*(){bc(to.isUri(e)),bc(Vi.isIPosition(i)),bc(Array.isArray(n)),bc(typeof a>"u"||typeof a=="string"),bc(typeof c>"u"||typeof c=="boolean");const h=r.get(wl),g=yield h.openCodeEditor({resource:e},h.getFocusedCodeEditor());if(MA(g))return g.setPosition(i),g.revealPositionInCenterIfOutsideViewport(i,0),g.invokeWithinContext(_=>{const x=new class extends N8i{_getNoResultFoundMessage(y){return o||super._getNoResultFoundMessage(y)}}({muteMessage:!o,openInPeek:!!c,openToSide:!1},n,a);_.get(Ds).invokeFunction(x.run.bind(x),g)})})});O0.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:to},{name:"position",description:"The position at which to start",constraint:Vi.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(r,e,i,n,a)=>ZC(void 0,void 0,void 0,function*(){r.get(Zh).executeCommand("editor.action.goToLocations",e,i,n,a,void 0,!0)})});O0.registerCommand({id:"editor.action.findReferences",handler:(r,e,i)=>{bc(to.isUri(e)),bc(Vi.isIPosition(i));const n=r.get(ma),a=r.get(wl);return a.openCodeEditor({resource:e},a.getFocusedCodeEditor()).then(o=>{if(!MA(o)||!o.hasModel())return;const c=YL.get(o);if(!c)return;const h=u4(_=>Wve(n.referenceProvider,o.getModel(),Vi.lift(i),!1,_).then(x=>new KD(x,V("ref.title","References")))),g=new ot(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(c.toggleWidget(g,h,!1))})}});O0.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var P8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},XRe=function(r,e){return function(i,n){e(i,n,r)}},PDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let AR=class vDe{constructor(e,i,n,a){this.textModelResolverService=i,this.languageService=n,this.languageFeaturesService=a,this.toUnhook=new du,this.toUnhookForKeyboard=new du,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new Ive(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([c,h])=>{this.startFindDefinitionFromMouse(c,xp(h))})),this.toUnhook.add(o.onExecute(c=>{this.isEnabled(c)&&this.gotoDefinition(c.target.position,c.hasSideBySideModifier).catch(h=>{Bs(h)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(vDe.ID)}startFindDefinitionFromCursor(e){return PDt(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(i=>{i&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,i){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,i)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var i;return PDt(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const n=e?(i=this.editor.getModel())===null||i===void 0?void 0:i.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const a=new Lyt(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=u4(h=>this.findDefinition(e,h));let o;try{o=yield this.previousPromise}catch(h){Bs(h);return}if(!o||!o.length||!a.validate(this.editor)){this.removeLinkDecorations();return}const c=o[0].originSelectionRange?ot.lift(o[0].originSelectionRange):new ot(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(o.length>1){let h=c;for(const{originSelectionRange:g}of o)g&&(h=ot.plusRange(h,g));this.addDecoration(h,new M3().appendText(V("multipleResults","Click to show {0} definitions.",o.length)))}else{const h=o[0];if(!h.uri)return;this.textModelResolverService.createModelReference(h.uri).then(g=>{if(!g.object||!g.object.textEditorModel){g.dispose();return}const{object:{textEditorModel:_}}=g,{startLineNumber:x}=h.range;if(x<1||x>_.getLineCount()){g.dispose();return}const y=this.getPreviewValue(_,x,h),S=this.languageService.guessLanguageIdByFilepathOrFirstLine(_.uri);this.addDecoration(c,y?new M3().appendCodeblock(S||"",y):void 0),g.dispose()})}})}getPreviewValue(e,i,n){let a=n.range;return a.endLineNumber-a.startLineNumber>=vDe.MAX_SOURCE_PREVIEW_LINES&&(a=this.getPreviewRangeBasedOnIndentation(e,i)),this.stripIndentationFromPreviewRange(e,i,a)}stripIndentationFromPreviewRange(e,i,n){let o=e.getLineFirstNonWhitespaceColumn(i);for(let h=i+1;h{const a=!i&&this.editor.getOption(84)&&!this.isInPeekEditor(n);return new Wae({openToSide:i,openInPeek:a,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const i=e.get(Wo);return K3.inPeekEditor.getValue(i)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};AR.ID="editor.contrib.gotodefinitionatposition";AR.MAX_SOURCE_PREVIEW_LINES=8;AR=P8i([XRe(1,W3),XRe(2,s1),XRe(3,ma)],AR);fl(AR.ID,AR,2);const p3e=Pu;class Gkt extends sn{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new kae(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class q$e extends sn{static render(e,i,n){return new q$e(e,i,n)}constructor(e,i,n){super(),this.actionContainer=Yn(e,p3e("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Yn(this.actionContainer,p3e("a.action")),this.action.setAttribute("role","button"),i.iconClass&&Yn(this.action,p3e(`span.icon.${i.iconClass}`));const a=Yn(this.action,p3e("span"));a.textContent=n?`${i.label} (${n})`:i.label,this._register(Vn(this.actionContainer,wr.CLICK,o=>{o.stopPropagation(),o.preventDefault(),i.run(this.actionContainer)})),this._register(Vn(this.actionContainer,wr.KEY_DOWN,o=>{const c=new xd(o);(c.equals(3)||c.equals(10))&&(o.stopPropagation(),o.preventDefault(),i.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var M8i=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})},z8i=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],i;return e?e.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),i={},n("next"),n("throw"),n("return"),i[Symbol.asyncIterator]=function(){return this},i);function n(o){i[o]=r[o]&&function(c){return new Promise(function(h,g){c=r[o](c),a(h,g,c.done,c.value)})}}function a(o,c,h,g){Promise.resolve(g).then(function(_){o({value:_,done:h})},c)}};let I8i=class{constructor(e,i,n){this.value=e,this.isComplete=i,this.hasLoadingMessage=n}};class Jkt extends sn{constructor(e,i){super(),this._editor=e,this._computer=i,this._onResult=this._register(new yi),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Zc(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Zc(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Zc(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(58).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,i=!0){this._state=e,i&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=Ppi(e=>this._computer.computeAsync(e)),M8i(this,void 0,void 0,function*(){var e,i,n,a;try{try{for(var o=!0,c=z8i(this._asyncIterable),h;h=yield c.next(),e=h.done,!e;){a=h.value,o=!1;try{const g=a;g&&(this._result.push(g),this._fireResult())}finally{o=!0}}}catch(g){i={error:g}}finally{try{!o&&!e&&(n=c.return)&&(yield n.call(c))}finally{if(i)throw i.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(g){Bs(g)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,i=this._state===4;this._onResult.fire(new I8i(this._result.slice(0),e,i))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class eOe{constructor(e,i,n,a){this.priority=e,this.range=i,this.initialMousePosX=n,this.initialMousePosY=a,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,i){return e.type===1&&i.lineNumber===this.range.startLineNumber}}class CDe{constructor(e,i,n,a,o,c){this.priority=e,this.owner=i,this.range=n,this.initialMousePosX=a,this.initialMousePosY=o,this.supportsMarkerHover=c,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,i){return e.type===2&&this.owner===e.owner}}const oO=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class jC{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let i=0,n=this.value.charCodeAt(e),a;if(a=jC._table[n],typeof a=="number")return this.pos+=1,{type:a,pos:e,len:1};if(jC.isDigitCharacter(n)){a=8;do i+=1,n=this.value.charCodeAt(e+i);while(jC.isDigitCharacter(n));return this.pos+=i,{type:a,pos:e,len:i}}if(jC.isVariableCharacter(n)){a=9;do n=this.value.charCodeAt(e+ ++i);while(jC.isVariableCharacter(n)||jC.isDigitCharacter(n));return this.pos+=i,{type:a,pos:e,len:i}}a=10;do i+=1,n=this.value.charCodeAt(e+i);while(!isNaN(n)&&typeof jC._table[n]>"u"&&!jC.isDigitCharacter(n)&&!jC.isVariableCharacter(n));return this.pos+=i,{type:a,pos:e,len:i}}}jC._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class L${constructor(){this._children=[]}appendChild(e){return e instanceof w_&&this._children[this._children.length-1]instanceof w_?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,i){const{parent:n}=e,a=n.children.indexOf(e),o=n.children.slice(0);o.splice(a,1,...i),n._children=o,function c(h,g){for(const _ of h)_.parent=g,c(_.children,_)}(i,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Gae)return e;e=e.parent}}toString(){return this.children.reduce((e,i)=>e+i.toString(),"")}len(){return 0}}class w_ extends L${constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new w_(this.value)}}class $kt extends L${}class R6 extends $kt{static compareByIndex(e,i){return e.index===i.index?0:e.isFinalTabstop?1:i.isFinalTabstop||e.indexi.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof N$?this._children[0]:void 0}clone(){const e=new R6(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(i=>i.clone()),e}}class N$ extends L${constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof w_&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new N$;return this.options.forEach(e.appendChild,e),e}}class Z$e extends L${constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const i=this;let n=!1,a=e.replace(this.regexp,function(){return n=!0,i._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(o=>o instanceof Yb&&!!o.elseValue)&&(a=this._replace([])),a}_replace(e){let i="";for(const n of this._children)if(n instanceof Yb){let a=e[n.index]||"";a=n.resolve(a),i+=a}else i+=n.toString();return i}toString(){return""}clone(){const e=new Z$e;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(i=>i.clone()),e}}class Yb extends L${constructor(e,i,n,a){super(),this.index=e,this.shorthandName=i,this.ifValue=n,this.elseValue=a}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const i=e.match(/[a-z0-9]+/gi);return i?i.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){const i=e.match(/[a-z0-9]+/gi);return i?i.map((n,a)=>a===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new Yb(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class kre extends $kt{constructor(e){super(),this.name=e}resolve(e){let i=e.resolve(this);return this.transform&&(i=this.transform.resolve(i||"")),i!==void 0?(this._children=[new w_(i)],!0):!1}clone(){const e=new kre(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(i=>i.clone()),e}}function MDt(r,e){const i=[...r];for(;i.length>0;){const n=i.shift();if(!e(n))break;i.unshift(...n.children)}}class Gae extends L${get placeholderInfo(){if(!this._placeholders){const e=[];let i;this.walk(function(n){return n instanceof R6&&(e.push(n),i=!i||i.indexa===e?(n=!0,!1):(i+=a.len(),!0)),n?i:-1}fullLen(e){let i=0;return MDt([e],n=>(i+=n.len(),!0)),i}enclosingPlaceholders(e){const i=[];let{parent:n}=e;for(;n;)n instanceof R6&&i.push(n),n=n.parent;return i}resolveVariables(e){return this.walk(i=>(i instanceof kre&&i.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,i){return this._placeholders=void 0,super.replace(e,i)}clone(){const e=new Gae;return this._children=this.children.map(i=>i.clone()),e}walk(e){MDt(this.children,e)}}class QL{constructor(){this._scanner=new jC,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,i,n){const a=new Gae;return this.parseFragment(e,a),this.ensureFinalTabstop(a,n??!1,i??!1),a}parseFragment(e,i){const n=i.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(i););const a=new Map,o=[];i.walk(g=>(g instanceof R6&&(g.isFinalTabstop?a.set(0,void 0):!a.has(g.index)&&g.children.length>0?a.set(g.index,g.children):o.push(g)),!0));const c=(g,_)=>{const x=a.get(g.index);if(!x)return;const y=new R6(g.index);y.transform=g.transform;for(const S of x){const L=S.clone();y.appendChild(L),L instanceof R6&&a.has(L.index)&&!_.has(L.index)&&(_.add(L.index),c(L,_),_.delete(L.index))}i.replace(g,[y])},h=new Set;for(const g of o)c(g,h);return i.children.slice(n)}ensureFinalTabstop(e,i,n){(i||n&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new R6(0)))}_accept(e,i){if(e===void 0||this._token.type===e){const n=i?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const i=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const a=this._scanner.next();if(a.type!==0&&a.type!==4&&a.type!==5)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(i.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let i;return(i=this._accept(5,!0))?(i=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||i,e.appendChild(new w_(i)),!0):!1}_parseTabstopOrVariableName(e){let i;const n=this._token;return this._accept(0)&&(i=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(i)?new R6(Number(i)):new kre(i)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let i;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(i=this._accept(8,!0))))return this._backTo(n);const o=new R6(Number(i));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new w_("${"+i+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){const c=new N$;for(;;){if(this._parseChoiceElement(c)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(c),this._accept(4)))return e.appendChild(o),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseChoiceElement(e){const i=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let a;if((a=this._accept(5,!0))?a=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||a:a=this._accept(void 0,!0),!a)return this._backTo(i),!1;n.push(a)}return n.length===0?(this._backTo(i),!1):(e.appendChild(new w_(n.join(""))),!0)}_parseComplexVariable(e){let i;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(i=this._accept(9,!0))))return this._backTo(n);const o=new kre(i);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new w_("${"+i+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseTransform(e){const i=new Z$e;let n="",a="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,n+=o;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,i.appendChild(new w_(o));continue}if(!(this._parseFormatString(i)||this._parseAnything(i)))return!1}for(;!this._accept(4);){if(this._token.type!==14){a+=this._accept(void 0,!0);continue}return!1}try{i.regexp=new RegExp(n,a)}catch{return!1}return e.transform=i,!0}_parseFormatString(e){const i=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);const a=this._accept(8,!0);if(a)if(n){if(this._accept(4))return e.appendChild(new Yb(Number(a))),!0;if(!this._accept(1))return this._backTo(i),!1}else return e.appendChild(new Yb(Number(a))),!0;else return this._backTo(i),!1;if(this._accept(6)){const o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(i),!1):(e.appendChild(new Yb(Number(a),o)),!0)}else if(this._accept(11)){const o=this._until(4);if(o)return e.appendChild(new Yb(Number(a),void 0,o,void 0)),!0}else if(this._accept(12)){const o=this._until(4);if(o)return e.appendChild(new Yb(Number(a),void 0,void 0,o)),!0}else if(this._accept(13)){const o=this._until(1);if(o){const c=this._until(4);if(c)return e.appendChild(new Yb(Number(a),void 0,o,c)),!0}}else{const o=this._until(4);if(o)return e.appendChild(new Yb(Number(a),void 0,void 0,o)),!0}return this._backTo(i),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new w_(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const R8i=V("defaultLabel","input"),O8i=V("label.preserveCaseToggle","Preserve Case");class j8i extends w${constructor(e){super({icon:dr.preserveCase,title:O8i+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class V8i extends rv{constructor(e,i,n,a){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new yi),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new yi),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new yi),this._onInput=this._register(new yi),this._onKeyUp=this._register(new yi),this._onPreserveCaseKeyDown=this._register(new yi),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=i,this.placeholder=a.placeholder||"",this.validation=a.validation,this.label=a.label||R8i;const o=a.appendPreserveCaseLabel||"",c=a.history||[],h=!!a.flexibleHeight,g=!!a.flexibleWidth,_=a.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new eyt(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:c,showHistoryHint:a.showHistoryHint,flexibleHeight:h,flexibleWidth:g,flexibleMaxHeight:_,inputBoxStyles:a.inputBoxStyles})),this.preserveCase=this._register(new j8i(Object.assign({appendTitle:o,isChecked:!1},a.toggleStyles))),this._register(this.preserveCase.onChange(S=>{this._onDidOptionChange.fire(S),!S&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(S=>{this._onPreserveCaseKeyDown.fire(S)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const x=[this.preserveCase.domNode];this.onkeydown(this.domNode,S=>{if(S.equals(15)||S.equals(17)||S.equals(9)){const L=x.indexOf(document.activeElement);if(L>=0){let O=-1;S.equals(17)?O=(L+1)%x.length:S.equals(15)&&(L===0?O=x.length-1:O=L-1),S.equals(9)?(x[L].blur(),this.inputBox.focus()):O>=0&&x[O].focus(),Ws.stop(S,!0)}}});const y=document.createElement("div");y.className="controls",y.style.display=this._showOptionButtons?"block":"none",y.appendChild(this.preserveCase.domNode),this.domNode.appendChild(y),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,S=>this._onKeyDown.fire(S)),this.onkeyup(this.inputBox.inputElement,S=>this._onKeyUp.fire(S)),this.oninput(this.inputBox.inputElement,S=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,S=>this._onMouseDown.fire(S))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var Ukt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},qkt=function(r,e){return function(i,n){e(i,n,r)}};const Y$e=new Kr("suggestWidgetVisible",!1,V("suggestWidgetVisible","Whether suggestion are visible")),Q$e="historyNavigationWidgetFocus",Zkt="historyNavigationForwardsEnabled",Ykt="historyNavigationBackwardsEnabled";let US;const g3e=[];function Qkt(r,e){if(g3e.includes(e))throw new Error("Cannot register the same widget multiple times");g3e.push(e);const i=new du,n=new Kr(Q$e,!1).bindTo(r),a=new Kr(Zkt,!0).bindTo(r),o=new Kr(Ykt,!0).bindTo(r),c=()=>{n.set(!0),US=e},h=()=>{n.set(!1),US===e&&(US=void 0)};return e.element===document.activeElement&&c(),i.add(e.onDidFocus(()=>c())),i.add(e.onDidBlur(()=>h())),i.add(Ss(()=>{g3e.splice(g3e.indexOf(e),1),h()})),{historyNavigationForwardsEnablement:a,historyNavigationBackwardsEnablement:o,dispose(){i.dispose()}}}let BKe=class extends tyt{constructor(e,i,n,a){super(e,i,n);const o=this._register(a.createScoped(this.inputBox.element));this._register(Qkt(o,this.inputBox))}};BKe=Ukt([qkt(3,Wo)],BKe);let wKe=class extends V8i{constructor(e,i,n,a,o=!1){super(e,i,o,n);const c=this._register(a.createScoped(this.inputBox.element));this._register(Qkt(c,this.inputBox))}};wKe=Ukt([qkt(3,Wo)],wKe);H3.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:pu.and(pu.has(Q$e),pu.equals(Ykt,!0),Y$e.isEqualTo(!1)),primary:16,secondary:[528],handler:r=>{US==null||US.showPreviousValue()}});H3.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:pu.and(pu.has(Q$e),pu.equals(Zkt,!0),Y$e.isEqualTo(!1)),primary:18,secondary:[530],handler:r=>{US==null||US.showNextValue()}});var sue=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const Ns={Visible:Y$e,HasFocusedSuggestion:new Kr("suggestWidgetHasFocusedSuggestion",!1,V("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Kr("suggestWidgetDetailsVisible",!1,V("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Kr("suggestWidgetMultipleSuggestions",!1,V("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Kr("suggestionMakesTextEdit",!0,V("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Kr("acceptSuggestionOnEnter",!0,V("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Kr("suggestionHasInsertAndReplaceRange",!1,V("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Kr("suggestionInsertMode",void 0,{type:"string",description:V("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Kr("suggestionCanResolve",!1,V("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},AL=new Ht("suggestWidgetStatusBar");class H8i{constructor(e,i,n,a){var o;this.position=e,this.completion=i,this.container=n,this.provider=a,this.isInvalid=!1,this.score=xy.Default,this.distance=0,this.textLabel=typeof i.label=="string"?i.label:(o=i.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=i.sortText&&i.sortText.toLowerCase(),this.filterTextLow=i.filterText&&i.filterText.toLowerCase(),this.extensionId=i.extensionId,ot.isIRange(i.range)?(this.editStart=new Vi(i.range.startLineNumber,i.range.startColumn),this.editInsertEnd=new Vi(i.range.endLineNumber,i.range.endColumn),this.editReplaceEnd=new Vi(i.range.endLineNumber,i.range.endColumn),this.isInvalid=this.isInvalid||ot.spansMultipleLines(i.range)||i.range.startLineNumber!==e.lineNumber):(this.editStart=new Vi(i.range.insert.startLineNumber,i.range.insert.startColumn),this.editInsertEnd=new Vi(i.range.insert.endLineNumber,i.range.insert.endColumn),this.editReplaceEnd=new Vi(i.range.replace.endLineNumber,i.range.replace.endColumn),this.isInvalid=this.isInvalid||ot.spansMultipleLines(i.range.insert)||ot.spansMultipleLines(i.range.replace)||i.range.insert.startLineNumber!==e.lineNumber||i.range.replace.startLineNumber!==e.lineNumber||i.range.insert.startColumn!==i.range.replace.startColumn),typeof a.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return sue(this,void 0,void 0,function*(){if(!this._resolveCache){const i=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._isResolved=!0,i.dispose()},n=>{Ny(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class Fre{constructor(e=2,i=new Set,n=new Set,a=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=i,this.providerFilter=n,this.providerItemsToReuse=a,this.showDeprecated=o}}Fre.default=new Fre;let K8i;function W8i(){return K8i}class G8i{constructor(e,i,n,a){this.items=e,this.needsClipboard=i,this.durations=n,this.disposable=a}}function X$e(r,e,i,n=Fre.default,a={triggerKind:0},o=g0.None){return sue(this,void 0,void 0,function*(){const c=new j3(!0);i=i.clone();const h=e.getWordAtPosition(i),g=h?new ot(i.lineNumber,h.startColumn,i.lineNumber,h.endColumn):ot.fromPositions(i),_={replace:g,insert:g.setEndPosition(i.lineNumber,i.column)},x=[],y=new du,S=[];let L=!1;const O=(ie,ue,re)=>{var _e,ye,Le;let lt=!1;if(!ue)return lt;for(const $e of ue.suggestions)if(!n.kindFilter.has($e.kind)){if(!n.showDeprecated&&(!((_e=$e==null?void 0:$e.tags)===null||_e===void 0)&&_e.includes(1)))continue;$e.range||($e.range=_),$e.sortText||($e.sortText=typeof $e.label=="string"?$e.label:$e.label.label),!L&&$e.insertTextRules&&$e.insertTextRules&4&&(L=QL.guessNeedsClipboard($e.insertText)),x.push(new H8i(i,$e,ue,ie)),lt=!0}return SGe(ue)&&y.add(ue),S.push({providerName:(ye=ie._debugDisplayName)!==null&&ye!==void 0?ye:"unknown_provider",elapsedProvider:(Le=ue.duration)!==null&&Le!==void 0?Le:-1,elapsedOverall:re.elapsed()}),lt},G=sue(this,void 0,void 0,function*(){});for(const ie of r.orderedGroups(e)){let ue=!1;if(yield Promise.all(ie.map(re=>sue(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(re)){const _e=n.providerItemsToReuse.get(re);_e.forEach(ye=>x.push(ye)),ue=ue||_e.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(re)))try{const _e=new j3(!0),ye=yield re.provideCompletionItems(e,i,a,o);ue=O(re,ye,_e)||ue}catch(_e){z4(_e)}}))),ue||o.isCancellationRequested)break}return yield G,o.isCancellationRequested?(y.dispose(),Promise.reject(new rN)):new G8i(x.sort(U8i(n.snippetSortOrder)),L,{entries:S,elapsed:c.elapsed()},y)})}function eUe(r,e){if(r.sortTextLow&&e.sortTextLow){if(r.sortTextLowe.sortTextLow)return 1}return r.textLabele.textLabel?1:r.completion.kind-e.completion.kind}function J8i(r,e){if(r.completion.kind!==e.completion.kind){if(r.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return eUe(r,e)}function $8i(r,e){if(r.completion.kind!==e.completion.kind){if(r.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return eUe(r,e)}const Gve=new Map;Gve.set(0,J8i);Gve.set(2,$8i);Gve.set(1,eUe);function U8i(r){return Gve.get(r)}O0.registerCommand("_executeCompletionItemProvider",(r,...e)=>sue(void 0,void 0,void 0,function*(){const[i,n,a,o]=e;bc(to.isUri(i)),bc(Vi.isIPosition(n)),bc(typeof a=="string"||!a),bc(typeof o=="number"||!o);const{completionProvider:c}=r.get(ma),h=yield r.get(W3).createModelReference(i);try{const g={incomplete:!1,suggestions:[]},_=[],x=h.object.textEditorModel.validatePosition(n),y=yield X$e(c,h.object.textEditorModel,x,void 0,{triggerCharacter:a??void 0,triggerKind:a?1:0});for(const S of y.items)_.length<(o??0)&&_.push(S.resolve(g0.None)),g.incomplete=g.incomplete||S.container.incomplete,g.suggestions.push(S.completion);try{return yield Promise.all(_),g}finally{setTimeout(()=>y.disposable.dispose(),100)}}finally{h.dispose()}}));function q8i(r,e){var i;(i=r.getContribution("editor.contrib.suggestController"))===null||i===void 0||i.triggerSuggest(new Set().add(e),void 0,!0)}class KG{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,i){switch(i){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}var tUe=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},bxe=function(r,e){return function(i,n){e(i,n,r)}};const zDt=Pu;let yxe=class TKe extends sn{constructor(e,i,n){super(),this._editor=e,this._instantiationService=i,this._keybindingService=n,this._widget=this._register(this._instantiationService.createInstance(tR,this._editor)),this._currentResult=null,this._participants=[];for(const a of oO.getAll())this._participants.push(this._instantiationService.createInstance(a,this._editor));this._participants.sort((a,o)=>a.hoverOrdinal-o.hoverOrdinal),this._computer=new kxe(this._editor,this._participants),this._hoverOperation=this._register(new Jkt(this._editor,this._computer)),this._register(this._hoverOperation.onResult(a=>{if(!this._computer.anchor)return;const o=a.hasLoadingMessage?this._addLoadingMessage(a.value):a.value;this._withResult(new Xkt(this._computer.anchor,o,a.isComplete))})),this._register(pf(this._widget.getDomNode(),"keydown",a=>{a.equals(9)&&this.hide()})),this._register(ah.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(e){const i=[];for(const a of this._participants)if(a.suggestHoverAnchor){const o=a.suggestHoverAnchor(e);o&&i.push(o)}const n=e.target;if(n.type===6&&i.push(new eOe(0,n.range,e.event.posx,e.event.posy)),n.type===7){const a=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTexto.priority-a.priority),this._startShowingOrUpdateHover(i[0],0,0,!1,e))}startShowingAtRange(e,i,n,a){this._startShowingOrUpdateHover(new eOe(0,e,void 0,void 0),i,n,a,null)}_startShowingOrUpdateHover(e,i,n,a,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,i,n,a,!1),!0):!1:this._editor.getOption(58).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,i,n,a,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,i,n,a,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,i,n,a,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,i,n,a,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=a,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(i))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}isColorPickerVisible(){return this._widget.isColorPickerVisible}isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}isVisible(){return this._widget.isVisible}containsNode(e){return this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor){for(const i of this._participants)if(i.createLoadingMessage){const n=i.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,i){const{showAtPosition:n,showAtSecondaryPosition:a,highlightRange:o}=TKe.computeHoverRanges(this._editor,e.range,i),c=new du,h=c.add(new LKe(this._keybindingService)),g=document.createDocumentFragment();let _=null;const x={fragment:g,statusBar:h,setColorPicker:S=>_=S,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const S of this._participants){const L=i.filter(O=>O.owner===S);L.length>0&&c.add(S.renderHoverParts(x,L))}const y=i.some(S=>S.isBeforeContent);if(h.hasContent&&g.appendChild(h.hoverElement),g.hasChildNodes()){if(o){const S=this._editor.createDecorationsCollection();S.set([{range:o,options:TKe._DECORATION_OPTIONS}]),c.add(Ss(()=>{S.clear()}))}this._widget.showAt(g,new Y8i(_,n,a,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,y,e.initialMousePosX,e.initialMousePosY,c))}else c.dispose()}static computeHoverRanges(e,i,n){let a=1;if(e.hasModel()){const _=e._getViewModel(),x=_.coordinatesConverter,y=x.convertModelRangeToViewRange(i),S=new Vi(y.startLineNumber,_.getLineMinColumn(y.startLineNumber));a=x.convertViewPositionToModelPosition(S).column}const o=i.startLineNumber;let c=i.startColumn,h=n[0].range,g=null;for(const _ of n)h=ot.plusRange(h,_.range),_.range.startLineNumber===o&&_.range.endLineNumber===o&&(c=Math.max(Math.min(c,_.range.startColumn),a)),_.forceShowAtRange&&(g=_.range);return{showAtPosition:g?g.getStartPosition():new Vi(o,i.startColumn),showAtSecondaryPosition:g?g.getStartPosition():new Vi(o,c),highlightRange:h}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}escape(){this._widget.escape()}};yxe._DECORATION_OPTIONS=As.register({description:"content-hover-highlight",className:"hoverHighlight"});yxe=tUe([bxe(1,Ds),bxe(2,J1)],yxe);class Xkt{constructor(e,i,n){this.anchor=e,this.messages=i,this.isComplete=n}filter(e){const i=this.messages.filter(n=>n.isValidForHoverAnchor(e));return i.length===this.messages.length?this:new Z8i(this,this.anchor,i,this.isComplete)}}class Z8i extends Xkt{constructor(e,i,n,a){super(i,n,a),this.original=e}filter(e){return this.original.filter(e)}}class Y8i{constructor(e,i,n,a,o,c,h,g,_,x){this.colorPicker=e,this.showAtPosition=i,this.showAtSecondaryPosition=n,this.preferAbove=a,this.stoleFocus=o,this.source=c,this.isBeforeContent=h,this.initialMousePosX=g,this.initialMousePosY=_,this.disposables=x,this.closestMouseDistance=void 0}}let tR=class eFt extends sn{get position(){var e,i;return(i=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&i!==void 0?i:null}get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}constructor(e,i){super(),this._editor=e,this._contextKeyService=i,this.allowEditorOverflow=!0,this._hoverVisibleKey=Rt.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=Rt.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new Gkt),this._focusTracker=this._register(i8(this.getDomNode())),this._horizontalScrollingBy=30,this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(48)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this),this._register(this._focusTracker.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(this._focusTracker.onDidBlur(()=>{this._hoverFocusedKey.set(!1)}))}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return eFt.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(Ns.Visible.key)&&(e=!0);const i=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:e?[1,2]:[2,1],positionAffinity:i}}isMouseGettingCloser(e,i){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=i,!1;const n=N4(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=IDt(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const a=IDt(e,i,n.left,n.top,n.width,n.height);return a>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,a),!0)}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:i,lineHeight:n}=this._editor.getOption(48);this._hover.contentsDomNode.style.fontSize=`${i}px`,this._hover.contentsDomNode.style.lineHeight=`${n/i}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(i=>this._editor.applyFontInfo(i))}showAt(e,i){var n;this._setVisibleData(i),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),i.stoleFocus&&this._hover.containerDomNode.focus(),(n=i.colorPicker)===null||n===void 0||n.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const n=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==n&&(this._hover.contentsDomNode.style.paddingBottom=n,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e-i.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e+i.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-this._horizontalScrollingBy})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+this._horizontalScrollingBy})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-i})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+i})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}escape(){this._editor.focus()}};tR.ID="editor.contrib.contentHoverWidget";tR=tUe([bxe(1,Wo)],tR);let LKe=class extends sn{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=zDt("div.hover-row.status-bar"),this.actionsElement=Yn(this.hoverElement,zDt("div.actions"))}addAction(e){const i=this._keybindingService.lookupKeybinding(e.commandId),n=i?i.getLabel():null;return this._hasContent=!0,this._register(q$e.render(this.actionsElement,e,n))}append(e){const i=Yn(this.actionsElement,e);return this._hasContent=!0,i}};LKe=tUe([bxe(0,J1)],LKe);class kxe{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,i){this._editor=e,this._participants=i,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,i){if(i.type!==1&&!i.supportsMarkerHover)return[];const n=e.getModel(),a=i.range.startLineNumber;if(a>n.getLineCount())return[];const o=n.getLineMaxColumn(a);return e.getLineDecorations(a).filter(c=>{if(c.options.isWholeLine)return!0;const h=c.range.startLineNumber===a?c.range.startColumn:1,g=c.range.endLineNumber===a?c.range.endColumn:o;if(c.options.showIfCollapsed){if(h>i.range.startColumn+1||i.range.endColumn-1>g)return!1}else if(h>i.range.startColumn||i.range.endColumn>g)return!1;return!0})}computeAsync(e){const i=this._anchor;if(!this._editor.hasModel()||!i)return Bf.EMPTY;const n=kxe._getLineDecorations(this._editor,i);return Bf.merge(this._participants.map(a=>a.computeAsync?a.computeAsync(i,n,e):Bf.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=kxe._getLineDecorations(this._editor,this._anchor);let i=[];for(const n of this._participants)i=i.concat(n.computeSync(this._anchor,e));return _$(i)}}function IDt(r,e,i,n,a,o){const c=i+a/2,h=n+o/2,g=Math.max(Math.abs(r-c)-a/2,0),_=Math.max(Math.abs(e-h)-o/2,0);return Math.sqrt(g*g+_*_)}var Q8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},RDt=function(r,e){return function(i,n){e(i,n,r)}},tFt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})},tOe;let r8=class iFt{constructor(e,i,n){this._options=e,this._languageService=i,this._openerService=n,this._onDidRenderAsync=new yi,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,i,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const a=new du,o=a.add(i$e(e,Object.assign(Object.assign({},this._getRenderOptions(e,a)),i),n));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>a.dispose()}}_getRenderOptions(e,i){return{codeBlockRenderer:(n,a)=>tFt(this,void 0,void 0,function*(){var o,c,h;let g;n?g=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(g=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),g||(g=hx);const _=yield Svi(this._languageService,a,g),x=document.createElement("span");if(x.innerHTML=(h=(c=iFt._ttpTokenizer)===null||c===void 0?void 0:c.createHTML(_))!==null&&h!==void 0?h:_,this._options.editor){const y=this._options.editor.getOption(48);Cp(x,y)}else this._options.codeBlockFontFamily&&(x.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(x.style.fontSize=this._options.codeBlockFontSize),x}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>X8i(this._openerService,n,e.isTrusted),disposables:i}}}};r8._ttpTokenizer=(tOe=window.trustedTypes)===null||tOe===void 0?void 0:tOe.createPolicy("tokenizeToString",{createHTML(r){return r}});r8=Q8i([RDt(1,s1),RDt(2,JD)],r8);function X8i(r,e,i){return tFt(this,void 0,void 0,function*(){try{return yield r.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:eBi(i)})}catch(n){return Bs(n),!1}})}function eBi(r){return r===!0?!0:r&&Array.isArray(r.enabledCommands)?r.enabledCommands:!1}const ODt=Pu;class EJ extends sn{constructor(e,i,n){super(),this._renderDisposeables=this._register(new du),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new Gkt),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new r8({editor:this._editor},i,n)),this._computer=new tBi(this._editor),this._hoverOperation=this._register(new Jkt(this._editor,this._computer)),this._register(this._hoverOperation.onResult(a=>{this._withResult(a.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(48)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return EJ.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(i=>this._editor.applyFontInfo(i))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,i){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const a of i){const o=ODt("div.hover-row.markdown-hover"),c=Yn(o,ODt("div.hover-contents")),h=this._renderDisposeables.add(this._markdownRenderer.render(a.value));c.appendChild(h.element),n.appendChild(o)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const i=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),a=this._editor.getScrollTop(),o=this._editor.getOption(64),c=this._hover.containerDomNode.clientHeight,h=n-a-(c-o)/2;this._hover.containerDomNode.style.left=`${i.glyphMarginLeft+i.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(h),0)}px`}}EJ.ID="editor.contrib.modesGlyphHoverWidget";class tBi{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=a=>({value:a}),i=this._editor.getLineDecorations(this._lineNumber),n=[];if(!i)return n;for(const a of i){if(!a.options.glyphMarginClassName)continue;const o=a.options.glyphMarginHoverMessage;!o||qJ(o)||n.push(...kGe(o).map(e))}return n}}var iBi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class nBi{constructor(e,i,n){this.provider=e,this.hover=i,this.ordinal=n}}function uBi(r,e,i,n,a){return iBi(this,void 0,void 0,function*(){try{const o=yield Promise.resolve(r.provideHover(i,n,a));if(o&&aBi(o))return new nBi(r,o,e)}catch(o){z4(o)}})}function iUe(r,e,i,n){const o=r.ordered(e).map((c,h)=>uBi(c,h,e,i,n));return Bf.fromPromises(o).coalesce()}function rBi(r,e,i,n){return iUe(r,e,i,n).map(a=>a.hover).toPromise()}KA("_executeHoverProvider",(r,e,i)=>{const n=r.get(ma);return rBi(n.hoverProvider,e,i,g0.None)});function aBi(r){const e=typeof r.range<"u",i=typeof r.contents<"u"&&r.contents&&r.contents.length>0;return e&&i}var oBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},E3e=function(r,e){return function(i,n){e(i,n,r)}};const jDt=Pu;class ry{constructor(e,i,n,a,o){this.owner=e,this.range=i,this.contents=n,this.isBeforeContent=a,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Fxe=class{constructor(e,i,n,a,o){this._editor=e,this._languageService=i,this._openerService=n,this._configurationService=a,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new ry(this,e.range,[new M3().appendText(V("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),a=e.range.startLineNumber,o=n.getLineMaxColumn(a),c=[];let h=1e3;const g=n.getLineLength(a),_=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),x=this._editor.getOption(112),y=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:_});let S=!1;x>=0&&g>x&&e.range.startColumn>=x&&(S=!0,c.push(new ry(this,e.range,[{value:V("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,h++))),!S&&typeof y=="number"&&g>=y&&c.push(new ry(this,e.range,[{value:V("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,h++));let L=!1;for(const O of i){const G=O.range.startLineNumber===a?O.range.startColumn:1,ie=O.range.endLineNumber===a?O.range.endColumn:o,ue=O.options.hoverMessage;if(!ue||qJ(ue))continue;O.options.beforeContentClassName&&(L=!0);const re=new ot(e.range.startLineNumber,G,e.range.startLineNumber,ie);c.push(new ry(this,re,kGe(ue),L,h++))}return c}computeAsync(e,i,n){if(!this._editor.hasModel()||e.type!==1)return Bf.EMPTY;const a=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(a))return Bf.EMPTY;const o=new Vi(e.range.startLineNumber,e.range.startColumn);return iUe(this._languageFeaturesService.hoverProvider,a,o,n).filter(c=>!qJ(c.hover.contents)).map(c=>{const h=c.hover.range?ot.lift(c.hover.range):e.range;return new ry(this,h,c.hover.contents,!1,c.ordinal)})}renderHoverParts(e,i){return nFt(e,i,this._editor,this._languageService,this._openerService)}};Fxe=oBi([E3e(1,s1),E3e(2,JD),E3e(3,hl),E3e(4,ma)],Fxe);function nFt(r,e,i,n,a){e.sort((c,h)=>c.ordinal-h.ordinal);const o=new du;for(const c of e)for(const h of c.contents){if(qJ(h))continue;const g=jDt("div.hover-row.markdown-hover"),_=Yn(g,jDt("div.hover-contents")),x=o.add(new r8({editor:i},n,a));o.add(x.onDidRenderAsync(()=>{_.className="hover-contents code-hover-contents",r.onContentsChanged()}));const y=o.add(x.render(h));_.appendChild(y.element),r.fragment.appendChild(g)}return o}var uFt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Axe=function(r,e){return function(i,n){e(i,n,r)}};class VDt{constructor(e,i,n){this.marker=e,this.index=i,this.total=n}}let NKe=class{constructor(e,i,n){this._markerService=i,this._configService=n,this._onDidChange=new yi,this.onDidChange=this._onDidChange.event,this._dispoables=new du,this._markers=[],this._nextIdx=-1,to.isUri(e)?this._resourceFilter=h=>h.toString()===e.toString():e&&(this._resourceFilter=e);const a=this._configService.getValue("problems.sortOrder"),o=(h,g)=>{let _=Tue(h.resource.toString(),g.resource.toString());return _===0&&(a==="position"?_=ot.compareRangesUsingStarts(h,g)||sh.compare(h.severity,g.severity):_=sh.compare(h.severity,g.severity)||ot.compareRangesUsingStarts(h,g)),_},c=()=>{this._markers=this._markerService.read({resource:to.isUri(e)?e:void 0,severities:sh.Error|sh.Warning|sh.Info}),typeof e=="function"&&(this._markers=this._markers.filter(h=>this._resourceFilter(h.resource))),this._markers.sort(o)};c(),this._dispoables.add(i.onMarkerChanged(h=>{(!this._resourceFilter||h.some(g=>this._resourceFilter(g)))&&(c(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new VDt(e,this._nextIdx+1,this._markers.length)}_initIdx(e,i,n){let a=!1,o=this._markers.findIndex(c=>c.resource.toString()===e.uri.toString());o<0&&(o=Aue(this._markers,{resource:e.uri},(c,h)=>Tue(c.resource.toString(),h.resource.toString())),o<0&&(o=~o));for(let c=o;ca.resource.toString()===e.toString());if(!(n<0)){for(;n=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},iG=function(r,e){return function(i,n){e(i,n,r)}};class lBi{constructor(e,i,n,a,o){this._openerService=a,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new du,this._editor=i;const c=document.createElement("div");c.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),c.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),c.appendChild(this._relatedBlock),this._disposables.add(pf(this._relatedBlock,"click",h=>{h.preventDefault();const g=this._relatedDiagnostics.get(h.target);g&&n(g)})),this._scrollable=new u2t(c,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(h=>{c.style.left=`-${h.scrollLeft}px`,c.style.top=`-${h.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){nc(this._disposables)}update(e){const{source:i,message:n,relatedInformation:a,code:o}=e;let c=((i==null?void 0:i.length)||0)+2;o&&(typeof o=="string"?c+=o.length:c+=o.value.length);const h=SA(n);this._lines=h.length,this._longestLineLength=0;for(const S of h)this._longestLineLength=Math.max(S.length+c,this._longestLineLength);km(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let g=this._messageBlock;for(const S of h)g=document.createElement("div"),g.innerText=S,S===""&&(g.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(g);if(i||o){const S=document.createElement("span");if(S.classList.add("details"),g.appendChild(S),i){const L=document.createElement("span");L.innerText=i,L.classList.add("source"),S.appendChild(L)}if(o)if(typeof o=="string"){const L=document.createElement("span");L.innerText=`(${o})`,L.classList.add("code"),S.appendChild(L)}else{this._codeLink=Pu("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=O=>{this._openerService.open(o.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()};const L=Yn(this._codeLink,Pu("span"));L.innerText=o.value,S.appendChild(this._codeLink)}}if(km(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Kg(a)){const S=this._relatedBlock.appendChild(document.createElement("div"));S.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(const L of a){const O=document.createElement("div"),G=document.createElement("a");G.classList.add("filename"),G.innerText=`${this._labelService.getUriBasenameLabel(L.resource)}(${L.startLineNumber}, ${L.startColumn}): `,G.title=this._labelService.getUriLabel(L.resource),this._relatedDiagnostics.set(G,L);const ie=document.createElement("span");ie.innerText=L.message,O.appendChild(G),O.appendChild(ie),this._lines+=1,S.appendChild(O)}}const _=this._editor.getOption(48),x=Math.ceil(_.typicalFullwidthCharacterWidth*this._longestLineLength*.75),y=_.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:x,scrollHeight:y})}layout(e,i){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${i}px`,this._scrollable.setScrollDimensions({width:i,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let i="";switch(e.severity){case sh.Error:i=V("Error","Error");break;case sh.Warning:i=V("Warning","Warning");break;case sh.Info:i=V("Info","Info");break;case sh.Hint:i=V("Hint","Hint");break}let n=V("marker aria","{0} at {1}. ",i,e.startLineNumber+":"+e.startColumn);const a=this._editor.getModel();return a&&e.startLineNumber<=a.getLineCount()&&e.startLineNumber>=1&&(n=`${a.getLineContent(e.startLineNumber)}, ${n}`),n}}let o$=class aFt extends Cxe{constructor(e,i,n,a,o,c,h){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=i,this._openerService=n,this._menuService=a,this._contextKeyService=c,this._labelService=h,this._callOnDispose=new du,this._onDidSelectRelatedInformation=new yi,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=sh.Warning,this._backgroundColor=qi.white,this._applyTheme(i.getColorTheme()),this._callOnDispose.add(i.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(fBi);let i=zKe,n=cBi;this._severity===sh.Warning?(i=bDe,n=dBi):this._severity===sh.Info&&(i=IKe,n=hBi);const a=e.getColor(i),o=e.getColor(n);this.style({arrowColor:a,frameColor:a,headerBackgroundColor:o,primaryHeadingColor:e.getColor(Skt),secondaryHeadingColor:e.getColor(Bkt)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(a=>this.editor.focus()));const i=[],n=this._menuService.createMenu(aFt.TitleMenu,this._contextKeyService);Jbt(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=Yn(e,Pu(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new lBi(this._container,this.editor,i=>this._onDidSelectRelatedInformation.fire(i),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,i,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const a=ot.lift(e),o=this.editor.getPosition(),c=o&&a.containsPosition(o)?o:a.getStartPosition();super.show(c,this.computeRequiredHeight());const h=this.editor.getModel();if(h){const g=n>1?V("problems","{0} of {1} problems",i,n):V("change","{0} of {1} problem",i,n);this.setTitle(X6(h.uri),g)}this._icon.className=`codicon ${MKe.className(sh.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(c,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,i){super._doLayoutBody(e,i),this._heightInPixel=e,this._message.layout(e,i),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};o$.TitleMenu=new Ht("gotoErrorTitleMenu");o$=sBi([iG(1,I4),iG(2,JD),iG(3,HA),iG(4,Ds),iG(5,Wo),iG(6,ZJ)],o$);const HDt=Kue(dA,X_i),KDt=Kue(ax,Hue),WDt=Kue(ox,AVe),zKe=Jt("editorMarkerNavigationError.background",{dark:HDt,light:HDt,hcDark:v0,hcLight:v0},V("editorMarkerNavigationError","Editor marker navigation widget error color.")),cBi=Jt("editorMarkerNavigationError.headerBackground",{dark:Ga(zKe,.1),light:Ga(zKe,.1),hcDark:null,hcLight:null},V("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),bDe=Jt("editorMarkerNavigationWarning.background",{dark:KDt,light:KDt,hcDark:v0,hcLight:v0},V("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),dBi=Jt("editorMarkerNavigationWarning.headerBackground",{dark:Ga(bDe,.1),light:Ga(bDe,.1),hcDark:"#0C141F",hcLight:Ga(bDe,.2)},V("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),IKe=Jt("editorMarkerNavigationInfo.background",{dark:WDt,light:WDt,hcDark:v0,hcLight:v0},V("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),hBi=Jt("editorMarkerNavigationInfo.headerBackground",{dark:Ga(IKe,.1),light:Ga(IKe,.1),hcDark:null,hcLight:null},V("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),fBi=Jt("editorMarkerNavigation.background",{dark:n4,light:n4,hcDark:n4,hcLight:n4},V("editorMarkerNavigationBackground","Editor marker navigation widget background."));var mBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},_3e=function(r,e){return function(i,n){e(i,n,r)}},oFt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let XL=class yDe{static get(e){return e.getContribution(yDe.ID)}constructor(e,i,n,a,o){this._markerNavigationService=i,this._contextKeyService=n,this._editorService=a,this._instantiationService=o,this._sessionDispoables=new du,this._editor=e,this._widgetVisible=sFt.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let i=!1;return this._model&&(i=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),i&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(o$,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var a,o,c;(!(!((a=this._model)===null||a===void 0)&&a.selected)||!ot.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,n.position))&&((c=this._model)===null||c===void 0||c.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:ot.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const i=this._getOrCreateModel(this._editor.getModel().uri);i.resetIndex(),i.move(!0,this._editor.getModel(),new Vi(e.startLineNumber,e.startColumn)),i.selected&&this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}nagivate(e,i){var n,a;return oFt(this,void 0,void 0,function*(){if(this._editor.hasModel()){const o=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const c=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);c&&((n=yDe.get(c))===null||n===void 0||n.close(),(a=yDe.get(c))===null||a===void 0||a.nagivate(e,i))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};XL.ID="editor.contrib.markerController";XL=mBi([_3e(1,rFt),_3e(2,Wo),_3e(3,wl),_3e(4,Ds)],XL);class Jve extends Vr{constructor(e,i,n){super(n),this._next=e,this._multiFile=i}run(e,i){var n;return oFt(this,void 0,void 0,function*(){i.hasModel()&&((n=XL.get(i))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}}class SL extends Jve{constructor(){super(!0,!1,{id:SL.ID,label:SL.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rt.focus,primary:578,weight:100},menuOpts:{menuId:o$.TitleMenu,title:SL.LABEL,icon:Ef("marker-navigation-next",dr.arrowDown,V("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}SL.ID="editor.action.marker.next";SL.LABEL=V("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class iR extends Jve{constructor(){super(!1,!1,{id:iR.ID,label:iR.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rt.focus,primary:1602,weight:100},menuOpts:{menuId:o$.TitleMenu,title:iR.LABEL,icon:Ef("marker-navigation-previous",dr.arrowUp,V("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}iR.ID="editor.action.marker.prev";iR.LABEL=V("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class pBi extends Jve{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:V("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rt.focus,primary:66,weight:100},menuOpts:{menuId:Ht.MenubarGoMenu,title:V({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class gBi extends Jve{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:V("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rt.focus,primary:1090,weight:100},menuOpts:{menuId:Ht.MenubarGoMenu,title:V({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}fl(XL.ID,XL,4);Cu(SL);Cu(iR);Cu(pBi);Cu(gBi);const sFt=new Kr("markersNavigationVisible",!1),EBi=Fp.bindToContribution(XL.get);Zu(new EBi({id:"closeMarkersNavigation",precondition:sFt,handler:r=>r.close(),kbOpts:{weight:150,kbExpr:Rt.focus,primary:9,secondary:[1033]}}));var _Bi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},iOe=function(r,e){return function(i,n){e(i,n,r)}};const zC=Pu;class DBi{constructor(e,i,n){this.owner=e,this.range=i,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const GDt={type:1,filter:{include:es.QuickFix},triggerAction:Ex.QuickFixHover};let RKe=class{constructor(e,i,n,a){this._editor=e,this._markerDecorationsService=i,this._openerService=n,this._languageFeaturesService=a,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),a=e.range.startLineNumber,o=n.getLineMaxColumn(a),c=[];for(const h of i){const g=h.range.startLineNumber===a?h.range.startColumn:1,_=h.range.endLineNumber===a?h.range.endColumn:o,x=this._markerDecorationsService.getMarker(n.uri,h);if(!x)continue;const y=new ot(e.range.startLineNumber,g,e.range.startLineNumber,_);c.push(new DBi(this,y,x))}return c}renderHoverParts(e,i){if(!i.length)return sn.None;const n=new du;i.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,n)));const a=i.length===1?i[0]:i.sort((o,c)=>sh.compare(o.marker.severity,c.marker.severity))[0];return this.renderMarkerStatusbar(e,a,n),n}renderMarkerHover(e,i){const n=zC("div.hover-row"),a=Yn(n,zC("div.marker.hover-contents")),{source:o,message:c,code:h,relatedInformation:g}=e.marker;this._editor.applyFontInfo(a);const _=Yn(a,zC("span"));if(_.style.whiteSpace="pre-wrap",_.innerText=c,o||h)if(h&&typeof h!="string"){const x=zC("span");if(o){const O=Yn(x,zC("span"));O.innerText=o}const y=Yn(x,zC("a.code-link"));y.setAttribute("href",h.target.toString()),i.add(Vn(y,"click",O=>{this._openerService.open(h.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()}));const S=Yn(y,zC("span"));S.innerText=h.value;const L=Yn(a,x);L.style.opacity="0.6",L.style.paddingLeft="6px"}else{const x=Yn(a,zC("span"));x.style.opacity="0.6",x.style.paddingLeft="6px",x.innerText=o&&h?`${o}(${h})`:o||`(${h})`}if(Kg(g))for(const{message:x,resource:y,startLineNumber:S,startColumn:L}of g){const O=Yn(a,zC("div"));O.style.marginTop="8px";const G=Yn(O,zC("a"));G.innerText=`${X6(y)}(${S}, ${L}): `,G.style.cursor="pointer",i.add(Vn(G,"click",ue=>{ue.stopPropagation(),ue.preventDefault(),this._openerService&&this._openerService.open(y,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:S,startColumn:L}}}).catch(Bs)}));const ie=Yn(O,zC("span"));ie.innerText=x,this._editor.applyFontInfo(ie)}return n}renderMarkerStatusbar(e,i,n){if((i.marker.severity===sh.Error||i.marker.severity===sh.Warning||i.marker.severity===sh.Info)&&e.statusBar.addAction({label:V("view problem","View Problem"),commandId:SL.ID,run:()=>{var a;e.hide(),(a=XL.get(this._editor))===null||a===void 0||a.showAtMarker(i.marker),this._editor.focus()}}),!this._editor.getOption(87)){const a=e.statusBar.append(zC("div"));this.recentMarkerCodeActionsInfo&&(sxe.makeKey(this.recentMarkerCodeActionsInfo.marker)===sxe.makeKey(i.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(a.textContent=V("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?sn.None:n.add(lR(()=>a.textContent=V("checkingForQuickFixes","Checking for quick fixes..."),200));a.textContent||(a.textContent=" ");const c=this.getCodeActions(i.marker);n.add(Ss(()=>c.cancel())),c.then(h=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:i.marker,hasCodeActions:h.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){h.dispose(),a.textContent=V("noQuickFixes","No quick fixes available");return}a.style.display="none";let g=!1;n.add(Ss(()=>{g||h.dispose()})),e.statusBar.addAction({label:V("quick fixes","Quick Fix..."),commandId:H$e,run:_=>{g=!0;const x=kR.get(this._editor),y=N4(_);e.hide(),x==null||x.showCodeActions(GDt,h,{x:y.left+6,y:y.top+y.height+6,width:y.width,height:y.height})}})},Bs)}}getCodeActions(e){return u4(i=>G$e(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new ot(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),GDt,XR.None,i))}};RKe=_Bi([iOe(1,sJe),iOe(2,JD),iOe(3,ma)],RKe);const lFt="editor.action.inlineSuggest.commit",cFt="editor.action.inlineSuggest.showPrevious",dFt="editor.action.inlineSuggest.showNext";var xBi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class vBi extends sn{constructor(e,i,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new Bmi),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new du,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new Are(()=>{var a;return(a=this.toggleMenuActionViewItem)===null||a===void 0?void 0:a.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new ev(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(a,o)=>{var c;if(a.id===Are.ID)return this.toggleMenuActionViewItem=new txe(a,a.menuActions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:_o.asClassNameArray((c=n.moreIcon)!==null&&c!==void 0?c:dr.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const h=n.actionViewItemProvider(a,o);if(h)return h}if(a instanceof VJ){const h=new txe(a,a.actions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:a.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return h.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(h),this.disposables.add(this._onDidChangeDropdownVisibility.add(h.onDidChangeVisibility)),h}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,i){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(i&&i.length>0),this.hasSecondaryActions&&i&&(this.toggleMenuAction.menuActions=i.slice(0),n.push(this.toggleMenuAction)),n.forEach(a=>{this.actionBar.push(a,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(a)})})}getKeybindingLabel(e){var i,n;const a=this.lookupKeybindings?(n=(i=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(i,e):void 0;return xp(a==null?void 0:a.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}class Are extends HD{constructor(e,i){i=i||V("moreActions","More Actions..."),super(Are.ID,i,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return xBi(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}Are.ID="toolbar.toggle.more";var CBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Kie=function(r,e){return function(i,n){e(i,n,r)}};let OKe=class extends vBi{constructor(e,i,n,a,o,c,h){super(e,o,Object.assign(Object.assign({getKeyBinding:g=>{var _;return(_=c.lookupKeybinding(g.id))!==null&&_!==void 0?_:void 0}},i),{allowContextMenu:!0})),this._options=i,this._menuService=n,this._contextKeyService=a,this._contextMenuService=o,this._sessionDisposables=this._store.add(new du),i!=null&&i.telemetrySource&&this._store.add(this.actionBar.onDidRun(g=>h.publicLog2("workbenchActionExecuted",{id:g.action.id,from:i.telemetrySource})))}setActions(e,i=[],n){var a,o,c;this._sessionDisposables.clear();const h=e.slice(),g=i.slice(),_=[];let x=0;const y=[];let S=!1;if(((a=this._options)===null||a===void 0?void 0:a.hiddenItemStrategy)!==-1)for(let L=0;L=this._options.maxNumberOfItems&&(h[O]=void 0,y[O]=G)}}lgt(h),lgt(y),super.setActions(h,P4.join(y,g)),_.length>0&&this._sessionDisposables.add(Vn(this.getElement(),"contextmenu",L=>{var O,G,ie,ue;const re=this.getItemAction(L.target);if(!re)return;L.preventDefault(),L.stopPropagation();let _e=!1;if(x===1&&((O=this._options)===null||O===void 0?void 0:O.hiddenItemStrategy)===0){_e=!0;for(let lt=0;lt<_.length;lt++)if(_[lt].checked){_[lt]=Vne({id:re.id,label:re.label,checked:!0,enabled:!1,run(){}});break}}let ye;if(!_e&&(re instanceof t2||re instanceof jue)){if(!re.hideActions)return;ye=re.hideActions.hide}else ye=Vne({id:"label",label:V("hide","Hide"),enabled:!1,run(){}});const Le=P4.join([ye],_);!((G=this._options)===null||G===void 0)&&G.resetMenu&&!n&&(n=[this._options.resetMenu]),S&&n&&(Le.push(new P4),Le.push(Vne({id:"resetThisMenu",label:V("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>L,getActions:()=>Le,menuId:(ie=this._options)===null||ie===void 0?void 0:ie.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(ue=this._options)===null||ue===void 0?void 0:ue.menuOptions),contextKeyService:this._contextKeyService})}))}};OKe=CBi([Kie(2,HA),Kie(3,Wo),Kie(4,Py),Kie(5,J1),Kie(6,nv)],OKe);var hFt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},uA=function(r,e){return function(i,n){e(i,n,r)}};const bBi=Ef("inline-suggestion-hints-next",dr.chevronRight,V("parameterHintsNextIcon","Icon for show next parameter hint.")),yBi=Ef("inline-suggestion-hints-previous",dr.chevronLeft,V("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let SR=class jKe extends sn{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,i,n){const a=new HD(e,i,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let c=i;return o&&(c=V({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",i,o.getLabel())),a.tooltip=c,a}constructor(e,i,n,a,o,c,h){super(),this.editor=e,this.withBorder=i,this._commandService=n,this.keybindingService=o,this._contextKeyService=c,this._menuService=h,this.id=`InlineSuggestionHintsContentWidget${jKe.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=sne("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[sne("div",{style:{display:"flex"}},[sne("div@actionBar",{className:"custom-actions"}),sne("div@toolBar")])]),this.position=null,this.previousAction=this.createCommandAction(cFt,V("previous","Previous"),_o.asClassName(yBi)),this.availableSuggestionCountAction=new HD("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(dFt,V("next","Next"),_o.asClassName(bBi)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Ht.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Zc(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Zc(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCurrentSuggestionIdx=-1,this.lastSuggestionCount=-1,this.lastCommands=[];const g=this._register(new ev(this.nodes.actionBar));g.push(this.previousAction,{icon:!0,label:!1}),g.push(this.availableSuggestionCountAction),g.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(a.createInstance(VKe,this.nodes.toolBar,Ht.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:_=>_.startsWith("primary")},actionViewItemProvider:(_,x)=>_ instanceof t2?a.createInstance(kBi,_,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(_=>{jKe._dropDownVisible=_}))}update(e,i,n,a){if(this.position===e&&this.lastCurrentSuggestionIdx===i&&this.lastSuggestionCount===n&&tg(this.lastCommands,a))return;this.position=e,this.lastCurrentSuggestionIdx=i,this.lastSuggestionCount=n??-1,this.lastCommands=a,n!==void 0&&n>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule(),n!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${n}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),this.editor.layoutContentWidget(this);const o=a.map(c=>({class:void 0,id:c.id,enabled:!0,tooltip:c.tooltip||"",label:c.title,run:h=>this._commandService.executeCommand(c.id)}));for(const[c,h]of this.inlineCompletionsActionsMenus.getActions())for(const g of h)g instanceof t2&&o.push(g);o.length>0&&o.unshift(new P4),this.toolBar.setAdditionalSecondaryActions(o)}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this.position,preference:[1,2],positionAffinity:3}}};SR._dropDownVisible=!1;SR.id=0;SR=hFt([uA(2,Zh),uA(3,Ds),uA(4,J1),uA(5,Wo),uA(6,HA)],SR);let kBi=class extends pR{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const i=sne("div.keybinding").root;new Pae(i,ux,Object.assign({disableTitle:!0},iFi)).set(e),this.label.textContent=this._action.label,this.label.appendChild(i),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},VKe=class extends OKe{constructor(e,i,n,a,o,c,h,g){super(e,Object.assign({resetMenu:i},n),a,o,c,h,g),this.menuId=i,this.options2=n,this.menuService=a,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,i,n,a,o,c,h;const g=[],_=[];Jbt(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:g,secondary:_},(n=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(o=(a=this.options2)===null||a===void 0?void 0:a.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(h=(c=this.options2)===null||c===void 0?void 0:c.toolbarOptions)===null||h===void 0?void 0:h.useSeparatorsInPrimaryActions),_.push(...this.additionalActions),this.setActions(g,_)}setAdditionalSecondaryActions(e){tg(this.additionalActions,e,(i,n)=>i===n)||(this.additionalActions=e,this.updateToolbar())}};VKe=hFt([uA(3,HA),uA(4,Wo),uA(5,Py),uA(6,J1),uA(7,nv)],VKe);var FBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},D3e=function(r,e){return function(i,n){e(i,n,r)}};let I_=class fFt{static get(e){return e.getContribution(fFt.ID)}constructor(e,i,n,a,o){this._editor=e,this._instantiationService=i,this._openerService=n,this._languageService=a,this._keybindingService=o,this._toUnhook=new du,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(c=>{c.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const e=()=>this._hideWidgets(),i=this._editor.getOption(58);this._isHoverEnabled=i.enabled,this._isHoverSticky=i.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const i=e.target;if(i.type===9&&i.detail===tR.ID){this._hoverClicked=!0;return}i.type===12&&i.detail===EJ.ID||(i.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var i;const n=e.event.browserEvent.relatedTarget;!((i=this._contentWidget)===null||i===void 0)&&i.containsNode(n)||this._hideWidgets()}_onEditorMouseMove(e){var i,n,a,o,c,h;const g=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&g.type===9&&g.detail===tR.ID||this._isHoverSticky&&!(!((n=(i=e.event.browserEvent.view)===null||i===void 0?void 0:i.getSelection())===null||n===void 0)&&n.isCollapsed)||!this._isHoverSticky&&g.type===9&&g.detail===tR.ID&&(!((a=this._contentWidget)===null||a===void 0)&&a.isColorPickerVisible())||this._isHoverSticky&&g.type===12&&g.detail===EJ.ID||this._isHoverSticky&&(!((o=this._contentWidget)===null||o===void 0)&&o.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(c=this._glyphWidget)===null||c===void 0||c.hide();return}if(g.type===2&&g.position){(h=this._contentWidget)===null||h===void 0||h.hide(),this._glyphWidget||(this._glyphWidget=new EJ(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(g.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var i;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),a=(n==null?void 0:n.kind)===1||n&&n.kind===2&&n.commandId==="editor.action.showHover"&&((i=this._contentWidget)===null||i===void 0?void 0:i.isVisible());e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!a&&this._hideWidgets()}_hideWidgets(){var e,i,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible())||SR.dropDownVisible||(this._hoverClicked=!1,(i=this._glyphWidget)===null||i===void 0||i.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(yxe,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,i,n,a){this._getOrCreateContentWidget().startShowingAtRange(e,i,n,a)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}escape(){var e;(e=this._contentWidget)===null||e===void 0||e.escape()}isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible()}dispose(){var e,i;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(i=this._contentWidget)===null||i===void 0||i.dispose()}};I_.ID="editor.contrib.hover";I_=FBi([D3e(1,Ds),D3e(2,JD),D3e(3,s1),D3e(4,J1)],I_);class ABi extends Vr{constructor(){super({id:"editor.action.showHover",label:V({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:Rt.editorTextFocus,primary:Fm(2089,2087),weight:100}})}run(e,i,n){if(!i.hasModel())return;const a=I_.get(i);if(!a)return;const o=i.getPosition(),c=new ot(o.lineNumber,o.column,o.lineNumber,o.column),h=i.getOption(2)===2||!!(n!=null&&n.focus);a.isHoverVisible()?a.focus():a.showContentHover(c,1,1,h)}}class SBi extends Vr{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:V({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,i){const n=I_.get(i);if(!n)return;const a=i.getPosition();if(!a)return;const o=new ot(a.lineNumber,a.column,a.lineNumber,a.column),c=AR.get(i);if(!c)return;c.startFindDefinitionFromCursor(a).then(()=>{n.showContentHover(o,1,1,!0)})}}class BBi extends Vr{constructor(){super({id:"editor.action.scrollUpHover",label:V({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:16,weight:100}})}run(e,i){const n=I_.get(i);n&&n.scrollUp()}}class wBi extends Vr{constructor(){super({id:"editor.action.scrollDownHover",label:V({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:18,weight:100}})}run(e,i){const n=I_.get(i);n&&n.scrollDown()}}class TBi extends Vr{constructor(){super({id:"editor.action.scrollLeftHover",label:V({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:15,weight:100}})}run(e,i){const n=I_.get(i);n&&n.scrollLeft()}}class LBi extends Vr{constructor(){super({id:"editor.action.scrollRightHover",label:V({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:17,weight:100}})}run(e,i){const n=I_.get(i);n&&n.scrollRight()}}class NBi extends Vr{constructor(){super({id:"editor.action.pageUpHover",label:V({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,i){const n=I_.get(i);n&&n.pageUp()}}class PBi extends Vr{constructor(){super({id:"editor.action.pageDownHover",label:V({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,i){const n=I_.get(i);n&&n.pageDown()}}class MBi extends Vr{constructor(){super({id:"editor.action.goToTopHover",label:V({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,i){const n=I_.get(i);n&&n.goToTop()}}class zBi extends Vr{constructor(){super({id:"editor.action.goToBottomHover",label:V({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,i){const n=I_.get(i);n&&n.goToBottom()}}class IBi extends Vr{constructor(){super({id:"editor.action.escapeFocusHover",label:V({key:"escapeFocusHover",comment:["Action that allows to escape from the hover widget with the escape command when the hover widget is focused."]},"Escape Focus Hover"),alias:"Escape Focus Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:9,weight:100}})}run(e,i){const n=I_.get(i);n&&n.escape()}}fl(I_.ID,I_,2);Cu(ABi);Cu(SBi);Cu(BBi);Cu(wBi);Cu(TBi);Cu(LBi);Cu(NBi);Cu(PBi);Cu(MBi);Cu(zBi);Cu(IBi);oO.register(Fxe);oO.register(RKe);i2((r,e)=>{const i=r.getColor(m3i);i&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))});class HKe extends sn{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(i=>this.onMouseDown(i)))}dispose(){super.dispose()}onMouseDown(e){const i=e.target;if(i.type!==6||!i.detail.injectedText||i.detail.injectedText.options.attachedData!==Ckt||!i.range)return;const n=this._editor.getContribution(I_.ID);if(n&&!n.isColorPickerVisible()){const a=new ot(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(a,1,0,!1)}}}HKe.ID="editor.contrib.colorContribution";fl(HKe.ID,HKe,2);oO.register(EKe);const Jae=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?r=crypto.getRandomValues.bind(crypto):r=function(n){for(let a=0;amFt(this,void 0,void 0,function*(){return r}),asFile:()=>{},value:typeof r=="string"?r:void 0}}function RBi(r,e,i){return{id:Jae(),asString:()=>mFt(this,void 0,void 0,function*(){return""}),asFile:()=>({name:r,uri:e,data:i}),value:void 0}}class pFt{constructor(){this._entries=new Map}get size(){return this._entries.size}has(e){return this._entries.has(this.toKey(e))}get(e){var i;return(i=this._entries.get(this.toKey(e)))===null||i===void 0?void 0:i[0]}append(e,i){const n=this._entries.get(e);n?n.push(i):this._entries.set(this.toKey(e),[i])}replace(e,i){this._entries.set(this.toKey(e),[i])}delete(e){this._entries.delete(this.toKey(e))}*entries(){for(const[e,i]of this._entries.entries())for(const n of i)yield[e,n]}values(){return Array.from(this._entries.values()).flat()}forEach(e){for(const[i,n]of this.entries())e(n,i)}toKey(e){return e.toLowerCase()}}const $ve=Object.freeze({create:r=>RL(r.map(e=>e.toString())).join(`\r + *-----------------------------------------------------------------------------*/var P9i=Object.defineProperty,M9i=Object.getOwnPropertyDescriptor,z9i=Object.getOwnPropertyNames,I9i=Object.prototype.hasOwnProperty,DDt=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of z9i(e))!I9i.call(r,a)&&a!==i&&P9i(r,a,{get:()=>e[a],enumerable:!(n=M9i(e,a))||n.enumerable});return r},R9i=(r,e,i)=>(DDt(r,e,"default"),i&&DDt(i,e,"default")),O9i="5.0.2",u$={};R9i(u$,Iae);var $yt=(r=>(r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext",r))($yt||{}),Uyt=(r=>(r[r.None=0]="None",r[r.Preserve=1]="Preserve",r[r.React=2]="React",r[r.ReactNative=3]="ReactNative",r[r.ReactJSX=4]="ReactJSX",r[r.ReactJSXDev=5]="ReactJSXDev",r))(Uyt||{}),qyt=(r=>(r[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed",r))(qyt||{}),Zyt=(r=>(r[r.ES3=0]="ES3",r[r.ES5=1]="ES5",r[r.ES2015=2]="ES2015",r[r.ES2016=3]="ES2016",r[r.ES2017=4]="ES2017",r[r.ES2018=5]="ES2018",r[r.ES2019=6]="ES2019",r[r.ES2020=7]="ES2020",r[r.ESNext=99]="ESNext",r[r.JSON=100]="JSON",r[r.Latest=99]="Latest",r))(Zyt||{}),Yyt=(r=>(r[r.Classic=1]="Classic",r[r.NodeJs=2]="NodeJs",r))(Yyt||{}),Qyt=class{constructor(r,e,i,n,a){zc(this,"_onDidChange",new u$.Emitter);zc(this,"_onDidExtraLibsChange",new u$.Emitter);zc(this,"_extraLibs");zc(this,"_removedExtraLibs");zc(this,"_eagerModelSync");zc(this,"_compilerOptions");zc(this,"_diagnosticsOptions");zc(this,"_workerOptions");zc(this,"_onDidExtraLibsChangeTimeout");zc(this,"_inlayHintsOptions");zc(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(r),this.setDiagnosticsOptions(e),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(a),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(r,e){let i;if(typeof e>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=e,this._extraLibs[i]&&this._extraLibs[i].content===r)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:r,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let a=this._extraLibs[i];a&&a.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(r){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),r&&r.length>0)for(const e of r){const i=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,n=e.content;let a=1;this._removedExtraLibs[i]&&(a=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:n,version:a}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(r){this._compilerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(r){this._diagnosticsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(r){this._workerOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(r){this._inlayHintsOptions=r||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(r){}setEagerModelSync(r){this._eagerModelSync=r}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(r){this._modeConfiguration=r||Object.create(null),this._onDidChange.fire(void 0)}},j9i=O9i,Xyt={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},ekt=new Qyt({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},Xyt),tkt=new Qyt({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},Xyt),V9i=()=>Nve().then(r=>r.getTypeScriptWorker()),H9i=()=>Nve().then(r=>r.getJavaScriptWorker());u$.languages.typescript={ModuleKind:$yt,JsxEmit:Uyt,NewLineKind:qyt,ScriptTarget:Zyt,ModuleResolutionKind:Yyt,typescriptVersion:j9i,typescriptDefaults:ekt,javascriptDefaults:tkt,getTypeScriptWorker:V9i,getJavaScriptWorker:H9i};function Nve(){return Ra(()=>import("./tsMode-PBOrm3-u.js"),__vite__mapDeps([]),import.meta.url)}u$.languages.onLanguage("typescript",()=>Nve().then(r=>r.setupTypeScript(ekt)));u$.languages.onLanguage("javascript",()=>Nve().then(r=>r.setupJavaScript(tkt)));var K9i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},W9i=function(r,e){return function(i,n){e(i,n,r)}},Pve=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const Mve=new Kr("selectionAnchorSet",!1);let u8=class ikt{static get(e){return e.getContribution(ikt.ID)}constructor(e,i){this.editor=e,this.selectionAnchorSetContextKey=Mve.bindTo(i),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(i=>{this.decorationId&&i.removeDecoration(this.decorationId),this.decorationId=i.addDecoration(Ea.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new M3().appendText(V("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),vp(V("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const i=this.editor.getPosition();this.editor.setSelection(Ea.fromPositions(e.getStartPosition(),i)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(i=>{i.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};u8.ID="editor.contrib.selectionAnchorController";u8=K9i([W9i(1,Wo)],u8);class G9i extends Vr{constructor(){super({id:"editor.action.setSelectionAnchor",label:V("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:Rt.editorTextFocus,primary:Fm(2089,2080),weight:100}})}run(e,i){var n;return Pve(this,void 0,void 0,function*(){(n=u8.get(i))===null||n===void 0||n.setSelectionAnchor()})}}class J9i extends Vr{constructor(){super({id:"editor.action.goToSelectionAnchor",label:V("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:Mve})}run(e,i){var n;return Pve(this,void 0,void 0,function*(){(n=u8.get(i))===null||n===void 0||n.goToSelectionAnchor()})}}class $9i extends Vr{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:V("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:Mve,kbOpts:{kbExpr:Rt.editorTextFocus,primary:Fm(2089,2089),weight:100}})}run(e,i){var n;return Pve(this,void 0,void 0,function*(){(n=u8.get(i))===null||n===void 0||n.selectFromAnchorToCursor()})}}class U9i extends Vr{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:V("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:Mve,kbOpts:{kbExpr:Rt.editorTextFocus,primary:9,weight:100}})}run(e,i){var n;return Pve(this,void 0,void 0,function*(){(n=u8.get(i))===null||n===void 0||n.cancelSelectionAnchor()})}}fl(u8.ID,u8,4);Cu(G9i);Cu(J9i);Cu($9i);Cu(U9i);const q9i=Jt("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},V("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Z9i extends Vr{constructor(){super({id:"editor.action.jumpToBracket",label:V("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:Rt.editorTextFocus,primary:3160,weight:100}})}run(e,i){var n;(n=qC.get(i))===null||n===void 0||n.jumpToBracket()}}class Y9i extends Vr{constructor(){super({id:"editor.action.selectToBracket",label:V("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,i,n){var a;let o=!0;n&&n.selectBrackets===!1&&(o=!1),(a=qC.get(i))===null||a===void 0||a.selectToBracket(o)}}class Q9i extends Vr{constructor(){super({id:"editor.action.removeBrackets",label:V("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:Rt.editorTextFocus,primary:2561,weight:100}})}run(e,i){var n;(n=qC.get(i))===null||n===void 0||n.removeBrackets(this.id)}}class X9i{constructor(e,i,n){this.position=e,this.brackets=i,this.options=n}}class qC extends sn{static get(e){return e.getContribution(qC.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Zc(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(i=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(i=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(i=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(i=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(i=>{i.hasChanged(69)&&(this._matchBrackets=this._editor.getOption(69),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),i=this._editor.getSelections().map(n=>{const a=n.getStartPosition(),o=e.bracketPairs.matchBracket(a);let c=null;if(o)o[0].containsPosition(a)&&!o[1].containsPosition(a)?c=o[1].getStartPosition():o[1].containsPosition(a)&&(c=o[0].getStartPosition());else{const h=e.bracketPairs.findEnclosingBrackets(a);if(h)c=h[1].getStartPosition();else{const g=e.bracketPairs.findNextBracket(a);g&&g.range&&(c=g.range.getStartPosition())}}return c?new Ea(c.lineNumber,c.column,c.lineNumber,c.column):new Ea(a.lineNumber,a.column,a.lineNumber,a.column)});this._editor.setSelections(i),this._editor.revealRange(i[0])}selectToBracket(e){if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=[];this._editor.getSelections().forEach(a=>{const o=a.getStartPosition();let c=i.bracketPairs.matchBracket(o);if(!c&&(c=i.bracketPairs.findEnclosingBrackets(o),!c)){const _=i.bracketPairs.findNextBracket(o);_&&_.range&&(c=i.bracketPairs.matchBracket(_.range.getStartPosition()))}let h=null,g=null;if(c){c.sort(ot.compareRangesUsingStarts);const[_,x]=c;if(h=e?_.getStartPosition():_.getEndPosition(),g=e?x.getEndPosition():x.getStartPosition(),x.containsPosition(o)){const y=h;h=g,g=y}}h&&g&&n.push(new Ea(h.lineNumber,h.column,g.lineNumber,g.column))}),n.length>0&&(this._editor.setSelections(n),this._editor.revealRange(n[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const i=this._editor.getModel();this._editor.getSelections().forEach(n=>{const a=n.getPosition();let o=i.bracketPairs.matchBracket(a);o||(o=i.bracketPairs.findEnclosingBrackets(a)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let i=0;for(const n of this._lastBracketsData){const a=n.brackets;a&&(e[i++]={range:a[0],options:n.options},e[i++]={range:a[1],options:n.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const i=this._editor.getModel(),n=i.getVersionId();let a=[];this._lastVersionId===n&&(a=this._lastBracketsData);const o=[];let c=0;for(let y=0,S=e.length;y1&&o.sort(Vi.compare);const h=[];let g=0,_=0;const x=a.length;for(let y=0,S=o.length;y0&&(i.pushUndoStop(),i.executeCommands(this.id,a),i.pushUndoStop())}}Cu(nSi);var uSi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const vR="9_cutcopypaste",rSi=gy||document.queryCommandSupported("cut"),ukt=gy||document.queryCommandSupported("copy"),aSi=typeof navigator.clipboard>"u"||q6?document.queryCommandSupported("paste"):!0;function V$e(r){return r.register(),r}const oSi=rSi?V$e(new b$({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:gy?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Ht.MenubarEditMenu,group:"2_ccp",title:V({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Ht.EditorContext,group:vR,title:V("actions.clipboard.cutLabel","Cut"),when:Rt.writable,order:1},{menuId:Ht.CommandPalette,group:"",title:V("actions.clipboard.cutLabel","Cut"),order:1},{menuId:Ht.SimpleEditorContext,group:vR,title:V("actions.clipboard.cutLabel","Cut"),when:Rt.writable,order:1}]})):void 0,sSi=ukt?V$e(new b$({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:gy?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Ht.MenubarEditMenu,group:"2_ccp",title:V({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Ht.EditorContext,group:vR,title:V("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Ht.CommandPalette,group:"",title:V("actions.clipboard.copyLabel","Copy"),order:1},{menuId:Ht.SimpleEditorContext,group:vR,title:V("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;IE.appendMenuItem(Ht.MenubarEditMenu,{submenu:Ht.MenubarCopy,title:{value:V("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});IE.appendMenuItem(Ht.EditorContext,{submenu:Ht.EditorContextCopy,title:{value:V("copy as","Copy As"),original:"Copy As"},group:vR,order:3});IE.appendMenuItem(Ht.EditorContext,{submenu:Ht.EditorContextShare,title:{value:V("share","Share"),original:"Share"},group:"11_share",order:-1,when:pu.and(pu.notEquals("resourceScheme","output"),Rt.editorTextFocus)});IE.appendMenuItem(Ht.EditorTitleContext,{submenu:Ht.EditorTitleContextShare,title:{value:V("share","Share"),original:"Share"},group:"11_share",order:-1});IE.appendMenuItem(Ht.ExplorerContext,{submenu:Ht.ExplorerContextShare,title:{value:V("share","Share"),original:"Share"},group:"11_share",order:-1});const RRe=aSi?V$e(new b$({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:gy?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Ht.MenubarEditMenu,group:"2_ccp",title:V({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:Ht.EditorContext,group:vR,title:V("actions.clipboard.pasteLabel","Paste"),when:Rt.writable,order:4},{menuId:Ht.CommandPalette,group:"",title:V("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:Ht.SimpleEditorContext,group:vR,title:V("actions.clipboard.pasteLabel","Paste"),when:Rt.writable,order:4}]})):void 0;class lSi extends Vr{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:V("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:Rt.textInputFocus,primary:0,weight:100}})}run(e,i){!i.hasModel()||!i.getOption(35)&&i.getSelection().isEmpty()||(TVe.forceCopyWithSyntaxHighlighting=!0,i.focus(),document.execCommand("copy"),TVe.forceCopyWithSyntaxHighlighting=!1)}}function rkt(r,e){r&&(r.addImplementation(1e4,"code-editor",(i,n)=>{const a=i.get(wl).getFocusedCodeEditor();if(a&&a.hasTextFocus()){const o=a.getOption(35),c=a.getSelection();return c&&c.isEmpty()&&!o||document.execCommand(e),!0}return!1}),r.addImplementation(0,"generic-dom",(i,n)=>(document.execCommand(e),!0)))}rkt(oSi,"cut");rkt(sSi,"copy");RRe&&(RRe.addImplementation(1e4,"code-editor",(r,e)=>{const i=r.get(wl),n=r.get(d8),a=i.getFocusedCodeEditor();return a&&a.hasTextFocus()?!document.execCommand("paste")&&uN?uSi(void 0,void 0,void 0,function*(){const c=yield n.readText();if(c!==""){const h=Uue.INSTANCE.get(c);let g=!1,_=null,x=null;h&&(g=a.getOption(35)&&!!h.isFromEmptySelection,_=typeof h.multicursorText<"u"?h.multicursorText:null,x=h.mode),a.trigger("keyboard","paste",{text:c,pasteOnNewLine:g,multicursorText:_,mode:x})}}):!0:!1}),RRe.addImplementation(0,"generic-dom",(r,e)=>(document.execCommand("paste"),!0)));ukt&&Cu(lSi);var cSi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class es{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+es.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new es(this.value+es.sep+e)}}es.sep=".";es.None=new es("@@none@@");es.Empty=new es("");es.QuickFix=new es("quickfix");es.Refactor=new es("refactor");es.RefactorExtract=es.Refactor.append("extract");es.RefactorInline=es.Refactor.append("inline");es.RefactorMove=es.Refactor.append("move");es.RefactorRewrite=es.Refactor.append("rewrite");es.Source=new es("source");es.SourceOrganizeImports=es.Source.append("organizeImports");es.SourceFixAll=es.Source.append("fixAll");es.SurroundWith=es.Refactor.append("surround");var Ex;(function(r){r.Refactor="refactor",r.RefactorPreview="refactor preview",r.Lightbulb="lightbulb",r.Default="other (default)",r.SourceAction="source action",r.QuickFix="quick fix action",r.FixAll="fix all",r.OrganizeImports="organize imports",r.AutoFix="auto fix",r.QuickFixHover="quick fix hover window",r.OnSave="save participants",r.ProblemsView="problems view"})(Ex||(Ex={}));function dSi(r,e){return!(r.include&&!r.include.intersects(e)||r.excludes&&r.excludes.some(i=>akt(e,i,r.include))||!r.includeSourceActions&&es.Source.contains(e))}function hSi(r,e){const i=e.kind?new es(e.kind):void 0;return!(r.include&&(!i||!r.include.contains(i))||r.excludes&&i&&r.excludes.some(n=>akt(i,n,r.include))||!r.includeSourceActions&&i&&es.Source.contains(i)||r.onlyIncludePreferredActions&&!e.isPreferred)}function akt(r,e,i){return!(!e.contains(r)||i&&e.contains(i))}class nA{static fromUser(e,i){return!e||typeof e!="object"?new nA(i.kind,i.apply,!1):new nA(nA.getKindFromUser(e,i.kind),nA.getApplyFromUser(e,i.apply),nA.getPreferredUser(e))}static getApplyFromUser(e,i){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return i}}static getKindFromUser(e,i){return typeof e.kind=="string"?new es(e.kind):i}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,i,n){this.kind=e,this.apply=i,this.preferred=n}}class fSi{constructor(e,i){this.action=e,this.provider=i}resolve(e){var i;return cSi(this,void 0,void 0,function*(){if(!((i=this.provider)===null||i===void 0)&&i.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,e)}catch(a){z4(a)}n&&(this.action.edit=n.edit)}return this})}}var Dxe=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const okt="editor.action.codeAction",H$e="editor.action.quickFix",skt="editor.action.autoFix",lkt="editor.action.refactor",ckt="editor.action.sourceAction",K$e="editor.action.organizeImports",W$e="editor.action.fixAll";class oue extends sn{static codeActionsPreferredComparator(e,i){return e.isPreferred&&!i.isPreferred?-1:!e.isPreferred&&i.isPreferred?1:0}static codeActionsComparator({action:e},{action:i}){return Kg(e.diagnostics)?Kg(i.diagnostics)?oue.codeActionsPreferredComparator(e,i):-1:Kg(i.diagnostics)?1:oue.codeActionsPreferredComparator(e,i)}constructor(e,i,n){super(),this.documentation=i,this._register(n),this.allActions=[...e].sort(oue.codeActionsComparator),this.validActions=this.allActions.filter(({action:a})=>!a.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&es.QuickFix.contains(new es(e.kind))&&!!e.isPreferred)}}const xDt={actions:[],documentation:void 0};function G$e(r,e,i,n,a,o){var c;return Dxe(this,void 0,void 0,function*(){const h=n.filter||{},g={only:(c=h.include)===null||c===void 0?void 0:c.value,trigger:n.type},_=new M$e(e,o),x=mSi(r,e,h),y=new du,S=x.map(O=>Dxe(this,void 0,void 0,function*(){try{a.report(O);const G=yield O.provideCodeActions(e,i,g,_.token);if(G&&y.add(G),_.token.isCancellationRequested)return xDt;const ie=((G==null?void 0:G.actions)||[]).filter(re=>re&&hSi(h,re)),ue=gSi(O,ie,h.include);return{actions:ie.map(re=>new fSi(re,O)),documentation:ue}}catch(G){if(Ny(G))throw G;return z4(G),xDt}})),L=r.onDidChange(()=>{const O=r.all(e);tg(O,x)||_.cancel()});try{const O=yield Promise.all(S),G=O.map(ue=>ue.actions).flat(),ie=[..._$(O.map(ue=>ue.documentation)),...pSi(r,e,n,G)];return new oue(G,ie,y)}finally{L.dispose(),_.dispose()}})}function mSi(r,e,i){return r.all(e).filter(n=>n.providedCodeActionKinds?n.providedCodeActionKinds.some(a=>dSi(i,new es(a))):!0)}function*pSi(r,e,i,n){var a,o,c;if(e&&n.length)for(const h of r.all(e))h._getAdditionalMenuItems&&(yield*(a=h._getAdditionalMenuItems)===null||a===void 0?void 0:a.call(h,{trigger:i.type,only:(c=(o=i.filter)===null||o===void 0?void 0:o.include)===null||c===void 0?void 0:c.value},n.map(g=>g.action)))}function gSi(r,e,i){if(!r.documentation)return;const n=r.documentation.map(a=>({kind:new es(a.kind),command:a.command}));if(i){let a;for(const o of n)o.kind.contains(i)&&(a?a.kind.contains(o.kind)&&(a=o):a=o);if(a)return a==null?void 0:a.command}for(const a of e)if(a.kind){for(const o of n)if(o.kind.contains(new es(a.kind)))return o.command}}var xxe;(function(r){r.OnSave="onSave",r.FromProblemsView="fromProblemsView",r.FromCodeActions="fromCodeActions"})(xxe||(xxe={}));function ESi(r,e,i,n,a=g0.None){var o;return Dxe(this,void 0,void 0,function*(){const c=r.get(Tae),h=r.get(Zh),g=r.get(nv),_=r.get(Lf);if(g.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:i}),yield e.resolve(a),!a.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield c.apply(e.action.edit,{editor:n==null?void 0:n.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==xxe.OnSave,showPreview:n==null?void 0:n.preview})).isApplied)&&e.action.command)try{yield h.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(x){const y=_Si(x);_.error(typeof y=="string"?y:V("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function _Si(r){return typeof r=="string"?r:r instanceof Error&&typeof r.message=="string"?r.message:void 0}O0.registerCommand("_executeCodeActionProvider",function(r,e,i,n,a){return Dxe(this,void 0,void 0,function*(){if(!(e instanceof to))throw cx();const{codeActionProvider:o}=r.get(ma),c=r.get(lh).getModel(e);if(!c)throw cx();const h=Ea.isISelection(i)?Ea.liftSelection(i):ot.isIRange(i)?c.validateRange(i):void 0;if(!h)throw cx();const g=typeof n=="string"?new es(n):void 0,_=yield G$e(o,c,h,{type:1,triggerAction:Ex.Default,filter:{includeSourceActions:!0,include:g}},XR.None,g0.None),x=[],y=Math.min(_.validActions.length,typeof a=="number"?a:0);for(let S=0;SS.action)}finally{setTimeout(()=>_.dispose(),100)}})});var DSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},xSi=function(r,e){return function(i,n){e(i,n,r)}};let vxe=class dkt{constructor(e){this.keybindingService=e}getResolver(){const e=new oN(()=>this.keybindingService.getKeybindings().filter(i=>dkt.codeActionCommands.indexOf(i.command)>=0).filter(i=>i.resolvedKeybinding).map(i=>{let n=i.commandArgs;return i.command===K$e?n={kind:es.SourceOrganizeImports.value}:i.command===W$e&&(n={kind:es.SourceFixAll.value}),Object.assign({resolvedKeybinding:i.resolvedKeybinding},nA.fromUser(n,{kind:es.None,apply:"never"}))}));return i=>{if(i.kind){const n=this.bestKeybindingForCodeAction(i,e.value);return n==null?void 0:n.resolvedKeybinding}}}bestKeybindingForCodeAction(e,i){if(!e.kind)return;const n=new es(e.kind);return i.filter(a=>a.kind.contains(n)).filter(a=>a.preferred?e.isPreferred:!0).reduceRight((a,o)=>a?a.kind.contains(o.kind)?o:a:o,void 0)}};vxe.codeActionCommands=[lkt,okt,ckt,K$e,W$e];vxe=DSi([xSi(0,J1)],vxe);Jt("symbolIcon.arrayForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.booleanForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.colorForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.constantForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},V("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.fileForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.folderForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.keyForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.keywordForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},V("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.moduleForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.namespaceForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.nullForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.numberForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.objectForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.operatorForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.packageForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.propertyForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.referenceForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.snippetForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.stringForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.structForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.textForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.typeParameterForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.unitForeground",{dark:Su,light:Su,hcDark:Su,hcLight:Su},V("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Jt("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},V("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const hkt=Object.freeze({kind:es.Empty,title:V("codeAction.widget.id.more","More Actions...")}),vSi=Object.freeze([{kind:es.QuickFix,title:V("codeAction.widget.id.quickfix","Quick Fix...")},{kind:es.RefactorExtract,title:V("codeAction.widget.id.extract","Extract..."),icon:dr.wrench},{kind:es.RefactorInline,title:V("codeAction.widget.id.inline","Inline..."),icon:dr.wrench},{kind:es.RefactorRewrite,title:V("codeAction.widget.id.convert","Rewrite..."),icon:dr.wrench},{kind:es.RefactorMove,title:V("codeAction.widget.id.move","Move..."),icon:dr.wrench},{kind:es.SurroundWith,title:V("codeAction.widget.id.surround","Surround With..."),icon:dr.symbolSnippet},{kind:es.Source,title:V("codeAction.widget.id.source","Source Action..."),icon:dr.symbolFile},hkt]);function CSi(r,e,i){if(!e)return r.map(o=>({kind:"action",item:o,group:hkt,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));const n=vSi.map(o=>({group:o,actions:[]}));for(const o of r){const c=o.action.kind?new es(o.action.kind):es.None;for(const h of n)if(h.group.kind.contains(c)){h.actions.push(o);break}}const a=[];for(const o of n)if(o.actions.length){a.push({kind:"header",group:o.group});for(const c of o.actions)a.push({kind:"action",item:c,group:o.group,label:c.action.title,disabled:!!c.action.disabled,keybinding:i(c.action)})}return a}var bSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},ySi=function(r,e){return function(i,n){e(i,n,r)}};let GD=class cKe{static get(e){return e.getContribution(cKe.ID)}constructor(e,i){this._messageWidget=new M4,this._messageListeners=new du,this._editor=e,this._visible=cKe.MESSAGE_VISIBLE.bindTo(i)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,i){vp(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new vDt(this._editor,i,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new tv(()=>this.closeMessage(),3e3));let n;this._messageListeners.add(this._editor.onMouseMove(a=>{a.target.position&&(n?n.containsPosition(a.target.position)||this.closeMessage():n=new ot(i.lineNumber-3,1,a.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(vDt.fadeOut(this._messageWidget.value))}};GD.ID="editor.contrib.messageController";GD.MESSAGE_VISIBLE=new Kr("messageVisible",!1,V("messageVisible","Whether the editor is currently showing an inline message"));GD=bSi([ySi(1,Wo)],GD);const kSi=Fp.bindToContribution(GD.get);Zu(new kSi({id:"leaveEditorMessage",precondition:GD.MESSAGE_VISIBLE,handler:r=>r.closeMessage(),kbOpts:{weight:130,primary:9}}));let vDt=class{static fadeOut(e){const i=()=>{e.dispose(),clearTimeout(n),e.getDomNode().removeEventListener("animationend",i)},n=setTimeout(i,110);return e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}constructor(e,{lineNumber:i,column:n},a){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:n},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const c=document.createElement("div");c.classList.add("message"),c.textContent=a,this._domNode.appendChild(c);const h=document.createElement("div");h.classList.add("anchor","below"),this._domNode.appendChild(h),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};fl(GD.ID,GD,4);var fkt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},dKe=function(r,e){return function(i,n){e(i,n,r)}};const mkt="acceptSelectedCodeAction",pkt="previewSelectedCodeAction";class FSi{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const i=document.createElement("span");return e.append(i),{container:e,text:i}}renderElement(e,i,n){var a,o;n.text.textContent=(o=(a=e.group)===null||a===void 0?void 0:a.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}}let hKe=class{get templateId(){return"action"}constructor(e,i){this._supportsPreview=e,this._keybindingService=i}renderTemplate(e){e.classList.add(this.templateId);const i=document.createElement("div");i.className="icon",e.append(i);const n=document.createElement("span");n.className="title",e.append(n);const a=new Pae(e,ux);return{container:e,icon:i,text:n,keybinding:a}}renderElement(e,i,n){var a,o,c;if(!((a=e.group)===null||a===void 0)&&a.icon?(n.icon.className=_o.asClassName(e.group.icon),e.group.icon.color&&(n.icon.style.color=Lr(e.group.icon.color.id))):(n.icon.className=_o.asClassName(dr.lightBulb),n.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;n.text.textContent=gkt(e.label),n.keybinding.set(e.keybinding),r_i(!!e.keybinding,n.keybinding.element);const h=(o=this._keybindingService.lookupKeybinding(mkt))===null||o===void 0?void 0:o.getLabel(),g=(c=this._keybindingService.lookupKeybinding(pkt))===null||c===void 0?void 0:c.getLabel();n.container.classList.toggle("option-disabled",e.disabled),e.disabled?n.container.title=e.label:h&&g?this._supportsPreview?n.container.title=V({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",h,g):n.container.title=V({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",h):n.container.title=""}disposeTemplate(e){}};hKe=fkt([dKe(1,J1)],hKe);class ASi extends UIEvent{constructor(){super("acceptSelectedAction")}}class CDt extends UIEvent{constructor(){super("previewSelectedAction")}}let fKe=class extends sn{constructor(e,i,n,a,o,c){super(),this._delegate=a,this._contextViewService=o,this._keybindingService=c,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const h={getHeight:g=>g.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:g=>g.kind};this._list=this._register(new n2(e,this.domNode,h,[new hKe(i,this._keybindingService),new FSi],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:g=>{if(g.kind==="action"){let _=g.label?gkt(g==null?void 0:g.label):"";return g.disabled&&(_=V({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",_,g.disabled)),_}return null},getWidgetAriaLabel:()=>V({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:g=>g.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(eO),this._register(this._list.onMouseClick(g=>this.onListClick(g))),this._register(this._list.onMouseOver(g=>this.onListHover(g))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(g=>this.onListSelection(g))),this._allMenuItems=n,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this._contextViewService.hideContextView()}layout(e){const i=this._allMenuItems.filter(_=>_.kind==="header").length,a=this._allMenuItems.length*this._actionLineHeight+i*this._headerLineHeight-i*this._actionLineHeight;this._list.layout(a);const o=this._allMenuItems.map((_,x)=>{const y=document.getElementById(this._list.getElementID(x));if(y){y.style.width="auto";const S=y.getBoundingClientRect().width;return y.style.width="",S}return 0}),c=Math.max(...o,e),g=Math.min(a,document.body.clientHeight*.7);return this._list.layout(g,c),this.domNode.style.height=`${g}px`,this._list.domFocus(),c}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const i=this._list.getFocus();if(i.length===0)return;const n=i[0],a=this._list.element(n);if(!this.focusCondition(a))return;const o=e?new CDt:new ASi;this._list.setSelection([n],o)}onListSelection(e){if(!e.elements.length)return;const i=e.elements[0];i.item&&this.focusCondition(i)?this._delegate.onSelect(i.item,e.browserEvent instanceof CDt):this._list.setSelection([])}onListHover(e){this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};fKe=fkt([dKe(4,h8),dKe(5,J1)],fKe);function gkt(r){return r.replace(/\r\n|\r|\n/g," ")}var SSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},ORe=function(r,e){return function(i,n){e(i,n,r)}};const CR={Visible:new Kr("codeActionMenuVisible",!1,V("codeActionMenuVisible","Whether the action widget list is visible"))},nO=y0("actionWidgetService");let bR=class extends sn{get isVisible(){return CR.Visible.getValue(this._contextKeyService)||!1}constructor(e,i,n){super(),this._contextViewService=e,this._contextKeyService=i,this._instantiationService=n,this._list=this._register(new M4)}show(e,i,n,a,o,c,h){const g=CR.Visible.bindTo(this._contextKeyService),_=this._instantiationService.createInstance(fKe,e,i,n,a);this._contextViewService.showContextView({getAnchor:()=>o,render:x=>(g.set(!0),this._renderWidget(x,_,h??[])),onHide:x=>{g.reset(),this._onWidgetClosed(x)}},c,!1)}acceptSelected(e){var i;(i=this._list.value)===null||i===void 0||i.acceptSelected(e)}focusPrevious(){var e,i;(i=(e=this._list)===null||e===void 0?void 0:e.value)===null||i===void 0||i.focusPrevious()}focusNext(){var e,i;(i=(e=this._list)===null||e===void 0?void 0:e.value)===null||i===void 0||i.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,i,n){var a;const o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=i,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");const c=new du,h=document.createElement("div"),g=e.appendChild(h);g.classList.add("context-view-block"),c.add(Vn(g,wr.MOUSE_DOWN,O=>O.stopPropagation()));const _=document.createElement("div"),x=e.appendChild(_);x.classList.add("context-view-pointerBlock"),c.add(Vn(x,wr.POINTER_MOVE,()=>x.remove())),c.add(Vn(x,wr.MOUSE_DOWN,()=>x.remove()));let y=0;if(n.length){const O=this._createActionBar(".action-widget-action-bar",n);O&&(o.appendChild(O.getContainer().parentElement),c.add(O),y=O.getContainer().offsetWidth)}const S=(a=this._list.value)===null||a===void 0?void 0:a.layout(y);o.style.width=`${S}px`;const L=c.add(i8(e));return c.add(L.onDidBlur(()=>this.hide())),c}_createActionBar(e,i){if(!i.length)return;const n=Pu(e),a=new ev(n);return a.push(i,{icon:!1,label:!0}),a}_onWidgetClosed(e){var i;(i=this._list.value)===null||i===void 0||i.hide(e)}};bR=SSi([ORe(0,h8),ORe(1,Wo),ORe(2,Ds)],bR);Z0(nO,bR,1);const Oae=1100;Am(class extends l8{constructor(){super({id:"hideCodeActionWidget",title:{value:V("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:CR.Visible,keybinding:{weight:Oae,primary:9,secondary:[1033]}})}run(r){r.get(nO).hide()}});Am(class extends l8{constructor(){super({id:"selectPrevCodeAction",title:{value:V("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:CR.Visible,keybinding:{weight:Oae,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(r){const e=r.get(nO);e instanceof bR&&e.focusPrevious()}});Am(class extends l8{constructor(){super({id:"selectNextCodeAction",title:{value:V("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:CR.Visible,keybinding:{weight:Oae,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(r){const e=r.get(nO);e instanceof bR&&e.focusNext()}});Am(class extends l8{constructor(){super({id:mkt,title:{value:V("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:CR.Visible,keybinding:{weight:Oae,primary:3,secondary:[2132]}})}run(r){const e=r.get(nO);e instanceof bR&&e.acceptSelected()}});Am(class extends l8{constructor(){super({id:pkt,title:{value:V("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:CR.Visible,keybinding:{weight:Oae,primary:2051}})}run(r){const e=r.get(nO);e instanceof bR&&e.acceptSelected(!0)}});var BSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},wSi=function(r,e){return function(i,n){e(i,n,r)}},HG;(function(r){r.Hidden={type:0};class e{constructor(n,a,o,c){this.actions=n,this.trigger=a,this.editorPosition=o,this.widgetPosition=c,this.type=1}}r.Showing=e})(HG||(HG={}));let yR=class Ekt extends sn{constructor(e,i){super(),this._editor=e,this._onClick=this._register(new yi),this.onClick=this._onClick.event,this._state=HG.Hidden,this._domNode=Pu("div.lightBulbWidget"),this._register(md.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const a=this._editor.getModel();(this.state.type!==1||!a||this.state.editorPosition.lineNumber>=a.getLineCount())&&this.hide()})),this._register(UEi(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:a,height:o}=N4(this._domNode),c=this._editor.getOption(64);let h=Math.floor(c/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(Ia.runAndSubscribe(i.onDidUpdateKeybindings,()=>{var n,a;this._preferredKbLabel=xp((n=i.lookupKeybinding(skt))===null||n===void 0?void 0:n.getLabel()),this._quickFixKbLabel=xp((a=i.lookupKeybinding(H$e))===null||a===void 0?void 0:a.getLabel()),this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,i,n){if(e.validActions.length<=0)return this.hide();const a=this._editor.getOptions();if(!a.get(62).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:c,column:h}=o.validatePosition(n),g=o.getOptions().tabSize,_=a.get(48),x=o.getLineContent(c),y=ive(x,g),S=_.spaceWidth*y>22,L=G=>G>2&&this._editor.getTopForLineNumber(G)===this._editor.getTopForLineNumber(G-1);let O=c;if(!S){if(c>1&&!L(c-1))O-=1;else if(!L(c+1))O+=1;else if(h*_.spaceWidth<22)return this.hide()}this.state=new HG.Showing(e,i,n,{position:{lineNumber:O,column:1},preference:Ekt._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==HG.Hidden&&(this.state=HG.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(..._o.asClassNameArray(dr.lightBulb)),this._domNode.classList.add(..._o.asClassNameArray(dr.lightbulbAutofix)),this._preferredKbLabel)){this.title=V("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(..._o.asClassNameArray(dr.lightbulbAutofix)),this._domNode.classList.add(..._o.asClassNameArray(dr.lightBulb)),this._quickFixKbLabel?this.title=V("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=V("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};yR.ID="editor.contrib.lightbulbWidget";yR._posPref=[0];yR=BSi([wSi(1,J1)],yR);var TSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},f3e=function(r,e){return function(i,n){e(i,n,r)}},jRe=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})},LSi=function(r,e,i,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(r,i):a?a.value=i:e.set(r,i),i},NSi=function(r,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(r):n?n.value:e.get(r)},xDe;let mKe=class extends sn{constructor(e,i,n,a,o,c){super(),this._editor=e,this.delegate=i,this._configurationService=a,this._actionWidgetService=o,this._commandService=c,this._activeCodeActions=this._register(new M4),xDe.set(this,!1),this._showDisabled=!1,this._lightBulbWidget=new oN(()=>{const h=this._editor.getContribution(yR.ID);return h&&this._register(h.onClick(g=>this.showCodeActionList(g.actions,g,{includeDisabledActions:!1,fromLightbulb:!0}))),h}),this._resolver=n.createInstance(vxe),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){LSi(this,xDe,!0,"f"),super.dispose()}update(e){var i,n,a,o,c,h,g;return jRe(this,void 0,void 0,function*(){if(e.type!==1){(i=this._lightBulbWidget.rawValue)===null||i===void 0||i.hide();return}let _;try{_=yield e.actions}catch(x){Bs(x);return}if(!NSi(this,xDe,"f"))if((n=this._lightBulbWidget.value)===null||n===void 0||n.update(_,e.trigger,e.position),e.trigger.type===1){if(!((a=e.trigger.filter)===null||a===void 0)&&a.include){const y=this.tryGetValidActionToApply(e.trigger,_);if(y){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this.delegate.applyCodeAction(y,!1,!1)}finally{_.dispose()}return}if(e.trigger.context){const S=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,_);if(S&&S.action.disabled){(c=GD.get(this._editor))===null||c===void 0||c.showMessage(S.action.disabled,e.trigger.context.position),_.dispose();return}}}const x=!!(!((h=e.trigger.filter)===null||h===void 0)&&h.include);if(e.trigger.context&&(!_.allActions.length||!x&&!_.validActions.length)){(g=GD.get(this._editor))===null||g===void 0||g.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=_,_.dispose();return}this._activeCodeActions.value=_,this.showCodeActionList(_,this.toCoords(e.position),{includeDisabledActions:x,fromLightbulb:!1})}else this._actionWidgetService.isVisible?_.dispose():this._activeCodeActions.value=_})}getInvalidActionThatWouldHaveBeenApplied(e,i){if(i.allActions.length&&(e.autoApply==="first"&&i.validActions.length===0||e.autoApply==="ifSingle"&&i.allActions.length===1))return i.allActions.find(({action:n})=>n.disabled)}tryGetValidActionToApply(e,i){if(i.validActions.length&&(e.autoApply==="first"&&i.validActions.length>0||e.autoApply==="ifSingle"&&i.validActions.length===1))return i.validActions[0]}showCodeActionList(e,i,n){return jRe(this,void 0,void 0,function*(){const a=this._editor.getDomNode();if(!a)return;const o=n.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;const c=Vi.isIPosition(i)?this.toCoords(i):i,h={onSelect:(g,_)=>jRe(this,void 0,void 0,function*(){this.delegate.applyCodeAction(g,!0,!!_),this._actionWidgetService.hide()}),onHide:()=>{var g;(g=this._editor)===null||g===void 0||g.focus()}};this._actionWidgetService.show("codeActionWidget",!0,CSi(o,this._shouldShowHeaders(),this._resolver.getResolver()),h,c,a,this._getActionBarActions(e,i,n))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const i=this._editor.getScrolledVisiblePosition(e),n=N4(this._editor.getDomNode()),a=n.left+i.left,o=n.top+i.top+i.height;return{x:a,y:o}}_shouldShowHeaders(){var e;const i=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:i==null?void 0:i.uri})}_getActionBarActions(e,i,n){if(n.fromLightbulb)return[];const a=e.documentation.map(o=>{var c;return{id:o.id,label:o.title,tooltip:(c=o.tooltip)!==null&&c!==void 0?c:"",class:void 0,enabled:!0,run:()=>{var h;return this._commandService.executeCommand(o.id,...(h=o.arguments)!==null&&h!==void 0?h:[])}}});return n.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&a.push(this._showDisabled?{id:"hideMoreActions",label:V("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,i,n))}:{id:"showMoreActions",label:V("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,i,n))}),a}};xDe=new WeakMap;mKe=TSi([f3e(2,Ds),f3e(3,hl),f3e(4,nO),f3e(5,Zh)],mKe);var VRe=function(r,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(r):n?n.value:e.get(r)},PSi=function(r,e,i,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(r,i):a?a.value=i:e.set(r,i),i},gG;const _kt=new Kr("supportedCodeAction","");class MSi extends sn{constructor(e,i,n,a=250){super(),this._editor=e,this._markerService=i,this._signalChange=n,this._delay=a,this._autoTriggerTimer=this._register(new tv),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const i=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(i?{trigger:e,selection:i}:void 0)}_onMarkerChanges(e){const i=this._editor.getModel();i&&e.some(n=>uve(n,i.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Ex.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const i=this._editor.getModel(),n=this._editor.getSelection();if(n.isEmpty()&&e.type===2){const{lineNumber:a,column:o}=n.getPosition(),c=i.getLineContent(a);if(c.length===0)return;if(o===1){if(/\s/.test(c[0]))return}else if(o===i.getLineMaxColumn(a)){if(/\s/.test(c[c.length-1]))return}else if(/\s/.test(c[o-2])&&/\s/.test(c[o-1]))return}return n}}var AI;(function(r){r.Empty={type:0};class e{constructor(n,a,o){this.trigger=n,this.position=a,this._cancellablePromise=o,this.type=1,this.actions=o.catch(c=>{if(Ny(c))return zSi;throw c})}cancel(){this._cancellablePromise.cancel()}}r.Triggered=e})(AI||(AI={}));const zSi=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class ISi extends sn{constructor(e,i,n,a,o){super(),this._editor=e,this._registry=i,this._markerService=n,this._progressService=o,this._codeActionOracle=this._register(new M4),this._state=AI.Empty,this._onDidChangeState=this._register(new yi),this.onDidChangeState=this._onDidChangeState.event,gG.set(this,!1),this._supportedCodeActions=_kt.bindTo(a),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){VRe(this,gG,"f")||(PSi(this,gG,!0,"f"),super.dispose(),this.setState(AI.Empty,!0))}_update(){if(VRe(this,gG,"f"))return;this._codeActionOracle.value=void 0,this.setState(AI.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(87)){const i=this._registry.all(e).flatMap(n=>{var a;return(a=n.providedCodeActionKinds)!==null&&a!==void 0?a:[]});this._supportedCodeActions.set(i.join(" ")),this._codeActionOracle.value=new MSi(this._editor,this._markerService,n=>{var a;if(!n){this.setState(AI.Empty);return}const o=u4(c=>G$e(this._registry,e,n.selection,n.trigger,XR.None,c));n.trigger.type===1&&((a=this._progressService)===null||a===void 0||a.showWhile(o,250)),this.setState(new AI.Triggered(n.trigger,n.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Ex.Default})}else this._supportedCodeActions.reset()}trigger(e){var i;(i=this._codeActionOracle.value)===null||i===void 0||i.trigger(e)}setState(e,i){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!i&&!VRe(this,gG,"f")&&this._onDidChangeState.fire(e))}}gG=new WeakMap;var RSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Vie=function(r,e){return function(i,n){e(i,n,r)}},OSi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let kR=class Dkt extends sn{static get(e){return e.getContribution(Dkt.ID)}constructor(e,i,n,a,o,c){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new ISi(this._editor,c.codeActionProvider,i,n,a)),this._register(this._model.onDidChangeState(h=>this._ui.value.update(h))),this._ui=new oN(()=>this._register(o.createInstance(mKe,e,{applyCodeAction:(h,g,_)=>OSi(this,void 0,void 0,function*(){try{yield this._applyCodeAction(h,_)}finally{g&&this._trigger({type:2,triggerAction:Ex.QuickFix,filter:{}})}})})))}showCodeActions(e,i,n){return this._ui.value.showCodeActionList(i,n,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,i,n,a){var o;if(!this._editor.hasModel())return;(o=GD.get(this._editor))===null||o===void 0||o.closeMessage();const c=this._editor.getPosition();this._trigger({type:1,triggerAction:i,filter:n,autoApply:a,context:{notAvailableMessage:e,position:c}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,i){return this._instantiationService.invokeFunction(ESi,e,xxe.FromCodeActions,{preview:i,editor:this._editor})}};kR.ID="editor.contrib.codeActionController";kR=RSi([Vie(1,WA),Vie(2,Wo),Vie(3,hN),Vie(4,Ds),Vie(5,ma)],kR);function jae(r){return pu.regex(_kt.keys()[0],new RegExp("(\\s|^)"+mx(r.value)+"\\b"))}const J$e={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:V("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:V("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[V("args.schema.apply.first","Always apply the first returned code action."),V("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),V("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:V("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function uO(r,e,i,n,a=Ex.Default){if(r.hasModel()){const o=kR.get(r);o==null||o.manualTriggerAtCurrentPosition(e,a,i,n)}}class jSi extends Vr{constructor(){super({id:H$e,label:V("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:pu.and(Rt.writable,Rt.hasCodeActionsProvider),kbOpts:{kbExpr:Rt.textInputFocus,primary:2132,weight:100}})}run(e,i){return uO(i,V("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Ex.QuickFix)}}class VSi extends Fp{constructor(){super({id:okt,precondition:pu.and(Rt.writable,Rt.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:J$e}]}})}runEditorCommand(e,i,n){const a=nA.fromUser(n,{kind:es.Empty,apply:"ifSingle"});return uO(i,typeof(n==null?void 0:n.kind)=="string"?a.preferred?V("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",n.kind):V("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",n.kind):a.preferred?V("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):V("editor.action.codeAction.noneMessage","No code actions available"),{include:a.kind,includeSourceActions:!0,onlyIncludePreferredActions:a.preferred},a.apply)}}class HSi extends Vr{constructor(){super({id:lkt,label:V("refactor.label","Refactor..."),alias:"Refactor...",precondition:pu.and(Rt.writable,Rt.hasCodeActionsProvider),kbOpts:{kbExpr:Rt.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:pu.and(Rt.writable,jae(es.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:J$e}]}})}run(e,i,n){const a=nA.fromUser(n,{kind:es.Refactor,apply:"never"});return uO(i,typeof(n==null?void 0:n.kind)=="string"?a.preferred?V("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",n.kind):V("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",n.kind):a.preferred?V("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):V("editor.action.refactor.noneMessage","No refactorings available"),{include:es.Refactor.contains(a.kind)?a.kind:es.None,onlyIncludePreferredActions:a.preferred},a.apply,Ex.Refactor)}}class KSi extends Vr{constructor(){super({id:ckt,label:V("source.label","Source Action..."),alias:"Source Action...",precondition:pu.and(Rt.writable,Rt.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:pu.and(Rt.writable,jae(es.Source))},description:{description:"Source Action...",args:[{name:"args",schema:J$e}]}})}run(e,i,n){const a=nA.fromUser(n,{kind:es.Source,apply:"never"});return uO(i,typeof(n==null?void 0:n.kind)=="string"?a.preferred?V("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",n.kind):V("editor.action.source.noneMessage.kind","No source actions for '{0}' available",n.kind):a.preferred?V("editor.action.source.noneMessage.preferred","No preferred source actions available"):V("editor.action.source.noneMessage","No source actions available"),{include:es.Source.contains(a.kind)?a.kind:es.None,includeSourceActions:!0,onlyIncludePreferredActions:a.preferred},a.apply,Ex.SourceAction)}}class WSi extends Vr{constructor(){super({id:K$e,label:V("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:pu.and(Rt.writable,jae(es.SourceOrganizeImports)),kbOpts:{kbExpr:Rt.textInputFocus,primary:1581,weight:100}})}run(e,i){return uO(i,V("editor.action.organize.noneMessage","No organize imports action available"),{include:es.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Ex.OrganizeImports)}}class GSi extends Vr{constructor(){super({id:W$e,label:V("fixAll.label","Fix All"),alias:"Fix All",precondition:pu.and(Rt.writable,jae(es.SourceFixAll))})}run(e,i){return uO(i,V("fixAll.noneMessage","No fix all action available"),{include:es.SourceFixAll,includeSourceActions:!0},"ifSingle",Ex.FixAll)}}class JSi extends Vr{constructor(){super({id:skt,label:V("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:pu.and(Rt.writable,jae(es.QuickFix)),kbOpts:{kbExpr:Rt.textInputFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,i){return uO(i,V("editor.action.autoFix.noneMessage","No auto fixes available"),{include:es.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Ex.AutoFix)}}fl(kR.ID,kR,3);fl(yR.ID,yR,4);Cu(jSi);Cu(HSi);Cu(KSi);Cu(WSi);Cu(JSi);Cu(GSi);Zu(new VSi);G1.as(jA.Configuration).registerConfiguration(Object.assign(Object.assign({},o$e),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:V("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));var bDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class pKe{constructor(){this.lenses=[],this._disposables=new du}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,i){this._disposables.add(e);for(const n of e.lenses)this.lenses.push({symbol:n,provider:i})}}function xkt(r,e,i){return bDt(this,void 0,void 0,function*(){const n=r.ordered(e),a=new Map,o=new pKe,c=n.map((h,g)=>bDt(this,void 0,void 0,function*(){a.set(h,g);try{const _=yield Promise.resolve(h.provideCodeLenses(e,i));_&&o.add(_,h)}catch(_){z4(_)}}));return yield Promise.all(c),o.lenses=o.lenses.sort((h,g)=>h.symbol.range.startLineNumberg.symbol.range.startLineNumber?1:a.get(h.provider)a.get(g.provider)?1:h.symbol.range.startColumng.symbol.range.startColumn?1:0),o})}O0.registerCommand("_executeCodeLensProvider",function(r,...e){let[i,n]=e;bc(to.isUri(i)),bc(typeof n=="number"||!n);const{codeLensProvider:a}=r.get(ma),o=r.get(lh).getModel(i);if(!o)throw cx();const c=[],h=new du;return xkt(a,o,g0.None).then(g=>{h.add(g);const _=[];for(const x of g.lenses)n==null||x.symbol.command?c.push(x.symbol):n-- >0&&x.provider.resolveCodeLens&&_.push(Promise.resolve(x.provider.resolveCodeLens(o,x.symbol,g0.None)).then(y=>c.push(y||x.symbol)));return Promise.all(_)}).then(()=>c).finally(()=>{setTimeout(()=>h.dispose(),100)})});var $Si=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},USi=function(r,e){return function(i,n){e(i,n,r)}};const vkt=y0("ICodeLensCache");class yDt{constructor(e,i){this.lineCount=e,this.data=i}}let gKe=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new dN(20,.75);const i="codelens/cache";TS(()=>e.remove(i,1));const n="codelens/cache2",a=e.get(n,1,"{}");this._deserialize(a),AA(e.onWillSaveState)(o=>{o.reason===ixe.SHUTDOWN&&e.store(n,this._serialize(),1,1)})}put(e,i){const n=i.lenses.map(c=>{var h;return{range:c.symbol.range,command:c.symbol.command&&{id:"",title:(h=c.symbol.command)===null||h===void 0?void 0:h.title}}}),a=new pKe;a.add({lenses:n,dispose:()=>{}},this._fakeProvider);const o=new yDt(e.getLineCount(),a);this._cache.set(e.uri.toString(),o)}get(e){const i=this._cache.get(e.uri.toString());return i&&i.lineCount===e.getLineCount()?i.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[i,n]of this._cache){const a=new Set;for(const o of n.data.lenses)a.add(o.symbol.range.startLineNumber);e[i]={lineCount:n.lineCount,lines:[...a.values()]}}return JSON.stringify(e)}_deserialize(e){try{const i=JSON.parse(e);for(const n in i){const a=i[n],o=[];for(const h of a.lines)o.push({range:new ot(h,1,h,11)});const c=new pKe;c.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(n,new yDt(a.lineCount,c))}}catch{}}};gKe=$Si([USi(0,r2)],gKe);Z0(vkt,gKe,1);class qSi{constructor(e,i,n){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=i,this._onHeight=n,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class zve{constructor(e,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${zve._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,i){this._commands.clear();const n=[];let a=!1;for(let o=0;o{_.symbol.command&&g.push(_.symbol),n.addDecoration({range:_.symbol.range,options:kDt},y=>this._decorationIds[x]=y),h?h=ot.plusRange(h,_.symbol.range):h=ot.lift(_.symbol.range)}),this._viewZone=new qSi(h.startLineNumber-1,o,c),this._viewZoneId=a.addZone(this._viewZone),g.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(g,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new zve(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,i){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],i==null||i.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,i)=>{const n=this._editor.getModel().getDecorationRange(e),a=this._data[i].symbol;return!!(n&&ot.isEmpty(a.range)===n.isEmpty())})}updateCodeLensSymbols(e,i){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],this._data=e,this._data.forEach((n,a)=>{i.addDecoration({range:n.symbol.range,options:kDt},o=>this._decorationIds[a]=o)})}updateHeight(e,i){this._viewZone.heightInPx=e,i.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let i=0;i=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Hie=function(r,e){return function(i,n){e(i,n,r)}},YSi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let r$=class{constructor(e,i,n,a,o,c){this._editor=e,this._languageFeaturesService=i,this._commandService=a,this._notificationService=o,this._codeLensCache=c,this._disposables=new du,this._localToDispose=new du,this._lenses=[],this._oldCodeLensModels=new du,this._provideCodeLensDebounce=n.for(i.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=n.for(i.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Zc(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(h=>{(h.hasChanged(48)||h.hasChanged(17)||h.hasChanged(16))&&this._updateLensStyle(),h.hasChanged(15)&&this._onModelChange()})),this._disposables.add(i.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(64)/this._editor.getOption(50));let i=this._editor.getOption(17);return(!i||i<5)&&(i=this._editor.getOption(50)*.9|0),{fontSize:i,codeLensHeight:i*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:i}=this._getLayoutInfo(),n=this._editor.getOption(16),a=this._editor.getOption(48),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${i}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",a.fontFeatureSettings),n&&(o.setProperty("--vscode-editorCodeLens-fontFamily",n),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",VD.fontFamily)),this._editor.changeViewZones(c=>{for(const h of this._lenses)h.updateHeight(e,c)})}_localDispose(){var e,i,n;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(i=this._resolveCodeLensesPromise)===null||i===void 0||i.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(n=this._currentCodeLensModel)===null||n===void 0||n.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(15))return;const i=this._codeLensCache.get(e);if(i&&this._renderCodeLensSymbols(i),!this._languageFeaturesService.codeLensProvider.has(e)){i&&this._localToDispose.add(lR(()=>{const a=this._codeLensCache.get(e);i===a&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const a of this._languageFeaturesService.codeLensProvider.all(e))if(typeof a.onDidChange=="function"){const o=a.onDidChange(()=>n.schedule());this._localToDispose.add(o)}const n=new Zc(()=>{var a;const o=Date.now();(a=this._getCodeLensModelPromise)===null||a===void 0||a.cancel(),this._getCodeLensModelPromise=u4(c=>xkt(this._languageFeaturesService.codeLensProvider,e,c)),this._getCodeLensModelPromise.then(c=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=c,this._codeLensCache.put(e,c);const h=this._provideCodeLensDebounce.update(e,Date.now()-o);n.delay=h,this._renderCodeLensSymbols(c),this._resolveCodeLensesInViewportSoon()},Bs)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(n),this._localToDispose.add(Ss(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(a=>{this._editor.changeViewZones(o=>{const c=[];let h=-1;this._lenses.forEach(_=>{!_.isValid()||h===_.getLineNumber()?c.push(_):(_.update(o),h=_.getLineNumber())});const g=new HRe;c.forEach(_=>{_.dispose(g,o),this._lenses.splice(this._lenses.indexOf(_),1)}),g.commit(a)})}),n.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{n.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(a=>{a.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Ss(()=>{if(this._editor.getModel()){const a=TA.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(c=>{this._disposeAllLenses(o,c)})}),a.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(a=>{if(a.target.type!==9)return;let o=a.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(const c of this._lenses){const h=c.getCommand(o);if(h){this._commandService.executeCommand(h.id,...h.arguments||[]).catch(g=>this._notificationService.error(g));break}}})),n.schedule()}_disposeAllLenses(e,i){const n=new HRe;for(const a of this._lenses)a.dispose(n,i);e&&n.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const i=this._editor.getModel().getLineCount(),n=[];let a;for(const h of e.lenses){const g=h.symbol.range.startLineNumber;g<1||g>i||(a&&a[a.length-1].symbol.range.startLineNumber===g?a.push(h):(a=[h],n.push(a)))}if(!n.length&&!this._lenses.length)return;const o=TA.capture(this._editor),c=this._getLayoutInfo();this._editor.changeDecorations(h=>{this._editor.changeViewZones(g=>{const _=new HRe;let x=0,y=0;for(;ythis._resolveCodeLensesInViewportSoon())),x++,y++)}for(;xthis._resolveCodeLensesInViewportSoon())),y++;_.commit(h)})}),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const i=this._editor.getModel();if(!i)return;const n=[],a=[];if(this._lenses.forEach(h=>{const g=h.computeIfNecessary(i);g&&(n.push(g),a.push(h))}),n.length===0)return;const o=Date.now(),c=u4(h=>{const g=n.map((_,x)=>{const y=new Array(_.length),S=_.map((L,O)=>!L.symbol.command&&typeof L.provider.resolveCodeLens=="function"?Promise.resolve(L.provider.resolveCodeLens(i,L.symbol,h)).then(G=>{y[O]=G},z4):(y[O]=L.symbol,Promise.resolve(void 0)));return Promise.all(S).then(()=>{!h.isCancellationRequested&&!a[x].isDisposed()&&a[x].updateCommands(y)})});return Promise.all(g)});this._resolveCodeLensesPromise=c,this._resolveCodeLensesPromise.then(()=>{const h=this._resolveCodeLensesDebounce.update(i,Date.now()-o);this._resolveCodeLensesScheduler.delay=h,this._currentCodeLensModel&&this._codeLensCache.put(i,this._currentCodeLensModel),this._oldCodeLensModels.clear(),c===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},h=>{Bs(h),c===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};r$.ID="css.editor.codeLens";r$=ZSi([Hie(1,ma),Hie(2,ov),Hie(3,Zh),Hie(4,Lf),Hie(5,vkt)],r$);fl(r$.ID,r$,1);Cu(class extends Vr{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:Rt.hasCodeLensProvider,label:V("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,i){return YSi(this,void 0,void 0,function*(){if(!i.hasModel())return;const n=e.get(GA),a=e.get(Zh),o=e.get(Lf),c=i.getSelection().positionLineNumber,h=i.getContribution(r$.ID);if(!h)return;const g=h.getModel();if(!g)return;const _=[];for(const y of g.lenses)y.symbol.command&&y.symbol.range.startLineNumber===c&&_.push({label:y.symbol.command.title,command:y.symbol.command});if(_.length===0)return;const x=yield n.pick(_,{canPickMany:!1});if(x){if(g.isDisposed)return yield a.executeCommand(this.id);try{yield a.executeCommand(x.command.id,...x.command.arguments||[])}catch(y){o.error(y)}}})}});function QSi(r,e,i){const n=[],o=r.ordered(e).reverse().map(c=>Promise.resolve(c.provideDocumentColors(e,i)).then(h=>{if(Array.isArray(h))for(const g of h)n.push({colorInfo:g,provider:c})}));return Promise.all(o).then(()=>n)}function ADt(r,e,i,n){return Promise.resolve(i.provideColorPresentations(r,e,n))}O0.registerCommand("_executeDocumentColorProvider",function(r,...e){const[i]=e;if(!(i instanceof to))throw cx();const{colorProvider:n}=r.get(ma),a=r.get(lh).getModel(i);if(!a)throw cx();const o=[],h=n.ordered(a).reverse().map(g=>Promise.resolve(g.provideDocumentColors(a,g0.None)).then(_=>{if(Array.isArray(_))for(const x of _)o.push({range:x.range,color:[x.color.red,x.color.green,x.color.blue,x.color.alpha]})}));return Promise.all(h).then(()=>o)});O0.registerCommand("_executeColorPresentationProvider",function(r,...e){const[i,n]=e,{uri:a,range:o}=n;if(!(a instanceof to)||!Array.isArray(i)||i.length!==4||!ot.isIRange(o))throw cx();const[c,h,g,_]=i,{colorProvider:x}=r.get(ma),y=r.get(lh).getModel(a);if(!y)throw cx();const S={range:o,color:{red:c,green:h,blue:g,alpha:_}},L=[],G=x.ordered(y).reverse().map(ie=>Promise.resolve(ie.provideColorPresentations(y,S,g0.None)).then(ue=>{Array.isArray(ue)&&L.push(...ue)}));return Promise.all(G).then(()=>L)});var XSi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},KRe=function(r,e){return function(i,n){e(i,n,r)}},e8i=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const Ckt=Object.create({});let FR=class bkt extends sn{constructor(e,i,n,a){super(),this._editor=e,this._configurationService=i,this._languageFeaturesService=n,this._localToDispose=this._register(new du),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new Cae(this._editor),this._decoratorLimitReporter=new t8i,this._colorDecorationClassRefs=this._register(new du),this._debounceInformation=a.for(n.colorProvider,"Document Colors",{min:bkt.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(n.colorProvider.onDidChange(()=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(o=>{const c=this._isEnabled;this._isEnabled=this.isEnabled(),(c!==this._isEnabled||o.hasChanged(19))&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const i=e.getLanguageId(),n=this._configurationService.getValue(i);if(n&&typeof n=="object"){const a=n.colorDecorators;if(a&&a.enable!==void 0&&!a.enable)return a.enable}return this._editor.getOption(18)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new tv,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){this._computePromise=u4(e=>e8i(this,void 0,void 0,function*(){const i=this._editor.getModel();if(!i)return Promise.resolve([]);const n=new j3(!1),a=yield QSi(this._languageFeaturesService.colorProvider,i,e);return this._debounceInformation.update(i,n.elapsed()),a})),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},Bs)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const i=e.map(n=>({range:{startLineNumber:n.colorInfo.range.startLineNumber,startColumn:n.colorInfo.range.startColumn,endLineNumber:n.colorInfo.range.endLineNumber,endColumn:n.colorInfo.range.endColumn},options:As.EMPTY}));this._editor.changeDecorations(n=>{this._decorationsIds=n.deltaDecorations(this._decorationsIds,i),this._colorDatas=new Map,this._decorationsIds.forEach((a,o)=>this._colorDatas.set(a,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const i=[],n=this._editor.getOption(19);for(let o=0;othis._colorDatas.has(a.id));return n.length===0?null:this._colorDatas.get(n[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};FR.ID="editor.contrib.colorDetector";FR.RECOMPUTE_TIME=1e3;FR=XSi([KRe(1,hl),KRe(2,ma),KRe(3,ov)],FR);class t8i{constructor(){this._onDidChange=new yi,this._computed=0,this._limited=!1}update(e,i){(e!==this._computed||i!==this._limited)&&(this._computed=e,this._limited=i,this._onDidChange.fire())}}fl(FR.ID,FR,1);class i8i{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,i,n){this.presentationIndex=n,this._onColorFlushed=new yi,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new yi,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new yi,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=i}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,i){let n=-1;for(let a=0;a{this.backgroundColor=c.getColor(v5e)||qi.white})),this._register(Vn(this.pickedColorNode,wr.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Vn(o,wr.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this._register(i.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=qi.Format.CSS.format(i.color)||"",this.pickedColorNode.classList.toggle("light",i.color.rgba.a<.5?this.backgroundColor.isLighter():i.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=qi.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(dy(".codicon.codicon-color-mode"))}}class u8i extends sn{constructor(e,i,n){super(),this.model=i,this.pixelRatio=n,this.domNode=dy(".colorpicker-body"),Yn(e,this.domNode),this.saturationBox=new r8i(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new a8i(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new o8i(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:i}){const n=this.model.color.hsva;this.model.color=new qi(new sA(n.h,e,i,n.a))}onDidOpacityChange(e){const i=this.model.color.hsva;this.model.color=new qi(new sA(i.h,i.s,i.v,e))}onDidHueChange(e){const i=this.model.color.hsva,n=(1-e)*360;this.model.color=new qi(new sA(n===360?0:n,i.s,i.v,i.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class r8i extends sn{constructor(e,i,n){super(),this.model=i,this.pixelRatio=n,this._onDidChange=new yi,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new yi,this.onColorFlushed=this._onColorFlushed.event,this.domNode=dy(".saturation-wrap"),Yn(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",Yn(this.domNode,this.canvas),this.selection=dy(".saturation-selection"),Yn(this.domNode,this.selection),this.layout(),this._register(Vn(this.domNode,wr.POINTER_DOWN,a=>this.onPointerDown(a))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new k$);const i=N4(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,a=>this.onDidChangePosition(a.pageX-i.left,a.pageY-i.top),()=>null);const n=Vn(document,wr.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,i){const n=Math.max(0,Math.min(1,e/this.width)),a=Math.max(0,Math.min(1,1-i/this.height));this.paintSelection(n,a),this._onDidChange.fire({s:n,v:a})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,i=new qi(new sA(e.h,1,1,1)),n=this.canvas.getContext("2d"),a=n.createLinearGradient(0,0,this.canvas.width,0);a.addColorStop(0,"rgba(255, 255, 255, 1)"),a.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),a.addColorStop(1,"rgba(255, 255, 255, 0)");const o=n.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),n.rect(0,0,this.canvas.width,this.canvas.height),n.fillStyle=qi.Format.CSS.format(i),n.fill(),n.fillStyle=a,n.fill(),n.fillStyle=o,n.fill()}paintSelection(e,i){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-i*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class ykt extends sn{constructor(e,i){super(),this.model=i,this._onDidChange=new yi,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new yi,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Yn(e,dy(".strip")),this.overlay=Yn(this.domNode,dy(".overlay")),this.slider=Yn(this.domNode,dy(".slider")),this.slider.style.top="0px",this._register(Vn(this.domNode,wr.POINTER_DOWN,n=>this.onPointerDown(n))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const i=this._register(new k$),n=N4(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),i.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-n.top),()=>null);const a=Vn(document,wr.POINTER_UP,()=>{this._onColorFlushed.fire(),a.dispose(),i.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const i=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(i),this._onDidChange.fire(i)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class a8i extends ykt{constructor(e,i){super(e,i),this.domNode.classList.add("opacity-strip"),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:i,g:n,b:a}=e.rgba,o=new qi(new L0(i,n,a,1)),c=new qi(new L0(i,n,a,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${c} 100%)`}getValue(e){return e.hsva.a}}class o8i extends ykt{constructor(e,i){super(e,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class s8i extends rv{constructor(e,i,n,a){super(),this.model=i,this.pixelRatio=n,this._register(PJ.onDidChange(()=>this.layout()));const o=dy(".colorpicker-widget");e.appendChild(o);const c=new n8i(o,this.model,a);this.body=new u8i(o,this.model,this.pixelRatio),this._register(c),this._register(this.body)}layout(){this.body.layout()}}var l8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},c8i=function(r,e){return function(i,n){e(i,n,r)}},SDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class d8i{constructor(e,i,n,a){this.owner=e,this.range=i,this.model=n,this.provider=a,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let EKe=class{constructor(e,i){this._editor=e,this._themeService=i,this.hoverOrdinal=2}computeSync(e,i){return[]}computeAsync(e,i,n){return Bf.fromPromise(this._computeAsync(e,i,n))}_computeAsync(e,i,n){return SDt(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const a=FR.get(this._editor);if(!a)return[];for(const o of i){if(!a.isColorDecoration(o))continue;const c=a.getColorData(o.range.getStartPosition());if(c)return[yield this._createColorHover(this._editor.getModel(),c.colorInfo,c.provider)]}return[]})}_createColorHover(e,i,n){return SDt(this,void 0,void 0,function*(){const a=e.getValueInRange(i.range),{red:o,green:c,blue:h,alpha:g}=i.color,_=new L0(Math.round(o*255),Math.round(c*255),Math.round(h*255),g),x=new qi(_),y=yield ADt(e,i,n,g0.None),S=new i8i(x,[],0);return S.colorPresentations=y||[],S.guessColorPresentation(x,a),new d8i(this,ot.lift(i.range),S,n)})}renderHoverParts(e,i){if(i.length===0||!this._editor.hasModel())return sn.None;const n=new du,a=i[0],o=this._editor.getModel(),c=a.model,h=n.add(new s8i(e.fragment,c,this._editor.getOption(137),this._themeService));e.setColorPicker(h);let g=new ot(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);const _=()=>{let y,S;if(c.presentation.textEdit){y=[c.presentation.textEdit],S=new ot(c.presentation.textEdit.range.startLineNumber,c.presentation.textEdit.range.startColumn,c.presentation.textEdit.range.endLineNumber,c.presentation.textEdit.range.endColumn);const L=this._editor.getModel()._setTrackedRange(null,S,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",y),S=this._editor.getModel()._getTrackedRange(L)||S}else y=[{range:g,text:c.presentation.label,forceMoveMarkers:!1}],S=g.setEndPosition(g.endLineNumber,g.startColumn+c.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",y);c.presentation.additionalTextEdits&&(y=[...c.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",y),e.hide()),this._editor.pushUndoStop(),g=S},x=y=>ADt(o,{range:g,color:{red:y.rgba.r/255,green:y.rgba.g/255,blue:y.rgba.b/255,alpha:y.rgba.a}},a.provider,g0.None).then(S=>{c.colorPresentations=S||[]});return n.add(c.onColorFlushed(y=>{x(y).then(_)})),n.add(c.onDidChangeColor(x)),n}};EKe=l8i([c8i(1,I4)],EKe);function _Ke(r,e){return!!r[e]}class WRe{constructor(e,i){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=_Ke(e.event,i.triggerModifier),this.hasSideBySideModifier=_Ke(e.event,i.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class BDt{constructor(e,i){this.keyCodeIsTriggerKey=e.keyCode===i.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===i.triggerSideBySideKey,this.hasTriggerModifier=_Ke(e,i.triggerModifier)}}class m3e{constructor(e,i,n,a){this.triggerKey=e,this.triggerModifier=i,this.triggerSideBySideKey=n,this.triggerSideBySideModifier=a}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function wDt(r){return r==="altKey"?c0?new m3e(57,"metaKey",6,"altKey"):new m3e(5,"ctrlKey",6,"altKey"):c0?new m3e(6,"altKey",57,"metaKey"):new m3e(6,"altKey",5,"ctrlKey")}class Ive extends sn{constructor(e,i){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new yi),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new yi),this.onExecute=this._onExecute.event,this._onCancel=this._register(new yi),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=i,this._opts=wDt(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(75)){const a=wDt(this._editor.getOption(75));if(this._opts.equals(a))return;this._opts=a,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new WRe(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new WRe(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new WRe(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new BDt(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new BDt(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const i=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===i||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var h8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},lS=function(r,e){return function(i,n){e(i,n,r)}};let qL=class extends $J{constructor(e,i,n,a,o,c,h,g,_,x,y,S,L){super(e,Object.assign(Object.assign({},a.getRawOptions()),{overflowWidgetsDomNode:a.getOverflowWidgetsDomNode()}),n,o,c,h,g,_,x,y,S,L),this._parentEditor=a,this._overwriteOptions=i,super.updateOptions(this._overwriteOptions),this._register(a.onDidChangeConfiguration(O=>this._onParentConfigurationChanged(O)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){cae(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};qL=h8i([lS(4,Ds),lS(5,wl),lS(6,Zh),lS(7,Wo),lS(8,I4),lS(9,Lf),lS(10,sN),lS(11,B1),lS(12,ma)],qL);const TDt=new qi(new L0(0,122,204)),f8i={showArrow:!0,showFrame:!0,className:"",frameColor:TDt,arrowColor:TDt,keepEditorSelection:!1},m8i="vs.editor.contrib.zoneWidget";class p8i{constructor(e,i,n,a,o,c){this.id="",this.domNode=e,this.afterLineNumber=i,this.afterColumn=n,this.heightInLines=a,this._onDomNodeTop=o,this._onComputedHeight=c}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class g8i{constructor(e,i){this._id=e,this._domNode=i}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class Rve{constructor(e){this._editor=e,this._ruleName=Rve._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),CEt(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){CEt(this._ruleName),xVe(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:ot.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}Rve._IdGenerator=new t$e(".arrow-decoration-");class E8i{constructor(e,i={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new du,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=DS(i),cae(this.options,f8i,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(n=>{const a=this._getWidth(n);this.domNode.style.width=a+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(a)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new Rve(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var i;if(this.domNode.style.height=`${e}px`,this.container){const n=e-this._decoratingElementsHeight();this.container.style.height=`${n}px`;const a=this.editor.getLayoutInfo();this._doLayout(n,this._getWidth(a))}(i=this._resizeSash)===null||i===void 0||i.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,i){const n=ot.isIRange(e)?ot.lift(e):ot.fromPositions(e);this._isShowing=!0,this._showImpl(n,i),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:As.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(i=>{this._viewZone&&i.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide()}_decoratingElementsHeight(){const e=this.editor.getOption(64);let i=0;if(this.options.showArrow){const n=Math.round(e/3);i+=2*n}if(this.options.showFrame){const n=Math.round(e/9);i+=2*n}return i}_showImpl(e,i){const n=e.getStartPosition(),a=this.editor.getLayoutInfo(),o=this._getWidth(a);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(a)+"px";const c=document.createElement("div");c.style.overflow="hidden";const h=this.editor.getOption(64),g=Math.max(12,this.editor.getLayoutInfo().height/h*.8);i=Math.min(i,g);let _=0,x=0;if(this._arrow&&this.options.showArrow&&(_=Math.round(h/3),this._arrow.height=_,this._arrow.show(n)),this.options.showFrame&&(x=Math.round(h/9)),this.editor.changeViewZones(L=>{this._viewZone&&L.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new p8i(c,n.lineNumber,n.column,i,O=>this._onViewZoneTop(O),O=>this._onViewZoneHeight(O)),this._viewZone.id=L.addZone(this._viewZone),this._overlayWidget=new g8i(m8i+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const L=this.options.frameWidth?this.options.frameWidth:x;this.container.style.borderTopWidth=L+"px",this.container.style.borderBottomWidth=L+"px"}const y=i*h-this._decoratingElementsHeight();this.container&&(this.container.style.top=_+"px",this.container.style.height=y+"px",this.container.style.overflow="hidden"),this._doLayout(y,o),this.options.keepEditorSelection||this.editor.setSelection(e);const S=this.editor.getModel();if(S){const L=S.validateRange(new ot(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(L,L.endLineNumber===S.getLineCount())}}revealRange(e,i){i?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,i){this.container&&(i&&this.container.classList.remove(i),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,i){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(i=>{this._viewZone&&(this._viewZone.heightInLines=e,i.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Mg(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(i=>{this._viewZone&&(e={startY:i.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(i=>{if(e){const n=(i.currentY-e.startY)/this.editor.getOption(64),a=n<0?Math.ceil(n):Math.floor(n),o=e.heightInLines+a;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var kkt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Fkt=function(r,e){return function(i,n){e(i,n,r)}};const Akt=y0("IPeekViewService");Z0(Akt,class{constructor(){this._widgets=new Map}addExclusiveWidget(r,e){const i=this._widgets.get(r);i&&(i.listener.dispose(),i.widget.dispose());const n=()=>{const a=this._widgets.get(r);a&&a.widget===e&&(a.listener.dispose(),this._widgets.delete(r))};this._widgets.set(r,{widget:e,listener:e.onDidClose(n)})}},1);var K3;(function(r){r.inPeekEditor=new Kr("inReferenceSearchEditor",!0,V("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),r.notInPeekEditor=r.inPeekEditor.toNegated()})(K3||(K3={}));let Cre=class{constructor(e,i){e instanceof qL&&K3.inPeekEditor.bindTo(i)}dispose(){}};Cre.ID="editor.contrib.referenceController";Cre=kkt([Fkt(1,Wo)],Cre);fl(Cre.ID,Cre,0);function _8i(r){const e=r.get(wl).getFocusedCodeEditor();return e instanceof qL?e.getParentEditor():e}const D8i={headerBackgroundColor:qi.white,primaryHeadingColor:qi.fromHex("#333333"),secondaryHeadingColor:qi.fromHex("#6c6c6cb3")};let Cxe=class extends E8i{constructor(e,i,n){super(e,i),this.instantiationService=n,this._onDidClose=new yi,this.onDidClose=this._onDidClose.event,cae(this.options,D8i,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const i=this.options;e.headerBackgroundColor&&(i.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(i.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(i.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Pu(".head"),this._bodyElement=Pu(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,i){this._titleElement=Pu(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),pf(this._titleElement,"click",o=>this._onTitleClick(o))),Yn(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Pu("span.filename"),this._secondaryHeading=Pu("span.dirname"),this._metaHeading=Pu("span.meta"),Yn(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=Pu(".peekview-actions");Yn(this._headElement,n);const a=this._getActionBarOptions();this._actionbarWidget=new ev(n,a),this._disposables.add(this._actionbarWidget),i||this._actionbarWidget.push(new HD("peekview.close",V("label.close","Close"),_o.asClassName(dr.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Ryi.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,i){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),i?this._secondaryHeading.innerText=i:km(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,zD(this._metaHeading)):B_(this._metaHeading))}_doLayout(e,i){if(!this._isShowing&&e<0){this.dispose();return}const n=Math.ceil(this.editor.getOption(64)*1.2),a=Math.round(e-(n+2));this._doLayoutHead(n,i),this._doLayoutBody(a,i)}_doLayoutHead(e,i){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,i){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};Cxe=kkt([Fkt(2,Ds)],Cxe);const x8i=Jt("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:qi.black,hcLight:qi.white},V("peekViewTitleBackground","Background color of the peek view title area.")),Skt=Jt("peekViewTitleLabel.foreground",{dark:qi.white,light:qi.black,hcDark:qi.white,hcLight:KC},V("peekViewTitleForeground","Color of the peek view title.")),Bkt=Jt("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},V("peekViewTitleInfoForeground","Color of the peek view title info.")),v8i=Jt("peekView.border",{dark:ox,light:ox,hcDark:v0,hcLight:v0},V("peekViewBorder","Color of the peek view borders and arrow.")),C8i=Jt("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:qi.black,hcLight:qi.white},V("peekViewResultsBackground","Background color of the peek view result list."));Jt("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:qi.white,hcLight:KC},V("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));Jt("peekViewResult.fileForeground",{dark:qi.white,light:"#1E1E1E",hcDark:qi.white,hcLight:KC},V("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));Jt("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},V("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));Jt("peekViewResult.selectionForeground",{dark:qi.white,light:"#6C6C6C",hcDark:qi.white,hcLight:KC},V("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const oL=Jt("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:qi.black,hcLight:qi.white},V("peekViewEditorBackground","Background color of the peek view editor."));Jt("peekViewEditorGutter.background",{dark:oL,light:oL,hcDark:oL,hcLight:oL},V("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));Jt("peekViewEditorStickyScroll.background",{dark:oL,light:oL,hcDark:oL,hcLight:oL},V("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));Jt("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},V("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));Jt("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},V("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));Jt("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Wd,hcLight:Wd},V("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var b8i=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class ZL{constructor(e,i,n,a){this.isProviderFirst=e,this.parent=i,this.link=n,this._rangeCallback=a,this.id=iHe.nextId()}get uri(){return this.link.uri}get range(){var e,i;return(i=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&i!==void 0?i:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const i=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return i?V({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",X6(this.uri),this.range.startLineNumber,this.range.startColumn,i.value):V("aria.oneReference","symbol in {0} on line {1} at column {2}",X6(this.uri),this.range.startLineNumber,this.range.startColumn)}}class y8i{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,i=8){const n=this._modelReference.object.textEditorModel;if(!n)return;const{startLineNumber:a,startColumn:o,endLineNumber:c,endColumn:h}=e,g=n.getWordUntilPosition({lineNumber:a,column:o-i}),_=new ot(a,g.startColumn,a,o),x=new ot(c,h,c,1073741824),y=n.getValueInRange(_).replace(/^\s+/,""),S=n.getValueInRange(e),L=n.getValueInRange(x).replace(/\s+$/,"");return{value:y+S+L,highlight:{start:y.length,end:y.length+S.length}}}}class bre{constructor(e,i){this.parent=e,this.uri=i,this.children=[],this._previews=new jg}dispose(){nc(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?V("aria.fileReferences.1","1 symbol in {0}, full path {1}",X6(this.uri),this.uri.fsPath):V("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,X6(this.uri),this.uri.fsPath)}resolve(e){return b8i(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const i of this.children)if(!this._previews.has(i.uri))try{const n=yield e.createModelReference(i.uri);this._previews.set(i.uri,new y8i(n))}catch(n){Bs(n)}return this})}}class KD{constructor(e,i){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new yi,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=i;const[n]=e;e.sort(KD._compareReferences);let a;for(const o of e)if((!a||!Gd.isEqual(a.uri,o.uri,!0))&&(a=new bre(this,o.uri),this.groups.push(a)),a.children.length===0||KD._compareReferences(o,a.children[a.children.length-1])!==0){const c=new ZL(n===o,a,o,h=>this._onDidChangeReferenceRange.fire(h));this.references.push(c),a.children.push(c)}}dispose(){nc(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new KD(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?V("aria.result.0","No results found"):this.references.length===1?V("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?V("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):V("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,i){const{parent:n}=e;let a=n.children.indexOf(e);const o=n.children.length,c=n.parent.groups.length;return c===1||i&&a+10?(i?a=(a+1)%o:a=(a+o-1)%o,n.children[a]):(a=n.parent.groups.indexOf(n),i?(a=(a+1)%c,n.parent.groups[a].children[0]):(a=(a+c-1)%c,n.parent.groups[a].children[n.parent.groups[a].children.length-1]))}nearestReference(e,i){const n=this.references.map((a,o)=>({idx:o,prefixLen:oR(a.uri.toString(),e.toString()),offsetDist:Math.abs(a.range.startLineNumber-i.lineNumber)*100+Math.abs(a.range.startColumn-i.column)})).sort((a,o)=>a.prefixLen>o.prefixLen?-1:a.prefixLeno.offsetDist?1:0)[0];if(n)return this.references[n.idx]}referenceAt(e,i){for(const n of this.references)if(n.uri.toString()===e.toString()&&ot.containsPosition(n.range,i))return n}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,i){return Gd.compare(e.uri,i.uri)||ot.compareRangesUsingStarts(e.range,i.range)}}var Ove=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},jve=function(r,e){return function(i,n){e(i,n,r)}};let DKe=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof KD||e instanceof bre}getChildren(e){if(e instanceof KD)return e.groups;if(e instanceof bre)return e.resolve(this._resolverService).then(i=>i.children);throw new Error("bad tree")}};DKe=Ove([jve(0,W3)],DKe);class k8i{getHeight(){return 23}getTemplateId(e){return e instanceof bre?yre.id:Vae.id}}let xKe=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var i;if(e instanceof ZL){const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(n)return n.value}return X6(e.uri)}};xKe=Ove([jve(0,J1)],xKe);class F8i{getId(e){return e instanceof ZL?e.id:e.uri}}let vKe=class extends sn{constructor(e,i){super(),this._labelService=i;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new mxe(n,{supportHighlights:!0})),this.badge=new OHe(Yn(n,Pu(".count")),{},Wbt),e.appendChild(n)}set(e,i){const n=rve(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(n,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:i});const a=e.children.length;this.badge.setCount(a),a>1?this.badge.setTitleFormat(V("referencesCount","{0} references",a)):this.badge.setTitleFormat(V("referenceCount","{0} reference",a))}};vKe=Ove([jve(1,ZJ)],vKe);let yre=class wkt{constructor(e){this._instantiationService=e,this.templateId=wkt.id}renderTemplate(e){return this._instantiationService.createInstance(vKe,e)}renderElement(e,i,n){n.set(e.element,cve(e.filterData))}disposeTemplate(e){e.dispose()}};yre.id="FileReferencesRenderer";yre=Ove([jve(0,Ds)],yre);class A8i{constructor(e){this.label=new FL(e)}set(e,i){var n;const a=(n=e.parent.getPreview(e))===null||n===void 0?void 0:n.preview(e.range);if(!a||!a.value)this.label.set(`${X6(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:o,highlight:c}=a;i&&!xy.isDefault(i)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,cve(i))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[c]))}}}class Vae{constructor(){this.templateId=Vae.id}renderTemplate(e){return new A8i(e)}renderElement(e,i,n){n.set(e.element,e.filterData)}disposeTemplate(){}}Vae.id="OneReferenceRenderer";class S8i{getWidgetAriaLabel(){return V("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var B8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},cS=function(r,e){return function(i,n){e(i,n,r)}},LDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class Vve{constructor(e,i){this._editor=e,this._model=i,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new du,this._callOnModelChange=new du,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const i of this._model.references)if(i.uri.toString()===e.uri.toString()){this._addDecorations(i.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const i=[],n=[];for(let a=0,o=e.children.length;a{const o=a.deltaDecorations([],i);for(let c=0;c{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(T8i,"ReferencesWidget",this._treeContainer,new k8i,[this._instantiationService.createInstance(yre),this._instantiationService.createInstance(Vae)],this._instantiationService.createInstance(DKe),n),this._splitView.addView({onDidChange:Ia.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},cxe.Distribute),this._splitView.addView({onDidChange:Ia.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:o=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${o}px`,this._tree.layout(this._dim.height,o)}},cxe.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const a=(o,c)=>{o instanceof ZL&&(c==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:c,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?a(o.element,"side"):o.editorOptions.pinned?a(o.element,"goto"):a(o.element,"show")}),B_(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,i){super._doLayoutBody(e,i),this._dim=new _d(i,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(i),this._splitView.resizeView(0,i*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=V("noResults","No results"),zD(this._messageContainer),Promise.resolve(void 0)):(B_(this._messageContainer),this._decorationsManager=new Vve(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:i,target:n}=e;if(i.detail!==2)return;const a=this._getFocusedReference();a&&this._onDidSelectReference.fire({element:{uri:a.uri,range:n.range},kind:i.ctrlKey||i.metaKey||i.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),zD(this._treeContainer),zD(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof ZL)return e;if(e instanceof bre&&e.children.length>0)return e.children[0]}revealReference(e){return LDt(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,i){return LDt(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Js.inMemory?this.setTitle(i6i(e.uri),this._uriLabel.getUriLabel(rve(e.uri))):this.setTitle(V("peekView.alternateTitle","References"));const n=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(i&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const a=yield n;if(!this._model){a.dispose();return}nc(this._previewModelReference);const o=a.object;if(o){const c=this._preview.getModel()===o.textEditorModel?0:1,h=ot.lift(e.range).collapseToStart();this._previewModelReference=a,this._preview.setModel(o.textEditorModel),this._preview.setSelection(h),this._preview.revealRangeInCenter(h,c)}else this._preview.setModel(this._previewNotAvailableMessage),a.dispose()})}};CKe=B8i([cS(3,I4),cS(4,W3),cS(5,Ds),cS(6,Akt),cS(7,ZJ),cS(8,ave),cS(9,J1),cS(10,s1),cS(11,B1)],CKe);var L8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},tG=function(r,e){return function(i,n){e(i,n,r)}},NDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const rO=new Kr("referenceSearchVisible",!1,V("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let YL=class bKe{static get(e){return e.getContribution(bKe.ID)}constructor(e,i,n,a,o,c,h,g){this._defaultTreeKeyboardSupport=e,this._editor=i,this._editorService=a,this._notificationService=o,this._instantiationService=c,this._storageService=h,this._configurationService=g,this._disposables=new du,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=rO.bindTo(n)}dispose(){var e,i;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,i,n){let a;if(this._widget&&(a=this._widget.position),this.closeWidget(),a&&e.containsPosition(a))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const o="peekViewLayout",c=w8i.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(CKe,this._editor,this._defaultTreeKeyboardSupport,c),this._widget.setTitle(V("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{i.cancel(),this._widget&&(this._storageService.store(o,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(g=>{const{element:_,kind:x}=g;if(_)switch(x){case"open":(g.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(_,!1,!1);break;case"side":this.openReference(_,!0,!1);break;case"goto":n?this._gotoReference(_,!0):this.openReference(_,!1,!0);break}}));const h=++this._requestIdPool;i.then(g=>{var _;if(h!==this._requestIdPool||!this._widget){g.dispose();return}return(_=this._model)===null||_===void 0||_.dispose(),this._model=g,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(V("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const x=this._editor.getModel().uri,y=new Vi(e.startLineNumber,e.startColumn),S=this._model.nearestReference(x,y);if(S)return this._widget.setSelection(S).then(()=>{this._widget&&this._editor.getOption(83)==="editor"&&this._widget.focusOnPreviewEditor()})}})},g=>{this._notificationService.error(g)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return NDt(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const i=this._widget.position;if(!i)return;const n=this._model.nearestReference(this._editor.getModel().uri,i);if(!n)return;const a=this._model.nextOrPreviousReference(n,e),o=this._editor.hasTextFocus(),c=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(a),yield this._gotoReference(a,!1),o?this._editor.focus():this._widget&&c&&this._widget.focusOnPreviewEditor()})}revealReference(e){return NDt(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var i,n;(i=this._widget)===null||i===void 0||i.dispose(),(n=this._model)===null||n===void 0||n.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,i){var n;(n=this._widget)===null||n===void 0||n.hide(),this._ignoreModelChangeEvent=!0;const a=ot.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:a,selectionSource:"code.jump",pinned:i}},this._editor).then(o=>{var c;if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(a),this._widget.focusOnReferenceTree();else{const h=bKe.get(o),g=this._model.clone();this.closeWidget(),o.focus(),h==null||h.toggleWidget(a,u4(_=>Promise.resolve(g)),(c=this._peekMode)!==null&&c!==void 0?c:!1)}},o=>{this._ignoreModelChangeEvent=!1,Bs(o)})}openReference(e,i,n){i||this.closeWidget();const{uri:a,range:o}=e;this._editorService.openCodeEditor({resource:a,options:{selection:o,selectionSource:"code.jump",pinned:n}},this._editor,i)}};YL.ID="editor.contrib.referencesController";YL=L8i([tG(2,Wo),tG(3,wl),tG(4,Lf),tG(5,Ds),tG(6,r2),tG(7,hl)],YL);function aO(r,e){const i=_8i(r);if(!i)return;const n=YL.get(i);n&&e(n)}H3.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Fm(2089,60),when:pu.or(rO,K3.inPeekEditor),handler(r){aO(r,e=>{e.changeFocusBetweenPreviewAndReferences()})}});H3.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:pu.or(rO,K3.inPeekEditor),handler(r){aO(r,e=>{e.goToNextOrPreviousReference(!0)})}});H3.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:pu.or(rO,K3.inPeekEditor),handler(r){aO(r,e=>{e.goToNextOrPreviousReference(!1)})}});O0.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");O0.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");O0.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");O0.registerCommand("closeReferenceSearch",r=>aO(r,e=>e.closeWidget()));H3.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:pu.and(K3.inPeekEditor,pu.not("config.editor.stablePeek"))});H3.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:pu.and(rO,pu.not("config.editor.stablePeek"))});H3.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:pu.and(rO,cyt,C$e.negate(),b$e.negate()),handler(r){var e;const n=(e=r.get(sv).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof ZL&&aO(r,a=>a.revealReference(n[0]))}});H3.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:pu.and(rO,cyt,C$e.negate(),b$e.negate()),handler(r){var e;const n=(e=r.get(sv).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof ZL&&aO(r,a=>a.openReference(n[0],!0,!0))}});O0.registerCommand("openReference",r=>{var e;const n=(e=r.get(sv).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(n)&&n[0]instanceof ZL&&aO(r,a=>a.openReference(n[0],!1,!0))});var Tkt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},kne=function(r,e){return function(i,n){e(i,n,r)}};const $$e=new Kr("hasSymbols",!1,V("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),Hve=y0("ISymbolNavigationService");let yKe=class{constructor(e,i,n,a){this._editorService=i,this._notificationService=n,this._keybindingService=a,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=$$e.bindTo(e)}reset(){var e,i;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(i=this._currentMessage)===null||i===void 0||i.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const i=e.parent.parent;if(i.references.length<=1){this.reset();return}this._currentModel=i,this._currentIdx=i.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const n=new kKe(this._editorService),a=n.onDidChange(o=>{if(this._ignoreEditorChange)return;const c=this._editorService.getActiveCodeEditor();if(!c)return;const h=c.getModel(),g=c.getPosition();if(!h||!g)return;let _=!1,x=!1;for(const y of i.references)if(uve(y.uri,h.uri))_=!0,x=x||ot.containsPosition(y.range,g);else if(_)break;(!_||!x)&&this.reset()});this._currentState=UC(n,a)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const i=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:i.uri,options:{selection:ot.collapseToStart(i.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const i=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=i?V("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,i.getLabel()):V("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};yKe=Tkt([kne(0,Wo),kne(1,wl),kne(2,Lf),kne(3,J1)],yKe);Z0(Hve,yKe,1);Zu(new class extends Fp{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:$$e,kbOpts:{weight:100,primary:70}})}runEditorCommand(r,e){return r.get(Hve).revealNext(e)}});H3.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:$$e,primary:9,handler(r){r.get(Hve).reset()}});let kKe=class{constructor(e){this._listener=new Map,this._disposables=new du,this._onDidChange=new yi,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),nc(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,UC(e.onDidChangeCursorPosition(i=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(i=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var i;(i=this._listener.get(e))===null||i===void 0||i.dispose(),this._listener.delete(e)}};kKe=Tkt([kne(0,wl)],kKe);var U$e=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};function Hae(r,e,i,n){return U$e(this,void 0,void 0,function*(){const o=i.ordered(r).map(h=>Promise.resolve(n(h,r,e)).then(void 0,g=>{z4(g)})),c=yield Promise.all(o);return _$(c.flat())})}function Kve(r,e,i,n){return Hae(e,i,r,(a,o,c)=>a.provideDefinition(o,c,n))}function Lkt(r,e,i,n){return Hae(e,i,r,(a,o,c)=>a.provideDeclaration(o,c,n))}function Nkt(r,e,i,n){return Hae(e,i,r,(a,o,c)=>a.provideImplementation(o,c,n))}function Pkt(r,e,i,n){return Hae(e,i,r,(a,o,c)=>a.provideTypeDefinition(o,c,n))}function Wve(r,e,i,n,a){return Hae(e,i,r,(o,c,h)=>U$e(this,void 0,void 0,function*(){const g=yield o.provideReferences(c,h,{includeDeclaration:!0},a);if(!n||!g||g.length!==2)return g;const _=yield o.provideReferences(c,h,{includeDeclaration:!1},a);return _&&_.length===1?_:g}))}function Kae(r){return U$e(this,void 0,void 0,function*(){const e=yield r(),i=new KD(e,""),n=i.references.map(a=>a.link);return i.dispose(),n})}KA("_executeDefinitionProvider",(r,e,i)=>{const n=r.get(ma),a=Kve(n.definitionProvider,e,i,g0.None);return Kae(()=>a)});KA("_executeTypeDefinitionProvider",(r,e,i)=>{const n=r.get(ma),a=Pkt(n.typeDefinitionProvider,e,i,g0.None);return Kae(()=>a)});KA("_executeDeclarationProvider",(r,e,i)=>{const n=r.get(ma),a=Lkt(n.declarationProvider,e,i,g0.None);return Kae(()=>a)});KA("_executeReferenceProvider",(r,e,i)=>{const n=r.get(ma),a=Wve(n.referenceProvider,e,i,!1,g0.None);return Kae(()=>a)});KA("_executeImplementationProvider",(r,e,i)=>{const n=r.get(ma),a=Nkt(n.implementationProvider,e,i,g0.None);return Kae(()=>a)});var ZC=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})},GRe,JRe,$Re,URe,qRe,ZRe,YRe,QRe;IE.appendMenuItem(Ht.EditorContext,{submenu:Ht.EditorContextPeek,title:V("peek.submenu","Peek"),group:"navigation",order:100});class a${static is(e){return!e||typeof e!="object"?!1:!!(e instanceof a$||Vi.isIPosition(e.position)&&e.model)}constructor(e,i){this.model=e,this.position=i}}class zE extends y${static all(){return zE._allSymbolNavigationCommands.values()}static _patchConfig(e){const i=Object.assign(Object.assign({},e),{f1:!0});if(i.menu)for(const n of I0.wrap(i.menu))(n.id===Ht.EditorContext||n.id===Ht.EditorContextPeek)&&(n.when=pu.and(e.precondition,n.when));return i}constructor(e,i){super(zE._patchConfig(i)),this.configuration=e,zE._allSymbolNavigationCommands.set(i.id,this)}runEditorCommand(e,i,n,a){if(!i.hasModel())return Promise.resolve(void 0);const o=e.get(Lf),c=e.get(wl),h=e.get(hN),g=e.get(Hve),_=e.get(ma),x=e.get(Ds),y=i.getModel(),S=i.getPosition(),L=a$.is(n)?n:new a$(y,S),O=new DR(i,5),G=z6e(this._getLocationModel(_,L.model,L.position,O.token),O.token).then(ie=>ZC(this,void 0,void 0,function*(){var ue;if(!ie||O.token.isCancellationRequested)return;vp(ie.ariaMessage);let re;if(ie.referenceAt(y.uri,S)){const ye=this._getAlternativeCommand(i);!zE._activeAlternativeCommands.has(ye)&&zE._allSymbolNavigationCommands.has(ye)&&(re=zE._allSymbolNavigationCommands.get(ye))}const _e=ie.references.length;if(_e===0){if(!this.configuration.muteMessage){const ye=y.getWordAtPosition(S);(ue=GD.get(i))===null||ue===void 0||ue.showMessage(this._getNoResultFoundMessage(ye),S)}}else if(_e===1&&re)zE._activeAlternativeCommands.add(this.desc.id),x.invokeFunction(ye=>re.runEditorCommand(ye,i,n,a).finally(()=>{zE._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(c,g,i,ie,a)}),ie=>{o.error(ie)}).finally(()=>{O.dispose()});return h.showWhile(G,250),G}_onResult(e,i,n,a,o){return ZC(this,void 0,void 0,function*(){const c=this._getGoToPreference(n);if(!(n instanceof qL)&&(this.configuration.openInPeek||c==="peek"&&a.references.length>1))this._openInPeek(n,a,o);else{const h=a.firstReference(),g=a.references.length>1&&c==="gotoAndPeek",_=yield this._openReference(n,e,h,this.configuration.openToSide,!g);g&&_?this._openInPeek(_,a,o):a.dispose(),c==="goto"&&i.put(h)}})}_openReference(e,i,n,a,o){return ZC(this,void 0,void 0,function*(){let c;if(Xmi(n)&&(c=n.targetSelectionRange),c||(c=n.range),!c)return;const h=yield i.openCodeEditor({resource:n.uri,options:{selection:ot.collapseToStart(c),selectionRevealType:3,selectionSource:"code.jump"}},e,a);if(h){if(o){const g=h.getModel(),_=h.createDecorationsCollection([{range:c,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{h.getModel()===g&&_.clear()},350)}return h}})}_openInPeek(e,i,n){const a=YL.get(e);a&&e.hasModel()?a.toggleWidget(n??e.getSelection(),u4(o=>Promise.resolve(i)),this.configuration.openInPeek):i.dispose()}}zE._allSymbolNavigationCommands=new Map;zE._activeAlternativeCommands=new Set;class Wae extends zE{_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Kve(e.definitionProvider,i,n,a),V("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?V("noResultWord","No definition found for '{0}'",e.word):V("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleDefinitions}}const Mkt=uN&&!GGe()?2118:70;Am((GRe=class FKe extends Wae{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:FKe.id,title:{value:V("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:V({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:pu.and(Rt.hasDefinitionProvider,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:Mkt,weight:100},menu:[{id:Ht.EditorContext,group:"navigation",order:1.1},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),O0.registerCommandAlias("editor.action.goToDeclaration",FKe.id)}},GRe.id="editor.action.revealDefinition",GRe));Am((JRe=class AKe extends Wae{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:AKe.id,title:{value:V("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:pu.and(Rt.hasDefinitionProvider,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:Fm(2089,Mkt),weight:100}}),O0.registerCommandAlias("editor.action.openDeclarationToTheSide",AKe.id)}},JRe.id="editor.action.revealDefinitionAside",JRe));Am(($Re=class SKe extends Wae{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:SKe.id,title:{value:V("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:pu.and(Rt.hasDefinitionProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Ht.EditorContextPeek,group:"peek",order:2}}),O0.registerCommandAlias("editor.action.previewDeclaration",SKe.id)}},$Re.id="editor.action.peekDefinition",$Re));class zkt extends zE{_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Lkt(e.declarationProvider,i,n,a),V("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?V("decl.noResultWord","No declaration found for '{0}'",e.word):V("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(56).multipleDeclarations}}Am((URe=class Ikt extends zkt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Ikt.id,title:{value:V("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:V({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:pu.and(Rt.hasDeclarationProvider,Rt.isInWalkThroughSnippet.toNegated()),menu:[{id:Ht.EditorContext,group:"navigation",order:1.3},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?V("decl.noResultWord","No declaration found for '{0}'",e.word):V("decl.generic.noResults","No declaration found")}},URe.id="editor.action.revealDeclaration",URe));Am(class extends zkt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:V("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:pu.and(Rt.hasDeclarationProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),menu:{id:Ht.EditorContextPeek,group:"peek",order:3}})}});class Rkt extends zE{_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Pkt(e.typeDefinitionProvider,i,n,a),V("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?V("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):V("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleTypeDefinitions}}Am((qRe=class Okt extends Rkt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Okt.ID,title:{value:V("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:V({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:pu.and(Rt.hasTypeDefinitionProvider,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:0,weight:100},menu:[{id:Ht.EditorContext,group:"navigation",order:1.4},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},qRe.ID="editor.action.goToTypeDefinition",qRe));Am((ZRe=class jkt extends Rkt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:jkt.ID,title:{value:V("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:pu.and(Rt.hasTypeDefinitionProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),menu:{id:Ht.EditorContextPeek,group:"peek",order:4}})}},ZRe.ID="editor.action.peekTypeDefinition",ZRe));class Vkt extends zE{_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Nkt(e.implementationProvider,i,n,a),V("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?V("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):V("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(56).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(56).multipleImplementations}}Am((YRe=class Hkt extends Vkt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Hkt.ID,title:{value:V("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:V({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:pu.and(Rt.hasImplementationProvider,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:2118,weight:100},menu:[{id:Ht.EditorContext,group:"navigation",order:1.45},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},YRe.ID="editor.action.goToImplementation",YRe));Am((QRe=class Kkt extends Vkt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Kkt.ID,title:{value:V("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:pu.and(Rt.hasImplementationProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:3142,weight:100},menu:{id:Ht.EditorContextPeek,group:"peek",order:5}})}},QRe.ID="editor.action.peekImplementation",QRe));class Wkt extends zE{_getNoResultFoundMessage(e){return e?V("references.no","No references found for '{0}'",e.word):V("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(56).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(56).multipleReferences}}Am(class extends Wkt{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:V("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:V({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:pu.and(Rt.hasReferenceProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),keybinding:{when:Rt.editorTextFocus,primary:1094,weight:100},menu:[{id:Ht.EditorContext,group:"navigation",order:1.45},{id:Ht.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Wve(e.referenceProvider,i,n,!0,a),V("ref.title","References"))})}});Am(class extends Wkt{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:V("references.action.label","Peek References"),original:"Peek References"},precondition:pu.and(Rt.hasReferenceProvider,K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated()),menu:{id:Ht.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(yield Wve(e.referenceProvider,i,n,!1,a),V("ref.title","References"))})}});class N8i extends zE{constructor(e,i,n){super(e,{id:"editor.action.goToLocation",title:{value:V("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:pu.and(K3.notInPeekEditor,Rt.isInWalkThroughSnippet.toNegated())}),this._references=i,this._gotoMultipleBehaviour=n}_getLocationModel(e,i,n,a){return ZC(this,void 0,void 0,function*(){return new KD(this._references,V("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&V("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var i;return(i=this._gotoMultipleBehaviour)!==null&&i!==void 0?i:e.getOption(56).multipleReferences}_getAlternativeCommand(){return""}}O0.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:to},{name:"position",description:"The position at which to start",constraint:Vi.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(r,e,i,n,a,o,c)=>ZC(void 0,void 0,void 0,function*(){bc(to.isUri(e)),bc(Vi.isIPosition(i)),bc(Array.isArray(n)),bc(typeof a>"u"||typeof a=="string"),bc(typeof c>"u"||typeof c=="boolean");const h=r.get(wl),g=yield h.openCodeEditor({resource:e},h.getFocusedCodeEditor());if(MA(g))return g.setPosition(i),g.revealPositionInCenterIfOutsideViewport(i,0),g.invokeWithinContext(_=>{const x=new class extends N8i{_getNoResultFoundMessage(y){return o||super._getNoResultFoundMessage(y)}}({muteMessage:!o,openInPeek:!!c,openToSide:!1},n,a);_.get(Ds).invokeFunction(x.run.bind(x),g)})})});O0.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:to},{name:"position",description:"The position at which to start",constraint:Vi.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(r,e,i,n,a)=>ZC(void 0,void 0,void 0,function*(){r.get(Zh).executeCommand("editor.action.goToLocations",e,i,n,a,void 0,!0)})});O0.registerCommand({id:"editor.action.findReferences",handler:(r,e,i)=>{bc(to.isUri(e)),bc(Vi.isIPosition(i));const n=r.get(ma),a=r.get(wl);return a.openCodeEditor({resource:e},a.getFocusedCodeEditor()).then(o=>{if(!MA(o)||!o.hasModel())return;const c=YL.get(o);if(!c)return;const h=u4(_=>Wve(n.referenceProvider,o.getModel(),Vi.lift(i),!1,_).then(x=>new KD(x,V("ref.title","References")))),g=new ot(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(c.toggleWidget(g,h,!1))})}});O0.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var P8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},XRe=function(r,e){return function(i,n){e(i,n,r)}},PDt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let AR=class vDe{constructor(e,i,n,a){this.textModelResolverService=i,this.languageService=n,this.languageFeaturesService=a,this.toUnhook=new du,this.toUnhookForKeyboard=new du,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new Ive(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([c,h])=>{this.startFindDefinitionFromMouse(c,xp(h))})),this.toUnhook.add(o.onExecute(c=>{this.isEnabled(c)&&this.gotoDefinition(c.target.position,c.hasSideBySideModifier).catch(h=>{Bs(h)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(vDe.ID)}startFindDefinitionFromCursor(e){return PDt(this,void 0,void 0,function*(){yield this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(i=>{i&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,i){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,i)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const n=e.target.position;this.startFindDefinition(n)}startFindDefinition(e){var i;return PDt(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const n=e?(i=this.editor.getModel())===null||i===void 0?void 0:i.getWordAtPosition(e):null;if(!n){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return;this.currentWordAtPosition=n;const a=new Lyt(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=u4(h=>this.findDefinition(e,h));let o;try{o=yield this.previousPromise}catch(h){Bs(h);return}if(!o||!o.length||!a.validate(this.editor)){this.removeLinkDecorations();return}const c=o[0].originSelectionRange?ot.lift(o[0].originSelectionRange):new ot(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn);if(o.length>1){let h=c;for(const{originSelectionRange:g}of o)g&&(h=ot.plusRange(h,g));this.addDecoration(h,new M3().appendText(V("multipleResults","Click to show {0} definitions.",o.length)))}else{const h=o[0];if(!h.uri)return;this.textModelResolverService.createModelReference(h.uri).then(g=>{if(!g.object||!g.object.textEditorModel){g.dispose();return}const{object:{textEditorModel:_}}=g,{startLineNumber:x}=h.range;if(x<1||x>_.getLineCount()){g.dispose();return}const y=this.getPreviewValue(_,x,h),S=this.languageService.guessLanguageIdByFilepathOrFirstLine(_.uri);this.addDecoration(c,y?new M3().appendCodeblock(S||"",y):void 0),g.dispose()})}})}getPreviewValue(e,i,n){let a=n.range;return a.endLineNumber-a.startLineNumber>=vDe.MAX_SOURCE_PREVIEW_LINES&&(a=this.getPreviewRangeBasedOnIndentation(e,i)),this.stripIndentationFromPreviewRange(e,i,a)}stripIndentationFromPreviewRange(e,i,n){let o=e.getLineFirstNonWhitespaceColumn(i);for(let h=i+1;h{const a=!i&&this.editor.getOption(84)&&!this.isInPeekEditor(n);return new Wae({openToSide:i,openInPeek:a,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(n)})}isInPeekEditor(e){const i=e.get(Wo);return K3.inPeekEditor.getValue(i)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};AR.ID="editor.contrib.gotodefinitionatposition";AR.MAX_SOURCE_PREVIEW_LINES=8;AR=P8i([XRe(1,W3),XRe(2,s1),XRe(3,ma)],AR);fl(AR.ID,AR,2);const p3e=Pu;class Gkt extends sn{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new kae(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class q$e extends sn{static render(e,i,n){return new q$e(e,i,n)}constructor(e,i,n){super(),this.actionContainer=Yn(e,p3e("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Yn(this.actionContainer,p3e("a.action")),this.action.setAttribute("role","button"),i.iconClass&&Yn(this.action,p3e(`span.icon.${i.iconClass}`));const a=Yn(this.action,p3e("span"));a.textContent=n?`${i.label} (${n})`:i.label,this._register(Vn(this.actionContainer,wr.CLICK,o=>{o.stopPropagation(),o.preventDefault(),i.run(this.actionContainer)})),this._register(Vn(this.actionContainer,wr.KEY_DOWN,o=>{const c=new xd(o);(c.equals(3)||c.equals(10))&&(o.stopPropagation(),o.preventDefault(),i.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var M8i=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})},z8i=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],i;return e?e.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),i={},n("next"),n("throw"),n("return"),i[Symbol.asyncIterator]=function(){return this},i);function n(o){i[o]=r[o]&&function(c){return new Promise(function(h,g){c=r[o](c),a(h,g,c.done,c.value)})}}function a(o,c,h,g){Promise.resolve(g).then(function(_){o({value:_,done:h})},c)}};let I8i=class{constructor(e,i,n){this.value=e,this.isComplete=i,this.hasLoadingMessage=n}};class Jkt extends sn{constructor(e,i){super(),this._editor=e,this._computer=i,this._onResult=this._register(new yi),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Zc(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Zc(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Zc(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(58).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,i=!0){this._state=e,i&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=Ppi(e=>this._computer.computeAsync(e)),M8i(this,void 0,void 0,function*(){var e,i,n,a;try{try{for(var o=!0,c=z8i(this._asyncIterable),h;h=yield c.next(),e=h.done,!e;){a=h.value,o=!1;try{const g=a;g&&(this._result.push(g),this._fireResult())}finally{o=!0}}}catch(g){i={error:g}}finally{try{!o&&!e&&(n=c.return)&&(yield n.call(c))}finally{if(i)throw i.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(g){Bs(g)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,i=this._state===4;this._onResult.fire(new I8i(this._result.slice(0),e,i))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class eOe{constructor(e,i,n,a){this.priority=e,this.range=i,this.initialMousePosX=n,this.initialMousePosY=a,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,i){return e.type===1&&i.lineNumber===this.range.startLineNumber}}class CDe{constructor(e,i,n,a,o,c){this.priority=e,this.owner=i,this.range=n,this.initialMousePosX=a,this.initialMousePosY=o,this.supportsMarkerHover=c,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,i){return e.type===2&&this.owner===e.owner}}const oO=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class jC{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let i=0,n=this.value.charCodeAt(e),a;if(a=jC._table[n],typeof a=="number")return this.pos+=1,{type:a,pos:e,len:1};if(jC.isDigitCharacter(n)){a=8;do i+=1,n=this.value.charCodeAt(e+i);while(jC.isDigitCharacter(n));return this.pos+=i,{type:a,pos:e,len:i}}if(jC.isVariableCharacter(n)){a=9;do n=this.value.charCodeAt(e+ ++i);while(jC.isVariableCharacter(n)||jC.isDigitCharacter(n));return this.pos+=i,{type:a,pos:e,len:i}}a=10;do i+=1,n=this.value.charCodeAt(e+i);while(!isNaN(n)&&typeof jC._table[n]>"u"&&!jC.isDigitCharacter(n)&&!jC.isVariableCharacter(n));return this.pos+=i,{type:a,pos:e,len:i}}}jC._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class L${constructor(){this._children=[]}appendChild(e){return e instanceof w_&&this._children[this._children.length-1]instanceof w_?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,i){const{parent:n}=e,a=n.children.indexOf(e),o=n.children.slice(0);o.splice(a,1,...i),n._children=o,function c(h,g){for(const _ of h)_.parent=g,c(_.children,_)}(i,n)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof Gae)return e;e=e.parent}}toString(){return this.children.reduce((e,i)=>e+i.toString(),"")}len(){return 0}}class w_ extends L${constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new w_(this.value)}}class $kt extends L${}class R6 extends $kt{static compareByIndex(e,i){return e.index===i.index?0:e.isFinalTabstop?1:i.isFinalTabstop||e.indexi.index?1:0}constructor(e){super(),this.index=e}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof N$?this._children[0]:void 0}clone(){const e=new R6(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(i=>i.clone()),e}}class N$ extends L${constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof w_&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new N$;return this.options.forEach(e.appendChild,e),e}}class Z$e extends L${constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const i=this;let n=!1,a=e.replace(this.regexp,function(){return n=!0,i._replace(Array.prototype.slice.call(arguments,0,-2))});return!n&&this._children.some(o=>o instanceof Yb&&!!o.elseValue)&&(a=this._replace([])),a}_replace(e){let i="";for(const n of this._children)if(n instanceof Yb){let a=e[n.index]||"";a=n.resolve(a),i+=a}else i+=n.toString();return i}toString(){return""}clone(){const e=new Z$e;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(i=>i.clone()),e}}class Yb extends L${constructor(e,i,n,a){super(),this.index=e,this.shorthandName=i,this.ifValue=n,this.elseValue=a}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const i=e.match(/[a-z0-9]+/gi);return i?i.map(n=>n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}_toCamelCase(e){const i=e.match(/[a-z0-9]+/gi);return i?i.map((n,a)=>a===0?n.charAt(0).toLowerCase()+n.substr(1):n.charAt(0).toUpperCase()+n.substr(1)).join(""):e}clone(){return new Yb(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class kre extends $kt{constructor(e){super(),this.name=e}resolve(e){let i=e.resolve(this);return this.transform&&(i=this.transform.resolve(i||"")),i!==void 0?(this._children=[new w_(i)],!0):!1}clone(){const e=new kre(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(i=>i.clone()),e}}function MDt(r,e){const i=[...r];for(;i.length>0;){const n=i.shift();if(!e(n))break;i.unshift(...n.children)}}class Gae extends L${get placeholderInfo(){if(!this._placeholders){const e=[];let i;this.walk(function(n){return n instanceof R6&&(e.push(n),i=!i||i.indexa===e?(n=!0,!1):(i+=a.len(),!0)),n?i:-1}fullLen(e){let i=0;return MDt([e],n=>(i+=n.len(),!0)),i}enclosingPlaceholders(e){const i=[];let{parent:n}=e;for(;n;)n instanceof R6&&i.push(n),n=n.parent;return i}resolveVariables(e){return this.walk(i=>(i instanceof kre&&i.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,i){return this._placeholders=void 0,super.replace(e,i)}clone(){const e=new Gae;return this._children=this.children.map(i=>i.clone()),e}walk(e){MDt(this.children,e)}}class QL{constructor(){this._scanner=new jC,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,i,n){const a=new Gae;return this.parseFragment(e,a),this.ensureFinalTabstop(a,n??!1,i??!1),a}parseFragment(e,i){const n=i.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(i););const a=new Map,o=[];i.walk(g=>(g instanceof R6&&(g.isFinalTabstop?a.set(0,void 0):!a.has(g.index)&&g.children.length>0?a.set(g.index,g.children):o.push(g)),!0));const c=(g,_)=>{const x=a.get(g.index);if(!x)return;const y=new R6(g.index);y.transform=g.transform;for(const S of x){const L=S.clone();y.appendChild(L),L instanceof R6&&a.has(L.index)&&!_.has(L.index)&&(_.add(L.index),c(L,_),_.delete(L.index))}i.replace(g,[y])},h=new Set;for(const g of o)c(g,h);return i.children.slice(n)}ensureFinalTabstop(e,i,n){(i||n&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new R6(0)))}_accept(e,i){if(e===void 0||this._token.type===e){const n=i?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),n}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const i=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const a=this._scanner.next();if(a.type!==0&&a.type!==4&&a.type!==5)return!1}this._token=this._scanner.next()}const n=this._scanner.value.substring(i.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),n}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let i;return(i=this._accept(5,!0))?(i=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||i,e.appendChild(new w_(i)),!0):!1}_parseTabstopOrVariableName(e){let i;const n=this._token;return this._accept(0)&&(i=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(i)?new R6(Number(i)):new kre(i)),!0):this._backTo(n)}_parseComplexPlaceholder(e){let i;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(i=this._accept(8,!0))))return this._backTo(n);const o=new R6(Number(i));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new w_("${"+i+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){const c=new N$;for(;;){if(this._parseChoiceElement(c)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(c),this._accept(4)))return e.appendChild(o),!0}return this._backTo(n),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseChoiceElement(e){const i=this._token,n=[];for(;!(this._token.type===2||this._token.type===7);){let a;if((a=this._accept(5,!0))?a=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||a:a=this._accept(void 0,!0),!a)return this._backTo(i),!1;n.push(a)}return n.length===0?(this._backTo(i),!1):(e.appendChild(new w_(n.join(""))),!0)}_parseComplexVariable(e){let i;const n=this._token;if(!(this._accept(0)&&this._accept(3)&&(i=this._accept(9,!0))))return this._backTo(n);const o=new kre(i);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new w_("${"+i+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(n)}_parseTransform(e){const i=new Z$e;let n="",a="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,n+=o;continue}if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,i.appendChild(new w_(o));continue}if(!(this._parseFormatString(i)||this._parseAnything(i)))return!1}for(;!this._accept(4);){if(this._token.type!==14){a+=this._accept(void 0,!0);continue}return!1}try{i.regexp=new RegExp(n,a)}catch{return!1}return e.transform=i,!0}_parseFormatString(e){const i=this._token;if(!this._accept(0))return!1;let n=!1;this._accept(3)&&(n=!0);const a=this._accept(8,!0);if(a)if(n){if(this._accept(4))return e.appendChild(new Yb(Number(a))),!0;if(!this._accept(1))return this._backTo(i),!1}else return e.appendChild(new Yb(Number(a))),!0;else return this._backTo(i),!1;if(this._accept(6)){const o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(i),!1):(e.appendChild(new Yb(Number(a),o)),!0)}else if(this._accept(11)){const o=this._until(4);if(o)return e.appendChild(new Yb(Number(a),void 0,o,void 0)),!0}else if(this._accept(12)){const o=this._until(4);if(o)return e.appendChild(new Yb(Number(a),void 0,void 0,o)),!0}else if(this._accept(13)){const o=this._until(1);if(o){const c=this._until(4);if(c)return e.appendChild(new Yb(Number(a),void 0,o,c)),!0}}else{const o=this._until(4);if(o)return e.appendChild(new Yb(Number(a),void 0,void 0,o)),!0}return this._backTo(i),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new w_(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const R8i=V("defaultLabel","input"),O8i=V("label.preserveCaseToggle","Preserve Case");class j8i extends w${constructor(e){super({icon:dr.preserveCase,title:O8i+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class V8i extends rv{constructor(e,i,n,a){super(),this._showOptionButtons=n,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new yi),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new yi),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new yi),this._onInput=this._register(new yi),this._onKeyUp=this._register(new yi),this._onPreserveCaseKeyDown=this._register(new yi),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=i,this.placeholder=a.placeholder||"",this.validation=a.validation,this.label=a.label||R8i;const o=a.appendPreserveCaseLabel||"",c=a.history||[],h=!!a.flexibleHeight,g=!!a.flexibleWidth,_=a.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new eyt(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:c,showHistoryHint:a.showHistoryHint,flexibleHeight:h,flexibleWidth:g,flexibleMaxHeight:_,inputBoxStyles:a.inputBoxStyles})),this.preserveCase=this._register(new j8i(Object.assign({appendTitle:o,isChecked:!1},a.toggleStyles))),this._register(this.preserveCase.onChange(S=>{this._onDidOptionChange.fire(S),!S&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(S=>{this._onPreserveCaseKeyDown.fire(S)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const x=[this.preserveCase.domNode];this.onkeydown(this.domNode,S=>{if(S.equals(15)||S.equals(17)||S.equals(9)){const L=x.indexOf(document.activeElement);if(L>=0){let O=-1;S.equals(17)?O=(L+1)%x.length:S.equals(15)&&(L===0?O=x.length-1:O=L-1),S.equals(9)?(x[L].blur(),this.inputBox.focus()):O>=0&&x[O].focus(),Ws.stop(S,!0)}}});const y=document.createElement("div");y.className="controls",y.style.display=this._showOptionButtons?"block":"none",y.appendChild(this.preserveCase.domNode),this.domNode.appendChild(y),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,S=>this._onKeyDown.fire(S)),this.onkeyup(this.inputBox.inputElement,S=>this._onKeyUp.fire(S)),this.oninput(this.inputBox.inputElement,S=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,S=>this._onMouseDown.fire(S))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){var e;(e=this.inputBox)===null||e===void 0||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var Ukt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},qkt=function(r,e){return function(i,n){e(i,n,r)}};const Y$e=new Kr("suggestWidgetVisible",!1,V("suggestWidgetVisible","Whether suggestion are visible")),Q$e="historyNavigationWidgetFocus",Zkt="historyNavigationForwardsEnabled",Ykt="historyNavigationBackwardsEnabled";let US;const g3e=[];function Qkt(r,e){if(g3e.includes(e))throw new Error("Cannot register the same widget multiple times");g3e.push(e);const i=new du,n=new Kr(Q$e,!1).bindTo(r),a=new Kr(Zkt,!0).bindTo(r),o=new Kr(Ykt,!0).bindTo(r),c=()=>{n.set(!0),US=e},h=()=>{n.set(!1),US===e&&(US=void 0)};return e.element===document.activeElement&&c(),i.add(e.onDidFocus(()=>c())),i.add(e.onDidBlur(()=>h())),i.add(Ss(()=>{g3e.splice(g3e.indexOf(e),1),h()})),{historyNavigationForwardsEnablement:a,historyNavigationBackwardsEnablement:o,dispose(){i.dispose()}}}let BKe=class extends tyt{constructor(e,i,n,a){super(e,i,n);const o=this._register(a.createScoped(this.inputBox.element));this._register(Qkt(o,this.inputBox))}};BKe=Ukt([qkt(3,Wo)],BKe);let wKe=class extends V8i{constructor(e,i,n,a,o=!1){super(e,i,o,n);const c=this._register(a.createScoped(this.inputBox.element));this._register(Qkt(c,this.inputBox))}};wKe=Ukt([qkt(3,Wo)],wKe);H3.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:pu.and(pu.has(Q$e),pu.equals(Ykt,!0),Y$e.isEqualTo(!1)),primary:16,secondary:[528],handler:r=>{US==null||US.showPreviousValue()}});H3.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:pu.and(pu.has(Q$e),pu.equals(Zkt,!0),Y$e.isEqualTo(!1)),primary:18,secondary:[530],handler:r=>{US==null||US.showNextValue()}});var sue=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const Ns={Visible:Y$e,HasFocusedSuggestion:new Kr("suggestWidgetHasFocusedSuggestion",!1,V("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new Kr("suggestWidgetDetailsVisible",!1,V("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Kr("suggestWidgetMultipleSuggestions",!1,V("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Kr("suggestionMakesTextEdit",!0,V("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Kr("acceptSuggestionOnEnter",!0,V("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Kr("suggestionHasInsertAndReplaceRange",!1,V("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Kr("suggestionInsertMode",void 0,{type:"string",description:V("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Kr("suggestionCanResolve",!1,V("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},AL=new Ht("suggestWidgetStatusBar");class H8i{constructor(e,i,n,a){var o;this.position=e,this.completion=i,this.container=n,this.provider=a,this.isInvalid=!1,this.score=xy.Default,this.distance=0,this.textLabel=typeof i.label=="string"?i.label:(o=i.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=i.sortText&&i.sortText.toLowerCase(),this.filterTextLow=i.filterText&&i.filterText.toLowerCase(),this.extensionId=i.extensionId,ot.isIRange(i.range)?(this.editStart=new Vi(i.range.startLineNumber,i.range.startColumn),this.editInsertEnd=new Vi(i.range.endLineNumber,i.range.endColumn),this.editReplaceEnd=new Vi(i.range.endLineNumber,i.range.endColumn),this.isInvalid=this.isInvalid||ot.spansMultipleLines(i.range)||i.range.startLineNumber!==e.lineNumber):(this.editStart=new Vi(i.range.insert.startLineNumber,i.range.insert.startColumn),this.editInsertEnd=new Vi(i.range.insert.endLineNumber,i.range.insert.endColumn),this.editReplaceEnd=new Vi(i.range.replace.endLineNumber,i.range.replace.endColumn),this.isInvalid=this.isInvalid||ot.spansMultipleLines(i.range.insert)||ot.spansMultipleLines(i.range.replace)||i.range.insert.startLineNumber!==e.lineNumber||i.range.replace.startLineNumber!==e.lineNumber||i.range.insert.startColumn!==i.range.replace.startColumn),typeof a.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return sue(this,void 0,void 0,function*(){if(!this._resolveCache){const i=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(n=>{Object.assign(this.completion,n),this._isResolved=!0,i.dispose()},n=>{Ny(n)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class Fre{constructor(e=2,i=new Set,n=new Set,a=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=i,this.providerFilter=n,this.providerItemsToReuse=a,this.showDeprecated=o}}Fre.default=new Fre;let K8i;function W8i(){return K8i}class G8i{constructor(e,i,n,a){this.items=e,this.needsClipboard=i,this.durations=n,this.disposable=a}}function X$e(r,e,i,n=Fre.default,a={triggerKind:0},o=g0.None){return sue(this,void 0,void 0,function*(){const c=new j3(!0);i=i.clone();const h=e.getWordAtPosition(i),g=h?new ot(i.lineNumber,h.startColumn,i.lineNumber,h.endColumn):ot.fromPositions(i),_={replace:g,insert:g.setEndPosition(i.lineNumber,i.column)},x=[],y=new du,S=[];let L=!1;const O=(ie,ue,re)=>{var _e,ye,Le;let lt=!1;if(!ue)return lt;for(const $e of ue.suggestions)if(!n.kindFilter.has($e.kind)){if(!n.showDeprecated&&(!((_e=$e==null?void 0:$e.tags)===null||_e===void 0)&&_e.includes(1)))continue;$e.range||($e.range=_),$e.sortText||($e.sortText=typeof $e.label=="string"?$e.label:$e.label.label),!L&&$e.insertTextRules&&$e.insertTextRules&4&&(L=QL.guessNeedsClipboard($e.insertText)),x.push(new H8i(i,$e,ue,ie)),lt=!0}return SGe(ue)&&y.add(ue),S.push({providerName:(ye=ie._debugDisplayName)!==null&&ye!==void 0?ye:"unknown_provider",elapsedProvider:(Le=ue.duration)!==null&&Le!==void 0?Le:-1,elapsedOverall:re.elapsed()}),lt},G=sue(this,void 0,void 0,function*(){});for(const ie of r.orderedGroups(e)){let ue=!1;if(yield Promise.all(ie.map(re=>sue(this,void 0,void 0,function*(){if(n.providerItemsToReuse.has(re)){const _e=n.providerItemsToReuse.get(re);_e.forEach(ye=>x.push(ye)),ue=ue||_e.length>0;return}if(!(n.providerFilter.size>0&&!n.providerFilter.has(re)))try{const _e=new j3(!0),ye=yield re.provideCompletionItems(e,i,a,o);ue=O(re,ye,_e)||ue}catch(_e){z4(_e)}}))),ue||o.isCancellationRequested)break}return yield G,o.isCancellationRequested?(y.dispose(),Promise.reject(new rN)):new G8i(x.sort(U8i(n.snippetSortOrder)),L,{entries:S,elapsed:c.elapsed()},y)})}function eUe(r,e){if(r.sortTextLow&&e.sortTextLow){if(r.sortTextLowe.sortTextLow)return 1}return r.textLabele.textLabel?1:r.completion.kind-e.completion.kind}function J8i(r,e){if(r.completion.kind!==e.completion.kind){if(r.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return eUe(r,e)}function $8i(r,e){if(r.completion.kind!==e.completion.kind){if(r.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return eUe(r,e)}const Gve=new Map;Gve.set(0,J8i);Gve.set(2,$8i);Gve.set(1,eUe);function U8i(r){return Gve.get(r)}O0.registerCommand("_executeCompletionItemProvider",(r,...e)=>sue(void 0,void 0,void 0,function*(){const[i,n,a,o]=e;bc(to.isUri(i)),bc(Vi.isIPosition(n)),bc(typeof a=="string"||!a),bc(typeof o=="number"||!o);const{completionProvider:c}=r.get(ma),h=yield r.get(W3).createModelReference(i);try{const g={incomplete:!1,suggestions:[]},_=[],x=h.object.textEditorModel.validatePosition(n),y=yield X$e(c,h.object.textEditorModel,x,void 0,{triggerCharacter:a??void 0,triggerKind:a?1:0});for(const S of y.items)_.length<(o??0)&&_.push(S.resolve(g0.None)),g.incomplete=g.incomplete||S.container.incomplete,g.suggestions.push(S.completion);try{return yield Promise.all(_),g}finally{setTimeout(()=>y.disposable.dispose(),100)}}finally{h.dispose()}}));function q8i(r,e){var i;(i=r.getContribution("editor.contrib.suggestController"))===null||i===void 0||i.triggerSuggest(new Set().add(e),void 0,!0)}class KG{static isAllOff(e){return e.other==="off"&&e.comments==="off"&&e.strings==="off"}static isAllOn(e){return e.other==="on"&&e.comments==="on"&&e.strings==="on"}static valueFor(e,i){switch(i){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}var tUe=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},bxe=function(r,e){return function(i,n){e(i,n,r)}};const zDt=Pu;let yxe=class TKe extends sn{constructor(e,i,n){super(),this._editor=e,this._instantiationService=i,this._keybindingService=n,this._widget=this._register(this._instantiationService.createInstance(tR,this._editor)),this._currentResult=null,this._participants=[];for(const a of oO.getAll())this._participants.push(this._instantiationService.createInstance(a,this._editor));this._participants.sort((a,o)=>a.hoverOrdinal-o.hoverOrdinal),this._computer=new kxe(this._editor,this._participants),this._hoverOperation=this._register(new Jkt(this._editor,this._computer)),this._register(this._hoverOperation.onResult(a=>{if(!this._computer.anchor)return;const o=a.hasLoadingMessage?this._addLoadingMessage(a.value):a.value;this._withResult(new Xkt(this._computer.anchor,o,a.isComplete))})),this._register(pf(this._widget.getDomNode(),"keydown",a=>{a.equals(9)&&this.hide()})),this._register(ah.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(e){const i=[];for(const a of this._participants)if(a.suggestHoverAnchor){const o=a.suggestHoverAnchor(e);o&&i.push(o)}const n=e.target;if(n.type===6&&i.push(new eOe(0,n.range,e.event.posx,e.event.posy)),n.type===7){const a=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!n.detail.isAfterLines&&typeof n.detail.horizontalDistanceToText=="number"&&n.detail.horizontalDistanceToTexto.priority-a.priority),this._startShowingOrUpdateHover(i[0],0,0,!1,e))}startShowingAtRange(e,i,n,a){this._startShowingOrUpdateHover(new eOe(0,e,void 0,void 0),i,n,a,null)}_startShowingOrUpdateHover(e,i,n,a,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,i,n,a,!1),!0):!1:this._editor.getOption(58).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,i,n,a,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,i,n,a,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,i,n,a,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,i,n,a,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=a,this._computer.source=n,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(i))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}isColorPickerVisible(){return this._widget.isColorPickerVisible}isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}isVisible(){return this._widget.isVisible}containsNode(e){return this._widget.getDomNode().contains(e)}_addLoadingMessage(e){if(this._computer.anchor){for(const i of this._participants)if(i.createLoadingMessage){const n=i.createLoadingMessage(this._computer.anchor);if(n)return e.slice(0).concat([n])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,i){const{showAtPosition:n,showAtSecondaryPosition:a,highlightRange:o}=TKe.computeHoverRanges(this._editor,e.range,i),c=new du,h=c.add(new LKe(this._keybindingService)),g=document.createDocumentFragment();let _=null;const x={fragment:g,statusBar:h,setColorPicker:S=>_=S,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const S of this._participants){const L=i.filter(O=>O.owner===S);L.length>0&&c.add(S.renderHoverParts(x,L))}const y=i.some(S=>S.isBeforeContent);if(h.hasContent&&g.appendChild(h.hoverElement),g.hasChildNodes()){if(o){const S=this._editor.createDecorationsCollection();S.set([{range:o,options:TKe._DECORATION_OPTIONS}]),c.add(Ss(()=>{S.clear()}))}this._widget.showAt(g,new Y8i(_,n,a,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,y,e.initialMousePosX,e.initialMousePosY,c))}else c.dispose()}static computeHoverRanges(e,i,n){let a=1;if(e.hasModel()){const _=e._getViewModel(),x=_.coordinatesConverter,y=x.convertModelRangeToViewRange(i),S=new Vi(y.startLineNumber,_.getLineMinColumn(y.startLineNumber));a=x.convertViewPositionToModelPosition(S).column}const o=i.startLineNumber;let c=i.startColumn,h=n[0].range,g=null;for(const _ of n)h=ot.plusRange(h,_.range),_.range.startLineNumber===o&&_.range.endLineNumber===o&&(c=Math.max(Math.min(c,_.range.startColumn),a)),_.forceShowAtRange&&(g=_.range);return{showAtPosition:g?g.getStartPosition():new Vi(o,i.startColumn),showAtSecondaryPosition:g?g.getStartPosition():new Vi(o,c),highlightRange:h}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}escape(){this._widget.escape()}};yxe._DECORATION_OPTIONS=As.register({description:"content-hover-highlight",className:"hoverHighlight"});yxe=tUe([bxe(1,Ds),bxe(2,J1)],yxe);class Xkt{constructor(e,i,n){this.anchor=e,this.messages=i,this.isComplete=n}filter(e){const i=this.messages.filter(n=>n.isValidForHoverAnchor(e));return i.length===this.messages.length?this:new Z8i(this,this.anchor,i,this.isComplete)}}class Z8i extends Xkt{constructor(e,i,n,a){super(i,n,a),this.original=e}filter(e){return this.original.filter(e)}}class Y8i{constructor(e,i,n,a,o,c,h,g,_,x){this.colorPicker=e,this.showAtPosition=i,this.showAtSecondaryPosition=n,this.preferAbove=a,this.stoleFocus=o,this.source=c,this.isBeforeContent=h,this.initialMousePosX=g,this.initialMousePosY=_,this.disposables=x,this.closestMouseDistance=void 0}}let tR=class eFt extends sn{get position(){var e,i;return(i=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&i!==void 0?i:null}get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}constructor(e,i){super(),this._editor=e,this._contextKeyService=i,this.allowEditorOverflow=!0,this._hoverVisibleKey=Rt.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=Rt.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new Gkt),this._focusTracker=this._register(i8(this.getDomNode())),this._horizontalScrollingBy=30,this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(48)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this),this._register(this._focusTracker.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(this._focusTracker.onDidBlur(()=>{this._hoverFocusedKey.set(!1)}))}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return eFt.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(Ns.Visible.key)&&(e=!0);const i=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:e?[1,2]:[2,1],positionAffinity:i}}isMouseGettingCloser(e,i){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=i,!1;const n=N4(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=IDt(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,n.left,n.top,n.width,n.height));const a=IDt(e,i,n.left,n.top,n.width,n.height);return a>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,a),!0)}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:i,lineHeight:n}=this._editor.getOption(48);this._hover.contentsDomNode.style.fontSize=`${i}px`,this._hover.contentsDomNode.style.lineHeight=`${n/i}`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(i=>this._editor.applyFontInfo(i))}showAt(e,i){var n;this._setVisibleData(i),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),i.stoleFocus&&this._hover.containerDomNode.focus(),(n=i.colorPicker)===null||n===void 0||n.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const n=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==n&&(this._hover.contentsDomNode.style.paddingBottom=n,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e-i.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e+i.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-this._horizontalScrollingBy})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+this._horizontalScrollingBy})}pageUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-i})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,i=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+i})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}escape(){this._editor.focus()}};tR.ID="editor.contrib.contentHoverWidget";tR=tUe([bxe(1,Wo)],tR);let LKe=class extends sn{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=zDt("div.hover-row.status-bar"),this.actionsElement=Yn(this.hoverElement,zDt("div.actions"))}addAction(e){const i=this._keybindingService.lookupKeybinding(e.commandId),n=i?i.getLabel():null;return this._hasContent=!0,this._register(q$e.render(this.actionsElement,e,n))}append(e){const i=Yn(this.actionsElement,e);return this._hasContent=!0,i}};LKe=tUe([bxe(0,J1)],LKe);class kxe{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,i){this._editor=e,this._participants=i,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,i){if(i.type!==1&&!i.supportsMarkerHover)return[];const n=e.getModel(),a=i.range.startLineNumber;if(a>n.getLineCount())return[];const o=n.getLineMaxColumn(a);return e.getLineDecorations(a).filter(c=>{if(c.options.isWholeLine)return!0;const h=c.range.startLineNumber===a?c.range.startColumn:1,g=c.range.endLineNumber===a?c.range.endColumn:o;if(c.options.showIfCollapsed){if(h>i.range.startColumn+1||i.range.endColumn-1>g)return!1}else if(h>i.range.startColumn||i.range.endColumn>g)return!1;return!0})}computeAsync(e){const i=this._anchor;if(!this._editor.hasModel()||!i)return Bf.EMPTY;const n=kxe._getLineDecorations(this._editor,i);return Bf.merge(this._participants.map(a=>a.computeAsync?a.computeAsync(i,n,e):Bf.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=kxe._getLineDecorations(this._editor,this._anchor);let i=[];for(const n of this._participants)i=i.concat(n.computeSync(this._anchor,e));return _$(i)}}function IDt(r,e,i,n,a,o){const c=i+a/2,h=n+o/2,g=Math.max(Math.abs(r-c)-a/2,0),_=Math.max(Math.abs(e-h)-o/2,0);return Math.sqrt(g*g+_*_)}var Q8i=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},RDt=function(r,e){return function(i,n){e(i,n,r)}},tFt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})},tOe;let r8=class iFt{constructor(e,i,n){this._options=e,this._languageService=i,this._openerService=n,this._onDidRenderAsync=new yi,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,i,n){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const a=new du,o=a.add(i$e(e,Object.assign(Object.assign({},this._getRenderOptions(e,a)),i),n));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>a.dispose()}}_getRenderOptions(e,i){return{codeBlockRenderer:(n,a)=>tFt(this,void 0,void 0,function*(){var o,c,h;let g;n?g=this._languageService.getLanguageIdByLanguageName(n):this._options.editor&&(g=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),g||(g=hx);const _=yield Svi(this._languageService,a,g),x=document.createElement("span");if(x.innerHTML=(h=(c=iFt._ttpTokenizer)===null||c===void 0?void 0:c.createHTML(_))!==null&&h!==void 0?h:_,this._options.editor){const y=this._options.editor.getOption(48);Cp(x,y)}else this._options.codeBlockFontFamily&&(x.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(x.style.fontSize=this._options.codeBlockFontSize),x}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:n=>X8i(this._openerService,n,e.isTrusted),disposables:i}}}};r8._ttpTokenizer=(tOe=window.trustedTypes)===null||tOe===void 0?void 0:tOe.createPolicy("tokenizeToString",{createHTML(r){return r}});r8=Q8i([RDt(1,s1),RDt(2,JD)],r8);function X8i(r,e,i){return tFt(this,void 0,void 0,function*(){try{return yield r.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:eBi(i)})}catch(n){return Bs(n),!1}})}function eBi(r){return r===!0?!0:r&&Array.isArray(r.enabledCommands)?r.enabledCommands:!1}const ODt=Pu;class EJ extends sn{constructor(e,i,n){super(),this._renderDisposeables=this._register(new du),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new Gkt),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new r8({editor:this._editor},i,n)),this._computer=new tBi(this._editor),this._hoverOperation=this._register(new Jkt(this._editor,this._computer)),this._register(this._hoverOperation.onResult(a=>{this._withResult(a.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(a=>{a.hasChanged(48)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return EJ.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(i=>this._editor.applyFontInfo(i))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,i){this._renderDisposeables.clear();const n=document.createDocumentFragment();for(const a of i){const o=ODt("div.hover-row.markdown-hover"),c=Yn(o,ODt("div.hover-contents")),h=this._renderDisposeables.add(this._markdownRenderer.render(a.value));c.appendChild(h.element),n.appendChild(o)}this._updateContents(n),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const i=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(e),a=this._editor.getScrollTop(),o=this._editor.getOption(64),c=this._hover.containerDomNode.clientHeight,h=n-a-(c-o)/2;this._hover.containerDomNode.style.left=`${i.glyphMarginLeft+i.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(h),0)}px`}}EJ.ID="editor.contrib.modesGlyphHoverWidget";class tBi{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=a=>({value:a}),i=this._editor.getLineDecorations(this._lineNumber),n=[];if(!i)return n;for(const a of i){if(!a.options.glyphMarginClassName)continue;const o=a.options.glyphMarginHoverMessage;!o||qJ(o)||n.push(...kGe(o).map(e))}return n}}var iBi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class nBi{constructor(e,i,n){this.provider=e,this.hover=i,this.ordinal=n}}function uBi(r,e,i,n,a){return iBi(this,void 0,void 0,function*(){try{const o=yield Promise.resolve(r.provideHover(i,n,a));if(o&&aBi(o))return new nBi(r,o,e)}catch(o){z4(o)}})}function iUe(r,e,i,n){const o=r.ordered(e).map((c,h)=>uBi(c,h,e,i,n));return Bf.fromPromises(o).coalesce()}function rBi(r,e,i,n){return iUe(r,e,i,n).map(a=>a.hover).toPromise()}KA("_executeHoverProvider",(r,e,i)=>{const n=r.get(ma);return rBi(n.hoverProvider,e,i,g0.None)});function aBi(r){const e=typeof r.range<"u",i=typeof r.contents<"u"&&r.contents&&r.contents.length>0;return e&&i}var oBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},E3e=function(r,e){return function(i,n){e(i,n,r)}};const jDt=Pu;class ry{constructor(e,i,n,a,o){this.owner=e,this.range=i,this.contents=n,this.isBeforeContent=a,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let Fxe=class{constructor(e,i,n,a,o){this._editor=e,this._languageService=i,this._openerService=n,this._configurationService=a,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new ry(this,e.range,[new M3().appendText(V("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1)return[];const n=this._editor.getModel(),a=e.range.startLineNumber,o=n.getLineMaxColumn(a),c=[];let h=1e3;const g=n.getLineLength(a),_=n.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),x=this._editor.getOption(112),y=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:_});let S=!1;x>=0&&g>x&&e.range.startColumn>=x&&(S=!0,c.push(new ry(this,e.range,[{value:V("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,h++))),!S&&typeof y=="number"&&g>=y&&c.push(new ry(this,e.range,[{value:V("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,h++));let L=!1;for(const O of i){const G=O.range.startLineNumber===a?O.range.startColumn:1,ie=O.range.endLineNumber===a?O.range.endColumn:o,ue=O.options.hoverMessage;if(!ue||qJ(ue))continue;O.options.beforeContentClassName&&(L=!0);const re=new ot(e.range.startLineNumber,G,e.range.startLineNumber,ie);c.push(new ry(this,re,kGe(ue),L,h++))}return c}computeAsync(e,i,n){if(!this._editor.hasModel()||e.type!==1)return Bf.EMPTY;const a=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(a))return Bf.EMPTY;const o=new Vi(e.range.startLineNumber,e.range.startColumn);return iUe(this._languageFeaturesService.hoverProvider,a,o,n).filter(c=>!qJ(c.hover.contents)).map(c=>{const h=c.hover.range?ot.lift(c.hover.range):e.range;return new ry(this,h,c.hover.contents,!1,c.ordinal)})}renderHoverParts(e,i){return nFt(e,i,this._editor,this._languageService,this._openerService)}};Fxe=oBi([E3e(1,s1),E3e(2,JD),E3e(3,hl),E3e(4,ma)],Fxe);function nFt(r,e,i,n,a){e.sort((c,h)=>c.ordinal-h.ordinal);const o=new du;for(const c of e)for(const h of c.contents){if(qJ(h))continue;const g=jDt("div.hover-row.markdown-hover"),_=Yn(g,jDt("div.hover-contents")),x=o.add(new r8({editor:i},n,a));o.add(x.onDidRenderAsync(()=>{_.className="hover-contents code-hover-contents",r.onContentsChanged()}));const y=o.add(x.render(h));_.appendChild(y.element),r.fragment.appendChild(g)}return o}var uFt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Axe=function(r,e){return function(i,n){e(i,n,r)}};class VDt{constructor(e,i,n){this.marker=e,this.index=i,this.total=n}}let NKe=class{constructor(e,i,n){this._markerService=i,this._configService=n,this._onDidChange=new yi,this.onDidChange=this._onDidChange.event,this._dispoables=new du,this._markers=[],this._nextIdx=-1,to.isUri(e)?this._resourceFilter=h=>h.toString()===e.toString():e&&(this._resourceFilter=e);const a=this._configService.getValue("problems.sortOrder"),o=(h,g)=>{let _=Tue(h.resource.toString(),g.resource.toString());return _===0&&(a==="position"?_=ot.compareRangesUsingStarts(h,g)||sh.compare(h.severity,g.severity):_=sh.compare(h.severity,g.severity)||ot.compareRangesUsingStarts(h,g)),_},c=()=>{this._markers=this._markerService.read({resource:to.isUri(e)?e:void 0,severities:sh.Error|sh.Warning|sh.Info}),typeof e=="function"&&(this._markers=this._markers.filter(h=>this._resourceFilter(h.resource))),this._markers.sort(o)};c(),this._dispoables.add(i.onMarkerChanged(h=>{(!this._resourceFilter||h.some(g=>this._resourceFilter(g)))&&(c(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new VDt(e,this._nextIdx+1,this._markers.length)}_initIdx(e,i,n){let a=!1,o=this._markers.findIndex(c=>c.resource.toString()===e.uri.toString());o<0&&(o=Aue(this._markers,{resource:e.uri},(c,h)=>Tue(c.resource.toString(),h.resource.toString())),o<0&&(o=~o));for(let c=o;ca.resource.toString()===e.toString());if(!(n<0)){for(;n=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},iG=function(r,e){return function(i,n){e(i,n,r)}};class lBi{constructor(e,i,n,a,o){this._openerService=a,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new du,this._editor=i;const c=document.createElement("div");c.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),c.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),c.appendChild(this._relatedBlock),this._disposables.add(pf(this._relatedBlock,"click",h=>{h.preventDefault();const g=this._relatedDiagnostics.get(h.target);g&&n(g)})),this._scrollable=new u2t(c,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(h=>{c.style.left=`-${h.scrollLeft}px`,c.style.top=`-${h.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){nc(this._disposables)}update(e){const{source:i,message:n,relatedInformation:a,code:o}=e;let c=((i==null?void 0:i.length)||0)+2;o&&(typeof o=="string"?c+=o.length:c+=o.value.length);const h=SA(n);this._lines=h.length,this._longestLineLength=0;for(const S of h)this._longestLineLength=Math.max(S.length+c,this._longestLineLength);km(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let g=this._messageBlock;for(const S of h)g=document.createElement("div"),g.innerText=S,S===""&&(g.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(g);if(i||o){const S=document.createElement("span");if(S.classList.add("details"),g.appendChild(S),i){const L=document.createElement("span");L.innerText=i,L.classList.add("source"),S.appendChild(L)}if(o)if(typeof o=="string"){const L=document.createElement("span");L.innerText=`(${o})`,L.classList.add("code"),S.appendChild(L)}else{this._codeLink=Pu("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=O=>{this._openerService.open(o.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()};const L=Yn(this._codeLink,Pu("span"));L.innerText=o.value,S.appendChild(this._codeLink)}}if(km(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Kg(a)){const S=this._relatedBlock.appendChild(document.createElement("div"));S.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(const L of a){const O=document.createElement("div"),G=document.createElement("a");G.classList.add("filename"),G.innerText=`${this._labelService.getUriBasenameLabel(L.resource)}(${L.startLineNumber}, ${L.startColumn}): `,G.title=this._labelService.getUriLabel(L.resource),this._relatedDiagnostics.set(G,L);const ie=document.createElement("span");ie.innerText=L.message,O.appendChild(G),O.appendChild(ie),this._lines+=1,S.appendChild(O)}}const _=this._editor.getOption(48),x=Math.ceil(_.typicalFullwidthCharacterWidth*this._longestLineLength*.75),y=_.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:x,scrollHeight:y})}layout(e,i){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${i}px`,this._scrollable.setScrollDimensions({width:i,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let i="";switch(e.severity){case sh.Error:i=V("Error","Error");break;case sh.Warning:i=V("Warning","Warning");break;case sh.Info:i=V("Info","Info");break;case sh.Hint:i=V("Hint","Hint");break}let n=V("marker aria","{0} at {1}. ",i,e.startLineNumber+":"+e.startColumn);const a=this._editor.getModel();return a&&e.startLineNumber<=a.getLineCount()&&e.startLineNumber>=1&&(n=`${a.getLineContent(e.startLineNumber)}, ${n}`),n}}let o$=class aFt extends Cxe{constructor(e,i,n,a,o,c,h){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=i,this._openerService=n,this._menuService=a,this._contextKeyService=c,this._labelService=h,this._callOnDispose=new du,this._onDidSelectRelatedInformation=new yi,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=sh.Warning,this._backgroundColor=qi.white,this._applyTheme(i.getColorTheme()),this._callOnDispose.add(i.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(fBi);let i=zKe,n=cBi;this._severity===sh.Warning?(i=bDe,n=dBi):this._severity===sh.Info&&(i=IKe,n=hBi);const a=e.getColor(i),o=e.getColor(n);this.style({arrowColor:a,frameColor:a,headerBackgroundColor:o,primaryHeadingColor:e.getColor(Skt),secondaryHeadingColor:e.getColor(Bkt)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(a=>this.editor.focus()));const i=[],n=this._menuService.createMenu(aFt.TitleMenu,this._contextKeyService);Jbt(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=Yn(e,Pu(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new lBi(this._container,this.editor,i=>this._onDidSelectRelatedInformation.fire(i),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,i,n){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const a=ot.lift(e),o=this.editor.getPosition(),c=o&&a.containsPosition(o)?o:a.getStartPosition();super.show(c,this.computeRequiredHeight());const h=this.editor.getModel();if(h){const g=n>1?V("problems","{0} of {1} problems",i,n):V("change","{0} of {1} problem",i,n);this.setTitle(X6(h.uri),g)}this._icon.className=`codicon ${MKe.className(sh.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(c,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,i){super._doLayoutBody(e,i),this._heightInPixel=e,this._message.layout(e,i),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};o$.TitleMenu=new Ht("gotoErrorTitleMenu");o$=sBi([iG(1,I4),iG(2,JD),iG(3,HA),iG(4,Ds),iG(5,Wo),iG(6,ZJ)],o$);const HDt=Kue(dA,X_i),KDt=Kue(ax,Hue),WDt=Kue(ox,AVe),zKe=Jt("editorMarkerNavigationError.background",{dark:HDt,light:HDt,hcDark:v0,hcLight:v0},V("editorMarkerNavigationError","Editor marker navigation widget error color.")),cBi=Jt("editorMarkerNavigationError.headerBackground",{dark:Ga(zKe,.1),light:Ga(zKe,.1),hcDark:null,hcLight:null},V("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),bDe=Jt("editorMarkerNavigationWarning.background",{dark:KDt,light:KDt,hcDark:v0,hcLight:v0},V("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),dBi=Jt("editorMarkerNavigationWarning.headerBackground",{dark:Ga(bDe,.1),light:Ga(bDe,.1),hcDark:"#0C141F",hcLight:Ga(bDe,.2)},V("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),IKe=Jt("editorMarkerNavigationInfo.background",{dark:WDt,light:WDt,hcDark:v0,hcLight:v0},V("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),hBi=Jt("editorMarkerNavigationInfo.headerBackground",{dark:Ga(IKe,.1),light:Ga(IKe,.1),hcDark:null,hcLight:null},V("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),fBi=Jt("editorMarkerNavigation.background",{dark:n4,light:n4,hcDark:n4,hcLight:n4},V("editorMarkerNavigationBackground","Editor marker navigation widget background."));var mBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},_3e=function(r,e){return function(i,n){e(i,n,r)}},oFt=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let XL=class yDe{static get(e){return e.getContribution(yDe.ID)}constructor(e,i,n,a,o){this._markerNavigationService=i,this._contextKeyService=n,this._editorService=a,this._instantiationService=o,this._sessionDispoables=new du,this._editor=e,this._widgetVisible=sFt.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let i=!1;return this._model&&(i=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),i&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(o$,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(n=>{var a,o,c;(!(!((a=this._model)===null||a===void 0)&&a.selected)||!ot.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,n.position))&&((c=this._model)===null||c===void 0||c.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const n=this._model.find(this._editor.getModel().uri,this._widget.position);n?this._widget.updateMarker(n.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(n=>{this._editorService.openCodeEditor({resource:n.resource,options:{pinned:!0,revealIfOpened:!0,selection:ot.lift(n).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const i=this._getOrCreateModel(this._editor.getModel().uri);i.resetIndex(),i.move(!0,this._editor.getModel(),new Vi(e.startLineNumber,e.startColumn)),i.selected&&this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}}nagivate(e,i){var n,a;return oFt(this,void 0,void 0,function*(){if(this._editor.hasModel()){const o=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(o.move(e,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const c=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);c&&((n=yDe.get(c))===null||n===void 0||n.close(),(a=yDe.get(c))===null||a===void 0||a.nagivate(e,i))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};XL.ID="editor.contrib.markerController";XL=mBi([_3e(1,rFt),_3e(2,Wo),_3e(3,wl),_3e(4,Ds)],XL);class Jve extends Vr{constructor(e,i,n){super(n),this._next=e,this._multiFile=i}run(e,i){var n;return oFt(this,void 0,void 0,function*(){i.hasModel()&&((n=XL.get(i))===null||n===void 0||n.nagivate(this._next,this._multiFile))})}}class SL extends Jve{constructor(){super(!0,!1,{id:SL.ID,label:SL.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rt.focus,primary:578,weight:100},menuOpts:{menuId:o$.TitleMenu,title:SL.LABEL,icon:Ef("marker-navigation-next",dr.arrowDown,V("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}SL.ID="editor.action.marker.next";SL.LABEL=V("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class iR extends Jve{constructor(){super(!1,!1,{id:iR.ID,label:iR.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rt.focus,primary:1602,weight:100},menuOpts:{menuId:o$.TitleMenu,title:iR.LABEL,icon:Ef("marker-navigation-previous",dr.arrowUp,V("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}iR.ID="editor.action.marker.prev";iR.LABEL=V("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class pBi extends Jve{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:V("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rt.focus,primary:66,weight:100},menuOpts:{menuId:Ht.MenubarGoMenu,title:V({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class gBi extends Jve{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:V("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:Rt.focus,primary:1090,weight:100},menuOpts:{menuId:Ht.MenubarGoMenu,title:V({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}fl(XL.ID,XL,4);Cu(SL);Cu(iR);Cu(pBi);Cu(gBi);const sFt=new Kr("markersNavigationVisible",!1),EBi=Fp.bindToContribution(XL.get);Zu(new EBi({id:"closeMarkersNavigation",precondition:sFt,handler:r=>r.close(),kbOpts:{weight:150,kbExpr:Rt.focus,primary:9,secondary:[1033]}}));var _Bi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},iOe=function(r,e){return function(i,n){e(i,n,r)}};const zC=Pu;class DBi{constructor(e,i,n){this.owner=e,this.range=i,this.marker=n}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const GDt={type:1,filter:{include:es.QuickFix},triggerAction:Ex.QuickFixHover};let RKe=class{constructor(e,i,n,a){this._editor=e,this._markerDecorationsService=i,this._openerService=n,this._languageFeaturesService=a,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,i){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const n=this._editor.getModel(),a=e.range.startLineNumber,o=n.getLineMaxColumn(a),c=[];for(const h of i){const g=h.range.startLineNumber===a?h.range.startColumn:1,_=h.range.endLineNumber===a?h.range.endColumn:o,x=this._markerDecorationsService.getMarker(n.uri,h);if(!x)continue;const y=new ot(e.range.startLineNumber,g,e.range.startLineNumber,_);c.push(new DBi(this,y,x))}return c}renderHoverParts(e,i){if(!i.length)return sn.None;const n=new du;i.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,n)));const a=i.length===1?i[0]:i.sort((o,c)=>sh.compare(o.marker.severity,c.marker.severity))[0];return this.renderMarkerStatusbar(e,a,n),n}renderMarkerHover(e,i){const n=zC("div.hover-row"),a=Yn(n,zC("div.marker.hover-contents")),{source:o,message:c,code:h,relatedInformation:g}=e.marker;this._editor.applyFontInfo(a);const _=Yn(a,zC("span"));if(_.style.whiteSpace="pre-wrap",_.innerText=c,o||h)if(h&&typeof h!="string"){const x=zC("span");if(o){const O=Yn(x,zC("span"));O.innerText=o}const y=Yn(x,zC("a.code-link"));y.setAttribute("href",h.target.toString()),i.add(Vn(y,"click",O=>{this._openerService.open(h.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()}));const S=Yn(y,zC("span"));S.innerText=h.value;const L=Yn(a,x);L.style.opacity="0.6",L.style.paddingLeft="6px"}else{const x=Yn(a,zC("span"));x.style.opacity="0.6",x.style.paddingLeft="6px",x.innerText=o&&h?`${o}(${h})`:o||`(${h})`}if(Kg(g))for(const{message:x,resource:y,startLineNumber:S,startColumn:L}of g){const O=Yn(a,zC("div"));O.style.marginTop="8px";const G=Yn(O,zC("a"));G.innerText=`${X6(y)}(${S}, ${L}): `,G.style.cursor="pointer",i.add(Vn(G,"click",ue=>{ue.stopPropagation(),ue.preventDefault(),this._openerService&&this._openerService.open(y,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:S,startColumn:L}}}).catch(Bs)}));const ie=Yn(O,zC("span"));ie.innerText=x,this._editor.applyFontInfo(ie)}return n}renderMarkerStatusbar(e,i,n){if((i.marker.severity===sh.Error||i.marker.severity===sh.Warning||i.marker.severity===sh.Info)&&e.statusBar.addAction({label:V("view problem","View Problem"),commandId:SL.ID,run:()=>{var a;e.hide(),(a=XL.get(this._editor))===null||a===void 0||a.showAtMarker(i.marker),this._editor.focus()}}),!this._editor.getOption(87)){const a=e.statusBar.append(zC("div"));this.recentMarkerCodeActionsInfo&&(sxe.makeKey(this.recentMarkerCodeActionsInfo.marker)===sxe.makeKey(i.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(a.textContent=V("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?sn.None:n.add(lR(()=>a.textContent=V("checkingForQuickFixes","Checking for quick fixes..."),200));a.textContent||(a.textContent=" ");const c=this.getCodeActions(i.marker);n.add(Ss(()=>c.cancel())),c.then(h=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:i.marker,hasCodeActions:h.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){h.dispose(),a.textContent=V("noQuickFixes","No quick fixes available");return}a.style.display="none";let g=!1;n.add(Ss(()=>{g||h.dispose()})),e.statusBar.addAction({label:V("quick fixes","Quick Fix..."),commandId:H$e,run:_=>{g=!0;const x=kR.get(this._editor),y=N4(_);e.hide(),x==null||x.showCodeActions(GDt,h,{x:y.left+6,y:y.top+y.height+6,width:y.width,height:y.height})}})},Bs)}}getCodeActions(e){return u4(i=>G$e(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new ot(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),GDt,XR.None,i))}};RKe=_Bi([iOe(1,sJe),iOe(2,JD),iOe(3,ma)],RKe);const lFt="editor.action.inlineSuggest.commit",cFt="editor.action.inlineSuggest.showPrevious",dFt="editor.action.inlineSuggest.showNext";var xBi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};class vBi extends sn{constructor(e,i,n={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new Bmi),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new du,this.options=n,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new Are(()=>{var a;return(a=this.toggleMenuActionViewItem)===null||a===void 0?void 0:a.show()},n.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new ev(this.element,{orientation:n.orientation,ariaLabel:n.ariaLabel,actionRunner:n.actionRunner,allowContextMenu:n.allowContextMenu,actionViewItemProvider:(a,o)=>{var c;if(a.id===Are.ID)return this.toggleMenuActionViewItem=new txe(a,a.menuActions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:_o.asClassNameArray((c=n.moreIcon)!==null&&c!==void 0?c:dr.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(n.actionViewItemProvider){const h=n.actionViewItemProvider(a,o);if(h)return h}if(a instanceof VJ){const h=new txe(a,a.actions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:a.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return h.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(h),this.disposables.add(this._onDidChangeDropdownVisibility.add(h.onDidChangeVisibility)),h}}}))}set actionRunner(e){this.actionBar.actionRunner=e}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(e){return this.actionBar.getAction(e)}setActions(e,i){this.clear();const n=e?e.slice(0):[];this.hasSecondaryActions=!!(i&&i.length>0),this.hasSecondaryActions&&i&&(this.toggleMenuAction.menuActions=i.slice(0),n.push(this.toggleMenuAction)),n.forEach(a=>{this.actionBar.push(a,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(a)})})}getKeybindingLabel(e){var i,n;const a=this.lookupKeybindings?(n=(i=this.options).getKeyBinding)===null||n===void 0?void 0:n.call(i,e):void 0;return xp(a==null?void 0:a.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}class Are extends HD{constructor(e,i){i=i||V("moreActions","More Actions..."),super(Are.ID,i,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return xBi(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}Are.ID="toolbar.toggle.more";var CBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Kie=function(r,e){return function(i,n){e(i,n,r)}};let OKe=class extends vBi{constructor(e,i,n,a,o,c,h){super(e,o,Object.assign(Object.assign({getKeyBinding:g=>{var _;return(_=c.lookupKeybinding(g.id))!==null&&_!==void 0?_:void 0}},i),{allowContextMenu:!0})),this._options=i,this._menuService=n,this._contextKeyService=a,this._contextMenuService=o,this._sessionDisposables=this._store.add(new du),i!=null&&i.telemetrySource&&this._store.add(this.actionBar.onDidRun(g=>h.publicLog2("workbenchActionExecuted",{id:g.action.id,from:i.telemetrySource})))}setActions(e,i=[],n){var a,o,c;this._sessionDisposables.clear();const h=e.slice(),g=i.slice(),_=[];let x=0;const y=[];let S=!1;if(((a=this._options)===null||a===void 0?void 0:a.hiddenItemStrategy)!==-1)for(let L=0;L=this._options.maxNumberOfItems&&(h[O]=void 0,y[O]=G)}}lgt(h),lgt(y),super.setActions(h,P4.join(y,g)),_.length>0&&this._sessionDisposables.add(Vn(this.getElement(),"contextmenu",L=>{var O,G,ie,ue;const re=this.getItemAction(L.target);if(!re)return;L.preventDefault(),L.stopPropagation();let _e=!1;if(x===1&&((O=this._options)===null||O===void 0?void 0:O.hiddenItemStrategy)===0){_e=!0;for(let lt=0;lt<_.length;lt++)if(_[lt].checked){_[lt]=Vne({id:re.id,label:re.label,checked:!0,enabled:!1,run(){}});break}}let ye;if(!_e&&(re instanceof t2||re instanceof jue)){if(!re.hideActions)return;ye=re.hideActions.hide}else ye=Vne({id:"label",label:V("hide","Hide"),enabled:!1,run(){}});const Le=P4.join([ye],_);!((G=this._options)===null||G===void 0)&&G.resetMenu&&!n&&(n=[this._options.resetMenu]),S&&n&&(Le.push(new P4),Le.push(Vne({id:"resetThisMenu",label:V("resetThisMenu","Reset Menu"),run:()=>this._menuService.resetHiddenStates(n)}))),this._contextMenuService.showContextMenu({getAnchor:()=>L,getActions:()=>Le,menuId:(ie=this._options)===null||ie===void 0?void 0:ie.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(ue=this._options)===null||ue===void 0?void 0:ue.menuOptions),contextKeyService:this._contextKeyService})}))}};OKe=CBi([Kie(2,HA),Kie(3,Wo),Kie(4,Py),Kie(5,J1),Kie(6,nv)],OKe);var hFt=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},uA=function(r,e){return function(i,n){e(i,n,r)}};const bBi=Ef("inline-suggestion-hints-next",dr.chevronRight,V("parameterHintsNextIcon","Icon for show next parameter hint.")),yBi=Ef("inline-suggestion-hints-previous",dr.chevronLeft,V("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let SR=class jKe extends sn{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,i,n){const a=new HD(e,i,n,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let c=i;return o&&(c=V({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",i,o.getLabel())),a.tooltip=c,a}constructor(e,i,n,a,o,c,h){super(),this.editor=e,this.withBorder=i,this._commandService=n,this.keybindingService=o,this._contextKeyService=c,this._menuService=h,this.id=`InlineSuggestionHintsContentWidget${jKe.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=sne("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[sne("div",{style:{display:"flex"}},[sne("div@actionBar",{className:"custom-actions"}),sne("div@toolBar")])]),this.position=null,this.previousAction=this.createCommandAction(cFt,V("previous","Previous"),_o.asClassName(yBi)),this.availableSuggestionCountAction=new HD("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(dFt,V("next","Next"),_o.asClassName(bBi)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Ht.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Zc(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Zc(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCurrentSuggestionIdx=-1,this.lastSuggestionCount=-1,this.lastCommands=[];const g=this._register(new ev(this.nodes.actionBar));g.push(this.previousAction,{icon:!0,label:!1}),g.push(this.availableSuggestionCountAction),g.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(a.createInstance(VKe,this.nodes.toolBar,Ht.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:_=>_.startsWith("primary")},actionViewItemProvider:(_,x)=>_ instanceof t2?a.createInstance(kBi,_,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(_=>{jKe._dropDownVisible=_}))}update(e,i,n,a){if(this.position===e&&this.lastCurrentSuggestionIdx===i&&this.lastSuggestionCount===n&&tg(this.lastCommands,a))return;this.position=e,this.lastCurrentSuggestionIdx=i,this.lastSuggestionCount=n??-1,this.lastCommands=a,n!==void 0&&n>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule(),n!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${n}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),this.editor.layoutContentWidget(this);const o=a.map(c=>({class:void 0,id:c.id,enabled:!0,tooltip:c.tooltip||"",label:c.title,run:h=>this._commandService.executeCommand(c.id)}));for(const[c,h]of this.inlineCompletionsActionsMenus.getActions())for(const g of h)g instanceof t2&&o.push(g);o.length>0&&o.unshift(new P4),this.toolBar.setAdditionalSecondaryActions(o)}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this.position,preference:[1,2],positionAffinity:3}}};SR._dropDownVisible=!1;SR.id=0;SR=hFt([uA(2,Zh),uA(3,Ds),uA(4,J1),uA(5,Wo),uA(6,HA)],SR);let kBi=class extends pR{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const i=sne("div.keybinding").root;new Pae(i,ux,Object.assign({disableTitle:!0},iFi)).set(e),this.label.textContent=this._action.label,this.label.appendChild(i),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}},VKe=class extends OKe{constructor(e,i,n,a,o,c,h,g){super(e,Object.assign({resetMenu:i},n),a,o,c,h,g),this.menuId=i,this.options2=n,this.menuService=a,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,i,n,a,o,c,h;const g=[],_=[];Jbt(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:g,secondary:_},(n=(i=this.options2)===null||i===void 0?void 0:i.toolbarOptions)===null||n===void 0?void 0:n.primaryGroup,(o=(a=this.options2)===null||a===void 0?void 0:a.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(h=(c=this.options2)===null||c===void 0?void 0:c.toolbarOptions)===null||h===void 0?void 0:h.useSeparatorsInPrimaryActions),_.push(...this.additionalActions),this.setActions(g,_)}setAdditionalSecondaryActions(e){tg(this.additionalActions,e,(i,n)=>i===n)||(this.additionalActions=e,this.updateToolbar())}};VKe=hFt([uA(3,HA),uA(4,Wo),uA(5,Py),uA(6,J1),uA(7,nv)],VKe);var FBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},D3e=function(r,e){return function(i,n){e(i,n,r)}};let I_=class fFt{static get(e){return e.getContribution(fFt.ID)}constructor(e,i,n,a,o){this._editor=e,this._instantiationService=i,this._openerService=n,this._languageService=a,this._keybindingService=o,this._toUnhook=new du,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(c=>{c.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const e=()=>this._hideWidgets(),i=this._editor.getOption(58);this._isHoverEnabled=i.enabled,this._isHoverSticky=i.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(n=>this._onEditorMouseDown(n))),this._toUnhook.add(this._editor.onMouseUp(n=>this._onEditorMouseUp(n))),this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))):(this._toUnhook.add(this._editor.onMouseMove(n=>this._onEditorMouseMove(n))),this._toUnhook.add(this._editor.onKeyDown(n=>this._onKeyDown(n)))),this._toUnhook.add(this._editor.onMouseLeave(n=>this._onEditorMouseLeave(n))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(n=>this._onEditorScrollChanged(n)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const i=e.target;if(i.type===9&&i.detail===tR.ID){this._hoverClicked=!0;return}i.type===12&&i.detail===EJ.ID||(i.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var i;const n=e.event.browserEvent.relatedTarget;!((i=this._contentWidget)===null||i===void 0)&&i.containsNode(n)||this._hideWidgets()}_onEditorMouseMove(e){var i,n,a,o,c,h;const g=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&g.type===9&&g.detail===tR.ID||this._isHoverSticky&&!(!((n=(i=e.event.browserEvent.view)===null||i===void 0?void 0:i.getSelection())===null||n===void 0)&&n.isCollapsed)||!this._isHoverSticky&&g.type===9&&g.detail===tR.ID&&(!((a=this._contentWidget)===null||a===void 0)&&a.isColorPickerVisible())||this._isHoverSticky&&g.type===12&&g.detail===EJ.ID||this._isHoverSticky&&(!((o=this._contentWidget)===null||o===void 0)&&o.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(c=this._glyphWidget)===null||c===void 0||c.hide();return}if(g.type===2&&g.position){(h=this._contentWidget)===null||h===void 0||h.hide(),this._glyphWidget||(this._glyphWidget=new EJ(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(g.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var i;if(!this._editor.hasModel())return;const n=this._keybindingService.softDispatch(e,this._editor.getDomNode()),a=(n==null?void 0:n.kind)===1||n&&n.kind===2&&n.commandId==="editor.action.showHover"&&((i=this._contentWidget)===null||i===void 0?void 0:i.isVisible());e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!a&&this._hideWidgets()}_hideWidgets(){var e,i,n;this._isMouseDown&&this._hoverClicked&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible())||SR.dropDownVisible||(this._hoverClicked=!1,(i=this._glyphWidget)===null||i===void 0||i.hide(),(n=this._contentWidget)===null||n===void 0||n.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(yxe,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,i,n,a){this._getOrCreateContentWidget().startShowingAtRange(e,i,n,a)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}escape(){var e;(e=this._contentWidget)===null||e===void 0||e.escape()}isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible()}dispose(){var e,i;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(i=this._contentWidget)===null||i===void 0||i.dispose()}};I_.ID="editor.contrib.hover";I_=FBi([D3e(1,Ds),D3e(2,JD),D3e(3,s1),D3e(4,J1)],I_);class ABi extends Vr{constructor(){super({id:"editor.action.showHover",label:V({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse.","If the hover is already visible, it will take focus."]},"Show or Focus Hover"),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:Rt.editorTextFocus,primary:Fm(2089,2087),weight:100}})}run(e,i,n){if(!i.hasModel())return;const a=I_.get(i);if(!a)return;const o=i.getPosition(),c=new ot(o.lineNumber,o.column,o.lineNumber,o.column),h=i.getOption(2)===2||!!(n!=null&&n.focus);a.isHoverVisible()?a.focus():a.showContentHover(c,1,1,h)}}class SBi extends Vr{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:V({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,i){const n=I_.get(i);if(!n)return;const a=i.getPosition();if(!a)return;const o=new ot(a.lineNumber,a.column,a.lineNumber,a.column),c=AR.get(i);if(!c)return;c.startFindDefinitionFromCursor(a).then(()=>{n.showContentHover(o,1,1,!0)})}}class BBi extends Vr{constructor(){super({id:"editor.action.scrollUpHover",label:V({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:16,weight:100}})}run(e,i){const n=I_.get(i);n&&n.scrollUp()}}class wBi extends Vr{constructor(){super({id:"editor.action.scrollDownHover",label:V({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:18,weight:100}})}run(e,i){const n=I_.get(i);n&&n.scrollDown()}}class TBi extends Vr{constructor(){super({id:"editor.action.scrollLeftHover",label:V({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:15,weight:100}})}run(e,i){const n=I_.get(i);n&&n.scrollLeft()}}class LBi extends Vr{constructor(){super({id:"editor.action.scrollRightHover",label:V({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:17,weight:100}})}run(e,i){const n=I_.get(i);n&&n.scrollRight()}}class NBi extends Vr{constructor(){super({id:"editor.action.pageUpHover",label:V({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,i){const n=I_.get(i);n&&n.pageUp()}}class PBi extends Vr{constructor(){super({id:"editor.action.pageDownHover",label:V({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,i){const n=I_.get(i);n&&n.pageDown()}}class MBi extends Vr{constructor(){super({id:"editor.action.goToTopHover",label:V({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,i){const n=I_.get(i);n&&n.goToTop()}}class zBi extends Vr{constructor(){super({id:"editor.action.goToBottomHover",label:V({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,i){const n=I_.get(i);n&&n.goToBottom()}}class IBi extends Vr{constructor(){super({id:"editor.action.escapeFocusHover",label:V({key:"escapeFocusHover",comment:["Action that allows to escape from the hover widget with the escape command when the hover widget is focused."]},"Escape Focus Hover"),alias:"Escape Focus Hover",precondition:Rt.hoverFocused,kbOpts:{kbExpr:Rt.hoverFocused,primary:9,weight:100}})}run(e,i){const n=I_.get(i);n&&n.escape()}}fl(I_.ID,I_,2);Cu(ABi);Cu(SBi);Cu(BBi);Cu(wBi);Cu(TBi);Cu(LBi);Cu(NBi);Cu(PBi);Cu(MBi);Cu(zBi);Cu(IBi);oO.register(Fxe);oO.register(RKe);i2((r,e)=>{const i=r.getColor(m3i);i&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))});class HKe extends sn{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(i=>this.onMouseDown(i)))}dispose(){super.dispose()}onMouseDown(e){const i=e.target;if(i.type!==6||!i.detail.injectedText||i.detail.injectedText.options.attachedData!==Ckt||!i.range)return;const n=this._editor.getContribution(I_.ID);if(n&&!n.isColorPickerVisible()){const a=new ot(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(a,1,0,!1)}}}HKe.ID="editor.contrib.colorContribution";fl(HKe.ID,HKe,2);oO.register(EKe);const Jae=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let r;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?r=crypto.getRandomValues.bind(crypto):r=function(n){for(let a=0;amFt(this,void 0,void 0,function*(){return r}),asFile:()=>{},value:typeof r=="string"?r:void 0}}function RBi(r,e,i){return{id:Jae(),asString:()=>mFt(this,void 0,void 0,function*(){return""}),asFile:()=>({name:r,uri:e,data:i}),value:void 0}}class pFt{constructor(){this._entries=new Map}get size(){return this._entries.size}has(e){return this._entries.has(this.toKey(e))}get(e){var i;return(i=this._entries.get(this.toKey(e)))===null||i===void 0?void 0:i[0]}append(e,i){const n=this._entries.get(e);n?n.push(i):this._entries.set(this.toKey(e),[i])}replace(e,i){this._entries.set(this.toKey(e),[i])}delete(e){this._entries.delete(this.toKey(e))}*entries(){for(const[e,i]of this._entries.entries())for(const n of i)yield[e,n]}values(){return Array.from(this._entries.values()).flat()}forEach(e){for(const[i,n]of this.entries())e(n,i)}toKey(e){return e.toLowerCase()}}const $ve=Object.freeze({create:r=>RL(r.map(e=>e.toString())).join(`\r `),split:r=>r.split(`\r `),parse:r=>$ve.split(r).filter(e=>!e.startsWith("#"))}),Sxe={EDITORS:"CodeEditors",FILES:"CodeFiles"};function OBi(r){var e;const i=[];if(r.dataTransfer&&r.dataTransfer.types.length>0){const o=r.dataTransfer.getData(Sxe.EDITORS);if(o)try{i.push(...H5e(o))}catch{}else try{const g=r.dataTransfer.getData(Sae.RESOURCES);i.push(...jBi(g))}catch{}if(!((e=r.dataTransfer)===null||e===void 0)&&e.files)for(let g=0;g0){const{selection:a,uri:o}=Nbt(to.parse(n));e.push({resource:o,options:{selection:a}})}}return e}class VBi{constructor(){this._contributions=new Map}getAll(){return this._contributions.values()}}const gFt={DragAndDropContribution:"workbench.contributions.dragAndDrop"};G1.add(gFt.DragAndDropContribution,new VBi);var HBi=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};function KKe(r){const e=new pFt;for(const i of r.items){const n=i.type;if(i.kind==="string"){const a=new Promise(o=>i.getAsString(o));e.append(n,nUe(a))}else if(i.kind==="file"){const a=i.getAsFile();a&&e.append(n,KBi(a))}}return e}function KBi(r){const e=r.path?to.parse(r.path):void 0;return RBi(r.name,e,()=>HBi(this,void 0,void 0,function*(){return new Uint8Array(yield r.arrayBuffer())}))}const WBi=Object.freeze([Sxe.EDITORS,Sxe.FILES,Sae.RESOURCES]);function GBi(r,e,i=!1){var n;if(e.dataTransfer&&(i||!r.has(I3.uriList))){const a=OBi(e).filter(o=>o.resource).map(o=>o.resource.toString());for(const o of(n=e.dataTransfer)===null||n===void 0?void 0:n.items){const c=o.getAsFile();c&&a.push(c.path?to.file(c.path).toString():c.name)}a.length&&r.replace(I3.uriList,nUe($ve.create(a)))}for(const a of WBi)r.delete(a)}var JBi=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Wie=function(r,e){return function(i,n){e(i,n,r)}},x3e=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};const nOe="application/vnd.code.copyMetadata";let Sre=class extends sn{constructor(e,i,n,a,o,c){super(),this._bulkEditService=i,this._clipboardService=n,this._configurationService=a,this._languageFeaturesService=o,this._progressService=c,this._editor=e;const h=e.getContainerDomNode();this._register(Vn(h,"copy",g=>this.handleCopy(g))),this._register(Vn(h,"cut",g=>this.handleCopy(g))),this._register(Vn(h,"paste",g=>this.handlePaste(g),!0))}arePasteActionsEnabled(e){return this._configurationService.getValue("editor.experimental.pasteActions.enabled",{resource:e.uri})?!0:e.uri.scheme===Js.vscodeNotebookCell}handleCopy(e){var i;if(!e.clipboardData||!this._editor.hasTextFocus())return;const n=this._editor.getModel(),a=this._editor.getSelections();if(!n||!(a!=null&&a.length)||!this.arePasteActionsEnabled(n))return;const o=[...a],c=a[0],h=c.isEmpty();if(h){if(!this._editor.getOption(35))return;o[0]=new ot(c.startLineNumber,0,c.startLineNumber,n.getLineLength(c.startLineNumber))}const g=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(S=>!!S.prepareDocumentPaste);if(!g.length){this.setCopyMetadata(e.clipboardData,{wasFromEmptySelection:h});return}const _=KKe(e.clipboardData),x=Jae();this.setCopyMetadata(e.clipboardData,{id:x,wasFromEmptySelection:h});const y=u4(S=>x3e(this,void 0,void 0,function*(){const L=yield Promise.all(g.map(O=>O.prepareDocumentPaste(n,o,_,S)));for(const O of L)O==null||O.forEach((G,ie)=>{_.replace(ie,G)});return _}));(i=this._currentClipboardItem)===null||i===void 0||i.dataTransferPromise.cancel(),this._currentClipboardItem={handle:x,dataTransferPromise:y}}setCopyMetadata(e,i){e.setData(nOe,JSON.stringify(i))}handlePaste(e){var i,n,a,o;return x3e(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;const c=this._editor.getSelections();if(!(c!=null&&c.length)||!this._editor.hasModel())return;const h=this._editor.getModel();if(!this.arePasteActionsEnabled(h))return;let g;const _=(i=e.clipboardData)===null||i===void 0?void 0:i.getData(nOe);_&&typeof _=="string"&&(g=JSON.parse(_));const x=this._languageFeaturesService.documentPasteEditProvider.ordered(h);if(!x.length)return;e.preventDefault(),e.stopImmediatePropagation();const y=new DR(this._editor,3);try{const S=KKe(e.clipboardData);if(g!=null&&g.id&&((n=this._currentClipboardItem)===null||n===void 0?void 0:n.handle)===g.id){const O=yield this._currentClipboardItem.dataTransferPromise;if(y.token.isCancellationRequested)return;O.forEach((G,ie)=>{S.replace(ie,G)})}if(!S.has(I3.uriList)){const O=yield this._clipboardService.readResources();if(y.token.isCancellationRequested)return;O.length&&S.append(I3.uriList,nUe($ve.create(O)))}S.delete(nOe);const L=yield this._progressService.withProgress({location:15,delay:750,title:V("pasteProgressTitle","Running paste handlers..."),cancellable:!0},()=>this.getProviderPasteEdit(x,S,h,c,y.token),()=>y.cancel());if(y.token.isCancellationRequested)return;if(L){const O=typeof L.insertText=="string"?QL.escape(L.insertText):L.insertText.snippet,G={edits:[new $S(h.uri,{range:Ea.liftSelection(this._editor.getSelection()),text:O,insertAsSnippet:!0}),...(o=(a=L.additionalEdit)===null||a===void 0?void 0:a.edits)!==null&&o!==void 0?o:[]]};yield this._bulkEditService.apply(G,{editor:this._editor});return}yield this.applyDefaultPasteHandler(S,g,y.token)}finally{y.dispose()}})}getProviderPasteEdit(e,i,n,a,o){return z6e(x3e(this,void 0,void 0,function*(){for(const c of e){if(o.isCancellationRequested)return;if(!$Bi(c,i))continue;const h=yield c.provideDocumentPasteEdits(n,a,i,o);if(h)return h}}),o)}applyDefaultPasteHandler(e,i,n){var a;return x3e(this,void 0,void 0,function*(){const o=(a=e.get(I3.text))!==null&&a!==void 0?a:e.get("text");if(!o)return;const c=yield o.asString();n.isCancellationRequested||this._editor.trigger("keyboard","paste",{text:c,pasteOnNewLine:i==null?void 0:i.wasFromEmptySelection,multicursorText:null})})}};Sre.ID="editor.contrib.copyPasteActionController";Sre=JBi([Wie(1,Tae),Wie(2,d8),Wie(3,hl),Wie(4,ma),Wie(5,n$e)],Sre);function $Bi(r,e){return r.pasteMimeTypes.some(i=>i.toLowerCase()===Sae.FILES.toLowerCase()?[...e.values()].some(n=>n.asFile()):e.has(i))}fl(Sre.ID,Sre,0);G1.as(jA.Configuration).registerConfiguration(Object.assign(Object.assign({},o$e),{properties:{"editor.experimental.pasteActions.enabled":{type:"boolean",scope:5,description:V("pasteActions","Enable/disable running edits from extensions on paste."),default:!1}}}));class sL{constructor(e,i,n){this.languageConfigurationService=n,this._selection=e,this._insertSpace=i,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,i,n){if(n<0)return!1;const a=i.length,o=e.length;if(n+a>o)return!1;for(let c=0;c=65&&h<=90&&h+32===g)&&!(g>=65&&g<=90&&g+32===h))return!1}return!0}_createOperationsForBlockComment(e,i,n,a,o,c){const h=e.startLineNumber,g=e.startColumn,_=e.endLineNumber,x=e.endColumn,y=o.getLineContent(h),S=o.getLineContent(_);let L=y.lastIndexOf(i,g-1+i.length),O=S.indexOf(n,x-1-n.length);if(L!==-1&&O!==-1)if(h===_)y.substring(L+i.length,O).indexOf(n)>=0&&(L=-1,O=-1);else{const ie=y.substring(L+i.length),ue=S.substring(0,O);(ie.indexOf(n)>=0||ue.indexOf(n)>=0)&&(L=-1,O=-1)}let G;L!==-1&&O!==-1?(a&&L+i.length0&&S.charCodeAt(O-1)===32&&(n=" "+n,O-=1),G=sL._createRemoveBlockCommentOperations(new ot(h,L+i.length+1,_,O+1),i,n)):(G=sL._createAddBlockCommentOperations(e,i,n,this._insertSpace),this._usedEndToken=G.length===1?n:null);for(const ie of G)c.addTrackedEditOperation(ie.range,ie.text)}static _createRemoveBlockCommentOperations(e,i,n){const a=[];return ot.isEmpty(e)?a.push(F1.delete(new ot(e.startLineNumber,e.startColumn-i.length,e.endLineNumber,e.endColumn+n.length))):(a.push(F1.delete(new ot(e.startLineNumber,e.startColumn-i.length,e.startLineNumber,e.startColumn))),a.push(F1.delete(new ot(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+n.length)))),a}static _createAddBlockCommentOperations(e,i,n,a){const o=[];return ot.isEmpty(e)?o.push(F1.replace(new ot(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),i+" "+n)):(o.push(F1.insert(new Vi(e.startLineNumber,e.startColumn),i+(a?" ":""))),o.push(F1.insert(new Vi(e.endLineNumber,e.endColumn),(a?" ":"")+n))),o}getEditOperations(e,i){const n=this._selection.startLineNumber,a=this._selection.startColumn;e.tokenization.tokenizeIfCheap(n);const o=e.getLanguageIdAtPosition(n,a),c=this.languageConfigurationService.getLanguageConfiguration(o).comments;!c||!c.blockCommentStartToken||!c.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,c.blockCommentStartToken,c.blockCommentEndToken,this._insertSpace,e,i)}computeCursorState(e,i){const n=i.getInverseEditOperations();if(n.length===2){const a=n[0],o=n[1];return new Ea(a.range.endLineNumber,a.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{const a=n[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ea(a.endLineNumber,a.endColumn+o,a.endLineNumber,a.endColumn+o)}}}class ES{constructor(e,i,n,a,o,c,h){this.languageConfigurationService=e,this._selection=i,this._tabSize=n,this._type=a,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=c,this._ignoreFirstLine=h||!1}static _gatherPreflightCommentStrings(e,i,n,a){e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,1),c=a.getLanguageConfiguration(o).comments,h=c?c.lineCommentToken:null;if(!h)return null;const g=[];for(let _=0,x=n-i+1;_o?i[g].commentStrOffset=c-1:i[g].commentStrOffset=c}}}class uUe extends Vr{constructor(e,i){super(i),this._type=e}run(e,i){const n=e.get(B1);if(!i.hasModel())return;const a=i.getModel(),o=[],c=a.getOptions(),h=i.getOption(21),g=i.getSelections().map((x,y)=>({selection:x,index:y,ignoreFirstLine:!1}));g.sort((x,y)=>ot.compareRangesUsingStarts(x.selection,y.selection));let _=g[0];for(let x=1;x=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},tI=function(r,e){return function(i,n){e(i,n,r)}};let s$=class EFt{static get(e){return e.getContribution(EFt.ID)}constructor(e,i,n,a,o,c,h,g){this._contextMenuService=i,this._contextViewService=n,this._contextKeyService=a,this._keybindingService=o,this._menuService=c,this._configurationService=h,this._workspaceContextService=g,this._toDispose=new du,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(_=>this._onContextMenu(_))),this._toDispose.add(this._editor.onMouseWheel(_=>{if(this._contextMenuIsBeingShownCount>0){const x=this._contextViewService.getContextViewElement(),y=_.srcElement;y.shadowRoot&&dR(x)===y.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(_=>{this._editor.getOption(22)&&_.keyCode===58&&(_.preventDefault(),_.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(22)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu({x:e.event.posx-1,width:2,y:e.event.posy-1,height:2});if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let n=!1;for(const a of this._editor.getSelections())if(a.containsPosition(e.target.position)){n=!0;break}n||this._editor.setPosition(e.target.position)}let i=null;e.target.type!==1&&(i={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(i)}showContextMenu(e){if(!this._editor.getOption(22)||!this._editor.hasModel())return;const i=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?Ht.SimpleEditorContext:Ht.EditorContext);i.length>0&&this._doShowContextMenu(i,e)}_getMenuActions(e,i){const n=[],a=this._menuService.createMenu(i,this._contextKeyService),o=a.getActions({arg:e.uri});a.dispose();for(const c of o){const[,h]=c;let g=0;for(const _ of h)if(_ instanceof jue){const x=this._getMenuActions(e,_.item.submenu);x.length>0&&(n.push(new VJ(_.id,_.label,x)),g++)}else n.push(_),g++;g&&n.push(new P4)}return n.length&&n.pop(),n}_doShowContextMenu(e,i=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!i){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const o=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),c=N4(this._editor.getDomNode()),h=c.left+o.left,g=c.top+o.top+o.height;i={x:h,y:g}}const a=this._editor.getOption(122)&&!kA;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:a?this._editor.getDomNode():void 0,getAnchor:()=>i,getActions:()=>e,getActionViewItem:o=>{const c=this._keybindingFor(o);if(c)return new are(o,o,{label:!0,keybinding:c.getLabel(),isMenu:!0});const h=o;return typeof h.getActionViewItem=="function"?h.getActionViewItem():new are(o,o,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:o=>this._keybindingFor(o),onHide:o=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||myi(this._workspaceContextService.getWorkspace()))return;const i=this._editor.getOption(70);let n=0;const a=_=>({id:`menu-action-${++n}`,label:_.label,tooltip:"",class:void 0,enabled:typeof _.enabled>"u"?!0:_.enabled,checked:_.checked,run:_.run}),o=(_,x)=>new VJ(`menu-action-${++n}`,_,x,void 0),c=(_,x,y,S,L)=>{if(!x)return a({label:_,enabled:x,run:()=>{}});const O=ie=>()=>{this._configurationService.updateValue(y,ie)},G=[];for(const ie of L)G.push(a({label:ie.label,checked:S===ie.value,run:O(ie.value)}));return o(_,G)},h=[];h.push(a({label:V("context.minimap.minimap","Minimap"),checked:i.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!i.enabled)}})),h.push(new P4),h.push(a({label:V("context.minimap.renderCharacters","Render Characters"),enabled:i.enabled,checked:i.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!i.renderCharacters)}})),h.push(c(V("context.minimap.size","Vertical size"),i.enabled,"editor.minimap.size",i.size,[{label:V("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:V("context.minimap.size.fill","Fill"),value:"fill"},{label:V("context.minimap.size.fit","Fit"),value:"fit"}])),h.push(c(V("context.minimap.slider","Slider"),i.enabled,"editor.minimap.showSlider",i.showSlider,[{label:V("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:V("context.minimap.slider.always","Always"),value:"always"}]));const g=this._editor.getOption(122)&&!kA;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:g?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>h,onHide:_=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};s$.ID="editor.contrib.contextmenu";s$=QBi([tI(1,Py),tI(2,h8),tI(3,Wo),tI(4,J1),tI(5,HA),tI(6,hl),tI(7,YJ)],s$);class XBi extends Vr{constructor(){super({id:"editor.action.showContextMenu",label:V("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:Rt.textInputFocus,primary:1092,weight:100}})}run(e,i){var n;(n=s$.get(i))===null||n===void 0||n.showContextMenu()}}fl(s$.ID,s$,2);Cu(XBi);class uOe{constructor(e){this.selections=e}equals(e){const i=this.selections.length,n=e.selections.length;if(i!==n)return!1;for(let a=0;a{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(i=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(i=>{if(this._isCursorUndoRedo||!i.oldSelections||i.oldModelVersionId!==i.modelVersionId)return;const n=new uOe(i.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(n)||(this._undoStack.push(new rOe(n,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new rOe(new uOe(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new rOe(new uOe(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}BR.ID="editor.contrib.cursorUndoRedoController";class ewi extends Vr{constructor(){super({id:"cursorUndo",label:V("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:Rt.textInputFocus,primary:2099,weight:100}})}run(e,i,n){var a;(a=BR.get(i))===null||a===void 0||a.cursorUndo()}}class twi extends Vr{constructor(){super({id:"cursorRedo",label:V("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,i,n){var a;(a=BR.get(i))===null||a===void 0||a.cursorRedo()}}fl(BR.ID,BR,0);Cu(ewi);Cu(twi);class iwi{constructor(e,i,n){this.selection=e,this.targetPosition=i,this.copy=n,this.targetSelection=null}getEditOperations(e,i){const n=e.getValueInRange(this.selection);if(this.copy||i.addEditOperation(this.selection,null),i.addEditOperation(new ot(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),n),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new Ea(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new Ea(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumberthis._onEditorMouseDown(i))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._register(this._editor.onMouseDrag(i=>this._onEditorMouseDrag(i))),this._register(this._editor.onMouseDrop(i=>this._onEditorMouseDrop(i))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(i=>this.onEditorKeyDown(i))),this._register(this._editor.onKeyUp(i=>this.onEditorKeyUp(i))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(33)||this._editor.getOption(20)||(nG(e)&&(this._modifierPressed=!0),this._mouseDown&&nG(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(33)||this._editor.getOption(20)||(nG(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===qS.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const i=e.target;if(this._dragSelection===null){const a=(this._editor.getSelections()||[]).filter(o=>i.position&&o.containsPosition(i.position));if(a.length===1)this._dragSelection=a[0];else return}nG(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),i.position&&(this._dragSelection.containsPosition(i.position)?this._removeDecoration():this.showAt(i.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const i=new Vi(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let n=null;if(e.event.shiftKey){const a=this._editor.getSelection();if(a){const{selectionStartLineNumber:o,selectionStartColumn:c}=a;n=[new Ea(o,c,i.lineNumber,i.column)]}}else n=(this._editor.getSelections()||[]).map(a=>a.containsPosition(i)?new Ea(i.lineNumber,i.column,i.lineNumber,i.column):a);this._editor.setSelections(n||[],"mouse",3)}else(!this._dragSelection.containsPosition(i)||(nG(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(i)||this._dragSelection.getStartPosition().equals(i)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(qS.ID,new iwi(this._dragSelection,i,nG(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new ot(e.lineNumber,e.column,e.lineNumber,e.column),options:qS._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}qS.ID="editor.contrib.dragAndDrop";qS.TRIGGER_KEY_VALUE=c0?6:5;qS._DECORATION_OPTIONS=As.register({description:"dnd-target",className:"dnd-target"});fl(qS.ID,qS,2);var _Ft=function(r,e,i,n){var a=arguments.length,o=a<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,i):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,i,n);else for(var h=r.length-1;h>=0;h--)(c=r[h])&&(o=(a<3?c(o):a>3?c(e,i,o):c(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o},Fne=function(r,e){return function(i,n){e(i,n,r)}},kDe=function(r,e,i,n){function a(o){return o instanceof i?o:new i(function(c){c(o)})}return new(i||(i=Promise))(function(o,c){function h(x){try{_(n.next(x))}catch(y){c(y)}}function g(x){try{_(n.throw(x))}catch(y){c(y)}}function _(x){x.done?o(x.value):a(x.value).then(h,g)}_((n=n.apply(r,e||[])).next())})};let Bre=class extends sn{constructor(e,i,n,a,o){super(),this._bulkEditService=i,this._languageFeaturesService=n,this._progressService=a,this._register(e.onDropIntoEditor(c=>this.onDropIntoEditor(e,c.position,c.event))),this._languageFeaturesService.documentOnDropEditProvider.register("*",new WKe(o))}onDropIntoEditor(e,i,n){var a,o;return kDe(this,void 0,void 0,function*(){if(!n.dataTransfer||!e.hasModel())return;const c=e.getModel(),h=c.getVersionId(),g=yield this.extractDataTransferData(n);if(g.size===0||e.getModel().getVersionId()!==h)return;const _=new DR(e,1);try{const x=this._languageFeaturesService.documentOnDropEditProvider.ordered(c),y=yield this._progressService.withProgress({location:15,delay:750,title:V("dropProgressTitle","Running drop handlers..."),cancellable:!0},()=>z6e(kDe(this,void 0,void 0,function*(){for(const S of x){const L=yield S.provideDocumentOnDropEdits(c,i,g,_.token);if(_.token.isCancellationRequested)return;if(L)return L}}),_.token),()=>{_.cancel()});if(_.token.isCancellationRequested||e.getModel().getVersionId()!==h)return;if(y){const S=typeof y.insertText=="string"?QL.escape(y.insertText):y.insertText.snippet,L={edits:[new $S(c.uri,{range:new ot(i.lineNumber,i.column,i.lineNumber,i.column),text:S,insertAsSnippet:!0}),...(o=(a=y.additionalEdit)===null||a===void 0?void 0:a.edits)!==null&&o!==void 0?o:[]]};e.focus(),yield this._bulkEditService.apply(L,{editor:e});return}}finally{_.dispose()}})}extractDataTransferData(e){return kDe(this,void 0,void 0,function*(){if(!e.dataTransfer)return new pFt;const i=KKe(e.dataTransfer);return GBi(i,e),i})}};Bre.ID="editor.contrib.dropIntoEditorController";Bre=_Ft([Fne(1,Tae),Fne(2,ma),Fne(3,n$e),Fne(4,YJ)],Bre);let WKe=class{constructor(e){this._workspaceContextService=e}provideDocumentOnDropEdits(e,i,n,a){var o;return kDe(this,void 0,void 0,function*(){const c=n.get(I3.uriList);if(c){const g=yield c.asString(),_=this.getUriListInsertText(g);if(_)return{insertText:_}}const h=(o=n.get("text"))!==null&&o!==void 0?o:n.get(I3.text);if(h)return{insertText:yield h.asString()}})}getUriListInsertText(e){const i=[];for(const n of $ve.parse(e))try{i.push(to.parse(n))}catch{}if(i.length)return i.map(n=>{const a=this._workspaceContextService.getWorkspaceFolder(n);if(a){const o=a6i(a.uri,n);if(o)return o}return n.fsPath}).join(" ")}};WKe=_Ft([Fne(0,YJ)],WKe);fl(Bre.ID,Bre,2);class PE{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(i=>this._editor.getModel().getDecorationRange(i)).filter(i=>!!i);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const i=this._decorations.indexOf(e);return i>=0?i+1:1}getDecorationRangeAt(e){const i=e{if(this._highlightedDecorationId!==null&&(a.changeDecorationOptions(this._highlightedDecorationId,PE._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),i!==null&&(this._highlightedDecorationId=i,a.changeDecorationOptions(this._highlightedDecorationId,PE._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(a.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),i!==null){let o=this._editor.getModel().getDecorationRange(i);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){const c=o.endLineNumber-1,h=this._editor.getModel().getLineMaxColumn(c);o=new ot(o.startLineNumber,o.startColumn,c,h)}this._rangeHighlightDecorationId=a.addDecoration(o,PE._RANGE_HIGHLIGHT_DECORATION)}}),n}set(e,i){this._editor.changeDecorations(n=>{let a=PE._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){a=PE._FIND_MATCH_NO_OVERVIEW_DECORATION;const h=this._editor.getModel().getLineCount(),_=this._editor.getLayoutInfo().height/h,x=Math.max(2,Math.ceil(3/_));let y=e[0].range.startLineNumber,S=e[0].range.endLineNumber;for(let L=1,O=e.length;L=G.startLineNumber?G.endLineNumber>S&&(S=G.endLineNumber):(o.push({range:new ot(y,1,S,1),options:PE._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),y=G.startLineNumber,S=G.endLineNumber)}o.push({range:new ot(y,1,S,1),options:PE._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const c=new Array(e.length);for(let h=0,g=e.length;hn.removeDecoration(h)),this._findScopeDecorationIds=[]),i!=null&&i.length&&(this._findScopeDecorationIds=i.map(h=>n.addDecoration(h,PE._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let i=this._decorations.length-1;i>=0;i--){const n=this._decorations[i],a=this._editor.getModel().getDecorationRange(n);if(!(!a||a.endLineNumber>e.lineNumber)){if(a.endLineNumbere.column))return a}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let i=0,n=this._decorations.length;ie.lineNumber)return o;if(!(o.startColumn0){const n=[];for(let c=0;cot.compareRangesUsingStarts(c.range,h.range));const a=[];let o=n[0];for(let c=1;c0?e[0].toUpperCase()+e.substr(1):r[0][0].toUpperCase()!==r[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function JDt(r,e,i){return r[0].indexOf(i)!==-1&&e.indexOf(i)!==-1&&r[0].split(i).length===e.split(i).length}function $Dt(r,e,i){const n=e.split(i),a=r[0].split(i);let o="";return n.forEach((c,h)=>{o+=DFt([a[h]],c)+i}),o.slice(0,-1)}class UDt{constructor(e){this.staticValue=e,this.kind=0}}class uwi{constructor(e){this.pieces=e,this.kind=1}}class l${static fromStaticValue(e){return new l$([nR.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new UDt(""):e.length===1&&e[0].staticValue!==null?this._state=new UDt(e[0].staticValue):this._state=new uwi(e)}buildReplaceString(e,i){if(this._state.kind===0)return i?DFt(e,this._state.staticValue):this._state.staticValue;let n="";for(let a=0,o=this._state.pieces.length;a0){const g=[],_=c.caseOps.length;let x=0;for(let y=0,S=h.length;y=_){g.push(h.slice(y));break}switch(c.caseOps[x]){case"U":g.push(h[y].toUpperCase());break;case"u":g.push(h[y].toUpperCase()),x++;break;case"L":g.push(h[y].toLowerCase());break;case"l":g.push(h[y].toLowerCase()),x++;break;default:g.push(h[y])}}h=g.join("")}n+=h}return n}static _substitute(e,i){if(i===null)return"";if(e===0)return i[0];let n="";for(;e>0;){if(e=a)break;const c=r.charCodeAt(n);switch(c){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic(` @@ -7139,10 +7139,10 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)}fun return { text: line.content || "-"} }`})},_e=()=>{a.value=e.layout.columns.filter(vn=>!vn.hidden)},ye=()=>{Le({name:"raw",id:"new",width:500,handlerTsCode:`(line: Message): CellHandler => { return { text: line.content || "-"} -}`})},Le=vn=>{vn.id==="new"?e.layout.add(vn):e.layout.update(vn),_I.update("main",e.layout),rt()},lt=vn=>{e.layout=vn,_I.update("main",e.layout),rt()},$e=vn=>{e.layout.removeColumn(vn),_I.update("main",e.layout),rt()},Ye=vn=>{e.layout.settings=vn,e.layout.processMiddlewareHandlers(),_I.update("main",e.layout),rt()},rt=()=>{e.rows=[],e.clearRowIds(),console.log(e.rowsIds),e.facets={},_e(),ue()},Ft=()=>{const Wn=(window.location.protocol==="https"?"wss":"ws")+"://"+window.location.host+window.location.pathname+"ws";console.log("Connecting to WS",Wn);const Yr=new WebSocket(Wn+"?password="+e.getPassword());e.status="not connected";var Mu=!1;Yr.onopen=()=>{Mu=!0,e.status="connected",rt()},Yr.onclose=()=>{Yr.CLOSED&&Mu&&(e.status="not connected",Ft())},Yr.onerror=Dn=>{Yr.close(),setTimeout(()=>{console.log("Reconnecting to WS"),Ft()},1e3)},Yr.onmessage=Dn=>{let $s=JSON.parse(Dn.data);switch($s.message_type){case"client_joined":GS.setAuthToken($s.client_id);break;case"client_msg_status":e.receiveCounters||(e.receiveCounters={MessageCount:0,MessagesToTail:0,LastDeliveredIdx:0}),e.receiveCounters.MessageCount=$s.stats.msg_count,e.receiveCounters.MessagesToTail=$s.client.count_to_tail,e.receiveCounters.LastDeliveredIdx=$s.client.last_delivered_id_idx;break;case"log_bulk":let ml=L($s.messages,e.layout.settings);i.changeFilter("unread",ml.length),ml.forEach(Ic=>{var Tl,Mr;$T.add({id:Ic.id,message:Ic},Ic.id),(Tl=Ic.origin)!=null&&Tl.file&&i.changeFilter("origin_file_"+Ic.origin.file,1),(Mr=Ic.origin)!=null&&Mr.port&&i.changeFilter("origin_port_"+Ic.origin.port,1)});break;default:throw console.error($s),new Error("Unrecognized message")}}},Zt=()=>{e.status="connected";const vn=2;Ot(),setInterval(()=>{e.demoStatus!=="stopped"&&ui()},1/vn*1e3)},Ot=()=>{e.layout=vOn(e.demoContent==="json"),e.layout.processMiddlewareHandlers(),e.clearAllRows(),rt()},ui=(vn=1)=>{let Wn=e.demoContent==="json",Yr=Math.random(),Mu={port:"",file:""};for(Yr<.5?(Mu.port="8123",Mu.file="foo.log"):(Mu.port="8999",Mu.file="foo/bar.log");vn--;){let Dn=xOn(Wn);L([{id:new Date().getTime().toString(),content:Wn?JSON.stringify(Dn):Dn,is_json:!0,log_type:0,json_content:Wn?Dn:null,origin:Mu,ts:new Date().getTime()}],e.layout.settings),i.changeFilter("unread",1)}};gL(()=>{var vn;return(vn=e.initSettings)==null?void 0:vn.received},vn=>{var Wn;vn&&((Wn=e.initSettings)!=null&&Wn.analyticsEnabled)&&BOe(!1)});const ei=vn=>{qh().confirm("Are you sure you want to hide the column? You can always restore it in the settings",()=>{vn.hidden=!0,Le(vn)})};E$(async()=>{var vn;e.demoMode?(Zt(),BOe(!0),rt()):await gu(),COn(),(vn=n.value)==null||vn.addEventListener("scroll",()=>{G()?e.stickedToBottom=!0:e.stickedToBottom=!1})});const Uu=()=>{e.modalShow="",Ft(),BOe(!1),re()},gu=async()=>{let vn=await GS.sendGet("status");e.initSettings=vn.json;let Wn=await GS.sendGet("check-pass?password="+e.getPassword());return e.initSettings.authRequired&&Wn.status!==200?e.modalShow="auth":Uu(),!0},Kt=(vn,Wn)=>{e.layout.move(vn,Wn),rt()},Rr=()=>{n.value.scrollTop=n.value.scrollHeight+30},zu=vn=>{e.demoContent=vn,Ot()},Va=yA(()=>e.rows&&e.rows[o.value]&&e.rows[o.value].msg),Ku=()=>{o.value=Math.floor(Math.random()*e.rows.length)};return(vn,Wn)=>{const Yr=c6e("tooltip");return $u(),Pr(pd,null,[Yu(e).modalShow?($u(),Pg($At,{key:0,onClose:Wn[0]||(Wn[0]=Mu=>Yu(e).modalShow="")},{default:zL(()=>[Yu(e).modalShow=="auth"?($u(),Pg(CRi,{key:0,onSuccess:Uu})):Bl("",!0),Yu(e).modalShow=="import"?($u(),Pg($Ri,{key:1,layout:Yu(e).layout,onLayoutLoaded:lt},null,8,["layout"])):Bl("",!0),Yu(e).modalShow=="export-logs"?($u(),Pg(WWi,{key:2,rows:Yu(e).rows,"visible-rows":Yu(e).displayRows,layout:Yu(e).layout},null,8,["rows","visible-rows","layout"])):Bl("",!0),Yu(e).modalShow=="load-logs"?($u(),Pg(YKi,{key:3})):Bl("",!0),Yu(e).modalShow=="feedback"?($u(),Pg(RRi,{key:4})):Bl("",!0)]),_:1})):Bl("",!0),dl(TRi),Yu(e).settingsDrawer?($u(),Pg(PIi,{key:1,onClose:Wn[1]||(Wn[1]=Mu=>Yu(e).settingsDrawer=!1),layout:Yu(e).layout,onEdit:Le,onRemove:$e,onMove:Kt,onSettingsUpdate:Ye,onUpdateSampleLine:Ku,sampleLine:Va.value},null,8,["layout","sampleLine"])):Bl("",!0),Yu(e).demoMode?($u(),Pg(BRi,{key:2,onStart:Wn[2]||(Wn[2]=Mu=>Yu(e).demoStatus="started"),onStop:Wn[3]||(Wn[3]=Mu=>Yu(e).demoStatus="stopped"),onMode:zu,onAdd:Wn[4]||(Wn[4]=Mu=>ui(100))})):Bl("",!0),Ci("div",{class:mf({demo:Yu(e).demoMode})},[Ci("div",Sjn,[Ci("div",Bjn,[wjn,Ci("div",Tjn,[Ljn,dl(yWi,{style:{}})]),Ci("div",{class:"docs link-style",onClick:Wn[5]||(Wn[5]=Mu=>Yu(e).modalShow="feedback"),style:{cursor:"pointer"}},[a0(" Leave feedback "),dl(EWi)])]),Ci("div",Njn,[r1(Ci("input",{type:"text",class:"searchbar","onUpdate:modelValue":Wn[6]||(Wn[6]=Mu=>Yu(e).searchbar=Mu),placeholder:"Search logs..."},null,512),[[aA,Yu(e).searchbar]])]),Ci("div",Pjn,[dl(Ajn)])]),Ci("div",{class:"layout",onMouseup:Wn[14]||(Wn[14]=(...Mu)=>Yu(Xpt)&&Yu(Xpt)(...Mu))},[Ci("div",Mjn,[Ci("div",{class:mf(["left-col",{empty:g.value}]),style:P3({width:Yu(e).layout.settings.leftColWidth+"px"})},[Ci("div",zjn,[g.value?Bl("",!0):($u(),Pg(uWi,{key:0,style:{height:"25px",width:"25px"},onClick:_})),g.value?($u(),Pg(dWi,{key:1,style:{height:"25px",width:"25px"},onClick:_})):Bl("",!0)]),g.value?Bl("",!0):($u(),Pr(pd,{key:0},[Ci("div",Ijn,[Ci("span",null,Ed(Yu(e).displayRows.length)+" out of "+Ed(Yu(e).rows.length)+" logs",1),Rjn,Ci("button",{class:"btn-sm",style:{"margin-top":"4px"},onClick:Wn[7]||(Wn[7]=Mu=>Yu(e).modalShow="export-logs")},"Export messages"),Ci("button",{class:"btn-sm",style:{"margin-top":"4px"},onClick:Wn[8]||(Wn[8]=Mu=>Yu(e).resetAllFiltersAndFacets())},"Reset all filters"),Yu(e).correlationFilter?($u(),Pr("div",Ojn,[a0(" Correlation filter active ("+Ed(Yu(e).correlationFilter)+") ",1),jjn,a0(" Change resolution: "),Ci("button",{class:"btn-sm",onClick:Wn[9]||(Wn[9]=Mu=>h(1))},"-"),Ci("button",{class:"btn-sm",onClick:Wn[10]||(Wn[10]=Mu=>h(-1))},"+"),Vjn,Ci("button",{class:"btn-sm",style:{"margin-top":"4px"},onClick:Wn[11]||(Wn[11]=Mu=>Yu(e).resetCorrelationFilter())},"Reset correlation filter")])):Bl("",!0)]),dl(sRi),dl(UIi,{facets:Yu(e).facets},null,8,["facets"])],64))],6)]),Ci("div",null,[Ci("div",{class:mf(["mid-col",{freeze:g.value}]),onMousedown:Wn[12]||(Wn[12]=(...Mu)=>Yu(Ypt)&&Yu(Ypt)(...Mu))},null,34)]),Ci("div",{class:"right-col",ref_key:"table",ref:n},[a.value.length===0?($u(),Pr("div",Hjn,[Yu(qh)().status=="not connected"?($u(),Pr("div",Kjn,[a0("Status: "),Wjn])):($u(),Pr(pd,{key:1},[a0(" No columns defined, open "),Ci("span",{class:"clickable",onClick:Wn[13]||(Wn[13]=Mu=>Yu(e).settingsDrawer=!0)},"Settings"),a0(" and add columns"),Gjn,a0(" or "),Ci("span",{class:"clickable",onClick:ye},"add column with raw content now"),a0(". ")],64))])):($u(),Pr(pd,{key:1},[Ci("div",{class:mf(["btn stick",{sticked:Yu(e).stickedToBottom}]),onClick:Rr},[Yu(e).stickedToBottom?($u(),Pr(pd,{key:1},[a0("Sticked")],64)):($u(),Pr(pd,{key:0},[a0("Stick to bottom")],64))],2),Ci("table",Jjn,[Ci("tr",null,[$jn,($u(!0),Pr(pd,null,py(a.value,Mu=>($u(),Pr("th",{style:P3({width:Mu.width+"px",cursor:"auto"}),class:"column-name"},[Ci("span",Ujn,Ed(Mu.name),1),Ci("div",{class:"hide-icon",style:{height:"12px",width:"12px",display:"inline",visibility:"hidden",opacity:"0.4",cursor:"pointer","margin-left":"3px"},onClick:Dn=>ei(Mu)},[dl(TWi)],8,qjn),Ci("div",{class:"header-border",onMousedown:Dn=>Yu(Fhi)(Mu.id)},"  ",40,Zjn)],4))),256)),Yu(e).correlationFilter?($u(),Pr("th",Yjn,"Trace ")):Bl("",!0)]),($u(!0),Pr(pd,null,py(Yu(e).displayRows,Mu=>($u(),Pr("tr",{class:mf(["row",{opened:Mu.opened,open:Mu.open}]),onClick:Dn=>Yu(e).openLogDrawer(Mu),style:P3(Mu.msg.style||{})},[Ci("td",null,[Ci("span",{class:mf(["mark",{active:Mu.starred}]),onClick:V1i(Dn=>Yu(e).toggleRowMark(Mu),["stop"])}," ⬤ ",10,Xjn)]),($u(!0),Pr(pd,null,py(a.value,(Dn,$s)=>($u(),Pr("td",{class:"cell",style:P3(Mu.cells[$s].style||{})},[Ci("div",{style:P3({width:a.value[$s].width+"px"})},Ed(Mu.cells[$s].text),5)],4))),256)),Yu(e).correlationFilter?($u(),Pr("td",eVn,[Yu(e).tracesRows[Mu.id]&&Yu(e).tracesRows[Mu.id].id===Mu.id?r1(($u(),Pr("div",{key:0,class:"trace-block",style:P3({width:Yu(e).tracesRows[Mu.id].width/c.value+"px",marginLeft:Yu(e).tracesRows[Mu.id].offset/c.value+"px",...Yu(e).tracesRows[Mu.id].style})},[a0(Ed(Yu(e).tracesRows[Mu.id].label||" "),1)],4)),[[Yr,Yu(e).tracesRows[Mu.id].label||""]]):($u(),Pr(pd,{key:1},[a0("-")],64))])):Bl("",!0)],14,Qjn))),256))])],64))],512),Ci("div",tVn,[dl(tfi,{row:Yu(e).drawer.row,layout:Yu(e).layout,onClose:Yu(e).closeLogDrawer},null,8,["row","layout","onClose"])])],32)],2)],64)}}}),nVn=["top","right","bottom","left"],dxt=["start","end"],hxt=nVn.reduce((r,e)=>r.concat(e,e+"-"+dxt[0],e+"-"+dxt[1]),[]),Xre=Math.min,gI=Math.max,uVn={left:"right",right:"left",bottom:"top",top:"bottom"},rVn={start:"end",end:"start"};function UWe(r,e,i){return gI(r,Xre(e,i))}function dO(r,e){return typeof r=="function"?r(e):r}function RA(r){return r.split("-")[0]}function Cy(r){return r.split("-")[1]}function GBt(r){return r==="x"?"y":"x"}function aqe(r){return r==="y"?"height":"width"}function toe(r){return["top","bottom"].includes(RA(r))?"y":"x"}function oqe(r){return GBt(toe(r))}function JBt(r,e,i){i===void 0&&(i=!1);const n=Cy(r),a=oqe(r),o=aqe(a);let c=a==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(c=Yxe(c)),[c,Yxe(c)]}function aVn(r){const e=Yxe(r);return[Zxe(r),e,Zxe(e)]}function Zxe(r){return r.replace(/start|end/g,e=>rVn[e])}function oVn(r,e,i){const n=["left","right"],a=["right","left"],o=["top","bottom"],c=["bottom","top"];switch(r){case"top":case"bottom":return i?e?a:n:e?n:a;case"left":case"right":return e?o:c;default:return[]}}function sVn(r,e,i,n){const a=Cy(r);let o=oVn(RA(r),i==="start",n);return a&&(o=o.map(c=>c+"-"+a),e&&(o=o.concat(o.map(Zxe)))),o}function Yxe(r){return r.replace(/left|right|bottom|top/g,e=>uVn[e])}function lVn(r){return{top:0,right:0,bottom:0,left:0,...r}}function $Bt(r){return typeof r!="number"?lVn(r):{top:r,right:r,bottom:r,left:r}}function pue(r){return{...r,top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height}}function fxt(r,e,i){let{reference:n,floating:a}=r;const o=toe(e),c=oqe(e),h=aqe(c),g=RA(e),_=o==="y",x=n.x+n.width/2-a.width/2,y=n.y+n.height/2-a.height/2,S=n[h]/2-a[h]/2;let L;switch(g){case"top":L={x,y:n.y-a.height};break;case"bottom":L={x,y:n.y+n.height};break;case"right":L={x:n.x+n.width,y};break;case"left":L={x:n.x-a.width,y};break;default:L={x:n.x,y:n.y}}switch(Cy(e)){case"start":L[c]-=S*(i&&_?-1:1);break;case"end":L[c]+=S*(i&&_?-1:1);break}return L}const cVn=async(r,e,i)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:c}=i,h=o.filter(Boolean),g=await(c.isRTL==null?void 0:c.isRTL(e));let _=await c.getElementRects({reference:r,floating:e,strategy:a}),{x,y}=fxt(_,n,g),S=n,L={},O=0;for(let G=0;G({name:"arrow",options:r,async fn(e){const{x:i,y:n,placement:a,rects:o,platform:c,elements:h,middlewareData:g}=e,{element:_,padding:x=0}=dO(r,e)||{};if(_==null)return{};const y=$Bt(x),S={x:i,y:n},L=oqe(a),O=aqe(L),G=await c.getDimensions(_),ie=L==="y",ue=ie?"top":"left",re=ie?"bottom":"right",_e=ie?"clientHeight":"clientWidth",ye=o.reference[O]+o.reference[L]-S[L]-o.floating[O],Le=S[L]-o.reference[L],lt=await(c.getOffsetParent==null?void 0:c.getOffsetParent(_));let $e=lt?lt[_e]:0;(!$e||!await(c.isElement==null?void 0:c.isElement(lt)))&&($e=h.floating[_e]||o.floating[O]);const Ye=ye/2-Le/2,rt=$e/2-G[O]/2-1,Ft=Xre(y[ue],rt),Zt=Xre(y[re],rt),Ot=Ft,ui=$e-G[O]-Zt,ei=$e/2-G[O]/2+Ye,Uu=UWe(Ot,ei,ui),gu=!g.arrow&&Cy(a)!=null&&ei!==Uu&&o.reference[O]/2-(eiCy(a)===r),...i.filter(a=>Cy(a)!==r)]:i.filter(a=>RA(a)===a)).filter(a=>r?Cy(a)===r||(e?Zxe(a)!==a:!1):!0)}const fVn=function(r){return r===void 0&&(r={}),{name:"autoPlacement",options:r,async fn(e){var i,n,a;const{rects:o,middlewareData:c,placement:h,platform:g,elements:_}=e,{crossAxis:x=!1,alignment:y,allowedPlacements:S=hxt,autoAlignment:L=!0,...O}=dO(r,e),G=y!==void 0||S===hxt?hVn(y||null,L,S):S,ie=await OCe(e,O),ue=((i=c.autoPlacement)==null?void 0:i.index)||0,re=G[ue];if(re==null)return{};const _e=JBt(re,o,await(g.isRTL==null?void 0:g.isRTL(_.floating)));if(h!==re)return{reset:{placement:G[0]}};const ye=[ie[RA(re)],ie[_e[0]],ie[_e[1]]],Le=[...((n=c.autoPlacement)==null?void 0:n.overflows)||[],{placement:re,overflows:ye}],lt=G[ue+1];if(lt)return{data:{index:ue+1,overflows:Le},reset:{placement:lt}};const $e=Le.map(Ft=>{const Zt=Cy(Ft.placement);return[Ft.placement,Zt&&x?Ft.overflows.slice(0,2).reduce((Ot,ui)=>Ot+ui,0):Ft.overflows[0],Ft.overflows]}).sort((Ft,Zt)=>Ft[1]-Zt[1]),rt=((a=$e.filter(Ft=>Ft[2].slice(0,Cy(Ft[0])?2:3).every(Zt=>Zt<=0))[0])==null?void 0:a[0])||$e[0][0];return rt!==h?{data:{index:ue+1,overflows:Le},reset:{placement:rt}}:{}}}},mVn=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var i,n;const{placement:a,middlewareData:o,rects:c,initialPlacement:h,platform:g,elements:_}=e,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:S,fallbackStrategy:L="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:G=!0,...ie}=dO(r,e);if((i=o.arrow)!=null&&i.alignmentOffset)return{};const ue=RA(a),re=RA(h)===h,_e=await(g.isRTL==null?void 0:g.isRTL(_.floating)),ye=S||(re||!G?[Yxe(h)]:aVn(h));!S&&O!=="none"&&ye.push(...sVn(h,G,O,_e));const Le=[h,...ye],lt=await OCe(e,ie),$e=[];let Ye=((n=o.flip)==null?void 0:n.overflows)||[];if(x&&$e.push(lt[ue]),y){const Ot=JBt(a,c,_e);$e.push(lt[Ot[0]],lt[Ot[1]])}if(Ye=[...Ye,{placement:a,overflows:$e}],!$e.every(Ot=>Ot<=0)){var rt,Ft;const Ot=(((rt=o.flip)==null?void 0:rt.index)||0)+1,ui=Le[Ot];if(ui)return{data:{index:Ot,overflows:Ye},reset:{placement:ui}};let ei=(Ft=Ye.filter(Uu=>Uu.overflows[0]<=0).sort((Uu,gu)=>Uu.overflows[1]-gu.overflows[1])[0])==null?void 0:Ft.placement;if(!ei)switch(L){case"bestFit":{var Zt;const Uu=(Zt=Ye.map(gu=>[gu.placement,gu.overflows.filter(Kt=>Kt>0).reduce((Kt,Rr)=>Kt+Rr,0)]).sort((gu,Kt)=>gu[1]-Kt[1])[0])==null?void 0:Zt[0];Uu&&(ei=Uu);break}case"initialPlacement":ei=h;break}if(a!==ei)return{reset:{placement:ei}}}return{}}}};async function pVn(r,e){const{placement:i,platform:n,elements:a}=r,o=await(n.isRTL==null?void 0:n.isRTL(a.floating)),c=RA(i),h=Cy(i),g=toe(i)==="y",_=["left","top"].includes(c)?-1:1,x=o&&g?-1:1,y=dO(e,r);let{mainAxis:S,crossAxis:L,alignmentAxis:O}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return h&&typeof O=="number"&&(L=h==="end"?O*-1:O),g?{x:L*x,y:S*_}:{x:S*_,y:L*x}}const gVn=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var i,n;const{x:a,y:o,placement:c,middlewareData:h}=e,g=await pVn(e,r);return c===((i=h.offset)==null?void 0:i.placement)&&(n=h.arrow)!=null&&n.alignmentOffset?{}:{x:a+g.x,y:o+g.y,data:{...g,placement:c}}}}},EVn=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:i,y:n,placement:a}=e,{mainAxis:o=!0,crossAxis:c=!1,limiter:h={fn:ie=>{let{x:ue,y:re}=ie;return{x:ue,y:re}}},...g}=dO(r,e),_={x:i,y:n},x=await OCe(e,g),y=toe(RA(a)),S=GBt(y);let L=_[S],O=_[y];if(o){const ie=S==="y"?"top":"left",ue=S==="y"?"bottom":"right",re=L+x[ie],_e=L-x[ue];L=UWe(re,L,_e)}if(c){const ie=y==="y"?"top":"left",ue=y==="y"?"bottom":"right",re=O+x[ie],_e=O-x[ue];O=UWe(re,O,_e)}const G=h.fn({...e,[S]:L,[y]:O});return{...G,data:{x:G.x-i,y:G.y-n}}}}},_Vn=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){const{placement:i,rects:n,platform:a,elements:o}=e,{apply:c=()=>{},...h}=dO(r,e),g=await OCe(e,h),_=RA(i),x=Cy(i),y=toe(i)==="y",{width:S,height:L}=n.floating;let O,G;_==="top"||_==="bottom"?(O=_,G=x===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(G=_,O=x==="end"?"top":"bottom");const ie=L-g[O],ue=S-g[G],re=!e.middlewareData.shift;let _e=ie,ye=ue;if(y){const lt=S-g.left-g.right;ye=x||re?Xre(ue,lt):lt}else{const lt=L-g.top-g.bottom;_e=x||re?Xre(ie,lt):lt}if(re&&!x){const lt=gI(g.left,0),$e=gI(g.right,0),Ye=gI(g.top,0),rt=gI(g.bottom,0);y?ye=S-2*(lt!==0||$e!==0?lt+$e:gI(g.left,g.right)):_e=L-2*(Ye!==0||rt!==0?Ye+rt:gI(g.top,g.bottom))}await c({...e,availableWidth:ye,availableHeight:_e});const Le=await a.getDimensions(o.floating);return S!==Le.width||L!==Le.height?{reset:{rects:!0}}:{}}}};function $C(r){var e;return((e=r.ownerDocument)==null?void 0:e.defaultView)||window}function vA(r){return $C(r).getComputedStyle(r)}const mxt=Math.min,gue=Math.max,Qxe=Math.round;function UBt(r){const e=vA(r);let i=parseFloat(e.width),n=parseFloat(e.height);const a=r.offsetWidth,o=r.offsetHeight,c=Qxe(i)!==a||Qxe(n)!==o;return c&&(i=a,n=o),{width:i,height:n,fallback:c}}function nN(r){return ZBt(r)?(r.nodeName||"").toLowerCase():""}let H3e;function qBt(){if(H3e)return H3e;const r=navigator.userAgentData;return r&&Array.isArray(r.brands)?(H3e=r.brands.map(e=>e.brand+"/"+e.version).join(" "),H3e):navigator.userAgent}function CA(r){return r instanceof $C(r).HTMLElement}function LL(r){return r instanceof $C(r).Element}function ZBt(r){return r instanceof $C(r).Node}function pxt(r){return typeof ShadowRoot>"u"?!1:r instanceof $C(r).ShadowRoot||r instanceof ShadowRoot}function jCe(r){const{overflow:e,overflowX:i,overflowY:n,display:a}=vA(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!["inline","contents"].includes(a)}function DVn(r){return["table","td","th"].includes(nN(r))}function qWe(r){const e=/firefox/i.test(qBt()),i=vA(r),n=i.backdropFilter||i.WebkitBackdropFilter;return i.transform!=="none"||i.perspective!=="none"||!!n&&n!=="none"||e&&i.willChange==="filter"||e&&!!i.filter&&i.filter!=="none"||["transform","perspective"].some(a=>i.willChange.includes(a))||["paint","layout","strict","content"].some(a=>{const o=i.contain;return o!=null&&o.includes(a)})}function YBt(){return!/^((?!chrome|android).)*safari/i.test(qBt())}function sqe(r){return["html","body","#document"].includes(nN(r))}function QBt(r){return LL(r)?r:r.contextElement}const XBt={x:1,y:1};function yJ(r){const e=QBt(r);if(!CA(e))return XBt;const i=e.getBoundingClientRect(),{width:n,height:a,fallback:o}=UBt(e);let c=(o?Qxe(i.width):i.width)/n,h=(o?Qxe(i.height):i.height)/a;return c&&Number.isFinite(c)||(c=1),h&&Number.isFinite(h)||(h=1),{x:c,y:h}}function eae(r,e,i,n){var a,o;e===void 0&&(e=!1),i===void 0&&(i=!1);const c=r.getBoundingClientRect(),h=QBt(r);let g=XBt;e&&(n?LL(n)&&(g=yJ(n)):g=yJ(r));const _=h?$C(h):window,x=!YBt()&&i;let y=(c.left+(x&&((a=_.visualViewport)==null?void 0:a.offsetLeft)||0))/g.x,S=(c.top+(x&&((o=_.visualViewport)==null?void 0:o.offsetTop)||0))/g.y,L=c.width/g.x,O=c.height/g.y;if(h){const G=$C(h),ie=n&&LL(n)?$C(n):n;let ue=G.frameElement;for(;ue&&n&&ie!==G;){const re=yJ(ue),_e=ue.getBoundingClientRect(),ye=getComputedStyle(ue);_e.x+=(ue.clientLeft+parseFloat(ye.paddingLeft))*re.x,_e.y+=(ue.clientTop+parseFloat(ye.paddingTop))*re.y,y*=re.x,S*=re.y,L*=re.x,O*=re.y,y+=_e.x,S+=_e.y,ue=$C(ue).frameElement}}return{width:L,height:O,top:S,right:y+L,bottom:S+O,left:y,x:y,y:S}}function NL(r){return((ZBt(r)?r.ownerDocument:r.document)||window.document).documentElement}function VCe(r){return LL(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function ewt(r){return eae(NL(r)).left+VCe(r).scrollLeft}function tae(r){if(nN(r)==="html")return r;const e=r.assignedSlot||r.parentNode||pxt(r)&&r.host||NL(r);return pxt(e)?e.host:e}function twt(r){const e=tae(r);return sqe(e)?e.ownerDocument.body:CA(e)&&jCe(e)?e:twt(e)}function Xxe(r,e){var i;e===void 0&&(e=[]);const n=twt(r),a=n===((i=r.ownerDocument)==null?void 0:i.body),o=$C(n);return a?e.concat(o,o.visualViewport||[],jCe(n)?n:[]):e.concat(n,Xxe(n))}function gxt(r,e,i){return e==="viewport"?pue(function(n,a){const o=$C(n),c=NL(n),h=o.visualViewport;let g=c.clientWidth,_=c.clientHeight,x=0,y=0;if(h){g=h.width,_=h.height;const S=YBt();(S||!S&&a==="fixed")&&(x=h.offsetLeft,y=h.offsetTop)}return{width:g,height:_,x,y}}(r,i)):LL(e)?pue(function(n,a){const o=eae(n,!0,a==="fixed"),c=o.top+n.clientTop,h=o.left+n.clientLeft,g=CA(n)?yJ(n):{x:1,y:1};return{width:n.clientWidth*g.x,height:n.clientHeight*g.y,x:h*g.x,y:c*g.y}}(e,i)):pue(function(n){const a=NL(n),o=VCe(n),c=n.ownerDocument.body,h=gue(a.scrollWidth,a.clientWidth,c.scrollWidth,c.clientWidth),g=gue(a.scrollHeight,a.clientHeight,c.scrollHeight,c.clientHeight);let _=-o.scrollLeft+ewt(n);const x=-o.scrollTop;return vA(c).direction==="rtl"&&(_+=gue(a.clientWidth,c.clientWidth)-h),{width:h,height:g,x:_,y:x}}(NL(r)))}function Ext(r){return CA(r)&&vA(r).position!=="fixed"?r.offsetParent:null}function _xt(r){const e=$C(r);let i=Ext(r);for(;i&&DVn(i)&&vA(i).position==="static";)i=Ext(i);return i&&(nN(i)==="html"||nN(i)==="body"&&vA(i).position==="static"&&!qWe(i))?e:i||function(n){let a=tae(n);for(;CA(a)&&!sqe(a);){if(qWe(a))return a;a=tae(a)}return null}(r)||e}function xVn(r,e,i){const n=CA(e),a=NL(e),o=eae(r,!0,i==="fixed",e);let c={scrollLeft:0,scrollTop:0};const h={x:0,y:0};if(n||!n&&i!=="fixed")if((nN(e)!=="body"||jCe(a))&&(c=VCe(e)),CA(e)){const g=eae(e,!0);h.x=g.x+e.clientLeft,h.y=g.y+e.clientTop}else a&&(h.x=ewt(a));return{x:o.left+c.scrollLeft-h.x,y:o.top+c.scrollTop-h.y,width:o.width,height:o.height}}const vVn={getClippingRect:function(r){let{element:e,boundary:i,rootBoundary:n,strategy:a}=r;const o=i==="clippingAncestors"?function(_,x){const y=x.get(_);if(y)return y;let S=Xxe(_).filter(ie=>LL(ie)&&nN(ie)!=="body"),L=null;const O=vA(_).position==="fixed";let G=O?tae(_):_;for(;LL(G)&&!sqe(G);){const ie=vA(G),ue=qWe(G);(O?ue||L:ue||ie.position!=="static"||!L||!["absolute","fixed"].includes(L.position))?L=ie:S=S.filter(re=>re!==G),G=tae(G)}return x.set(_,S),S}(e,this._c):[].concat(i),c=[...o,n],h=c[0],g=c.reduce((_,x)=>{const y=gxt(e,x,a);return _.top=gue(y.top,_.top),_.right=mxt(y.right,_.right),_.bottom=mxt(y.bottom,_.bottom),_.left=gue(y.left,_.left),_},gxt(e,h,a));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(r){let{rect:e,offsetParent:i,strategy:n}=r;const a=CA(i),o=NL(i);if(i===o)return e;let c={scrollLeft:0,scrollTop:0},h={x:1,y:1};const g={x:0,y:0};if((a||!a&&n!=="fixed")&&((nN(i)!=="body"||jCe(o))&&(c=VCe(i)),CA(i))){const _=eae(i);h=yJ(i),g.x=_.x+i.clientLeft,g.y=_.y+i.clientTop}return{width:e.width*h.x,height:e.height*h.y,x:e.x*h.x-c.scrollLeft*h.x+g.x,y:e.y*h.y-c.scrollTop*h.y+g.y}},isElement:LL,getDimensions:function(r){return CA(r)?UBt(r):r.getBoundingClientRect()},getOffsetParent:_xt,getDocumentElement:NL,getScale:yJ,async getElementRects(r){let{reference:e,floating:i,strategy:n}=r;const a=this.getOffsetParent||_xt,o=this.getDimensions;return{reference:xVn(e,await a(i),n),floating:{x:0,y:0,...await o(i)}}},getClientRects:r=>Array.from(r.getClientRects()),isRTL:r=>vA(r).direction==="rtl"},CVn=(r,e,i)=>{const n=new Map,a={platform:vVn,...i},o={...a.platform,_c:n};return cVn(r,e,{...a,platform:o})};function iwt(r,e){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(typeof e[i]=="object"&&r[i]?iwt(r[i],e[i]):r[i]=e[i])}const by={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:r=>[...r,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function iae(r,e){let i=by.themes[r]||{},n;do n=i[e],typeof n>"u"?i.$extend?i=by.themes[i.$extend]||{}:(i=null,n=by[e]):i=null;while(i);return n}function bVn(r){const e=[r];let i=by.themes[r]||{};do i.$extend&&!i.$resetCss?(e.push(i.$extend),i=by.themes[i.$extend]||{}):i=null;while(i);return e.map(n=>`v-popper--theme-${n}`)}function Dxt(r){const e=[r];let i=by.themes[r]||{};do i.$extend?(e.push(i.$extend),i=by.themes[i.$extend]||{}):i=null;while(i);return e}let g$=!1;if(typeof window<"u"){g$=!1;try{const r=Object.defineProperty({},"passive",{get(){g$=!0}});window.addEventListener("test",null,r)}catch{}}let nwt=!1;typeof window<"u"&&typeof navigator<"u"&&(nwt=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const uwt=["auto","top","bottom","left","right"].reduce((r,e)=>r.concat([e,`${e}-start`,`${e}-end`]),[]),xxt={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},vxt={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Cxt(r,e){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}function wOe(){return new Promise(r=>requestAnimationFrame(()=>{requestAnimationFrame(r)}))}const ay=[];let sI=null;const bxt={};function yxt(r){let e=bxt[r];return e||(e=bxt[r]=[]),e}let ZWe=function(){};typeof window<"u"&&(ZWe=window.Element);function Vd(r){return function(e){return iae(e.theme,r)}}const TOe="__floating-vue__popper",rwt=()=>rg({name:"VPopper",provide(){return{[TOe]:{parentPopper:this}}},inject:{[TOe]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Vd("disabled")},positioningDisabled:{type:Boolean,default:Vd("positioningDisabled")},placement:{type:String,default:Vd("placement"),validator:r=>uwt.includes(r)},delay:{type:[String,Number,Object],default:Vd("delay")},distance:{type:[Number,String],default:Vd("distance")},skidding:{type:[Number,String],default:Vd("skidding")},triggers:{type:Array,default:Vd("triggers")},showTriggers:{type:[Array,Function],default:Vd("showTriggers")},hideTriggers:{type:[Array,Function],default:Vd("hideTriggers")},popperTriggers:{type:Array,default:Vd("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Vd("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Vd("popperHideTriggers")},container:{type:[String,Object,ZWe,Boolean],default:Vd("container")},boundary:{type:[String,ZWe],default:Vd("boundary")},strategy:{type:String,validator:r=>["absolute","fixed"].includes(r),default:Vd("strategy")},autoHide:{type:[Boolean,Function],default:Vd("autoHide")},handleResize:{type:Boolean,default:Vd("handleResize")},instantMove:{type:Boolean,default:Vd("instantMove")},eagerMount:{type:Boolean,default:Vd("eagerMount")},popperClass:{type:[String,Array,Object],default:Vd("popperClass")},computeTransformOrigin:{type:Boolean,default:Vd("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Vd("autoMinSize")},autoSize:{type:[Boolean,String],default:Vd("autoSize")},autoMaxSize:{type:Boolean,default:Vd("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Vd("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Vd("preventOverflow")},overflowPadding:{type:[Number,String],default:Vd("overflowPadding")},arrowPadding:{type:[Number,String],default:Vd("arrowPadding")},arrowOverflow:{type:Boolean,default:Vd("arrowOverflow")},flip:{type:Boolean,default:Vd("flip")},shift:{type:Boolean,default:Vd("shift")},shiftCrossAxis:{type:Boolean,default:Vd("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Vd("noAutoFocus")},disposeTimeout:{type:Number,default:Vd("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":r=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(r=>r.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var r;return(r=this[TOe])==null?void 0:r.parentPopper},hasPopperShowTriggerHover(){var r,e;return((r=this.popperTriggers)==null?void 0:r.includes("hover"))||((e=this.popperShowTriggers)==null?void 0:e.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(r){r?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((r,e)=>(r[e]="$_computePosition",r),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:r=null,skipDelay:e=!1,force:i=!1}={}){var n,a;(n=this.parentPopper)!=null&&n.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(i||!this.disabled)&&(((a=this.parentPopper)==null?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(r,e),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:r=null,skipDelay:e=!1}={}){var i;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:e}),this.parentPopper.lockedChild=null)},1e3));return}((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(r,e),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var r;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((r=this.referenceNode)==null?void 0:r.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const r={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&r.middleware.push(gVn({mainAxis:this.distance,crossAxis:this.skidding}));const e=this.placement.startsWith("auto");if(e?r.middleware.push(fVn({alignment:this.placement.split("-")[1]??""})):r.placement=this.placement,this.preventOverflow&&(this.shift&&r.middleware.push(EVn({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!e&&this.flip&&r.middleware.push(mVn({padding:this.overflowPadding,boundary:this.boundary}))),r.middleware.push(dVn({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&r.middleware.push({name:"arrowOverflow",fn:({placement:n,rects:a,middlewareData:o})=>{let c;const{centerOffset:h}=o.arrow;return n.startsWith("top")||n.startsWith("bottom")?c=Math.abs(h)>a.reference.width/2:c=Math.abs(h)>a.reference.height/2,{data:{overflow:c}}}}),this.autoMinSize||this.autoSize){const n=this.autoSize?this.autoSize:this.autoMinSize?"min":null;r.middleware.push({name:"autoSize",fn:({rects:a,placement:o,middlewareData:c})=>{var h;if((h=c.autoSize)!=null&&h.skip)return{};let g,_;return o.startsWith("top")||o.startsWith("bottom")?g=a.reference.width:_=a.reference.height,this.$_innerNode.style[n==="min"?"minWidth":n==="max"?"maxWidth":"width"]=g!=null?`${g}px`:null,this.$_innerNode.style[n==="min"?"minHeight":n==="max"?"maxHeight":"height"]=_!=null?`${_}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,r.middleware.push(_Vn({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:n,availableHeight:a})=>{this.$_innerNode.style.maxWidth=n!=null?`${n}px`:null,this.$_innerNode.style.maxHeight=a!=null?`${a}px`:null}})));const i=await CVn(this.$_referenceNode,this.$_popperNode,r);Object.assign(this.result,{x:i.x,y:i.y,placement:i.placement,strategy:i.strategy,arrow:{...i.middlewareData.arrow,...i.middlewareData.arrowOverflow}})},$_scheduleShow(r,e=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),sI&&this.instantMove&&sI.instantMove&&sI!==this.parentPopper){sI.$_applyHide(!0),this.$_applyShow(!0);return}e?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(r,e=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(sI=this),e?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(r){const e=this.delay;return parseInt(e&&e[r]||e||0)},async $_applyShow(r=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=r,!this.isShown&&(this.$_ensureTeleport(),await wOe(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Xxe(this.$_referenceNode),...Xxe(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const e=this.$_referenceNode.getBoundingClientRect(),i=this.$_popperNode.querySelector(".v-popper__wrapper"),n=i.parentNode.getBoundingClientRect(),a=e.x+e.width/2-(n.left+i.offsetLeft),o=e.y+e.height/2-(n.top+i.offsetTop);this.result.transformOrigin=`${a}px ${o}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const r=this.showGroup;if(r){let e;for(let i=0;i0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=r,Cxt(ay,this),ay.length===0&&document.body.classList.remove("v-popper--some-open");for(const i of Dxt(this.theme)){const n=yxt(i);Cxt(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${i}`)}sI===this&&(sI=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const e=this.disposeTimeout;e!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},e)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await wOe(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let r=this.container;if(typeof r=="string"?r=window.document.querySelector(r):r===!1&&(r=this.$_targetNodes[0].parentNode),!r)throw new Error("No container for popover: "+this.container);r.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const r=i=>{this.isShown&&!this.$_hideInProgress||(i.usedByTooltip=!0,!this.$_preventShow&&this.show({event:i}))};this.$_registerTriggerListeners(this.$_targetNodes,xxt,this.triggers,this.showTriggers,r),this.$_registerTriggerListeners([this.$_popperNode],xxt,this.popperTriggers,this.popperShowTriggers,r);const e=i=>{i.usedByTooltip||this.hide({event:i})};this.$_registerTriggerListeners(this.$_targetNodes,vxt,this.triggers,this.hideTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],vxt,this.popperTriggers,this.popperHideTriggers,e)},$_registerEventListeners(r,e,i){this.$_events.push({targetNodes:r,eventType:e,handler:i}),r.forEach(n=>n.addEventListener(e,i,g$?{passive:!0}:void 0))},$_registerTriggerListeners(r,e,i,n,a){let o=i;n!=null&&(o=typeof n=="function"?n(o):n),o.forEach(c=>{const h=e[c];h&&this.$_registerEventListeners(r,h,a)})},$_removeEventListeners(r){const e=[];this.$_events.forEach(i=>{const{targetNodes:n,eventType:a,handler:o}=i;!r||r===a?n.forEach(c=>c.removeEventListener(a,o)):e.push(i)}),this.$_events=e},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(r,e=!1){this.$_showFrameLocked||(this.hide({event:r}),r.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),e&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(r,e){for(const i of this.$_targetNodes){const n=i.getAttribute(r);n&&(i.removeAttribute(r),i.setAttribute(e,n))}},$_applyAttrsToTarget(r){for(const e of this.$_targetNodes)for(const i in r){const n=r[i];n==null?e.removeAttribute(i):e.setAttribute(i,n)}},$_updateParentShownChildren(r){let e=this.parentPopper;for(;e;)r?e.shownChildren.add(this.randomId):(e.shownChildren.delete(this.randomId),e.pendingHide&&e.hide()),e=e.parentPopper},$_isAimingPopper(){const r=this.$_referenceNode.getBoundingClientRect();if(Eue>=r.left&&Eue<=r.right&&_ue>=r.top&&_ue<=r.bottom){const e=this.$_popperNode.getBoundingClientRect(),i=Eue-IT,n=_ue-RT,a=e.left+e.width/2-IT+(e.top+e.height/2)-RT+e.width+e.height,o=IT+i*a,c=RT+n*a;return K3e(IT,RT,o,c,e.left,e.top,e.left,e.bottom)||K3e(IT,RT,o,c,e.left,e.top,e.right,e.top)||K3e(IT,RT,o,c,e.right,e.top,e.right,e.bottom)||K3e(IT,RT,o,c,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(nwt){const r=g$?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",e=>kxt(e,!0),r),document.addEventListener("touchend",e=>Fxt(e,!0),r)}else window.addEventListener("mousedown",r=>kxt(r,!1),!0),window.addEventListener("click",r=>Fxt(r,!1),!0);window.addEventListener("resize",kVn)}function kxt(r,e){if(by.autoHideOnMousedown)awt(r,e);else for(let i=0;i=0;n--){const a=ay[n];try{const o=a.containsGlobalTarget=a.mouseDownContains||a.popperNode().contains(r.target);a.pendingHide=!1,requestAnimationFrame(()=>{if(a.pendingHide=!1,!i[a.randomId]&&Axt(a,o,r)){if(a.$_handleGlobalClose(r,e),!r.closeAllPopover&&r.closePopover&&o){let h=a.parentPopper;for(;h;)i[h.randomId]=!0,h=h.parentPopper;return}let c=a.parentPopper;for(;c&&Axt(c,c.containsGlobalTarget,r);)c.$_handleGlobalClose(r,e),c=c.parentPopper}})}catch{}}}function Axt(r,e,i){return i.closeAllPopover||i.closePopover&&e||yVn(r,i)&&!e}function yVn(r,e){if(typeof r.autoHide=="function"){const i=r.autoHide(e);return r.lastAutoHide=i,i}return r.autoHide}function kVn(){for(let r=0;r{IT=Eue,RT=_ue,Eue=r.clientX,_ue=r.clientY},g$?{passive:!0}:void 0);function K3e(r,e,i,n,a,o,c,h){const g=((c-a)*(e-o)-(h-o)*(r-a))/((h-o)*(i-r)-(c-a)*(n-e)),_=((i-r)*(e-o)-(n-e)*(r-a))/((h-o)*(i-r)-(c-a)*(n-e));return g>=0&&g<=1&&_>=0&&_<=1}const FVn={extends:rwt()},HCe=(r,e)=>{const i=r.__vccOpts||r;for(const[n,a]of e)i[n]=a;return i};function AVn(r,e,i,n,a,o){return $u(),Pr("div",{ref:"reference",class:mf(["v-popper",{"v-popper--shown":r.slotData.isShown}])},[bue(r.$slots,"default",Sci(k6t(r.slotData)))],2)}const SVn=HCe(FVn,[["render",AVn]]);function BVn(){var r=window.navigator.userAgent,e=r.indexOf("MSIE ");if(e>0)return parseInt(r.substring(e+5,r.indexOf(".",e)),10);var i=r.indexOf("Trident/");if(i>0){var n=r.indexOf("rv:");return parseInt(r.substring(n+3,r.indexOf(".",n)),10)}var a=r.indexOf("Edge/");return a>0?parseInt(r.substring(a+5,r.indexOf(".",a)),10):-1}let RDe;function YWe(){YWe.init||(YWe.init=!0,RDe=BVn()!==-1)}var KCe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){YWe(),dGe(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const r=document.createElement("object");this._resizeObject=r,r.setAttribute("aria-hidden","true"),r.setAttribute("tabindex",-1),r.onload=this.addResizeHandlers,r.type="text/html",RDe&&this.$el.appendChild(r),r.data="about:blank",RDe||this.$el.appendChild(r)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!RDe&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const wVn=mdi();aae("data-v-b329ee4c");const TVn={class:"resize-observer",tabindex:"-1"};oae();const LVn=wVn((r,e,i,n,a,o)=>($u(),Pg("div",TVn)));KCe.render=LVn;KCe.__scopeId="data-v-b329ee4c";KCe.__file="src/components/ResizeObserver.vue";const owt=(r="theme")=>({computed:{themeClass(){return bVn(this[r])}}}),NVn=rg({name:"VPopperContent",components:{ResizeObserver:KCe},mixins:[owt()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(r){return r!=null&&!isNaN(r)?`${r}px`:null}}}),PVn=["id","aria-hidden","tabindex","data-popper-placement"],MVn={ref:"inner",class:"v-popper__inner"},zVn=Ci("div",{class:"v-popper__arrow-outer"},null,-1),IVn=Ci("div",{class:"v-popper__arrow-inner"},null,-1),RVn=[zVn,IVn];function OVn(r,e,i,n,a,o){const c=Cue("ResizeObserver");return $u(),Pr("div",{id:r.popperId,ref:"popover",class:mf(["v-popper__popper",[r.themeClass,r.classes.popperClass,{"v-popper__popper--shown":r.shown,"v-popper__popper--hidden":!r.shown,"v-popper__popper--show-from":r.classes.showFrom,"v-popper__popper--show-to":r.classes.showTo,"v-popper__popper--hide-from":r.classes.hideFrom,"v-popper__popper--hide-to":r.classes.hideTo,"v-popper__popper--skip-transition":r.skipTransition,"v-popper__popper--arrow-overflow":r.result&&r.result.arrow.overflow,"v-popper__popper--no-positioning":!r.result}]]),style:P3(r.result?{position:r.result.strategy,transform:`translate3d(${Math.round(r.result.x)}px,${Math.round(r.result.y)}px,0)`}:void 0),"aria-hidden":r.shown?"false":"true",tabindex:r.autoHide?0:void 0,"data-popper-placement":r.result?r.result.placement:void 0,onKeyup:e[2]||(e[2]=w6t(h=>r.autoHide&&r.$emit("hide"),["esc"]))},[Ci("div",{class:"v-popper__backdrop",onClick:e[0]||(e[0]=h=>r.autoHide&&r.$emit("hide"))}),Ci("div",{class:"v-popper__wrapper",style:P3(r.result?{transformOrigin:r.result.transformOrigin}:void 0)},[Ci("div",MVn,[r.mounted?($u(),Pr(pd,{key:0},[Ci("div",null,[bue(r.$slots,"default")]),r.handleResize?($u(),Pg(c,{key:0,onNotify:e[1]||(e[1]=h=>r.$emit("resize",h))})):Bl("",!0)],64)):Bl("",!0)],512),Ci("div",{ref:"arrow",class:"v-popper__arrow-container",style:P3(r.result?{left:r.toPx(r.result.arrow.x),top:r.toPx(r.result.arrow.y)}:void 0)},RVn,4)],4)],46,PVn)}const swt=HCe(NVn,[["render",OVn]]),lwt={methods:{show(...r){return this.$refs.popper.show(...r)},hide(...r){return this.$refs.popper.hide(...r)},dispose(...r){return this.$refs.popper.dispose(...r)},onResize(...r){return this.$refs.popper.onResize(...r)}}};let QWe=function(){};typeof window<"u"&&(QWe=window.Element);const jVn=rg({name:"VPopperWrapper",components:{Popper:SVn,PopperContent:swt},mixins:[lwt,owt("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,QWe,Boolean],default:void 0},boundary:{type:[String,QWe],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":r=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(r=>r!==this.$refs.popperContent.$el)}}});function VVn(r,e,i,n,a,o){const c=Cue("PopperContent"),h=Cue("Popper");return $u(),Pg(h,_Ge({ref:"popper"},r.$props,{theme:r.finalTheme,"target-nodes":r.getTargetNodes,"popper-node":()=>r.$refs.popperContent.$el,class:[r.themeClass],onShow:e[0]||(e[0]=()=>r.$emit("show")),onHide:e[1]||(e[1]=()=>r.$emit("hide")),"onUpdate:shown":e[2]||(e[2]=g=>r.$emit("update:shown",g)),onApplyShow:e[3]||(e[3]=()=>r.$emit("apply-show")),onApplyHide:e[4]||(e[4]=()=>r.$emit("apply-hide")),onCloseGroup:e[5]||(e[5]=()=>r.$emit("close-group")),onCloseDirective:e[6]||(e[6]=()=>r.$emit("close-directive")),onAutoHide:e[7]||(e[7]=()=>r.$emit("auto-hide")),onResize:e[8]||(e[8]=()=>r.$emit("resize"))}),{default:zL(({popperId:g,isShown:_,shouldMountContent:x,skipTransition:y,autoHide:S,show:L,hide:O,handleResize:G,onResize:ie,classes:ue,result:re})=>[bue(r.$slots,"default",{shown:_,show:L,hide:O}),dl(c,{ref:"popperContent","popper-id":g,theme:r.finalTheme,shown:_,mounted:x,"skip-transition":y,"auto-hide":S,"handle-resize":G,classes:ue,result:re,onHide:O,onResize:ie},{default:zL(()=>[bue(r.$slots,"popper",{shown:_,hide:O})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const lqe=HCe(jVn,[["render",VVn]]),HVn={...lqe,name:"VDropdown",vPopperTheme:"dropdown"},KVn={...lqe,name:"VMenu",vPopperTheme:"menu"},WVn={...lqe,name:"VTooltip",vPopperTheme:"tooltip"},GVn=rg({name:"VTooltipDirective",components:{Popper:rwt(),PopperContent:swt},mixins:[lwt],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:r=>iae(r.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:r=>iae(r.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(r){if(typeof this.content=="function"&&this.$_isShown&&(r||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const e=++this.$_fetchId,i=this.content(this);i.then?i.then(n=>this.onResult(e,n)):this.onResult(e,i)}},onResult(r,e){r===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=e)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),JVn=["innerHTML"],$Vn=["textContent"];function UVn(r,e,i,n,a,o){const c=Cue("PopperContent"),h=Cue("Popper");return $u(),Pg(h,_Ge({ref:"popper"},r.$attrs,{theme:r.theme,"target-nodes":r.targetNodes,"popper-node":()=>r.$refs.popperContent.$el,onApplyShow:r.onShow,onApplyHide:r.onHide}),{default:zL(({popperId:g,isShown:_,shouldMountContent:x,skipTransition:y,autoHide:S,hide:L,handleResize:O,onResize:G,classes:ie,result:ue})=>[dl(c,{ref:"popperContent",class:mf({"v-popper--tooltip-loading":r.loading}),"popper-id":g,theme:r.theme,shown:_,mounted:x,"skip-transition":y,"auto-hide":S,"handle-resize":O,classes:ie,result:ue,onHide:L,onResize:G},{default:zL(()=>[r.html?($u(),Pr("div",{key:0,innerHTML:r.finalContent},null,8,JVn)):($u(),Pr("div",{key:1,textContent:Ed(r.finalContent)},null,8,$Vn))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const qVn=HCe(GVn,[["render",UVn]]),cwt="v-popper--has-tooltip";function ZVn(r,e){let i=r.placement;if(!i&&e)for(const n of uwt)e[n]&&(i=n);return i||(i=iae(r.theme||"tooltip","placement")),i}function dwt(r,e,i){let n;const a=typeof e;return a==="string"?n={content:e}:e&&a==="object"?n=e:n={content:!1},n.placement=ZVn(n,i),n.targetNodes=()=>[r],n.referenceNode=()=>r,n}let LOe,nae,YVn=0;function QVn(){if(LOe)return;nae=Ks([]),LOe=T6t({name:"VTooltipDirectiveApp",setup(){return{directives:nae}},render(){return this.directives.map(e=>g1i(qVn,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});const r=document.createElement("div");document.body.appendChild(r),LOe.mount(r)}function XVn(r,e,i){QVn();const n=Ks(dwt(r,e,i)),a=Ks(!1),o={id:YVn++,options:n,shown:a};return nae.value.push(o),r.classList&&r.classList.add(cwt),r.$_popper={options:n,item:o,show(){a.value=!0},hide(){a.value=!1}}}function hwt(r){if(r.$_popper){const e=nae.value.indexOf(r.$_popper.item);e!==-1&&nae.value.splice(e,1),delete r.$_popper,delete r.$_popperOldShown,delete r.$_popperMountTarget}r.classList&&r.classList.remove(cwt)}function Sxt(r,{value:e,modifiers:i}){const n=dwt(r,e,i);if(!n.content||iae(n.theme||"tooltip","disabled"))hwt(r);else{let a;r.$_popper?(a=r.$_popper,a.options.value=n):a=XVn(r,e,i),typeof e.shown<"u"&&e.shown!==r.$_popperOldShown&&(r.$_popperOldShown=e.shown,e.shown?a.show():a.hide())}}const eHn={beforeMount:Sxt,updated:Sxt,beforeUnmount(r){hwt(r)}};function Bxt(r){r.addEventListener("mousedown",e6e),r.addEventListener("click",e6e),r.addEventListener("touchstart",fwt,g$?{passive:!0}:!1)}function wxt(r){r.removeEventListener("mousedown",e6e),r.removeEventListener("click",e6e),r.removeEventListener("touchstart",fwt),r.removeEventListener("touchend",mwt),r.removeEventListener("touchcancel",pwt)}function e6e(r){const e=r.currentTarget;r.closePopover=!e.$_vclosepopover_touch,r.closeAllPopover=e.$_closePopoverModifiers&&!!e.$_closePopoverModifiers.all}function fwt(r){if(r.changedTouches.length===1){const e=r.currentTarget;e.$_vclosepopover_touch=!0;const i=r.changedTouches[0];e.$_vclosepopover_touchPoint=i,e.addEventListener("touchend",mwt),e.addEventListener("touchcancel",pwt)}}function mwt(r){const e=r.currentTarget;if(e.$_vclosepopover_touch=!1,r.changedTouches.length===1){const i=r.changedTouches[0],n=e.$_vclosepopover_touchPoint;r.closePopover=Math.abs(i.screenY-n.screenY)<20&&Math.abs(i.screenX-n.screenX)<20,r.closeAllPopover=e.$_closePopoverModifiers&&!!e.$_closePopoverModifiers.all}}function pwt(r){const e=r.currentTarget;e.$_vclosepopover_touch=!1}const tHn={beforeMount(r,{value:e,modifiers:i}){r.$_closePopoverModifiers=i,(typeof e>"u"||e)&&Bxt(r)},updated(r,{value:e,oldValue:i,modifiers:n}){r.$_closePopoverModifiers=n,e!==i&&(typeof e>"u"||e?Bxt(r):wxt(r))},beforeUnmount(r){wxt(r)}};function iHn(r,e={}){r.$_vTooltipInstalled||(r.$_vTooltipInstalled=!0,iwt(by,e),r.directive("tooltip",eHn),r.directive("close-popper",tHn),r.component("VTooltip",WVn),r.component("VDropdown",HVn),r.component("VMenu",KVn))}const nHn={version:"5.2.2",install:iHn,options:by};window.moment=Ro;window.document.title="Logdy";IDe.initTheme();T6t(iVn).use(mhi()).use(nHn,{themes:{tooltip:{distance:4,delay:{show:400,hide:0}}}}).mount("#app");export{Iae as m,ekt as t}; +}`})},Le=vn=>{vn.id==="new"?e.layout.add(vn):e.layout.update(vn),_I.update("main",e.layout),rt()},lt=vn=>{e.layout=vn,_I.update("main",e.layout),rt()},$e=vn=>{e.layout.removeColumn(vn),_I.update("main",e.layout),rt()},Ye=vn=>{e.layout.settings=vn,e.layout.processMiddlewareHandlers(),_I.update("main",e.layout),rt()},rt=()=>{e.rows=[],e.clearRowIds(),console.log(e.rowsIds),e.facets={},_e(),ue()},Ft=()=>{const Wn=(window.location.protocol==="https:"?"wss":"ws")+"://"+window.location.host+window.location.pathname+"ws";console.log("Connecting to WS",Wn);const Yr=new WebSocket(Wn+"?password="+e.getPassword());e.status="not connected";var Mu=!1;Yr.onopen=()=>{Mu=!0,e.status="connected",rt()},Yr.onclose=()=>{Yr.CLOSED&&Mu&&(e.status="not connected",Ft())},Yr.onerror=Dn=>{Yr.close(),setTimeout(()=>{console.log("Reconnecting to WS"),Ft()},1e3)},Yr.onmessage=Dn=>{let $s=JSON.parse(Dn.data);switch($s.message_type){case"client_joined":GS.setAuthToken($s.client_id);break;case"client_msg_status":e.receiveCounters||(e.receiveCounters={MessageCount:0,MessagesToTail:0,LastDeliveredIdx:0}),e.receiveCounters.MessageCount=$s.stats.msg_count,e.receiveCounters.MessagesToTail=$s.client.count_to_tail,e.receiveCounters.LastDeliveredIdx=$s.client.last_delivered_id_idx;break;case"log_bulk":let ml=L($s.messages,e.layout.settings);i.changeFilter("unread",ml.length),ml.forEach(Ic=>{var Tl,Mr;$T.add({id:Ic.id,message:Ic},Ic.id),(Tl=Ic.origin)!=null&&Tl.file&&i.changeFilter("origin_file_"+Ic.origin.file,1),(Mr=Ic.origin)!=null&&Mr.port&&i.changeFilter("origin_port_"+Ic.origin.port,1)});break;default:throw console.error($s),new Error("Unrecognized message")}}},Zt=()=>{e.status="connected";const vn=2;Ot(),setInterval(()=>{e.demoStatus!=="stopped"&&ui()},1/vn*1e3)},Ot=()=>{e.layout=vOn(e.demoContent==="json"),e.layout.processMiddlewareHandlers(),e.clearAllRows(),rt()},ui=(vn=1)=>{let Wn=e.demoContent==="json",Yr=Math.random(),Mu={port:"",file:""};for(Yr<.5?(Mu.port="8123",Mu.file="foo.log"):(Mu.port="8999",Mu.file="foo/bar.log");vn--;){let Dn=xOn(Wn);L([{id:new Date().getTime().toString(),content:Wn?JSON.stringify(Dn):Dn,is_json:!0,log_type:0,json_content:Wn?Dn:null,origin:Mu,ts:new Date().getTime()}],e.layout.settings),i.changeFilter("unread",1)}};gL(()=>{var vn;return(vn=e.initSettings)==null?void 0:vn.received},vn=>{var Wn;vn&&((Wn=e.initSettings)!=null&&Wn.analyticsEnabled)&&BOe(!1)});const ei=vn=>{qh().confirm("Are you sure you want to hide the column? You can always restore it in the settings",()=>{vn.hidden=!0,Le(vn)})};E$(async()=>{var vn;e.demoMode?(Zt(),BOe(!0),rt()):await gu(),COn(),(vn=n.value)==null||vn.addEventListener("scroll",()=>{G()?e.stickedToBottom=!0:e.stickedToBottom=!1})});const Uu=()=>{e.modalShow="",Ft(),BOe(!1),re()},gu=async()=>{let vn=await GS.sendGet("status");e.initSettings=vn.json;let Wn=await GS.sendGet("check-pass?password="+e.getPassword());return e.initSettings.authRequired&&Wn.status!==200?e.modalShow="auth":Uu(),!0},Kt=(vn,Wn)=>{e.layout.move(vn,Wn),rt()},Rr=()=>{n.value.scrollTop=n.value.scrollHeight+30},zu=vn=>{e.demoContent=vn,Ot()},Va=yA(()=>e.rows&&e.rows[o.value]&&e.rows[o.value].msg),Ku=()=>{o.value=Math.floor(Math.random()*e.rows.length)};return(vn,Wn)=>{const Yr=c6e("tooltip");return $u(),Pr(pd,null,[Yu(e).modalShow?($u(),Pg($At,{key:0,onClose:Wn[0]||(Wn[0]=Mu=>Yu(e).modalShow="")},{default:zL(()=>[Yu(e).modalShow=="auth"?($u(),Pg(CRi,{key:0,onSuccess:Uu})):Bl("",!0),Yu(e).modalShow=="import"?($u(),Pg($Ri,{key:1,layout:Yu(e).layout,onLayoutLoaded:lt},null,8,["layout"])):Bl("",!0),Yu(e).modalShow=="export-logs"?($u(),Pg(WWi,{key:2,rows:Yu(e).rows,"visible-rows":Yu(e).displayRows,layout:Yu(e).layout},null,8,["rows","visible-rows","layout"])):Bl("",!0),Yu(e).modalShow=="load-logs"?($u(),Pg(YKi,{key:3})):Bl("",!0),Yu(e).modalShow=="feedback"?($u(),Pg(RRi,{key:4})):Bl("",!0)]),_:1})):Bl("",!0),dl(TRi),Yu(e).settingsDrawer?($u(),Pg(PIi,{key:1,onClose:Wn[1]||(Wn[1]=Mu=>Yu(e).settingsDrawer=!1),layout:Yu(e).layout,onEdit:Le,onRemove:$e,onMove:Kt,onSettingsUpdate:Ye,onUpdateSampleLine:Ku,sampleLine:Va.value},null,8,["layout","sampleLine"])):Bl("",!0),Yu(e).demoMode?($u(),Pg(BRi,{key:2,onStart:Wn[2]||(Wn[2]=Mu=>Yu(e).demoStatus="started"),onStop:Wn[3]||(Wn[3]=Mu=>Yu(e).demoStatus="stopped"),onMode:zu,onAdd:Wn[4]||(Wn[4]=Mu=>ui(100))})):Bl("",!0),Ci("div",{class:mf({demo:Yu(e).demoMode})},[Ci("div",Sjn,[Ci("div",Bjn,[wjn,Ci("div",Tjn,[Ljn,dl(yWi,{style:{}})]),Ci("div",{class:"docs link-style",onClick:Wn[5]||(Wn[5]=Mu=>Yu(e).modalShow="feedback"),style:{cursor:"pointer"}},[a0(" Leave feedback "),dl(EWi)])]),Ci("div",Njn,[r1(Ci("input",{type:"text",class:"searchbar","onUpdate:modelValue":Wn[6]||(Wn[6]=Mu=>Yu(e).searchbar=Mu),placeholder:"Search logs..."},null,512),[[aA,Yu(e).searchbar]])]),Ci("div",Pjn,[dl(Ajn)])]),Ci("div",{class:"layout",onMouseup:Wn[14]||(Wn[14]=(...Mu)=>Yu(Xpt)&&Yu(Xpt)(...Mu))},[Ci("div",Mjn,[Ci("div",{class:mf(["left-col",{empty:g.value}]),style:P3({width:Yu(e).layout.settings.leftColWidth+"px"})},[Ci("div",zjn,[g.value?Bl("",!0):($u(),Pg(uWi,{key:0,style:{height:"25px",width:"25px"},onClick:_})),g.value?($u(),Pg(dWi,{key:1,style:{height:"25px",width:"25px"},onClick:_})):Bl("",!0)]),g.value?Bl("",!0):($u(),Pr(pd,{key:0},[Ci("div",Ijn,[Ci("span",null,Ed(Yu(e).displayRows.length)+" out of "+Ed(Yu(e).rows.length)+" logs",1),Rjn,Ci("button",{class:"btn-sm",style:{"margin-top":"4px"},onClick:Wn[7]||(Wn[7]=Mu=>Yu(e).modalShow="export-logs")},"Export messages"),Ci("button",{class:"btn-sm",style:{"margin-top":"4px"},onClick:Wn[8]||(Wn[8]=Mu=>Yu(e).resetAllFiltersAndFacets())},"Reset all filters"),Yu(e).correlationFilter?($u(),Pr("div",Ojn,[a0(" Correlation filter active ("+Ed(Yu(e).correlationFilter)+") ",1),jjn,a0(" Change resolution: "),Ci("button",{class:"btn-sm",onClick:Wn[9]||(Wn[9]=Mu=>h(1))},"-"),Ci("button",{class:"btn-sm",onClick:Wn[10]||(Wn[10]=Mu=>h(-1))},"+"),Vjn,Ci("button",{class:"btn-sm",style:{"margin-top":"4px"},onClick:Wn[11]||(Wn[11]=Mu=>Yu(e).resetCorrelationFilter())},"Reset correlation filter")])):Bl("",!0)]),dl(sRi),dl(UIi,{facets:Yu(e).facets},null,8,["facets"])],64))],6)]),Ci("div",null,[Ci("div",{class:mf(["mid-col",{freeze:g.value}]),onMousedown:Wn[12]||(Wn[12]=(...Mu)=>Yu(Ypt)&&Yu(Ypt)(...Mu))},null,34)]),Ci("div",{class:"right-col",ref_key:"table",ref:n},[a.value.length===0?($u(),Pr("div",Hjn,[Yu(qh)().status=="not connected"?($u(),Pr("div",Kjn,[a0("Status: "),Wjn])):($u(),Pr(pd,{key:1},[a0(" No columns defined, open "),Ci("span",{class:"clickable",onClick:Wn[13]||(Wn[13]=Mu=>Yu(e).settingsDrawer=!0)},"Settings"),a0(" and add columns"),Gjn,a0(" or "),Ci("span",{class:"clickable",onClick:ye},"add column with raw content now"),a0(". ")],64))])):($u(),Pr(pd,{key:1},[Ci("div",{class:mf(["btn stick",{sticked:Yu(e).stickedToBottom}]),onClick:Rr},[Yu(e).stickedToBottom?($u(),Pr(pd,{key:1},[a0("Sticked")],64)):($u(),Pr(pd,{key:0},[a0("Stick to bottom")],64))],2),Ci("table",Jjn,[Ci("tr",null,[$jn,($u(!0),Pr(pd,null,py(a.value,Mu=>($u(),Pr("th",{style:P3({width:Mu.width+"px",cursor:"auto"}),class:"column-name"},[Ci("span",Ujn,Ed(Mu.name),1),Ci("div",{class:"hide-icon",style:{height:"12px",width:"12px",display:"inline",visibility:"hidden",opacity:"0.4",cursor:"pointer","margin-left":"3px"},onClick:Dn=>ei(Mu)},[dl(TWi)],8,qjn),Ci("div",{class:"header-border",onMousedown:Dn=>Yu(Fhi)(Mu.id)},"  ",40,Zjn)],4))),256)),Yu(e).correlationFilter?($u(),Pr("th",Yjn,"Trace ")):Bl("",!0)]),($u(!0),Pr(pd,null,py(Yu(e).displayRows,Mu=>($u(),Pr("tr",{class:mf(["row",{opened:Mu.opened,open:Mu.open}]),onClick:Dn=>Yu(e).openLogDrawer(Mu),style:P3(Mu.msg.style||{})},[Ci("td",null,[Ci("span",{class:mf(["mark",{active:Mu.starred}]),onClick:V1i(Dn=>Yu(e).toggleRowMark(Mu),["stop"])}," ⬤ ",10,Xjn)]),($u(!0),Pr(pd,null,py(a.value,(Dn,$s)=>($u(),Pr("td",{class:"cell",style:P3(Mu.cells[$s].style||{})},[Ci("div",{style:P3({width:a.value[$s].width+"px"})},Ed(Mu.cells[$s].text),5)],4))),256)),Yu(e).correlationFilter?($u(),Pr("td",eVn,[Yu(e).tracesRows[Mu.id]&&Yu(e).tracesRows[Mu.id].id===Mu.id?r1(($u(),Pr("div",{key:0,class:"trace-block",style:P3({width:Yu(e).tracesRows[Mu.id].width/c.value+"px",marginLeft:Yu(e).tracesRows[Mu.id].offset/c.value+"px",...Yu(e).tracesRows[Mu.id].style})},[a0(Ed(Yu(e).tracesRows[Mu.id].label||" "),1)],4)),[[Yr,Yu(e).tracesRows[Mu.id].label||""]]):($u(),Pr(pd,{key:1},[a0("-")],64))])):Bl("",!0)],14,Qjn))),256))])],64))],512),Ci("div",tVn,[dl(tfi,{row:Yu(e).drawer.row,layout:Yu(e).layout,onClose:Yu(e).closeLogDrawer},null,8,["row","layout","onClose"])])],32)],2)],64)}}}),nVn=["top","right","bottom","left"],dxt=["start","end"],hxt=nVn.reduce((r,e)=>r.concat(e,e+"-"+dxt[0],e+"-"+dxt[1]),[]),Xre=Math.min,gI=Math.max,uVn={left:"right",right:"left",bottom:"top",top:"bottom"},rVn={start:"end",end:"start"};function UWe(r,e,i){return gI(r,Xre(e,i))}function dO(r,e){return typeof r=="function"?r(e):r}function RA(r){return r.split("-")[0]}function Cy(r){return r.split("-")[1]}function GBt(r){return r==="x"?"y":"x"}function aqe(r){return r==="y"?"height":"width"}function toe(r){return["top","bottom"].includes(RA(r))?"y":"x"}function oqe(r){return GBt(toe(r))}function JBt(r,e,i){i===void 0&&(i=!1);const n=Cy(r),a=oqe(r),o=aqe(a);let c=a==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(c=Yxe(c)),[c,Yxe(c)]}function aVn(r){const e=Yxe(r);return[Zxe(r),e,Zxe(e)]}function Zxe(r){return r.replace(/start|end/g,e=>rVn[e])}function oVn(r,e,i){const n=["left","right"],a=["right","left"],o=["top","bottom"],c=["bottom","top"];switch(r){case"top":case"bottom":return i?e?a:n:e?n:a;case"left":case"right":return e?o:c;default:return[]}}function sVn(r,e,i,n){const a=Cy(r);let o=oVn(RA(r),i==="start",n);return a&&(o=o.map(c=>c+"-"+a),e&&(o=o.concat(o.map(Zxe)))),o}function Yxe(r){return r.replace(/left|right|bottom|top/g,e=>uVn[e])}function lVn(r){return{top:0,right:0,bottom:0,left:0,...r}}function $Bt(r){return typeof r!="number"?lVn(r):{top:r,right:r,bottom:r,left:r}}function pue(r){return{...r,top:r.y,left:r.x,right:r.x+r.width,bottom:r.y+r.height}}function fxt(r,e,i){let{reference:n,floating:a}=r;const o=toe(e),c=oqe(e),h=aqe(c),g=RA(e),_=o==="y",x=n.x+n.width/2-a.width/2,y=n.y+n.height/2-a.height/2,S=n[h]/2-a[h]/2;let L;switch(g){case"top":L={x,y:n.y-a.height};break;case"bottom":L={x,y:n.y+n.height};break;case"right":L={x:n.x+n.width,y};break;case"left":L={x:n.x-a.width,y};break;default:L={x:n.x,y:n.y}}switch(Cy(e)){case"start":L[c]-=S*(i&&_?-1:1);break;case"end":L[c]+=S*(i&&_?-1:1);break}return L}const cVn=async(r,e,i)=>{const{placement:n="bottom",strategy:a="absolute",middleware:o=[],platform:c}=i,h=o.filter(Boolean),g=await(c.isRTL==null?void 0:c.isRTL(e));let _=await c.getElementRects({reference:r,floating:e,strategy:a}),{x,y}=fxt(_,n,g),S=n,L={},O=0;for(let G=0;G({name:"arrow",options:r,async fn(e){const{x:i,y:n,placement:a,rects:o,platform:c,elements:h,middlewareData:g}=e,{element:_,padding:x=0}=dO(r,e)||{};if(_==null)return{};const y=$Bt(x),S={x:i,y:n},L=oqe(a),O=aqe(L),G=await c.getDimensions(_),ie=L==="y",ue=ie?"top":"left",re=ie?"bottom":"right",_e=ie?"clientHeight":"clientWidth",ye=o.reference[O]+o.reference[L]-S[L]-o.floating[O],Le=S[L]-o.reference[L],lt=await(c.getOffsetParent==null?void 0:c.getOffsetParent(_));let $e=lt?lt[_e]:0;(!$e||!await(c.isElement==null?void 0:c.isElement(lt)))&&($e=h.floating[_e]||o.floating[O]);const Ye=ye/2-Le/2,rt=$e/2-G[O]/2-1,Ft=Xre(y[ue],rt),Zt=Xre(y[re],rt),Ot=Ft,ui=$e-G[O]-Zt,ei=$e/2-G[O]/2+Ye,Uu=UWe(Ot,ei,ui),gu=!g.arrow&&Cy(a)!=null&&ei!==Uu&&o.reference[O]/2-(eiCy(a)===r),...i.filter(a=>Cy(a)!==r)]:i.filter(a=>RA(a)===a)).filter(a=>r?Cy(a)===r||(e?Zxe(a)!==a:!1):!0)}const fVn=function(r){return r===void 0&&(r={}),{name:"autoPlacement",options:r,async fn(e){var i,n,a;const{rects:o,middlewareData:c,placement:h,platform:g,elements:_}=e,{crossAxis:x=!1,alignment:y,allowedPlacements:S=hxt,autoAlignment:L=!0,...O}=dO(r,e),G=y!==void 0||S===hxt?hVn(y||null,L,S):S,ie=await OCe(e,O),ue=((i=c.autoPlacement)==null?void 0:i.index)||0,re=G[ue];if(re==null)return{};const _e=JBt(re,o,await(g.isRTL==null?void 0:g.isRTL(_.floating)));if(h!==re)return{reset:{placement:G[0]}};const ye=[ie[RA(re)],ie[_e[0]],ie[_e[1]]],Le=[...((n=c.autoPlacement)==null?void 0:n.overflows)||[],{placement:re,overflows:ye}],lt=G[ue+1];if(lt)return{data:{index:ue+1,overflows:Le},reset:{placement:lt}};const $e=Le.map(Ft=>{const Zt=Cy(Ft.placement);return[Ft.placement,Zt&&x?Ft.overflows.slice(0,2).reduce((Ot,ui)=>Ot+ui,0):Ft.overflows[0],Ft.overflows]}).sort((Ft,Zt)=>Ft[1]-Zt[1]),rt=((a=$e.filter(Ft=>Ft[2].slice(0,Cy(Ft[0])?2:3).every(Zt=>Zt<=0))[0])==null?void 0:a[0])||$e[0][0];return rt!==h?{data:{index:ue+1,overflows:Le},reset:{placement:rt}}:{}}}},mVn=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(e){var i,n;const{placement:a,middlewareData:o,rects:c,initialPlacement:h,platform:g,elements:_}=e,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:S,fallbackStrategy:L="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:G=!0,...ie}=dO(r,e);if((i=o.arrow)!=null&&i.alignmentOffset)return{};const ue=RA(a),re=RA(h)===h,_e=await(g.isRTL==null?void 0:g.isRTL(_.floating)),ye=S||(re||!G?[Yxe(h)]:aVn(h));!S&&O!=="none"&&ye.push(...sVn(h,G,O,_e));const Le=[h,...ye],lt=await OCe(e,ie),$e=[];let Ye=((n=o.flip)==null?void 0:n.overflows)||[];if(x&&$e.push(lt[ue]),y){const Ot=JBt(a,c,_e);$e.push(lt[Ot[0]],lt[Ot[1]])}if(Ye=[...Ye,{placement:a,overflows:$e}],!$e.every(Ot=>Ot<=0)){var rt,Ft;const Ot=(((rt=o.flip)==null?void 0:rt.index)||0)+1,ui=Le[Ot];if(ui)return{data:{index:Ot,overflows:Ye},reset:{placement:ui}};let ei=(Ft=Ye.filter(Uu=>Uu.overflows[0]<=0).sort((Uu,gu)=>Uu.overflows[1]-gu.overflows[1])[0])==null?void 0:Ft.placement;if(!ei)switch(L){case"bestFit":{var Zt;const Uu=(Zt=Ye.map(gu=>[gu.placement,gu.overflows.filter(Kt=>Kt>0).reduce((Kt,Rr)=>Kt+Rr,0)]).sort((gu,Kt)=>gu[1]-Kt[1])[0])==null?void 0:Zt[0];Uu&&(ei=Uu);break}case"initialPlacement":ei=h;break}if(a!==ei)return{reset:{placement:ei}}}return{}}}};async function pVn(r,e){const{placement:i,platform:n,elements:a}=r,o=await(n.isRTL==null?void 0:n.isRTL(a.floating)),c=RA(i),h=Cy(i),g=toe(i)==="y",_=["left","top"].includes(c)?-1:1,x=o&&g?-1:1,y=dO(e,r);let{mainAxis:S,crossAxis:L,alignmentAxis:O}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return h&&typeof O=="number"&&(L=h==="end"?O*-1:O),g?{x:L*x,y:S*_}:{x:S*_,y:L*x}}const gVn=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(e){var i,n;const{x:a,y:o,placement:c,middlewareData:h}=e,g=await pVn(e,r);return c===((i=h.offset)==null?void 0:i.placement)&&(n=h.arrow)!=null&&n.alignmentOffset?{}:{x:a+g.x,y:o+g.y,data:{...g,placement:c}}}}},EVn=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(e){const{x:i,y:n,placement:a}=e,{mainAxis:o=!0,crossAxis:c=!1,limiter:h={fn:ie=>{let{x:ue,y:re}=ie;return{x:ue,y:re}}},...g}=dO(r,e),_={x:i,y:n},x=await OCe(e,g),y=toe(RA(a)),S=GBt(y);let L=_[S],O=_[y];if(o){const ie=S==="y"?"top":"left",ue=S==="y"?"bottom":"right",re=L+x[ie],_e=L-x[ue];L=UWe(re,L,_e)}if(c){const ie=y==="y"?"top":"left",ue=y==="y"?"bottom":"right",re=O+x[ie],_e=O-x[ue];O=UWe(re,O,_e)}const G=h.fn({...e,[S]:L,[y]:O});return{...G,data:{x:G.x-i,y:G.y-n}}}}},_Vn=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(e){const{placement:i,rects:n,platform:a,elements:o}=e,{apply:c=()=>{},...h}=dO(r,e),g=await OCe(e,h),_=RA(i),x=Cy(i),y=toe(i)==="y",{width:S,height:L}=n.floating;let O,G;_==="top"||_==="bottom"?(O=_,G=x===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(G=_,O=x==="end"?"top":"bottom");const ie=L-g[O],ue=S-g[G],re=!e.middlewareData.shift;let _e=ie,ye=ue;if(y){const lt=S-g.left-g.right;ye=x||re?Xre(ue,lt):lt}else{const lt=L-g.top-g.bottom;_e=x||re?Xre(ie,lt):lt}if(re&&!x){const lt=gI(g.left,0),$e=gI(g.right,0),Ye=gI(g.top,0),rt=gI(g.bottom,0);y?ye=S-2*(lt!==0||$e!==0?lt+$e:gI(g.left,g.right)):_e=L-2*(Ye!==0||rt!==0?Ye+rt:gI(g.top,g.bottom))}await c({...e,availableWidth:ye,availableHeight:_e});const Le=await a.getDimensions(o.floating);return S!==Le.width||L!==Le.height?{reset:{rects:!0}}:{}}}};function $C(r){var e;return((e=r.ownerDocument)==null?void 0:e.defaultView)||window}function vA(r){return $C(r).getComputedStyle(r)}const mxt=Math.min,gue=Math.max,Qxe=Math.round;function UBt(r){const e=vA(r);let i=parseFloat(e.width),n=parseFloat(e.height);const a=r.offsetWidth,o=r.offsetHeight,c=Qxe(i)!==a||Qxe(n)!==o;return c&&(i=a,n=o),{width:i,height:n,fallback:c}}function nN(r){return ZBt(r)?(r.nodeName||"").toLowerCase():""}let H3e;function qBt(){if(H3e)return H3e;const r=navigator.userAgentData;return r&&Array.isArray(r.brands)?(H3e=r.brands.map(e=>e.brand+"/"+e.version).join(" "),H3e):navigator.userAgent}function CA(r){return r instanceof $C(r).HTMLElement}function LL(r){return r instanceof $C(r).Element}function ZBt(r){return r instanceof $C(r).Node}function pxt(r){return typeof ShadowRoot>"u"?!1:r instanceof $C(r).ShadowRoot||r instanceof ShadowRoot}function jCe(r){const{overflow:e,overflowX:i,overflowY:n,display:a}=vA(r);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!["inline","contents"].includes(a)}function DVn(r){return["table","td","th"].includes(nN(r))}function qWe(r){const e=/firefox/i.test(qBt()),i=vA(r),n=i.backdropFilter||i.WebkitBackdropFilter;return i.transform!=="none"||i.perspective!=="none"||!!n&&n!=="none"||e&&i.willChange==="filter"||e&&!!i.filter&&i.filter!=="none"||["transform","perspective"].some(a=>i.willChange.includes(a))||["paint","layout","strict","content"].some(a=>{const o=i.contain;return o!=null&&o.includes(a)})}function YBt(){return!/^((?!chrome|android).)*safari/i.test(qBt())}function sqe(r){return["html","body","#document"].includes(nN(r))}function QBt(r){return LL(r)?r:r.contextElement}const XBt={x:1,y:1};function yJ(r){const e=QBt(r);if(!CA(e))return XBt;const i=e.getBoundingClientRect(),{width:n,height:a,fallback:o}=UBt(e);let c=(o?Qxe(i.width):i.width)/n,h=(o?Qxe(i.height):i.height)/a;return c&&Number.isFinite(c)||(c=1),h&&Number.isFinite(h)||(h=1),{x:c,y:h}}function eae(r,e,i,n){var a,o;e===void 0&&(e=!1),i===void 0&&(i=!1);const c=r.getBoundingClientRect(),h=QBt(r);let g=XBt;e&&(n?LL(n)&&(g=yJ(n)):g=yJ(r));const _=h?$C(h):window,x=!YBt()&&i;let y=(c.left+(x&&((a=_.visualViewport)==null?void 0:a.offsetLeft)||0))/g.x,S=(c.top+(x&&((o=_.visualViewport)==null?void 0:o.offsetTop)||0))/g.y,L=c.width/g.x,O=c.height/g.y;if(h){const G=$C(h),ie=n&&LL(n)?$C(n):n;let ue=G.frameElement;for(;ue&&n&&ie!==G;){const re=yJ(ue),_e=ue.getBoundingClientRect(),ye=getComputedStyle(ue);_e.x+=(ue.clientLeft+parseFloat(ye.paddingLeft))*re.x,_e.y+=(ue.clientTop+parseFloat(ye.paddingTop))*re.y,y*=re.x,S*=re.y,L*=re.x,O*=re.y,y+=_e.x,S+=_e.y,ue=$C(ue).frameElement}}return{width:L,height:O,top:S,right:y+L,bottom:S+O,left:y,x:y,y:S}}function NL(r){return((ZBt(r)?r.ownerDocument:r.document)||window.document).documentElement}function VCe(r){return LL(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.pageXOffset,scrollTop:r.pageYOffset}}function ewt(r){return eae(NL(r)).left+VCe(r).scrollLeft}function tae(r){if(nN(r)==="html")return r;const e=r.assignedSlot||r.parentNode||pxt(r)&&r.host||NL(r);return pxt(e)?e.host:e}function twt(r){const e=tae(r);return sqe(e)?e.ownerDocument.body:CA(e)&&jCe(e)?e:twt(e)}function Xxe(r,e){var i;e===void 0&&(e=[]);const n=twt(r),a=n===((i=r.ownerDocument)==null?void 0:i.body),o=$C(n);return a?e.concat(o,o.visualViewport||[],jCe(n)?n:[]):e.concat(n,Xxe(n))}function gxt(r,e,i){return e==="viewport"?pue(function(n,a){const o=$C(n),c=NL(n),h=o.visualViewport;let g=c.clientWidth,_=c.clientHeight,x=0,y=0;if(h){g=h.width,_=h.height;const S=YBt();(S||!S&&a==="fixed")&&(x=h.offsetLeft,y=h.offsetTop)}return{width:g,height:_,x,y}}(r,i)):LL(e)?pue(function(n,a){const o=eae(n,!0,a==="fixed"),c=o.top+n.clientTop,h=o.left+n.clientLeft,g=CA(n)?yJ(n):{x:1,y:1};return{width:n.clientWidth*g.x,height:n.clientHeight*g.y,x:h*g.x,y:c*g.y}}(e,i)):pue(function(n){const a=NL(n),o=VCe(n),c=n.ownerDocument.body,h=gue(a.scrollWidth,a.clientWidth,c.scrollWidth,c.clientWidth),g=gue(a.scrollHeight,a.clientHeight,c.scrollHeight,c.clientHeight);let _=-o.scrollLeft+ewt(n);const x=-o.scrollTop;return vA(c).direction==="rtl"&&(_+=gue(a.clientWidth,c.clientWidth)-h),{width:h,height:g,x:_,y:x}}(NL(r)))}function Ext(r){return CA(r)&&vA(r).position!=="fixed"?r.offsetParent:null}function _xt(r){const e=$C(r);let i=Ext(r);for(;i&&DVn(i)&&vA(i).position==="static";)i=Ext(i);return i&&(nN(i)==="html"||nN(i)==="body"&&vA(i).position==="static"&&!qWe(i))?e:i||function(n){let a=tae(n);for(;CA(a)&&!sqe(a);){if(qWe(a))return a;a=tae(a)}return null}(r)||e}function xVn(r,e,i){const n=CA(e),a=NL(e),o=eae(r,!0,i==="fixed",e);let c={scrollLeft:0,scrollTop:0};const h={x:0,y:0};if(n||!n&&i!=="fixed")if((nN(e)!=="body"||jCe(a))&&(c=VCe(e)),CA(e)){const g=eae(e,!0);h.x=g.x+e.clientLeft,h.y=g.y+e.clientTop}else a&&(h.x=ewt(a));return{x:o.left+c.scrollLeft-h.x,y:o.top+c.scrollTop-h.y,width:o.width,height:o.height}}const vVn={getClippingRect:function(r){let{element:e,boundary:i,rootBoundary:n,strategy:a}=r;const o=i==="clippingAncestors"?function(_,x){const y=x.get(_);if(y)return y;let S=Xxe(_).filter(ie=>LL(ie)&&nN(ie)!=="body"),L=null;const O=vA(_).position==="fixed";let G=O?tae(_):_;for(;LL(G)&&!sqe(G);){const ie=vA(G),ue=qWe(G);(O?ue||L:ue||ie.position!=="static"||!L||!["absolute","fixed"].includes(L.position))?L=ie:S=S.filter(re=>re!==G),G=tae(G)}return x.set(_,S),S}(e,this._c):[].concat(i),c=[...o,n],h=c[0],g=c.reduce((_,x)=>{const y=gxt(e,x,a);return _.top=gue(y.top,_.top),_.right=mxt(y.right,_.right),_.bottom=mxt(y.bottom,_.bottom),_.left=gue(y.left,_.left),_},gxt(e,h,a));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(r){let{rect:e,offsetParent:i,strategy:n}=r;const a=CA(i),o=NL(i);if(i===o)return e;let c={scrollLeft:0,scrollTop:0},h={x:1,y:1};const g={x:0,y:0};if((a||!a&&n!=="fixed")&&((nN(i)!=="body"||jCe(o))&&(c=VCe(i)),CA(i))){const _=eae(i);h=yJ(i),g.x=_.x+i.clientLeft,g.y=_.y+i.clientTop}return{width:e.width*h.x,height:e.height*h.y,x:e.x*h.x-c.scrollLeft*h.x+g.x,y:e.y*h.y-c.scrollTop*h.y+g.y}},isElement:LL,getDimensions:function(r){return CA(r)?UBt(r):r.getBoundingClientRect()},getOffsetParent:_xt,getDocumentElement:NL,getScale:yJ,async getElementRects(r){let{reference:e,floating:i,strategy:n}=r;const a=this.getOffsetParent||_xt,o=this.getDimensions;return{reference:xVn(e,await a(i),n),floating:{x:0,y:0,...await o(i)}}},getClientRects:r=>Array.from(r.getClientRects()),isRTL:r=>vA(r).direction==="rtl"},CVn=(r,e,i)=>{const n=new Map,a={platform:vVn,...i},o={...a.platform,_c:n};return cVn(r,e,{...a,platform:o})};function iwt(r,e){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(typeof e[i]=="object"&&r[i]?iwt(r[i],e[i]):r[i]=e[i])}const by={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:r=>[...r,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function iae(r,e){let i=by.themes[r]||{},n;do n=i[e],typeof n>"u"?i.$extend?i=by.themes[i.$extend]||{}:(i=null,n=by[e]):i=null;while(i);return n}function bVn(r){const e=[r];let i=by.themes[r]||{};do i.$extend&&!i.$resetCss?(e.push(i.$extend),i=by.themes[i.$extend]||{}):i=null;while(i);return e.map(n=>`v-popper--theme-${n}`)}function Dxt(r){const e=[r];let i=by.themes[r]||{};do i.$extend?(e.push(i.$extend),i=by.themes[i.$extend]||{}):i=null;while(i);return e}let g$=!1;if(typeof window<"u"){g$=!1;try{const r=Object.defineProperty({},"passive",{get(){g$=!0}});window.addEventListener("test",null,r)}catch{}}let nwt=!1;typeof window<"u"&&typeof navigator<"u"&&(nwt=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const uwt=["auto","top","bottom","left","right"].reduce((r,e)=>r.concat([e,`${e}-start`,`${e}-end`]),[]),xxt={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},vxt={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Cxt(r,e){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}function wOe(){return new Promise(r=>requestAnimationFrame(()=>{requestAnimationFrame(r)}))}const ay=[];let sI=null;const bxt={};function yxt(r){let e=bxt[r];return e||(e=bxt[r]=[]),e}let ZWe=function(){};typeof window<"u"&&(ZWe=window.Element);function Vd(r){return function(e){return iae(e.theme,r)}}const TOe="__floating-vue__popper",rwt=()=>rg({name:"VPopper",provide(){return{[TOe]:{parentPopper:this}}},inject:{[TOe]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Vd("disabled")},positioningDisabled:{type:Boolean,default:Vd("positioningDisabled")},placement:{type:String,default:Vd("placement"),validator:r=>uwt.includes(r)},delay:{type:[String,Number,Object],default:Vd("delay")},distance:{type:[Number,String],default:Vd("distance")},skidding:{type:[Number,String],default:Vd("skidding")},triggers:{type:Array,default:Vd("triggers")},showTriggers:{type:[Array,Function],default:Vd("showTriggers")},hideTriggers:{type:[Array,Function],default:Vd("hideTriggers")},popperTriggers:{type:Array,default:Vd("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Vd("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Vd("popperHideTriggers")},container:{type:[String,Object,ZWe,Boolean],default:Vd("container")},boundary:{type:[String,ZWe],default:Vd("boundary")},strategy:{type:String,validator:r=>["absolute","fixed"].includes(r),default:Vd("strategy")},autoHide:{type:[Boolean,Function],default:Vd("autoHide")},handleResize:{type:Boolean,default:Vd("handleResize")},instantMove:{type:Boolean,default:Vd("instantMove")},eagerMount:{type:Boolean,default:Vd("eagerMount")},popperClass:{type:[String,Array,Object],default:Vd("popperClass")},computeTransformOrigin:{type:Boolean,default:Vd("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Vd("autoMinSize")},autoSize:{type:[Boolean,String],default:Vd("autoSize")},autoMaxSize:{type:Boolean,default:Vd("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Vd("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Vd("preventOverflow")},overflowPadding:{type:[Number,String],default:Vd("overflowPadding")},arrowPadding:{type:[Number,String],default:Vd("arrowPadding")},arrowOverflow:{type:Boolean,default:Vd("arrowOverflow")},flip:{type:Boolean,default:Vd("flip")},shift:{type:Boolean,default:Vd("shift")},shiftCrossAxis:{type:Boolean,default:Vd("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Vd("noAutoFocus")},disposeTimeout:{type:Number,default:Vd("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":r=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(r=>r.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var r;return(r=this[TOe])==null?void 0:r.parentPopper},hasPopperShowTriggerHover(){var r,e;return((r=this.popperTriggers)==null?void 0:r.includes("hover"))||((e=this.popperShowTriggers)==null?void 0:e.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(r){r?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((r,e)=>(r[e]="$_computePosition",r),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:r=null,skipDelay:e=!1,force:i=!1}={}){var n,a;(n=this.parentPopper)!=null&&n.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(i||!this.disabled)&&(((a=this.parentPopper)==null?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(r,e),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:r=null,skipDelay:e=!1}={}){var i;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:e}),this.parentPopper.lockedChild=null)},1e3));return}((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(r,e),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var r;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((r=this.referenceNode)==null?void 0:r.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const r={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&r.middleware.push(gVn({mainAxis:this.distance,crossAxis:this.skidding}));const e=this.placement.startsWith("auto");if(e?r.middleware.push(fVn({alignment:this.placement.split("-")[1]??""})):r.placement=this.placement,this.preventOverflow&&(this.shift&&r.middleware.push(EVn({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!e&&this.flip&&r.middleware.push(mVn({padding:this.overflowPadding,boundary:this.boundary}))),r.middleware.push(dVn({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&r.middleware.push({name:"arrowOverflow",fn:({placement:n,rects:a,middlewareData:o})=>{let c;const{centerOffset:h}=o.arrow;return n.startsWith("top")||n.startsWith("bottom")?c=Math.abs(h)>a.reference.width/2:c=Math.abs(h)>a.reference.height/2,{data:{overflow:c}}}}),this.autoMinSize||this.autoSize){const n=this.autoSize?this.autoSize:this.autoMinSize?"min":null;r.middleware.push({name:"autoSize",fn:({rects:a,placement:o,middlewareData:c})=>{var h;if((h=c.autoSize)!=null&&h.skip)return{};let g,_;return o.startsWith("top")||o.startsWith("bottom")?g=a.reference.width:_=a.reference.height,this.$_innerNode.style[n==="min"?"minWidth":n==="max"?"maxWidth":"width"]=g!=null?`${g}px`:null,this.$_innerNode.style[n==="min"?"minHeight":n==="max"?"maxHeight":"height"]=_!=null?`${_}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,r.middleware.push(_Vn({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:n,availableHeight:a})=>{this.$_innerNode.style.maxWidth=n!=null?`${n}px`:null,this.$_innerNode.style.maxHeight=a!=null?`${a}px`:null}})));const i=await CVn(this.$_referenceNode,this.$_popperNode,r);Object.assign(this.result,{x:i.x,y:i.y,placement:i.placement,strategy:i.strategy,arrow:{...i.middlewareData.arrow,...i.middlewareData.arrowOverflow}})},$_scheduleShow(r,e=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),sI&&this.instantMove&&sI.instantMove&&sI!==this.parentPopper){sI.$_applyHide(!0),this.$_applyShow(!0);return}e?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(r,e=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(sI=this),e?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(r){const e=this.delay;return parseInt(e&&e[r]||e||0)},async $_applyShow(r=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=r,!this.isShown&&(this.$_ensureTeleport(),await wOe(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Xxe(this.$_referenceNode),...Xxe(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const e=this.$_referenceNode.getBoundingClientRect(),i=this.$_popperNode.querySelector(".v-popper__wrapper"),n=i.parentNode.getBoundingClientRect(),a=e.x+e.width/2-(n.left+i.offsetLeft),o=e.y+e.height/2-(n.top+i.offsetTop);this.result.transformOrigin=`${a}px ${o}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const r=this.showGroup;if(r){let e;for(let i=0;i0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=r,Cxt(ay,this),ay.length===0&&document.body.classList.remove("v-popper--some-open");for(const i of Dxt(this.theme)){const n=yxt(i);Cxt(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${i}`)}sI===this&&(sI=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const e=this.disposeTimeout;e!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},e)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await wOe(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let r=this.container;if(typeof r=="string"?r=window.document.querySelector(r):r===!1&&(r=this.$_targetNodes[0].parentNode),!r)throw new Error("No container for popover: "+this.container);r.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const r=i=>{this.isShown&&!this.$_hideInProgress||(i.usedByTooltip=!0,!this.$_preventShow&&this.show({event:i}))};this.$_registerTriggerListeners(this.$_targetNodes,xxt,this.triggers,this.showTriggers,r),this.$_registerTriggerListeners([this.$_popperNode],xxt,this.popperTriggers,this.popperShowTriggers,r);const e=i=>{i.usedByTooltip||this.hide({event:i})};this.$_registerTriggerListeners(this.$_targetNodes,vxt,this.triggers,this.hideTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],vxt,this.popperTriggers,this.popperHideTriggers,e)},$_registerEventListeners(r,e,i){this.$_events.push({targetNodes:r,eventType:e,handler:i}),r.forEach(n=>n.addEventListener(e,i,g$?{passive:!0}:void 0))},$_registerTriggerListeners(r,e,i,n,a){let o=i;n!=null&&(o=typeof n=="function"?n(o):n),o.forEach(c=>{const h=e[c];h&&this.$_registerEventListeners(r,h,a)})},$_removeEventListeners(r){const e=[];this.$_events.forEach(i=>{const{targetNodes:n,eventType:a,handler:o}=i;!r||r===a?n.forEach(c=>c.removeEventListener(a,o)):e.push(i)}),this.$_events=e},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(r,e=!1){this.$_showFrameLocked||(this.hide({event:r}),r.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),e&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(r,e){for(const i of this.$_targetNodes){const n=i.getAttribute(r);n&&(i.removeAttribute(r),i.setAttribute(e,n))}},$_applyAttrsToTarget(r){for(const e of this.$_targetNodes)for(const i in r){const n=r[i];n==null?e.removeAttribute(i):e.setAttribute(i,n)}},$_updateParentShownChildren(r){let e=this.parentPopper;for(;e;)r?e.shownChildren.add(this.randomId):(e.shownChildren.delete(this.randomId),e.pendingHide&&e.hide()),e=e.parentPopper},$_isAimingPopper(){const r=this.$_referenceNode.getBoundingClientRect();if(Eue>=r.left&&Eue<=r.right&&_ue>=r.top&&_ue<=r.bottom){const e=this.$_popperNode.getBoundingClientRect(),i=Eue-IT,n=_ue-RT,a=e.left+e.width/2-IT+(e.top+e.height/2)-RT+e.width+e.height,o=IT+i*a,c=RT+n*a;return K3e(IT,RT,o,c,e.left,e.top,e.left,e.bottom)||K3e(IT,RT,o,c,e.left,e.top,e.right,e.top)||K3e(IT,RT,o,c,e.right,e.top,e.right,e.bottom)||K3e(IT,RT,o,c,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(nwt){const r=g$?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",e=>kxt(e,!0),r),document.addEventListener("touchend",e=>Fxt(e,!0),r)}else window.addEventListener("mousedown",r=>kxt(r,!1),!0),window.addEventListener("click",r=>Fxt(r,!1),!0);window.addEventListener("resize",kVn)}function kxt(r,e){if(by.autoHideOnMousedown)awt(r,e);else for(let i=0;i=0;n--){const a=ay[n];try{const o=a.containsGlobalTarget=a.mouseDownContains||a.popperNode().contains(r.target);a.pendingHide=!1,requestAnimationFrame(()=>{if(a.pendingHide=!1,!i[a.randomId]&&Axt(a,o,r)){if(a.$_handleGlobalClose(r,e),!r.closeAllPopover&&r.closePopover&&o){let h=a.parentPopper;for(;h;)i[h.randomId]=!0,h=h.parentPopper;return}let c=a.parentPopper;for(;c&&Axt(c,c.containsGlobalTarget,r);)c.$_handleGlobalClose(r,e),c=c.parentPopper}})}catch{}}}function Axt(r,e,i){return i.closeAllPopover||i.closePopover&&e||yVn(r,i)&&!e}function yVn(r,e){if(typeof r.autoHide=="function"){const i=r.autoHide(e);return r.lastAutoHide=i,i}return r.autoHide}function kVn(){for(let r=0;r{IT=Eue,RT=_ue,Eue=r.clientX,_ue=r.clientY},g$?{passive:!0}:void 0);function K3e(r,e,i,n,a,o,c,h){const g=((c-a)*(e-o)-(h-o)*(r-a))/((h-o)*(i-r)-(c-a)*(n-e)),_=((i-r)*(e-o)-(n-e)*(r-a))/((h-o)*(i-r)-(c-a)*(n-e));return g>=0&&g<=1&&_>=0&&_<=1}const FVn={extends:rwt()},HCe=(r,e)=>{const i=r.__vccOpts||r;for(const[n,a]of e)i[n]=a;return i};function AVn(r,e,i,n,a,o){return $u(),Pr("div",{ref:"reference",class:mf(["v-popper",{"v-popper--shown":r.slotData.isShown}])},[bue(r.$slots,"default",Sci(k6t(r.slotData)))],2)}const SVn=HCe(FVn,[["render",AVn]]);function BVn(){var r=window.navigator.userAgent,e=r.indexOf("MSIE ");if(e>0)return parseInt(r.substring(e+5,r.indexOf(".",e)),10);var i=r.indexOf("Trident/");if(i>0){var n=r.indexOf("rv:");return parseInt(r.substring(n+3,r.indexOf(".",n)),10)}var a=r.indexOf("Edge/");return a>0?parseInt(r.substring(a+5,r.indexOf(".",a)),10):-1}let RDe;function YWe(){YWe.init||(YWe.init=!0,RDe=BVn()!==-1)}var KCe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){YWe(),dGe(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const r=document.createElement("object");this._resizeObject=r,r.setAttribute("aria-hidden","true"),r.setAttribute("tabindex",-1),r.onload=this.addResizeHandlers,r.type="text/html",RDe&&this.$el.appendChild(r),r.data="about:blank",RDe||this.$el.appendChild(r)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!RDe&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const wVn=mdi();aae("data-v-b329ee4c");const TVn={class:"resize-observer",tabindex:"-1"};oae();const LVn=wVn((r,e,i,n,a,o)=>($u(),Pg("div",TVn)));KCe.render=LVn;KCe.__scopeId="data-v-b329ee4c";KCe.__file="src/components/ResizeObserver.vue";const owt=(r="theme")=>({computed:{themeClass(){return bVn(this[r])}}}),NVn=rg({name:"VPopperContent",components:{ResizeObserver:KCe},mixins:[owt()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(r){return r!=null&&!isNaN(r)?`${r}px`:null}}}),PVn=["id","aria-hidden","tabindex","data-popper-placement"],MVn={ref:"inner",class:"v-popper__inner"},zVn=Ci("div",{class:"v-popper__arrow-outer"},null,-1),IVn=Ci("div",{class:"v-popper__arrow-inner"},null,-1),RVn=[zVn,IVn];function OVn(r,e,i,n,a,o){const c=Cue("ResizeObserver");return $u(),Pr("div",{id:r.popperId,ref:"popover",class:mf(["v-popper__popper",[r.themeClass,r.classes.popperClass,{"v-popper__popper--shown":r.shown,"v-popper__popper--hidden":!r.shown,"v-popper__popper--show-from":r.classes.showFrom,"v-popper__popper--show-to":r.classes.showTo,"v-popper__popper--hide-from":r.classes.hideFrom,"v-popper__popper--hide-to":r.classes.hideTo,"v-popper__popper--skip-transition":r.skipTransition,"v-popper__popper--arrow-overflow":r.result&&r.result.arrow.overflow,"v-popper__popper--no-positioning":!r.result}]]),style:P3(r.result?{position:r.result.strategy,transform:`translate3d(${Math.round(r.result.x)}px,${Math.round(r.result.y)}px,0)`}:void 0),"aria-hidden":r.shown?"false":"true",tabindex:r.autoHide?0:void 0,"data-popper-placement":r.result?r.result.placement:void 0,onKeyup:e[2]||(e[2]=w6t(h=>r.autoHide&&r.$emit("hide"),["esc"]))},[Ci("div",{class:"v-popper__backdrop",onClick:e[0]||(e[0]=h=>r.autoHide&&r.$emit("hide"))}),Ci("div",{class:"v-popper__wrapper",style:P3(r.result?{transformOrigin:r.result.transformOrigin}:void 0)},[Ci("div",MVn,[r.mounted?($u(),Pr(pd,{key:0},[Ci("div",null,[bue(r.$slots,"default")]),r.handleResize?($u(),Pg(c,{key:0,onNotify:e[1]||(e[1]=h=>r.$emit("resize",h))})):Bl("",!0)],64)):Bl("",!0)],512),Ci("div",{ref:"arrow",class:"v-popper__arrow-container",style:P3(r.result?{left:r.toPx(r.result.arrow.x),top:r.toPx(r.result.arrow.y)}:void 0)},RVn,4)],4)],46,PVn)}const swt=HCe(NVn,[["render",OVn]]),lwt={methods:{show(...r){return this.$refs.popper.show(...r)},hide(...r){return this.$refs.popper.hide(...r)},dispose(...r){return this.$refs.popper.dispose(...r)},onResize(...r){return this.$refs.popper.onResize(...r)}}};let QWe=function(){};typeof window<"u"&&(QWe=window.Element);const jVn=rg({name:"VPopperWrapper",components:{Popper:SVn,PopperContent:swt},mixins:[lwt,owt("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,QWe,Boolean],default:void 0},boundary:{type:[String,QWe],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":r=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(r=>r!==this.$refs.popperContent.$el)}}});function VVn(r,e,i,n,a,o){const c=Cue("PopperContent"),h=Cue("Popper");return $u(),Pg(h,_Ge({ref:"popper"},r.$props,{theme:r.finalTheme,"target-nodes":r.getTargetNodes,"popper-node":()=>r.$refs.popperContent.$el,class:[r.themeClass],onShow:e[0]||(e[0]=()=>r.$emit("show")),onHide:e[1]||(e[1]=()=>r.$emit("hide")),"onUpdate:shown":e[2]||(e[2]=g=>r.$emit("update:shown",g)),onApplyShow:e[3]||(e[3]=()=>r.$emit("apply-show")),onApplyHide:e[4]||(e[4]=()=>r.$emit("apply-hide")),onCloseGroup:e[5]||(e[5]=()=>r.$emit("close-group")),onCloseDirective:e[6]||(e[6]=()=>r.$emit("close-directive")),onAutoHide:e[7]||(e[7]=()=>r.$emit("auto-hide")),onResize:e[8]||(e[8]=()=>r.$emit("resize"))}),{default:zL(({popperId:g,isShown:_,shouldMountContent:x,skipTransition:y,autoHide:S,show:L,hide:O,handleResize:G,onResize:ie,classes:ue,result:re})=>[bue(r.$slots,"default",{shown:_,show:L,hide:O}),dl(c,{ref:"popperContent","popper-id":g,theme:r.finalTheme,shown:_,mounted:x,"skip-transition":y,"auto-hide":S,"handle-resize":G,classes:ue,result:re,onHide:O,onResize:ie},{default:zL(()=>[bue(r.$slots,"popper",{shown:_,hide:O})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const lqe=HCe(jVn,[["render",VVn]]),HVn={...lqe,name:"VDropdown",vPopperTheme:"dropdown"},KVn={...lqe,name:"VMenu",vPopperTheme:"menu"},WVn={...lqe,name:"VTooltip",vPopperTheme:"tooltip"},GVn=rg({name:"VTooltipDirective",components:{Popper:rwt(),PopperContent:swt},mixins:[lwt],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:r=>iae(r.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:r=>iae(r.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(r){if(typeof this.content=="function"&&this.$_isShown&&(r||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const e=++this.$_fetchId,i=this.content(this);i.then?i.then(n=>this.onResult(e,n)):this.onResult(e,i)}},onResult(r,e){r===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=e)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),JVn=["innerHTML"],$Vn=["textContent"];function UVn(r,e,i,n,a,o){const c=Cue("PopperContent"),h=Cue("Popper");return $u(),Pg(h,_Ge({ref:"popper"},r.$attrs,{theme:r.theme,"target-nodes":r.targetNodes,"popper-node":()=>r.$refs.popperContent.$el,onApplyShow:r.onShow,onApplyHide:r.onHide}),{default:zL(({popperId:g,isShown:_,shouldMountContent:x,skipTransition:y,autoHide:S,hide:L,handleResize:O,onResize:G,classes:ie,result:ue})=>[dl(c,{ref:"popperContent",class:mf({"v-popper--tooltip-loading":r.loading}),"popper-id":g,theme:r.theme,shown:_,mounted:x,"skip-transition":y,"auto-hide":S,"handle-resize":O,classes:ie,result:ue,onHide:L,onResize:G},{default:zL(()=>[r.html?($u(),Pr("div",{key:0,innerHTML:r.finalContent},null,8,JVn)):($u(),Pr("div",{key:1,textContent:Ed(r.finalContent)},null,8,$Vn))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const qVn=HCe(GVn,[["render",UVn]]),cwt="v-popper--has-tooltip";function ZVn(r,e){let i=r.placement;if(!i&&e)for(const n of uwt)e[n]&&(i=n);return i||(i=iae(r.theme||"tooltip","placement")),i}function dwt(r,e,i){let n;const a=typeof e;return a==="string"?n={content:e}:e&&a==="object"?n=e:n={content:!1},n.placement=ZVn(n,i),n.targetNodes=()=>[r],n.referenceNode=()=>r,n}let LOe,nae,YVn=0;function QVn(){if(LOe)return;nae=Ks([]),LOe=T6t({name:"VTooltipDirectiveApp",setup(){return{directives:nae}},render(){return this.directives.map(e=>g1i(qVn,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});const r=document.createElement("div");document.body.appendChild(r),LOe.mount(r)}function XVn(r,e,i){QVn();const n=Ks(dwt(r,e,i)),a=Ks(!1),o={id:YVn++,options:n,shown:a};return nae.value.push(o),r.classList&&r.classList.add(cwt),r.$_popper={options:n,item:o,show(){a.value=!0},hide(){a.value=!1}}}function hwt(r){if(r.$_popper){const e=nae.value.indexOf(r.$_popper.item);e!==-1&&nae.value.splice(e,1),delete r.$_popper,delete r.$_popperOldShown,delete r.$_popperMountTarget}r.classList&&r.classList.remove(cwt)}function Sxt(r,{value:e,modifiers:i}){const n=dwt(r,e,i);if(!n.content||iae(n.theme||"tooltip","disabled"))hwt(r);else{let a;r.$_popper?(a=r.$_popper,a.options.value=n):a=XVn(r,e,i),typeof e.shown<"u"&&e.shown!==r.$_popperOldShown&&(r.$_popperOldShown=e.shown,e.shown?a.show():a.hide())}}const eHn={beforeMount:Sxt,updated:Sxt,beforeUnmount(r){hwt(r)}};function Bxt(r){r.addEventListener("mousedown",e6e),r.addEventListener("click",e6e),r.addEventListener("touchstart",fwt,g$?{passive:!0}:!1)}function wxt(r){r.removeEventListener("mousedown",e6e),r.removeEventListener("click",e6e),r.removeEventListener("touchstart",fwt),r.removeEventListener("touchend",mwt),r.removeEventListener("touchcancel",pwt)}function e6e(r){const e=r.currentTarget;r.closePopover=!e.$_vclosepopover_touch,r.closeAllPopover=e.$_closePopoverModifiers&&!!e.$_closePopoverModifiers.all}function fwt(r){if(r.changedTouches.length===1){const e=r.currentTarget;e.$_vclosepopover_touch=!0;const i=r.changedTouches[0];e.$_vclosepopover_touchPoint=i,e.addEventListener("touchend",mwt),e.addEventListener("touchcancel",pwt)}}function mwt(r){const e=r.currentTarget;if(e.$_vclosepopover_touch=!1,r.changedTouches.length===1){const i=r.changedTouches[0],n=e.$_vclosepopover_touchPoint;r.closePopover=Math.abs(i.screenY-n.screenY)<20&&Math.abs(i.screenX-n.screenX)<20,r.closeAllPopover=e.$_closePopoverModifiers&&!!e.$_closePopoverModifiers.all}}function pwt(r){const e=r.currentTarget;e.$_vclosepopover_touch=!1}const tHn={beforeMount(r,{value:e,modifiers:i}){r.$_closePopoverModifiers=i,(typeof e>"u"||e)&&Bxt(r)},updated(r,{value:e,oldValue:i,modifiers:n}){r.$_closePopoverModifiers=n,e!==i&&(typeof e>"u"||e?Bxt(r):wxt(r))},beforeUnmount(r){wxt(r)}};function iHn(r,e={}){r.$_vTooltipInstalled||(r.$_vTooltipInstalled=!0,iwt(by,e),r.directive("tooltip",eHn),r.directive("close-popper",tHn),r.component("VTooltip",WVn),r.component("VDropdown",HVn),r.component("VMenu",KVn))}const nHn={version:"5.2.2",install:iHn,options:by};window.moment=Ro;window.document.title="Logdy";IDe.initTheme();T6t(iVn).use(mhi()).use(nHn,{themes:{tooltip:{distance:4,delay:{show:400,hide:0}}}}).mount("#app");export{Iae as m,ekt as t}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./javascript-cfyOAlAk.js","./typescript-5e93KqQu.js"] + __vite__mapDeps.viteFileDeps = ["./javascript-G8ibxNWS.js","./typescript-2sy1hHBH.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/http/assets/assets/javascript-cfyOAlAk.js b/http/assets/assets/javascript-G8ibxNWS.js similarity index 89% rename from http/assets/assets/javascript-cfyOAlAk.js rename to http/assets/assets/javascript-G8ibxNWS.js index d57b416..c48fec5 100644 --- a/http/assets/assets/javascript-cfyOAlAk.js +++ b/http/assets/assets/javascript-G8ibxNWS.js @@ -1,4 +1,4 @@ -import{conf as t,language as e}from"./typescript-5e93KqQu.js";import"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{conf as t,language as e}from"./typescript-2sy1hHBH.js";import"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/jsonMode-gyZTIlQx.js b/http/assets/assets/jsonMode-GZTrdMHu.js similarity index 99% rename from http/assets/assets/jsonMode-gyZTIlQx.js rename to http/assets/assets/jsonMode-GZTrdMHu.js index 1941d8a..31b5240 100644 --- a/http/assets/assets/jsonMode-gyZTIlQx.js +++ b/http/assets/assets/jsonMode-GZTrdMHu.js @@ -1,4 +1,4 @@ -var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var C=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +var Ge=Object.defineProperty;var Qe=(e,n,i)=>n in e?Ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var C=(e,n,i)=>(Qe(e,typeof n!="symbol"?n+"":n,i),i);import{m as Ze}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/liquid-iWsMlhOa.js b/http/assets/assets/liquid-Zy35w6eA.js similarity index 98% rename from http/assets/assets/liquid-iWsMlhOa.js rename to http/assets/assets/liquid-Zy35w6eA.js index 115a0d8..f3eaeee 100644 --- a/http/assets/assets/liquid-iWsMlhOa.js +++ b/http/assets/assets/liquid-Zy35w6eA.js @@ -1,4 +1,4 @@ -import{m as d}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/python-n0zHsyM5.js b/http/assets/assets/python-7RWCIHCj.js similarity index 98% rename from http/assets/assets/python-n0zHsyM5.js rename to http/assets/assets/python-7RWCIHCj.js index 2fb62c0..f93262a 100644 --- a/http/assets/assets/python-n0zHsyM5.js +++ b/http/assets/assets/python-7RWCIHCj.js @@ -1,4 +1,4 @@ -import{m as a}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/razor-2MoH6A7O.js b/http/assets/assets/razor-JV-AagFB.js similarity index 99% rename from http/assets/assets/razor-2MoH6A7O.js rename to http/assets/assets/razor-JV-AagFB.js index 4dcf869..4ddc579 100644 --- a/http/assets/assets/razor-2MoH6A7O.js +++ b/http/assets/assets/razor-JV-AagFB.js @@ -1,4 +1,4 @@ -import{m as s}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m as s}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/tsMode-721bft5-.js b/http/assets/assets/tsMode-PBOrm3-u.js similarity index 99% rename from http/assets/assets/tsMode-721bft5-.js rename to http/assets/assets/tsMode-PBOrm3-u.js index a062c10..8e6f1bf 100644 --- a/http/assets/assets/tsMode-721bft5-.js +++ b/http/assets/assets/tsMode-PBOrm3-u.js @@ -1,4 +1,4 @@ -var M=Object.defineProperty;var R=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(R(e,typeof t!="symbol"?t+"":t,r),r);import{t as K,m as E}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +var M=Object.defineProperty;var R=(e,t,r)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(R(e,typeof t!="symbol"?t+"":t,r),r);import{t as K,m as E}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/typescript-5e93KqQu.js b/http/assets/assets/typescript-2sy1hHBH.js similarity index 98% rename from http/assets/assets/typescript-5e93KqQu.js rename to http/assets/assets/typescript-2sy1hHBH.js index 2cbcf1d..1e0ea50 100644 --- a/http/assets/assets/typescript-5e93KqQu.js +++ b/http/assets/assets/typescript-2sy1hHBH.js @@ -1,4 +1,4 @@ -import{m as a}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/xml-pvMAvvEZ.js b/http/assets/assets/xml-W8IHW2kN.js similarity index 97% rename from http/assets/assets/xml-pvMAvvEZ.js rename to http/assets/assets/xml-W8IHW2kN.js index 5d95532..2e885b6 100644 --- a/http/assets/assets/xml-pvMAvvEZ.js +++ b/http/assets/assets/xml-W8IHW2kN.js @@ -1,4 +1,4 @@ -import{m}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/assets/yaml-WQY7k5Mr.js b/http/assets/assets/yaml-_k6aUJBN.js similarity index 98% rename from http/assets/assets/yaml-WQY7k5Mr.js rename to http/assets/assets/yaml-_k6aUJBN.js index 1f0da15..de0cf78 100644 --- a/http/assets/assets/yaml-WQY7k5Mr.js +++ b/http/assets/assets/yaml-_k6aUJBN.js @@ -1,4 +1,4 @@ -import{m as i}from"./index-b0PXBNwI.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index-66H2BNEh.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.37.1(20a8d5a651d057aaed7875ad1c1f2ecf13c4e773) * Released under the MIT license diff --git a/http/assets/index.html b/http/assets/index.html index 7fe964e..5e68a10 100644 --- a/http/assets/index.html +++ b/http/assets/index.html @@ -29,7 +29,7 @@ - +