From 5287f5b6b7f4528c6c18de4ed9ff598de51da473 Mon Sep 17 00:00:00 2001 From: slhmy Date: Sat, 28 Oct 2023 03:48:39 +0000 Subject: [PATCH] deploy: b0a1bd03a1fb7e08e682fdf00bd9ff227b9dcc8f --- assets/{cssMode.78cef928.js => cssMode.aaa4f85d.js} | 2 +- ...eemarker2.b84ec2a1.js => freemarker2.d092c0b3.js} | 2 +- ...handlebars.c2e75360.js => handlebars.a2f8ba4f.js} | 2 +- assets/{html.f1e27591.js => html.b12c41cf.js} | 2 +- .../{htmlMode.4a6860a1.js => htmlMode.2f60efb3.js} | 2 +- assets/{index.1d2d0b83.js => index.abf9ca5d.js} | 12 ++++++------ ...javascript.b733d9e6.js => javascript.5f6101f8.js} | 2 +- .../{jsonMode.9fde1613.js => jsonMode.18498886.js} | 2 +- assets/{liquid.a6fd7aeb.js => liquid.9a397b90.js} | 2 +- assets/{python.9ec4f778.js => python.8b723ab4.js} | 2 +- assets/{razor.8930d238.js => razor.cdac407a.js} | 2 +- assets/{tsMode.eb5d7719.js => tsMode.079db6ff.js} | 2 +- ...typescript.05dcf72e.js => typescript.4803e578.js} | 2 +- assets/{xml.2872fc70.js => xml.dc9ae6c8.js} | 2 +- assets/{yaml.472493f9.js => yaml.c6e4338d.js} | 2 +- index.html | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) rename assets/{cssMode.78cef928.js => cssMode.aaa4f85d.js} (99%) rename assets/{freemarker2.b84ec2a1.js => freemarker2.d092c0b3.js} (99%) rename assets/{handlebars.c2e75360.js => handlebars.a2f8ba4f.js} (99%) rename assets/{html.f1e27591.js => html.b12c41cf.js} (98%) rename assets/{htmlMode.4a6860a1.js => htmlMode.2f60efb3.js} (99%) rename assets/{index.1d2d0b83.js => index.abf9ca5d.js} (99%) rename assets/{javascript.b733d9e6.js => javascript.5f6101f8.js} (89%) rename assets/{jsonMode.9fde1613.js => jsonMode.18498886.js} (99%) rename assets/{liquid.a6fd7aeb.js => liquid.9a397b90.js} (98%) rename assets/{python.9ec4f778.js => python.8b723ab4.js} (98%) rename assets/{razor.8930d238.js => razor.cdac407a.js} (99%) rename assets/{tsMode.eb5d7719.js => tsMode.079db6ff.js} (99%) rename assets/{typescript.05dcf72e.js => typescript.4803e578.js} (98%) rename assets/{xml.2872fc70.js => xml.dc9ae6c8.js} (97%) rename assets/{yaml.472493f9.js => yaml.c6e4338d.js} (98%) diff --git a/assets/cssMode.78cef928.js b/assets/cssMode.aaa4f85d.js similarity index 99% rename from assets/cssMode.78cef928.js rename to assets/cssMode.aaa4f85d.js index 74d1ee6e5..c5efef3ea 100644 --- a/assets/cssMode.78cef928.js +++ b/assets/cssMode.aaa4f85d.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.1d2d0b83.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.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/freemarker2.b84ec2a1.js b/assets/freemarker2.d092c0b3.js similarity index 99% rename from assets/freemarker2.b84ec2a1.js rename to assets/freemarker2.d092c0b3.js index bc7c72e39..ce76c5808 100644 --- a/assets/freemarker2.b84ec2a1.js +++ b/assets/freemarker2.d092c0b3.js @@ -1,4 +1,4 @@ -import{m as F}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m as F}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/handlebars.c2e75360.js b/assets/handlebars.a2f8ba4f.js similarity index 99% rename from assets/handlebars.c2e75360.js rename to assets/handlebars.a2f8ba4f.js index c74f27fd4..6511941f8 100644 --- a/assets/handlebars.c2e75360.js +++ b/assets/handlebars.a2f8ba4f.js @@ -1,4 +1,4 @@ -import{m as i}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/html.f1e27591.js b/assets/html.b12c41cf.js similarity index 98% rename from assets/html.f1e27591.js rename to assets/html.b12c41cf.js index 965c5fbd5..56bf68d20 100644 --- a/assets/html.f1e27591.js +++ b/assets/html.b12c41cf.js @@ -1,4 +1,4 @@ -import{m as d}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/htmlMode.4a6860a1.js b/assets/htmlMode.2f60efb3.js similarity index 99% rename from assets/htmlMode.4a6860a1.js rename to assets/htmlMode.2f60efb3.js index 143c5a60f..10d56ec02 100644 --- a/assets/htmlMode.4a6860a1.js +++ b/assets/htmlMode.2f60efb3.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.1d2d0b83.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.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/index.1d2d0b83.js b/assets/index.abf9ca5d.js similarity index 99% rename from assets/index.1d2d0b83.js rename to assets/index.abf9ca5d.js index e0991bc9e..6cd4d59a1 100644 --- a/assets/index.1d2d0b83.js +++ b/assets/index.abf9ca5d.js @@ -877,27 +877,27 @@ ${e.toString()}`}}class xH{constructor(e=new fF,t=!1,i,r=vQt){var o;this._servic * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Eyt=Object.defineProperty,kyt=Object.getOwnPropertyDescriptor,Myt=Object.getOwnPropertyNames,Ayt=Object.prototype.hasOwnProperty,Fme=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Myt(e))!Ayt.call(n,r)&&r!==t&&Eyt(n,r,{get:()=>e[r],enumerable:!(i=kyt(e,r))||i.enumerable});return n},Nyt=(n,e,t)=>(Fme(n,e,"default"),t&&Fme(t,e,"default")),Iw={};Nyt(Iw,wD);var WNe={},OZ={},zNe=class{constructor(n){lo(this,"_languageId");lo(this,"_loadingTriggered");lo(this,"_lazyLoadPromise");lo(this,"_lazyLoadPromiseResolve");lo(this,"_lazyLoadPromiseReject");this._languageId=n,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(n){return OZ[n]||(OZ[n]=new zNe(n)),OZ[n]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,WNe[this._languageId].loader().then(n=>this._lazyLoadPromiseResolve(n),n=>this._lazyLoadPromiseReject(n))),this._lazyLoadPromise}};function en(n){const e=n.id;WNe[e]=n,Iw.languages.register(n);const t=zNe.getOrCreate(e);Iw.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),Iw.languages.onLanguageEncountered(e,async()=>{const i=await t.load();Iw.languages.setLanguageConfiguration(e,i.conf)})}en({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Gt(()=>import("./abap.8d9655f4.js"),[])});en({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Gt(()=>import("./apex.b3189065.js"),[])});en({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Gt(()=>import("./azcli.f7531e17.js"),[])});en({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Gt(()=>import("./bat.9ae253b7.js"),[])});en({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Gt(()=>import("./bicep.a3d6e787.js"),[])});en({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Gt(()=>import("./cameligo.8bf9720b.js"),[])});en({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Gt(()=>import("./clojure.04114cb8.js"),[])});en({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Gt(()=>import("./coffee.28837354.js"),[])});en({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Gt(()=>import("./cpp.deebc619.js"),[])});en({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Gt(()=>import("./cpp.deebc619.js"),[])});en({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Gt(()=>import("./csharp.648409de.js"),[])});en({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Gt(()=>import("./csp.66b6c869.js"),[])});en({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Gt(()=>import("./css.6bedf661.js"),[])});en({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Gt(()=>import("./cypher.00e41e23.js"),[])});en({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Gt(()=>import("./dart.cfde4211.js"),[])});en({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Gt(()=>import("./dockerfile.84a15201.js"),[])});en({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Gt(()=>import("./ecl.5abc946e.js"),[])});en({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Gt(()=>import("./elixir.db33105a.js"),[])});en({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Gt(()=>import("./flow9.1d4111c6.js"),[])});en({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Gt(()=>import("./fsharp.93aab1ff.js"),[])});en({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Gt(()=>import("./freemarker2.b84ec2a1.js"),[]).then(n=>n.TagAutoInterpolationDollar)});en({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Gt(()=>import("./freemarker2.b84ec2a1.js"),[]).then(n=>n.TagAngleInterpolationDollar)});en({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Gt(()=>import("./freemarker2.b84ec2a1.js"),[]).then(n=>n.TagBracketInterpolationDollar)});en({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Gt(()=>import("./freemarker2.b84ec2a1.js"),[]).then(n=>n.TagAngleInterpolationBracket)});en({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Gt(()=>import("./freemarker2.b84ec2a1.js"),[]).then(n=>n.TagBracketInterpolationBracket)});en({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Gt(()=>import("./freemarker2.b84ec2a1.js"),[]).then(n=>n.TagAutoInterpolationDollar)});en({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Gt(()=>import("./freemarker2.b84ec2a1.js"),[]).then(n=>n.TagAutoInterpolationBracket)});en({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Gt(()=>import("./go.98392917.js"),[])});en({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Gt(()=>import("./graphql.bf914c4a.js"),[])});en({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Gt(()=>import("./handlebars.c2e75360.js"),[])});en({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Gt(()=>import("./hcl.4f8b160a.js"),[])});en({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:()=>Gt(()=>import("./html.f1e27591.js"),[])});en({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Gt(()=>import("./ini.977f833e.js"),[])});en({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Gt(()=>import("./java.ae14ac73.js"),[])});en({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Gt(()=>import("./javascript.b733d9e6.js"),["assets/javascript.b733d9e6.js","assets/typescript.05dcf72e.js"])});en({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Gt(()=>import("./julia.dd67b955.js"),[])});en({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Gt(()=>import("./kotlin.23505027.js"),[])});en({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Gt(()=>import("./less.738fa250.js"),[])});en({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Gt(()=>import("./lexon.529339b0.js"),[])});en({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Gt(()=>import("./lua.18489a57.js"),[])});en({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Gt(()=>import("./liquid.a6fd7aeb.js"),[])});en({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Gt(()=>import("./m3.a6ef8080.js"),[])});en({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Gt(()=>import("./markdown.91cb7aa5.js"),[])});en({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Gt(()=>import("./mips.e7073e82.js"),[])});en({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Gt(()=>import("./msdax.33524897.js"),[])});en({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Gt(()=>import("./mysql.22cfb043.js"),[])});en({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Gt(()=>import("./objective-c.33bdf997.js"),[])});en({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Gt(()=>import("./pascal.633311c1.js"),[])});en({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Gt(()=>import("./pascaligo.d06b8aeb.js"),[])});en({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Gt(()=>import("./perl.6e113f1a.js"),[])});en({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Gt(()=>import("./pgsql.9b5e9017.js"),[])});en({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Gt(()=>import("./php.78d0eac3.js"),[])});en({id:"pla",extensions:[".pla"],loader:()=>Gt(()=>import("./pla.151fc74d.js"),[])});en({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Gt(()=>import("./postiats.17b61568.js"),[])});en({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Gt(()=>import("./powerquery.f8c48499.js"),[])});en({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Gt(()=>import("./powershell.609e2cf8.js"),[])});en({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Gt(()=>import("./protobuf.b1b6abd2.js"),[])});en({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Gt(()=>import("./pug.ee488ef4.js"),[])});en({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Gt(()=>import("./python.9ec4f778.js"),[])});en({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Gt(()=>import("./qsharp.c080fdf2.js"),[])});en({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Gt(()=>import("./r.46e01e78.js"),[])});en({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Gt(()=>import("./razor.8930d238.js"),[])});en({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Gt(()=>import("./redis.435c6619.js"),[])});en({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Gt(()=>import("./redshift.99a0e43e.js"),[])});en({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Gt(()=>import("./restructuredtext.1c9767eb.js"),[])});en({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Gt(()=>import("./ruby.a72a608d.js"),[])});en({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Gt(()=>import("./rust.5054347b.js"),[])});en({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Gt(()=>import("./sb.9c04a17e.js"),[])});en({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:()=>Gt(()=>import("./scala.963f3b7e.js"),[])});en({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Gt(()=>import("./scheme.ba91b63a.js"),[])});en({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Gt(()=>import("./scss.e98cebc6.js"),[])});en({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Gt(()=>import("./shell.a82e99e2.js"),[])});en({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Gt(()=>import("./solidity.b8e46684.js"),[])});en({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Gt(()=>import("./sophia.1771ec47.js"),[])});en({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Gt(()=>import("./sparql.2a37b27c.js"),[])});en({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Gt(()=>import("./sql.38f3f2d0.js"),[])});en({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>Gt(()=>import("./st.f2e86a7e.js"),[])});en({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Gt(()=>import("./swift.d105dd84.js"),[])});en({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Gt(()=>import("./systemverilog.fd8f498a.js"),[])});en({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Gt(()=>import("./systemverilog.fd8f498a.js"),[])});en({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Gt(()=>import("./tcl.bce48484.js"),[])});en({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Gt(()=>import("./twig.638e34ac.js"),[])});en({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Gt(()=>import("./typescript.05dcf72e.js"),[])});en({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Gt(()=>import("./vb.1c00933e.js"),[])});en({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Gt(()=>import("./wgsl.eaaedc4b.js"),[])});en({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Gt(()=>import("./xml.2872fc70.js"),[])});en({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Gt(()=>import("./yaml.472493f9.js"),[])});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Eyt=Object.defineProperty,kyt=Object.getOwnPropertyDescriptor,Myt=Object.getOwnPropertyNames,Ayt=Object.prototype.hasOwnProperty,Fme=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Myt(e))!Ayt.call(n,r)&&r!==t&&Eyt(n,r,{get:()=>e[r],enumerable:!(i=kyt(e,r))||i.enumerable});return n},Nyt=(n,e,t)=>(Fme(n,e,"default"),t&&Fme(t,e,"default")),Iw={};Nyt(Iw,wD);var WNe={},OZ={},zNe=class{constructor(n){lo(this,"_languageId");lo(this,"_loadingTriggered");lo(this,"_lazyLoadPromise");lo(this,"_lazyLoadPromiseResolve");lo(this,"_lazyLoadPromiseReject");this._languageId=n,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t})}static getOrCreate(n){return OZ[n]||(OZ[n]=new zNe(n)),OZ[n]}load(){return this._loadingTriggered||(this._loadingTriggered=!0,WNe[this._languageId].loader().then(n=>this._lazyLoadPromiseResolve(n),n=>this._lazyLoadPromiseReject(n))),this._lazyLoadPromise}};function en(n){const e=n.id;WNe[e]=n,Iw.languages.register(n);const t=zNe.getOrCreate(e);Iw.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),Iw.languages.onLanguageEncountered(e,async()=>{const i=await t.load();Iw.languages.setLanguageConfiguration(e,i.conf)})}en({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Gt(()=>import("./abap.8d9655f4.js"),[])});en({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Gt(()=>import("./apex.b3189065.js"),[])});en({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Gt(()=>import("./azcli.f7531e17.js"),[])});en({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Gt(()=>import("./bat.9ae253b7.js"),[])});en({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Gt(()=>import("./bicep.a3d6e787.js"),[])});en({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Gt(()=>import("./cameligo.8bf9720b.js"),[])});en({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Gt(()=>import("./clojure.04114cb8.js"),[])});en({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Gt(()=>import("./coffee.28837354.js"),[])});en({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Gt(()=>import("./cpp.deebc619.js"),[])});en({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Gt(()=>import("./cpp.deebc619.js"),[])});en({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Gt(()=>import("./csharp.648409de.js"),[])});en({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Gt(()=>import("./csp.66b6c869.js"),[])});en({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Gt(()=>import("./css.6bedf661.js"),[])});en({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>Gt(()=>import("./cypher.00e41e23.js"),[])});en({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Gt(()=>import("./dart.cfde4211.js"),[])});en({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Gt(()=>import("./dockerfile.84a15201.js"),[])});en({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Gt(()=>import("./ecl.5abc946e.js"),[])});en({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Gt(()=>import("./elixir.db33105a.js"),[])});en({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Gt(()=>import("./flow9.1d4111c6.js"),[])});en({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Gt(()=>import("./fsharp.93aab1ff.js"),[])});en({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Gt(()=>import("./freemarker2.d092c0b3.js"),[]).then(n=>n.TagAutoInterpolationDollar)});en({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Gt(()=>import("./freemarker2.d092c0b3.js"),[]).then(n=>n.TagAngleInterpolationDollar)});en({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Gt(()=>import("./freemarker2.d092c0b3.js"),[]).then(n=>n.TagBracketInterpolationDollar)});en({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Gt(()=>import("./freemarker2.d092c0b3.js"),[]).then(n=>n.TagAngleInterpolationBracket)});en({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Gt(()=>import("./freemarker2.d092c0b3.js"),[]).then(n=>n.TagBracketInterpolationBracket)});en({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Gt(()=>import("./freemarker2.d092c0b3.js"),[]).then(n=>n.TagAutoInterpolationDollar)});en({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Gt(()=>import("./freemarker2.d092c0b3.js"),[]).then(n=>n.TagAutoInterpolationBracket)});en({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Gt(()=>import("./go.98392917.js"),[])});en({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Gt(()=>import("./graphql.bf914c4a.js"),[])});en({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Gt(()=>import("./handlebars.a2f8ba4f.js"),[])});en({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Gt(()=>import("./hcl.4f8b160a.js"),[])});en({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:()=>Gt(()=>import("./html.b12c41cf.js"),[])});en({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Gt(()=>import("./ini.977f833e.js"),[])});en({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Gt(()=>import("./java.ae14ac73.js"),[])});en({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Gt(()=>import("./javascript.5f6101f8.js"),["assets/javascript.5f6101f8.js","assets/typescript.4803e578.js"])});en({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Gt(()=>import("./julia.dd67b955.js"),[])});en({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Gt(()=>import("./kotlin.23505027.js"),[])});en({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Gt(()=>import("./less.738fa250.js"),[])});en({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Gt(()=>import("./lexon.529339b0.js"),[])});en({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Gt(()=>import("./lua.18489a57.js"),[])});en({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Gt(()=>import("./liquid.9a397b90.js"),[])});en({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Gt(()=>import("./m3.a6ef8080.js"),[])});en({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Gt(()=>import("./markdown.91cb7aa5.js"),[])});en({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Gt(()=>import("./mips.e7073e82.js"),[])});en({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Gt(()=>import("./msdax.33524897.js"),[])});en({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Gt(()=>import("./mysql.22cfb043.js"),[])});en({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Gt(()=>import("./objective-c.33bdf997.js"),[])});en({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Gt(()=>import("./pascal.633311c1.js"),[])});en({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Gt(()=>import("./pascaligo.d06b8aeb.js"),[])});en({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>Gt(()=>import("./perl.6e113f1a.js"),[])});en({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Gt(()=>import("./pgsql.9b5e9017.js"),[])});en({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Gt(()=>import("./php.78d0eac3.js"),[])});en({id:"pla",extensions:[".pla"],loader:()=>Gt(()=>import("./pla.151fc74d.js"),[])});en({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Gt(()=>import("./postiats.17b61568.js"),[])});en({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Gt(()=>import("./powerquery.f8c48499.js"),[])});en({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Gt(()=>import("./powershell.609e2cf8.js"),[])});en({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Gt(()=>import("./protobuf.b1b6abd2.js"),[])});en({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Gt(()=>import("./pug.ee488ef4.js"),[])});en({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Gt(()=>import("./python.8b723ab4.js"),[])});en({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Gt(()=>import("./qsharp.c080fdf2.js"),[])});en({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Gt(()=>import("./r.46e01e78.js"),[])});en({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Gt(()=>import("./razor.cdac407a.js"),[])});en({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Gt(()=>import("./redis.435c6619.js"),[])});en({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Gt(()=>import("./redshift.99a0e43e.js"),[])});en({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Gt(()=>import("./restructuredtext.1c9767eb.js"),[])});en({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Gt(()=>import("./ruby.a72a608d.js"),[])});en({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Gt(()=>import("./rust.5054347b.js"),[])});en({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Gt(()=>import("./sb.9c04a17e.js"),[])});en({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:()=>Gt(()=>import("./scala.963f3b7e.js"),[])});en({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Gt(()=>import("./scheme.ba91b63a.js"),[])});en({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Gt(()=>import("./scss.e98cebc6.js"),[])});en({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Gt(()=>import("./shell.a82e99e2.js"),[])});en({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Gt(()=>import("./solidity.b8e46684.js"),[])});en({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Gt(()=>import("./sophia.1771ec47.js"),[])});en({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Gt(()=>import("./sparql.2a37b27c.js"),[])});en({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Gt(()=>import("./sql.38f3f2d0.js"),[])});en({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>Gt(()=>import("./st.f2e86a7e.js"),[])});en({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Gt(()=>import("./swift.d105dd84.js"),[])});en({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Gt(()=>import("./systemverilog.fd8f498a.js"),[])});en({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Gt(()=>import("./systemverilog.fd8f498a.js"),[])});en({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Gt(()=>import("./tcl.bce48484.js"),[])});en({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Gt(()=>import("./twig.638e34ac.js"),[])});en({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Gt(()=>import("./typescript.4803e578.js"),[])});en({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Gt(()=>import("./vb.1c00933e.js"),[])});en({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>Gt(()=>import("./wgsl.eaaedc4b.js"),[])});en({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Gt(()=>import("./xml.dc9ae6c8.js"),[])});en({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Gt(()=>import("./yaml.c6e4338d.js"),[])});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Oyt=Object.defineProperty,Iyt=Object.getOwnPropertyDescriptor,Ryt=Object.getOwnPropertyNames,Hyt=Object.prototype.hasOwnProperty,Bme=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ryt(e))!Hyt.call(n,r)&&r!==t&&Oyt(n,r,{get:()=>e[r],enumerable:!(i=Iyt(e,r))||i.enumerable});return n},Pyt=(n,e,t)=>(Bme(n,e,"default"),t&&Bme(t,e,"default")),ub={};Pyt(ub,wD);var nce=class{constructor(n,e,t){lo(this,"_onDidChange",new ub.Emitter);lo(this,"_options");lo(this,"_modeConfiguration");lo(this,"_languageId");this._languageId=n,this.setOptions(e),this.setModeConfiguration(t)}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(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(n){this.setOptions(n)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},ice={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}},rce={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},UNe=new nce("css",ice,rce),qNe=new nce("scss",ice,rce),GNe=new nce("less",ice,rce);ub.languages.css={cssDefaults:UNe,lessDefaults:GNe,scssDefaults:qNe};function oce(){return Gt(()=>import("./cssMode.78cef928.js"),[])}ub.languages.onLanguage("less",()=>{oce().then(n=>n.setupMode(GNe))});ub.languages.onLanguage("scss",()=>{oce().then(n=>n.setupMode(qNe))});ub.languages.onLanguage("css",()=>{oce().then(n=>n.setupMode(UNe))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Oyt=Object.defineProperty,Iyt=Object.getOwnPropertyDescriptor,Ryt=Object.getOwnPropertyNames,Hyt=Object.prototype.hasOwnProperty,Bme=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ryt(e))!Hyt.call(n,r)&&r!==t&&Oyt(n,r,{get:()=>e[r],enumerable:!(i=Iyt(e,r))||i.enumerable});return n},Pyt=(n,e,t)=>(Bme(n,e,"default"),t&&Bme(t,e,"default")),ub={};Pyt(ub,wD);var nce=class{constructor(n,e,t){lo(this,"_onDidChange",new ub.Emitter);lo(this,"_options");lo(this,"_modeConfiguration");lo(this,"_languageId");this._languageId=n,this.setOptions(e),this.setModeConfiguration(t)}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(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(n){this.setOptions(n)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},ice={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}},rce={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},UNe=new nce("css",ice,rce),qNe=new nce("scss",ice,rce),GNe=new nce("less",ice,rce);ub.languages.css={cssDefaults:UNe,lessDefaults:GNe,scssDefaults:qNe};function oce(){return Gt(()=>import("./cssMode.aaa4f85d.js"),[])}ub.languages.onLanguage("less",()=>{oce().then(n=>n.setupMode(GNe))});ub.languages.onLanguage("scss",()=>{oce().then(n=>n.setupMode(qNe))});ub.languages.onLanguage("css",()=>{oce().then(n=>n.setupMode(UNe))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Vyt=Object.defineProperty,Fyt=Object.getOwnPropertyDescriptor,Byt=Object.getOwnPropertyNames,$yt=Object.prototype.hasOwnProperty,$me=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Byt(e))!$yt.call(n,r)&&r!==t&&Vyt(n,r,{get:()=>e[r],enumerable:!(i=Fyt(e,r))||i.enumerable});return n},jyt=(n,e,t)=>($me(n,e,"default"),t&&$me(t,e,"default")),RF={};jyt(RF,wD);var Wyt=class{constructor(n,e,t){lo(this,"_onDidChange",new RF.Emitter);lo(this,"_options");lo(this,"_modeConfiguration");lo(this,"_languageId");this._languageId=n,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},zyt={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"},HF={format:zyt,suggest:{},data:{useDefaultDataProvider:!0}};function PF(n){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:n===yx,documentFormattingEdits:n===yx,documentRangeFormattingEdits:n===yx}}var yx="html",jme="handlebars",Wme="razor",KNe=VF(yx,HF,PF(yx)),Uyt=KNe.defaults,ZNe=VF(jme,HF,PF(jme)),qyt=ZNe.defaults,XNe=VF(Wme,HF,PF(Wme)),Gyt=XNe.defaults;RF.languages.html={htmlDefaults:Uyt,razorDefaults:Gyt,handlebarDefaults:qyt,htmlLanguageService:KNe,handlebarLanguageService:ZNe,razorLanguageService:XNe,registerHTMLLanguageService:VF};function Kyt(){return Gt(()=>import("./htmlMode.4a6860a1.js"),[])}function VF(n,e=HF,t=PF(n)){const i=new Wyt(n,e,t);let r;const o=RF.languages.onLanguage(n,async()=>{r=(await Kyt()).setupMode(i)});return{defaults:i,dispose(){o.dispose(),r==null||r.dispose(),r=void 0}}}/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Vyt=Object.defineProperty,Fyt=Object.getOwnPropertyDescriptor,Byt=Object.getOwnPropertyNames,$yt=Object.prototype.hasOwnProperty,$me=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Byt(e))!$yt.call(n,r)&&r!==t&&Vyt(n,r,{get:()=>e[r],enumerable:!(i=Fyt(e,r))||i.enumerable});return n},jyt=(n,e,t)=>($me(n,e,"default"),t&&$me(t,e,"default")),RF={};jyt(RF,wD);var Wyt=class{constructor(n,e,t){lo(this,"_onDidChange",new RF.Emitter);lo(this,"_options");lo(this,"_modeConfiguration");lo(this,"_languageId");this._languageId=n,this.setOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},zyt={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"},HF={format:zyt,suggest:{},data:{useDefaultDataProvider:!0}};function PF(n){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:n===yx,documentFormattingEdits:n===yx,documentRangeFormattingEdits:n===yx}}var yx="html",jme="handlebars",Wme="razor",KNe=VF(yx,HF,PF(yx)),Uyt=KNe.defaults,ZNe=VF(jme,HF,PF(jme)),qyt=ZNe.defaults,XNe=VF(Wme,HF,PF(Wme)),Gyt=XNe.defaults;RF.languages.html={htmlDefaults:Uyt,razorDefaults:Gyt,handlebarDefaults:qyt,htmlLanguageService:KNe,handlebarLanguageService:ZNe,razorLanguageService:XNe,registerHTMLLanguageService:VF};function Kyt(){return Gt(()=>import("./htmlMode.2f60efb3.js"),[])}function VF(n,e=HF,t=PF(n)){const i=new Wyt(n,e,t);let r;const o=RF.languages.onLanguage(n,async()=>{r=(await Kyt()).setupMode(i)});return{defaults:i,dispose(){o.dispose(),r==null||r.dispose(),r=void 0}}}/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var Zyt=Object.defineProperty,Xyt=Object.getOwnPropertyDescriptor,Yyt=Object.getOwnPropertyNames,Jyt=Object.prototype.hasOwnProperty,zme=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Yyt(e))!Jyt.call(n,r)&&r!==t&&Zyt(n,r,{get:()=>e[r],enumerable:!(i=Xyt(e,r))||i.enumerable});return n},e_t=(n,e,t)=>(zme(n,e,"default"),t&&zme(t,e,"default")),xD={};e_t(xD,wD);var t_t=class{constructor(n,e,t){lo(this,"_onDidChange",new xD.Emitter);lo(this,"_diagnosticsOptions");lo(this,"_modeConfiguration");lo(this,"_languageId");this._languageId=n,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},n_t={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},i_t={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},YNe=new t_t("json",n_t,i_t);xD.languages.json={jsonDefaults:YNe};function r_t(){return Gt(()=>import("./jsonMode.9fde1613.js"),[])}xD.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});xD.languages.onLanguage("json",()=>{r_t().then(n=>n.setupMode(YNe))});/*!----------------------------------------------------------------------------- + *-----------------------------------------------------------------------------*/var Zyt=Object.defineProperty,Xyt=Object.getOwnPropertyDescriptor,Yyt=Object.getOwnPropertyNames,Jyt=Object.prototype.hasOwnProperty,zme=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Yyt(e))!Jyt.call(n,r)&&r!==t&&Zyt(n,r,{get:()=>e[r],enumerable:!(i=Xyt(e,r))||i.enumerable});return n},e_t=(n,e,t)=>(zme(n,e,"default"),t&&zme(t,e,"default")),xD={};e_t(xD,wD);var t_t=class{constructor(n,e,t){lo(this,"_onDidChange",new xD.Emitter);lo(this,"_diagnosticsOptions");lo(this,"_modeConfiguration");lo(this,"_languageId");this._languageId=n,this.setDiagnosticsOptions(e),this.setModeConfiguration(t)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},n_t={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},i_t={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},YNe=new t_t("json",n_t,i_t);xD.languages.json={jsonDefaults:YNe};function r_t(){return Gt(()=>import("./jsonMode.18498886.js"),[])}xD.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});xD.languages.onLanguage("json",()=>{r_t().then(n=>n.setupMode(YNe))});/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/var o_t=Object.defineProperty,s_t=Object.getOwnPropertyDescriptor,a_t=Object.getOwnPropertyNames,l_t=Object.prototype.hasOwnProperty,Ume=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of a_t(e))!l_t.call(n,r)&&r!==t&&o_t(n,r,{get:()=>e[r],enumerable:!(i=s_t(e,r))||i.enumerable});return n},u_t=(n,e,t)=>(Ume(n,e,"default"),t&&Ume(t,e,"default")),c_t="5.0.2",hQ={};u_t(hQ,wD);var JNe=(n=>(n[n.None=0]="None",n[n.CommonJS=1]="CommonJS",n[n.AMD=2]="AMD",n[n.UMD=3]="UMD",n[n.System=4]="System",n[n.ES2015=5]="ES2015",n[n.ESNext=99]="ESNext",n))(JNe||{}),eOe=(n=>(n[n.None=0]="None",n[n.Preserve=1]="Preserve",n[n.React=2]="React",n[n.ReactNative=3]="ReactNative",n[n.ReactJSX=4]="ReactJSX",n[n.ReactJSXDev=5]="ReactJSXDev",n))(eOe||{}),tOe=(n=>(n[n.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",n[n.LineFeed=1]="LineFeed",n))(tOe||{}),nOe=(n=>(n[n.ES3=0]="ES3",n[n.ES5=1]="ES5",n[n.ES2015=2]="ES2015",n[n.ES2016=3]="ES2016",n[n.ES2017=4]="ES2017",n[n.ES2018=5]="ES2018",n[n.ES2019=6]="ES2019",n[n.ES2020=7]="ES2020",n[n.ESNext=99]="ESNext",n[n.JSON=100]="JSON",n[n.Latest=99]="Latest",n))(nOe||{}),iOe=(n=>(n[n.Classic=1]="Classic",n[n.NodeJs=2]="NodeJs",n))(iOe||{}),rOe=class{constructor(n,e,t,i,r){lo(this,"_onDidChange",new hQ.Emitter);lo(this,"_onDidExtraLibsChange",new hQ.Emitter);lo(this,"_extraLibs");lo(this,"_removedExtraLibs");lo(this,"_eagerModelSync");lo(this,"_compilerOptions");lo(this,"_diagnosticsOptions");lo(this,"_workerOptions");lo(this,"_onDidExtraLibsChangeTimeout");lo(this,"_inlayHintsOptions");lo(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(n),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(r),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(n,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===n)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:n,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let r=this._extraLibs[t];!r||r.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(n){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),n&&n.length>0)for(const e of n){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let r=1;this._removedExtraLibs[t]&&(r=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(n){this._compilerOptions=n||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(n){this._workerOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(n){this._inlayHintsOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(n){}setEagerModelSync(n){this._eagerModelSync=n}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(void 0)}},d_t=c_t,oOe={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},sOe=new rOe({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},oOe),aOe=new rOe({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},oOe),h_t=()=>FF().then(n=>n.getTypeScriptWorker()),f_t=()=>FF().then(n=>n.getJavaScriptWorker());hQ.languages.typescript={ModuleKind:JNe,JsxEmit:eOe,NewLineKind:tOe,ScriptTarget:nOe,ModuleResolutionKind:iOe,typescriptVersion:d_t,typescriptDefaults:sOe,javascriptDefaults:aOe,getTypeScriptWorker:h_t,getJavaScriptWorker:f_t};function FF(){return Gt(()=>import("./tsMode.eb5d7719.js"),[])}hQ.languages.onLanguage("typescript",()=>FF().then(n=>n.setupTypeScript(sOe)));hQ.languages.onLanguage("javascript",()=>FF().then(n=>n.setupJavaScript(aOe)));var p_t=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},g_t=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},BF=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const $F=new It("selectionAnchorSet",!1);let o6=class lOe{static get(e){return e.getContribution(lOe.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=$F.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ht.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Gl().appendText(w("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Ys(w("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 t=this.editor.getPosition();this.editor.setSelection(Ht.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};o6.ID="editor.contrib.selectionAnchorController";o6=p_t([g_t(1,_n)],o6);class m_t extends Ot{constructor(){super({id:"editor.action.setSelectionAnchor",label:w("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:oe.editorTextFocus,primary:ws(2089,2080),weight:100}})}run(e,t){var i;return BF(this,void 0,void 0,function*(){(i=o6.get(t))===null||i===void 0||i.setSelectionAnchor()})}}class T_t extends Ot{constructor(){super({id:"editor.action.goToSelectionAnchor",label:w("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:$F})}run(e,t){var i;return BF(this,void 0,void 0,function*(){(i=o6.get(t))===null||i===void 0||i.goToSelectionAnchor()})}}class v_t extends Ot{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:w("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:$F,kbOpts:{kbExpr:oe.editorTextFocus,primary:ws(2089,2089),weight:100}})}run(e,t){var i;return BF(this,void 0,void 0,function*(){(i=o6.get(t))===null||i===void 0||i.selectFromAnchorToCursor()})}}class Q_t extends Ot{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:w("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:$F,kbOpts:{kbExpr:oe.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return BF(this,void 0,void 0,function*(){(i=o6.get(t))===null||i===void 0||i.cancelSelectionAnchor()})}}yi(o6.ID,o6,4);dt(m_t);dt(T_t);dt(v_t);dt(Q_t);const b_t=de("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},w("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class y_t extends Ot{constructor(){super({id:"editor.action.jumpToBracket",label:w("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:oe.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.jumpToBracket()}}class __t extends Ot{constructor(){super({id:"editor.action.selectToBracket",label:w("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,t,i){var r;let o=!0;i&&i.selectBrackets===!1&&(o=!1),(r=Ed.get(t))===null||r===void 0||r.selectToBracket(o)}}class C_t extends Ot{constructor(){super({id:"editor.action.removeBrackets",label:w("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:oe.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class w_t{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Ed extends Pe{static get(e){return e.getContribution(Ed.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Qr(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.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(),t=this._editor.getSelections().map(i=>{const r=i.getStartPosition(),o=e.bracketPairs.matchBracket(r);let s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new Ht(s.lineNumber,s.column,s.lineNumber,s.column):new Ht(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(r=>{const o=r.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const u=t.bracketPairs.findNextBracket(o);u&&u.range&&(s=t.bracketPairs.matchBracket(u.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(G.compareRangesUsingStarts);const[u,c]=s;if(a=e?u.getStartPosition():u.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(o)){const d=a;a=l,l=d}}a&&l&&i.push(new Ht(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const r=i.getPosition();let o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),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 t=0;for(const i of this._lastBracketsData){const r=i.brackets;r&&(e[t++]={range:r[0],options:i.options},e[t++]={range:r[1],options:i.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 t=this._editor.getModel(),i=t.getVersionId();let r=[];this._lastVersionId===i&&(r=this._lastBracketsData);const o=[];let s=0;for(let d=0,h=e.length;d1&&o.sort(De.compare);const a=[];let l=0,u=0;const c=r.length;for(let d=0,h=o.length;d0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}}dt(D_t);var E_t=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const d8="9_cutcopypaste",k_t=B2||document.queryCommandSupported("cut"),cOe=B2||document.queryCommandSupported("copy"),M_t=typeof navigator.clipboard>"u"||I1?document.queryCommandSupported("paste"):!0;function sce(n){return n.register(),n}const A_t=k_t?sce(new nb({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:B2?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:se.MenubarEditMenu,group:"2_ccp",title:w({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:se.EditorContext,group:d8,title:w("actions.clipboard.cutLabel","Cut"),when:oe.writable,order:1},{menuId:se.CommandPalette,group:"",title:w("actions.clipboard.cutLabel","Cut"),order:1},{menuId:se.SimpleEditorContext,group:d8,title:w("actions.clipboard.cutLabel","Cut"),when:oe.writable,order:1}]})):void 0,N_t=cOe?sce(new nb({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:B2?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:se.MenubarEditMenu,group:"2_ccp",title:w({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:se.EditorContext,group:d8,title:w("actions.clipboard.copyLabel","Copy"),order:2},{menuId:se.CommandPalette,group:"",title:w("actions.clipboard.copyLabel","Copy"),order:1},{menuId:se.SimpleEditorContext,group:d8,title:w("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Ll.appendMenuItem(se.MenubarEditMenu,{submenu:se.MenubarCopy,title:{value:w("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Ll.appendMenuItem(se.EditorContext,{submenu:se.EditorContextCopy,title:{value:w("copy as","Copy As"),original:"Copy As"},group:d8,order:3});Ll.appendMenuItem(se.EditorContext,{submenu:se.EditorContextShare,title:{value:w("share","Share"),original:"Share"},group:"11_share",order:-1,when:ct.and(ct.notEquals("resourceScheme","output"),oe.editorTextFocus)});Ll.appendMenuItem(se.EditorTitleContext,{submenu:se.EditorTitleContextShare,title:{value:w("share","Share"),original:"Share"},group:"11_share",order:-1});Ll.appendMenuItem(se.ExplorerContext,{submenu:se.ExplorerContextShare,title:{value:w("share","Share"),original:"Share"},group:"11_share",order:-1});const IZ=M_t?sce(new nb({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:B2?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:se.MenubarEditMenu,group:"2_ccp",title:w({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:se.EditorContext,group:d8,title:w("actions.clipboard.pasteLabel","Paste"),when:oe.writable,order:4},{menuId:se.CommandPalette,group:"",title:w("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:se.SimpleEditorContext,group:d8,title:w("actions.clipboard.pasteLabel","Paste"),when:oe.writable,order:4}]})):void 0;class O_t extends Ot{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:w("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:oe.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(35)&&t.getSelection().isEmpty()||(one.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),one.forceCopyWithSyntaxHighlighting=!1)}}function dOe(n,e){!n||(n.addImplementation(1e4,"code-editor",(t,i)=>{const r=t.get(Mi).getFocusedCodeEditor();if(r&&r.hasTextFocus()){const o=r.getOption(35),s=r.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),n.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}dOe(A_t,"cut");dOe(N_t,"copy");IZ&&(IZ.addImplementation(1e4,"code-editor",(n,e)=>{const t=n.get(Mi),i=n.get(b6),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&w7?(()=>E_t(void 0,void 0,void 0,function*(){const s=yield i.readText();if(s!==""){const a=mL.INSTANCE.get(s);let l=!1,u=null,c=null;a&&(l=r.getOption(35)&&!!a.isFromEmptySelection,u=typeof a.multicursorText<"u"?a.multicursorText:null,c=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:u,mode:c})}}))():!0:!1}),IZ.addImplementation(0,"generic-dom",(n,e)=>(document.execCommand("paste"),!0)));cOe&&dt(O_t);var I_t=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class Mn{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+Mn.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Mn(this.value+Mn.sep+e)}}Mn.sep=".";Mn.None=new Mn("@@none@@");Mn.Empty=new Mn("");Mn.QuickFix=new Mn("quickfix");Mn.Refactor=new Mn("refactor");Mn.RefactorExtract=Mn.Refactor.append("extract");Mn.RefactorInline=Mn.Refactor.append("inline");Mn.RefactorMove=Mn.Refactor.append("move");Mn.RefactorRewrite=Mn.Refactor.append("rewrite");Mn.Source=new Mn("source");Mn.SourceOrganizeImports=Mn.Source.append("organizeImports");Mn.SourceFixAll=Mn.Source.append("fixAll");Mn.SurroundWith=Mn.Refactor.append("surround");var Gc;(function(n){n.Refactor="refactor",n.RefactorPreview="refactor preview",n.Lightbulb="lightbulb",n.Default="other (default)",n.SourceAction="source action",n.QuickFix="quick fix action",n.FixAll="fix all",n.OrganizeImports="organize imports",n.AutoFix="auto fix",n.QuickFixHover="quick fix hover window",n.OnSave="save participants",n.ProblemsView="problems view"})(Gc||(Gc={}));function R_t(n,e){return!(n.include&&!n.include.intersects(e)||n.excludes&&n.excludes.some(t=>hOe(e,t,n.include))||!n.includeSourceActions&&Mn.Source.contains(e))}function H_t(n,e){const t=e.kind?new Mn(e.kind):void 0;return!(n.include&&(!t||!n.include.contains(t))||n.excludes&&t&&n.excludes.some(i=>hOe(t,i,n.include))||!n.includeSourceActions&&t&&Mn.Source.contains(t)||n.onlyIncludePreferredActions&&!e.isPreferred)}function hOe(n,e,t){return!(!e.contains(n)||t&&e.contains(t))}class hh{static fromUser(e,t){return!e||typeof e!="object"?new hh(t.kind,t.apply,!1):new hh(hh.getKindFromUser(e,t.kind),hh.getApplyFromUser(e,t.apply),hh.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Mn(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class P_t{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return I_t(this,void 0,void 0,function*(){if(((t=this.provider)===null||t===void 0?void 0:t.resolveCodeAction)&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(r){Cs(r)}i&&(this.action.edit=i.edit)}return this})}}var DH=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const fOe="editor.action.codeAction",ace="editor.action.quickFix",pOe="editor.action.autoFix",gOe="editor.action.refactor",mOe="editor.action.sourceAction",lce="editor.action.organizeImports",uce="editor.action.fixAll";class _x extends Pe{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return sl(e.diagnostics)?sl(t.diagnostics)?_x.codeActionsPreferredComparator(e,t):-1:sl(t.diagnostics)?1:_x.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(_x.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Mn.QuickFix.contains(new Mn(e.kind))&&!!e.isPreferred)}}const qme={actions:[],documentation:void 0};function cce(n,e,t,i,r,o){var s;return DH(this,void 0,void 0,function*(){const a=i.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:i.type},u=new ece(e,o),c=V_t(n,e,a),d=new st,h=c.map(g=>DH(this,void 0,void 0,function*(){try{r.report(g);const T=yield g.provideCodeActions(e,t,l,u.token);if(T&&d.add(T),u.token.isCancellationRequested)return qme;const v=((T==null?void 0:T.actions)||[]).filter(b=>b&&H_t(a,b)),Q=B_t(g,v,a.include);return{actions:v.map(b=>new P_t(b,g)),documentation:Q}}catch(T){if(c0(T))throw T;return Cs(T),qme}})),f=n.onDidChange(()=>{const g=n.all(e);Oa(g,c)||u.cancel()});try{const g=yield Promise.all(h),T=g.map(Q=>Q.actions).flat(),v=[...Ph(g.map(Q=>Q.documentation)),...F_t(n,e,i,T)];return new _x(T,v,d)}finally{f.dispose(),u.dispose()}})}function V_t(n,e,t){return n.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(r=>R_t(t,new Mn(r))):!0)}function*F_t(n,e,t,i){var r,o,s;if(e&&i.length)for(const a of n.all(e))a._getAdditionalMenuItems&&(yield*(r=a._getAdditionalMenuItems)===null||r===void 0?void 0:r.call(a,{trigger:t.type,only:(s=(o=t.filter)===null||o===void 0?void 0:o.include)===null||s===void 0?void 0:s.value},i.map(l=>l.action)))}function B_t(n,e,t){if(!n.documentation)return;const i=n.documentation.map(r=>({kind:new Mn(r.kind),command:r.command}));if(t){let r;for(const o of i)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(const r of e)if(!!r.kind){for(const o of i)if(o.kind.contains(new Mn(r.kind)))return o.command}}var EH;(function(n){n.OnSave="onSave",n.FromProblemsView="fromProblemsView",n.FromCodeActions="fromCodeActions"})(EH||(EH={}));function $_t(n,e,t,i,r=Jn.None){var o;return DH(this,void 0,void 0,function*(){const s=n.get(vD),a=n.get(Qo),l=n.get(Jc),u=n.get(Fo);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(r),!r.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:i==null?void 0:i.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==EH.OnSave,showPreview:i==null?void 0:i.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const d=j_t(c);u.error(typeof d=="string"?d:w("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function j_t(n){return typeof n=="string"?n:n instanceof Error&&typeof n.message=="string"?n.message:void 0}mi.registerCommand("_executeCodeActionProvider",function(n,e,t,i,r){return DH(this,void 0,void 0,function*(){if(!(e instanceof on))throw E1();const{codeActionProvider:o}=n.get(Vt),s=n.get(Kr).getModel(e);if(!s)throw E1();const a=Ht.isISelection(t)?Ht.liftSelection(t):G.isIRange(t)?s.validateRange(t):void 0;if(!a)throw E1();const l=typeof i=="string"?new Mn(i):void 0,u=yield cce(o,s,a,{type:1,triggerAction:Gc.Default,filter:{includeSourceActions:!0,include:l}},em.None,Jn.None),c=[],d=Math.min(u.validActions.length,typeof r=="number"?r:0);for(let h=0;hh.action)}finally{setTimeout(()=>u.dispose(),100)}})});var W_t=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},z_t=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let kH=class TOe{constructor(e){this.keybindingService=e}getResolver(){const e=new t3(()=>this.keybindingService.getKeybindings().filter(t=>TOe.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===lce?i={kind:Mn.SourceOrganizeImports.value}:t.command===uce&&(i={kind:Mn.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},hh.fromUser(i,{kind:Mn.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Mn(e.kind);return t.filter(r=>r.kind.contains(i)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};kH.codeActionCommands=[gOe,fOe,mOe,lce,uce];kH=W_t([z_t(0,Ir)],kH);de("symbolIcon.arrayForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.booleanForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},w("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.colorForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.constantForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},w("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},w("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.fileForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.folderForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.keyForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.keywordForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.moduleForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.namespaceForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.nullForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.numberForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.objectForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.operatorForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.packageForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.propertyForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.referenceForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.snippetForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.stringForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.structForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.textForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.typeParameterForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.unitForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const vOe=Object.freeze({kind:Mn.Empty,title:w("codeAction.widget.id.more","More Actions...")}),U_t=Object.freeze([{kind:Mn.QuickFix,title:w("codeAction.widget.id.quickfix","Quick Fix...")},{kind:Mn.RefactorExtract,title:w("codeAction.widget.id.extract","Extract..."),icon:_t.wrench},{kind:Mn.RefactorInline,title:w("codeAction.widget.id.inline","Inline..."),icon:_t.wrench},{kind:Mn.RefactorRewrite,title:w("codeAction.widget.id.convert","Rewrite..."),icon:_t.wrench},{kind:Mn.RefactorMove,title:w("codeAction.widget.id.move","Move..."),icon:_t.wrench},{kind:Mn.SurroundWith,title:w("codeAction.widget.id.surround","Surround With..."),icon:_t.symbolSnippet},{kind:Mn.Source,title:w("codeAction.widget.id.source","Source Action..."),icon:_t.symbolFile},vOe]);function q_t(n,e,t){if(!e)return n.map(o=>({kind:"action",item:o,group:vOe,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));const i=U_t.map(o=>({group:o,actions:[]}));for(const o of n){const s=o.action.kind?new Mn(o.action.kind):Mn.None;for(const a of i)if(a.group.kind.contains(s)){a.actions.push(o);break}}const r=[];for(const o of i)if(o.actions.length){r.push({kind:"header",group:o.group});for(const s of o.actions)r.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return r}var G_t=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},K_t=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},XT;(function(n){n.Hidden={type:0};class e{constructor(i,r,o,s){this.actions=i,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}n.Showing=e})(XT||(XT={}));let h8=class QOe extends Pe{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new xe),this.onClick=this._onClick.event,this._state=XT.Hidden,this._domNode=at("div.lightBulbWidget"),this._register(gr.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(i=>{const r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(p3t(this._domNode,i=>{if(this.state.type!==1)return;this._editor.focus(),i.preventDefault();const{top:r,height:o}=Os(this._domNode),s=this._editor.getOption(64);let a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(i.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(Ut.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var i,r;this._preferredKbLabel=da((i=t.lookupKeybinding(pOe))===null||i===void 0?void 0:i.getLabel()),this._quickFixKbLabel=da((r=t.lookupKeybinding(ace))===null||r===void 0?void 0:r.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,t,i){if(e.validActions.length<=0)return this.hide();const r=this._editor.getOptions();if(!r.get(62).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:s,column:a}=o.validatePosition(i),l=o.getOptions().tabSize,u=r.get(48),c=o.getLineContent(s),d=lF(c,l),h=u.spaceWidth*d>22,f=T=>T>2&&this._editor.getTopForLineNumber(T)===this._editor.getTopForLineNumber(T-1);let g=s;if(!h){if(s>1&&!f(s-1))g-=1;else if(!f(s+1))g+=1;else if(a*u.spaceWidth<22)return this.hide()}this.state=new XT.Showing(e,t,i,{position:{lineNumber:g,column:1},preference:QOe._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==XT.Hidden&&(this.state=XT.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(...dn.asClassNameArray(_t.lightBulb)),this._domNode.classList.add(...dn.asClassNameArray(_t.lightbulbAutofix)),this._preferredKbLabel)){this.title=w("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...dn.asClassNameArray(_t.lightbulbAutofix)),this._domNode.classList.add(...dn.asClassNameArray(_t.lightBulb)),this._quickFixKbLabel?this.title=w("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=w("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};h8.ID="editor.contrib.lightbulbWidget";h8._posPref=[0];h8=G_t([K_t(1,Ir)],h8);var Z_t=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},X_t=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let ic=class Pie{static get(e){return e.getContribution(Pie.ID)}constructor(e,t){this._messageWidget=new Ha,this._messageListeners=new st,this._editor=e,this._visible=Pie.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Ys(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new Gme(this._editor,t,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 W1(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(r=>{!r.target.position||(i?i.containsPosition(r.target.position)||this.closeMessage():i=new G(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Gme.fadeOut(this._messageWidget.value))}};ic.ID="editor.contrib.messageController";ic.MESSAGE_VISIBLE=new It("messageVisible",!1,w("messageVisible","Whether the editor is currently showing an inline message"));ic=Z_t([X_t(1,_n)],ic);const Y_t=Ps.bindToContribution(ic.get);vt(new Y_t({id:"leaveEditorMessage",precondition:ic.MESSAGE_VISIBLE,handler:n=>n.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class Gme{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},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 s=document.createElement("div");s.classList.add("message"),s.textContent=r,this._domNode.appendChild(s);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),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)}}yi(ic.ID,ic,4);var bOe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Vie=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const yOe="acceptSelectedCodeAction",_Oe="previewSelectedCodeAction";class J_t{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var r,o;i.text.textContent=(o=(r=e.group)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}}let Fie=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const r=new yD(e,Ac);return{container:e,icon:t,text:i,keybinding:r}}renderElement(e,t,i){var r,o,s;if(!((r=e.group)===null||r===void 0)&&r.icon?(i.icon.className=dn.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=At(e.group.icon.color.id))):(i.icon.className=dn.asClassName(_t.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=COe(e.label),i.keybinding.set(e.keybinding),x3t(!!e.keybinding,i.keybinding.element);const a=(o=this._keybindingService.lookupKeybinding(yOe))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(_Oe))===null||s===void 0?void 0:s.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview?i.container.title=w({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):i.container.title=w({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};Fie=bOe([Vie(1,Ir)],Fie);class eCt extends UIEvent{constructor(){super("acceptSelectedAction")}}class Kme extends UIEvent{constructor(){super("previewSelectedAction")}}let Bie=class extends Pe{constructor(e,t,i,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new Wd(e,this.domNode,a,[new Fie(t,this._keybindingService),new J_t],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let u=l.label?COe(l==null?void 0:l.label):"";return l.disabled&&(u=w({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",u,l.disabled)),u}return null},getWidgetAriaLabel:()=>w({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(tm),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=i,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 t=this._allMenuItems.filter(u=>u.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);const o=this._allMenuItems.map((u,c)=>{const d=document.getElementById(this._list.getElementID(c));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0}),s=Math.max(...o,e),a=.7,l=Math.min(r,document.body.clientHeight*a);return this._list.layout(l,s),this.domNode.style.height=`${l}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const i=t[0],r=this._list.element(i);if(!this.focusCondition(r))return;const o=e?new Kme:new eCt;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Kme):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([])}};Bie=bOe([Vie(4,y6),Vie(5,Ir)],Bie);function COe(n){return n.replace(/\r\n|\r|\n/g," ")}var tCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},RZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const f8={Visible:new It("codeActionMenuVisible",!1,w("codeActionMenuVisible","Whether the action widget list is visible"))},rm=oi("actionWidgetService");let p8=class extends Pe{get isVisible(){return f8.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new Ha)}show(e,t,i,r,o,s,a){const l=f8.Visible.bindTo(this._contextKeyService),u=this._instantiationService.createInstance(Bie,e,t,i,r);this._contextViewService.showContextView({getAnchor:()=>o,render:c=>(l.set(!0),this._renderWidget(c,u,a!=null?a:[])),onHide:c=>{l.reset(),this._onWidgetClosed(c)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,i){var r;const o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");const s=new st,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(Ye(l,kt.MOUSE_DOWN,g=>g.stopPropagation()));const u=document.createElement("div"),c=e.appendChild(u);c.classList.add("context-view-pointerBlock"),s.add(Ye(c,kt.POINTER_MOVE,()=>c.remove())),s.add(Ye(c,kt.MOUSE_DOWN,()=>c.remove()));let d=0;if(i.length){const g=this._createActionBar(".action-widget-action-bar",i);g&&(o.appendChild(g.getContainer().parentElement),s.add(g),d=g.getContainer().offsetWidth)}const h=(r=this._list.value)===null||r===void 0?void 0:r.layout(d);o.style.width=`${h}px`;const f=s.add($h(e));return s.add(f.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;const i=at(e),r=new F1(i);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};p8=tCt([RZ(0,y6),RZ(1,_n),RZ(2,Sn)],p8);gi(rm,p8,1);const LD=100+1e3;ps(class extends v6{constructor(){super({id:"hideCodeActionWidget",title:{value:w("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:f8.Visible,keybinding:{weight:LD,primary:9,secondary:[1033]}})}run(n){n.get(rm).hide()}});ps(class extends v6{constructor(){super({id:"selectPrevCodeAction",title:{value:w("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:f8.Visible,keybinding:{weight:LD,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(n){const e=n.get(rm);e instanceof p8&&e.focusPrevious()}});ps(class extends v6{constructor(){super({id:"selectNextCodeAction",title:{value:w("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:f8.Visible,keybinding:{weight:LD,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(n){const e=n.get(rm);e instanceof p8&&e.focusNext()}});ps(class extends v6{constructor(){super({id:yOe,title:{value:w("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:f8.Visible,keybinding:{weight:LD,primary:3,secondary:[2137]}})}run(n){const e=n.get(rm);e instanceof p8&&e.acceptSelected()}});ps(class extends v6{constructor(){super({id:_Oe,title:{value:w("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:f8.Visible,keybinding:{weight:LD,primary:2051}})}run(n){const e=n.get(rm);e instanceof p8&&e.acceptSelected(!0)}});var HZ=globalThis&&globalThis.__classPrivateFieldGet||function(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)},nCt=globalThis&&globalThis.__classPrivateFieldSet||function(n,e,t,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(n,t):r?r.value=t:e.set(n,t),t},mT;const wOe=new It("supportedCodeAction","");class iCt extends Pe{constructor(e,t,i,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=r,this._autoTriggerTimer=this._register(new W1),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(i=>cF(i,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Gc.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:r,column:o}=i.getPosition(),s=t.getLineContent(r);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return i}}var gg;(function(n){n.Empty={type:0};class e{constructor(i,r,o){this.trigger=i,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(c0(s))return rCt;throw s})}cancel(){this._cancellablePromise.cancel()}}n.Triggered=e})(gg||(gg={}));const rCt=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class oCt extends Pe{constructor(e,t,i,r,o){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._codeActionOracle=this._register(new Ha),this._state=gg.Empty,this._onDidChangeState=this._register(new xe),this.onDidChangeState=this._onDidChangeState.event,mT.set(this,!1),this._supportedCodeActions=wOe.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){HZ(this,mT,"f")||(nCt(this,mT,!0,"f"),super.dispose(),this.setState(gg.Empty,!0))}_update(){if(HZ(this,mT,"f"))return;this._codeActionOracle.value=void 0,this.setState(gg.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(88)){const t=this._registry.all(e).flatMap(i=>{var r;return(r=i.providedCodeActionKinds)!==null&&r!==void 0?r:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new iCt(this._editor,this._markerService,i=>{var r;if(!i){this.setState(gg.Empty);return}const o=bs(s=>cce(this._registry,e,i.selection,i.trigger,em.None,s));i.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new gg.Triggered(i.trigger,i.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Gc.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!HZ(this,mT,"f")&&this._onDidChangeState.fire(e))}}mT=new WeakMap;var sCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},j3=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},uN=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},aCt=globalThis&&globalThis.__classPrivateFieldSet||function(n,e,t,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(n,t):r?r.value=t:e.set(n,t),t},lCt=globalThis&&globalThis.__classPrivateFieldGet||function(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)},fI;let g8=class xOe extends Pe{static get(e){return e.getContribution(xOe.ID)}constructor(e,t,i,r,o,s,a,l,u,c){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=u,this._instantiationService=c,this._activeCodeActions=this._register(new Ha),this._showDisabled=!1,fI.set(this,!1),this._editor=e,this._model=this._register(new oCt(this._editor,o.codeActionProvider,t,i,s)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new t3(()=>{const d=this._editor.getContribution(h8.ID);return d&&this._register(d.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),d}),this._resolver=r.createInstance(kH),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){aCt(this,fI,!0,"f"),super.dispose()}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,r){var o;if(!this._editor.hasModel())return;(o=ic.get(this._editor))===null||o===void 0||o.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:r,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,i){return uN(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction($_t,e,EH.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Gc.QuickFix,filter:{}})}})}update(e){var t,i,r,o,s,a,l;return uN(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let u;try{u=yield e.actions}catch(c){$n(c);return}if(!lCt(this,fI,"f"))if((i=this._lightBulbWidget.value)===null||i===void 0||i.update(u,e.trigger,e.position),e.trigger.type===1){if(!((r=e.trigger.filter)===null||r===void 0)&&r.include){const d=this.tryGetValidActionToApply(e.trigger,u);if(d){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(d,!1,!1)}finally{u.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,u);if(h&&h.action.disabled){(s=ic.get(this._editor))===null||s===void 0||s.showMessage(h.action.disabled,e.trigger.context.position),u.dispose();return}}}const c=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!u.allActions.length||!c&&!u.validActions.length)){(l=ic.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=u,u.dispose();return}this._activeCodeActions.value=u,this.showCodeActionList(u,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?u.dispose():this._activeCodeActions.value=u})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(!!t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(!!t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i){return uN(this,void 0,void 0,function*(){const r=this._editor.getDomNode();if(!r)return;const o=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;const s=De.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,u)=>uN(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!u),this._actionWidgetService.hide()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus()}};this._actionWidgetService.show("codeActionWidget",!0,q_t(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,r,this._getActionBarActions(e,t,i))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=Os(this._editor.getDomNode()),r=i.left+t.left,o=i.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const r=e.documentation.map(o=>{var s;return{id:o.id,label:o.title,tooltip:(s=o.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(o.id,...(a=o.arguments)!==null&&a!==void 0?a:[])}}});return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:w("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:w("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),r}};fI=new WeakMap;g8.ID="editor.contrib.codeActionController";g8=sCt([j3(1,o3),j3(2,_n),j3(3,Sn),j3(4,Vt),j3(5,M7),j3(6,Qo),j3(7,bi),j3(8,rm),j3(9,Sn)],g8);function SD(n){return ct.regex(wOe.keys()[0],new RegExp("(\\s|^)"+zc(n.value)+"\\b"))}const dce={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:w("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:w("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[w("args.schema.apply.first","Always apply the first returned code action."),w("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),w("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:w("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function om(n,e,t,i,r=Gc.Default){if(n.hasModel()){const o=g8.get(n);o==null||o.manualTriggerAtCurrentPosition(e,r,t,i)}}class uCt extends Ot{constructor(){super({id:ace,label:w("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ct.and(oe.writable,oe.hasCodeActionsProvider),kbOpts:{kbExpr:oe.textInputFocus,primary:2137,weight:100}})}run(e,t){return om(t,w("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Gc.QuickFix)}}class cCt extends Ps{constructor(){super({id:fOe,precondition:ct.and(oe.writable,oe.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:dce}]}})}runEditorCommand(e,t,i){const r=hh.fromUser(i,{kind:Mn.Empty,apply:"ifSingle"});return om(t,typeof(i==null?void 0:i.kind)=="string"?r.preferred?w("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):w("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):r.preferred?w("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):w("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}class dCt extends Ot{constructor(){super({id:gOe,label:w("refactor.label","Refactor..."),alias:"Refactor...",precondition:ct.and(oe.writable,oe.hasCodeActionsProvider),kbOpts:{kbExpr:oe.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ct.and(oe.writable,SD(Mn.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:dce}]}})}run(e,t,i){const r=hh.fromUser(i,{kind:Mn.Refactor,apply:"never"});return om(t,typeof(i==null?void 0:i.kind)=="string"?r.preferred?w("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):w("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):r.preferred?w("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):w("editor.action.refactor.noneMessage","No refactorings available"),{include:Mn.Refactor.contains(r.kind)?r.kind:Mn.None,onlyIncludePreferredActions:r.preferred},r.apply,Gc.Refactor)}}class hCt extends Ot{constructor(){super({id:mOe,label:w("source.label","Source Action..."),alias:"Source Action...",precondition:ct.and(oe.writable,oe.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ct.and(oe.writable,SD(Mn.Source))},description:{description:"Source Action...",args:[{name:"args",schema:dce}]}})}run(e,t,i){const r=hh.fromUser(i,{kind:Mn.Source,apply:"never"});return om(t,typeof(i==null?void 0:i.kind)=="string"?r.preferred?w("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):w("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):r.preferred?w("editor.action.source.noneMessage.preferred","No preferred source actions available"):w("editor.action.source.noneMessage","No source actions available"),{include:Mn.Source.contains(r.kind)?r.kind:Mn.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Gc.SourceAction)}}class fCt extends Ot{constructor(){super({id:lce,label:w("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ct.and(oe.writable,SD(Mn.SourceOrganizeImports)),kbOpts:{kbExpr:oe.textInputFocus,primary:1581,weight:100}})}run(e,t){return om(t,w("editor.action.organize.noneMessage","No organize imports action available"),{include:Mn.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Gc.OrganizeImports)}}class pCt extends Ot{constructor(){super({id:uce,label:w("fixAll.label","Fix All"),alias:"Fix All",precondition:ct.and(oe.writable,SD(Mn.SourceFixAll))})}run(e,t){return om(t,w("fixAll.noneMessage","No fix all action available"),{include:Mn.SourceFixAll,includeSourceActions:!0},"ifSingle",Gc.FixAll)}}class gCt extends Ot{constructor(){super({id:pOe,label:w("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ct.and(oe.writable,SD(Mn.QuickFix)),kbOpts:{kbExpr:oe.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return om(t,w("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Mn.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Gc.AutoFix)}}yi(g8.ID,g8,3);yi(h8.ID,h8,4);dt(uCt);dt(dCt);dt(hCt);dt(fCt);dt(gCt);dt(pCt);vt(new cCt);vo.as(m6.Configuration).registerConfiguration(Object.assign(Object.assign({},jAe),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:w("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));var Zme=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class $ie{constructor(){this.lenses=[],this._disposables=new st}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function LOe(n,e,t){return Zme(this,void 0,void 0,function*(){const i=n.ordered(e),r=new Map,o=new $ie,s=i.map((a,l)=>Zme(this,void 0,void 0,function*(){r.set(a,l);try{const u=yield Promise.resolve(a.provideCodeLenses(e,t));u&&o.add(u,a)}catch(u){Cs(u)}}));return yield Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:r.get(a.provider)r.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),o})}mi.registerCommand("_executeCodeLensProvider",function(n,...e){let[t,i]=e;Xi(on.isUri(t)),Xi(typeof i=="number"||!i);const{codeLensProvider:r}=n.get(Vt),o=n.get(Kr).getModel(t);if(!o)throw E1();const s=[],a=new st;return LOe(r,o,Jn.None).then(l=>{a.add(l);const u=[];for(const c of l.lenses)i==null||Boolean(c.symbol.command)?s.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&u.push(Promise.resolve(c.provider.resolveCodeLens(o,c.symbol,Jn.None)).then(d=>s.push(d||c.symbol)));return Promise.all(u)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})});var mCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},TCt=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const SOe=oi("ICodeLensCache");class Xme{constructor(e,t){this.lineCount=e,this.data=t}}let jie=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new k7(20,.75);const t="codelens/cache";C4(()=>e.remove(t,1));const i="codelens/cache2",r=e.get(i,1,"{}");this._deserialize(r),Vh(e.onWillSaveState)(o=>{o.reason===dH.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(s=>{var a;return{range:s.symbol.range,command:s.symbol.command&&{id:"",title:(a=s.symbol.command)===null||a===void 0?void 0:a.title}}}),r=new $ie;r.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new Xme(e.getLineCount(),r);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const r=new Set;for(const o of i.data.lenses)r.add(o.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const r=t[i],o=[];for(const a of r.lines)o.push({range:new G(a,1,a,11)});const s=new $ie;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(i,new Xme(r.lineCount,s))}}catch{}}};jie=mCt([TCt(0,qd)],jie);gi(SOe,jie,1);class vCt{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,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 jF{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${jF._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let r=!1;for(let o=0;o{u.symbol.command&&l.push(u.symbol),i.addDecoration({range:u.symbol.range,options:Yme},d=>this._decorationIds[c]=d),a?a=G.plusRange(a,u.symbol.range):a=G.lift(u.symbol.range)}),this._viewZone=new vCt(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new jF(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.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,t)=>{const i=this._editor.getModel().getDecorationRange(e),r=this._data[t].symbol;return!!(i&&G.isEmpty(r.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,r)=>{t.addDecoration({range:i.symbol.range,options:Yme},o=>this._decorationIds[r]=o)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eC=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},bCt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let fQ=class{constructor(e,t,i,r,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=o,this._codeLensCache=s,this._disposables=new st,this._localToDispose=new st,this._lenses=[],this._oldCodeLensModels=new st,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Qr(()=>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(a=>{(a.hasChanged(48)||a.hasChanged(17)||a.hasChanged(16))&&this._updateLensStyle(),a.hasChanged(15)&&this._onModelChange()})),this._disposables.add(t.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 t=this._editor.getOption(17);return(!t||t<5)&&(t=this._editor.getOption(50)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(16),r=this._editor.getOption(48),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",r.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",Ju.fontFamily)),this._editor.changeViewZones(s=>{for(const a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(15))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Uf(()=>{const r=this._codeLensCache.get(e);t===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){const o=r.onDidChange(()=>i.schedule());this._localToDispose.add(o)}const i=new Qr(()=>{var r;const o=Date.now();(r=this._getCodeLensModelPromise)===null||r===void 0||r.cancel(),this._getCodeLensModelPromise=bs(s=>LOe(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);const a=this._provideCodeLensDebounce.update(e,Date.now()-o);i.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},$n)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Bn(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var r;this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const a=[];let l=-1;this._lenses.forEach(c=>{!c.isValid()||l===c.getLineNumber()?a.push(c):(c.update(s),l=c.getLineNumber())});const u=new PZ;a.forEach(c=>{c.dispose(u,s),this._lenses.splice(this._lenses.indexOf(c),1)}),u.commit(o)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),(r=this._resolveCodeLensesPromise)===null||r===void 0||r.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Bn(()=>{if(this._editor.getModel()){const r=J2.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let o=r.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(const s of this._lenses){const a=s.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new PZ;for(const r of this._lenses)r.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let r;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],i.push(r)))}if(!i.length&&!this._lenses.length)return;const o=J2.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const u=new PZ;let c=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),c++,d++)}for(;cthis._resolveCodeLensesInViewportSoon())),d++;u.commit(a)})}),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 t=this._editor.getModel();if(!t)return;const i=[],r=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),r.push(a))}),i.length===0)return;const o=Date.now(),s=bs(a=>{const l=i.map((u,c)=>{const d=new Array(u.length),h=u.map((f,g)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(T=>{d[g]=T},Cs):(d[g]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!r[c].isDisposed()&&r[c].updateCommands(d)})});return Promise.all(l)});this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{$n(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};fQ.ID="css.editor.codeLens";fQ=QCt([eC(1,Vt),eC(2,G1),eC(3,Qo),eC(4,Fo),eC(5,SOe)],fQ);yi(fQ.ID,fQ,1);dt(class extends Ot{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:oe.hasCodeLensProvider,label:w("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return bCt(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(d0),r=e.get(Qo),o=e.get(Fo),s=t.getSelection().positionLineNumber,a=t.getContribution(fQ.ID);if(!a)return;const l=a.getModel();if(!l)return;const u=[];for(const d of l.lenses)d.symbol.command&&d.symbol.range.startLineNumber===s&&u.push({label:d.symbol.command.title,command:d.symbol.command});if(u.length===0)return;const c=yield i.pick(u,{canPickMany:!1});if(!!c){if(l.isDisposed)return yield r.executeCommand(this.id);try{yield r.executeCommand(c.command.id,...c.command.arguments||[])}catch(d){o.error(d)}}})}});var yCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},VZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},_Ct=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class hce{constructor(e,t){this._editorWorkerClient=new yle(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return _Ct(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,i){const r=t.range,o=t.color,s=o.alpha,a=new Re(new ci(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?Re.Format.CSS.formatRGB(a):Re.Format.CSS.formatRGBA(a),u=s?Re.Format.CSS.formatHSL(a):Re.Format.CSS.formatHSLA(a),c=s?Re.Format.CSS.formatHex(a):Re.Format.CSS.formatHexA(a),d=[];return d.push({label:l,textEdit:{range:r,text:l}}),d.push({label:u,textEdit:{range:r,text:u}}),d.push({label:c,textEdit:{range:r,text:c}}),d}}let Wie=class extends Pe{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new hce(e,t)))}};Wie=yCt([VZ(0,Kr),VZ(1,br),VZ(2,Vt)],Wie);OF(Wie);var DD=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};function DOe(n,e,t,i=!0){return DD(this,void 0,void 0,function*(){return fce(new CCt,n,e,t,i)})}function EOe(n,e,t,i){return Promise.resolve(t.provideColorPresentations(n,e,i))}class CCt{constructor(){}compute(e,t,i,r){return DD(this,void 0,void 0,function*(){const o=yield e.provideDocumentColors(t,i);if(Array.isArray(o))for(const s of o)r.push({colorInfo:s,provider:e});return Array.isArray(o)})}}class wCt{constructor(){}compute(e,t,i,r){return DD(this,void 0,void 0,function*(){const o=yield e.provideDocumentColors(t,i);if(Array.isArray(o))for(const s of o)r.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)})}}class xCt{constructor(e){this.colorInfo=e}compute(e,t,i,r){return DD(this,void 0,void 0,function*(){const o=yield e.provideColorPresentations(t,this.colorInfo,Jn.None);return Array.isArray(o)&&r.push(...o),Array.isArray(o)})}}function fce(n,e,t,i,r){return DD(this,void 0,void 0,function*(){let o=!1,s;const a=[],l=e.ordered(t);for(let u=l.length-1;u>=0;u--){const c=l[u];if(c instanceof hce)s=c;else try{(yield n.compute(c,t,i,a))&&(o=!0)}catch(d){Cs(d)}}return o?a:s&&r?(yield n.compute(s,t,i,a),a):[]})}function kOe(n,e){const{colorProvider:t}=n.get(Vt),i=n.get(Kr).getModel(e);if(!i)throw E1();const r=n.get(bi).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:r}}mi.registerCommand("_executeDocumentColorProvider",function(n,...e){const[t]=e;if(!(t instanceof on))throw E1();const{model:i,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:o}=kOe(n,t);return fce(new wCt,r,i,Jn.None,o)});mi.registerCommand("_executeColorPresentationProvider",function(n,...e){const[t,i]=e,{uri:r,range:o}=i;if(!(r instanceof on)||!Array.isArray(t)||t.length!==4||!G.isIRange(o))throw E1();const{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=kOe(n,r),[u,c,d,h]=t;return fce(new xCt({range:o,color:{red:u,green:c,blue:d,alpha:h}}),a,s,Jn.None,l)});var LCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},e9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const MOe=Object.create({});let e7=class AOe extends Pe{constructor(e,t,i,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new st),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new cD(this._editor),this._decoratorLimitReporter=new SCt,this._colorDecorationClassRefs=this._register(new st),this._debounceInformation=r.for(i.colorProvider,"Document Colors",{min:AOe.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(i.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{const s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142);const a=s!==this._isColorDecoratorsEnabled||o.hasChanged(19),l=o.hasChanged(142);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const r=i.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(18)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new W1,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return e9e(this,void 0,void 0,function*(){this._computePromise=bs(e=>e9e(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const i=new nu(!1),r=yield DOe(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),r}));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){$n(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:Vn.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((r,o)=>this._colorDatas.set(r,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(19);for(let o=0;othis._colorDatas.has(r.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};e7.ID="editor.contrib.colorDetector";e7.RECOMPUTE_TIME=1e3;e7=LCt([FZ(1,bi),FZ(2,Vt),FZ(3,G1)],e7);class SCt{constructor(){this._onDidChange=new xe,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}yi(e7.ID,e7,1);class DCt{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,t,i){this.presentationIndex=i,this._onColorFlushed=new xe,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new xe,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new xe,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let r=0;r{this.backgroundColor=s.getColor(kR)||Re.white})),this._register(Ye(this._pickedColorNode,kt.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Ye(this._originalColorNode,kt.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=Re.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new kCt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=Re.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(kc(".codicon.codicon-color-mode"))}}class kCt extends Pe{constructor(e){super(),this._onClicked=this._register(new xe),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Ge(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),Ge(this._button,t),Ge(t,kc(".button"+dn.asCSSSelector(Eo("color-picker-close",_t.close,w("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class MCt extends Pe{constructor(e,t,i,r=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=kc(".colorpicker-body"),Ge(e,this._domNode),this._saturationBox=new ACt(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 NCt(this._domNode,this.model,r),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new OCt(this._domNode,this.model,r),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),r&&(this._insertButton=this._register(new ICt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new Re(new ph(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new Re(new ph(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new Re(new ph(i===360?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class ACt extends Pe{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new xe,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new xe,this.onColorFlushed=this._onColorFlushed.event,this._domNode=kc(".saturation-wrap"),Ge(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Ge(this._domNode,this._canvas),this.selection=kc(".saturation-selection"),Ge(this._domNode,this.selection),this.layout(),this._register(Ye(this._domNode,kt.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new ib);const t=Os(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangePosition(r.pageX-t.left,r.pageY-t.top),()=>null);const i=Ye(document,kt.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,r),this._onDidChange.fire({s:i,v:r})}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,t=new Re(new ph(e.h,1,1,1)),i=this._canvas.getContext("2d"),r=i.createLinearGradient(0,0,this._canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=Re.Format.CSS.format(t),i.fill(),i.fillStyle=r,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class NOe extends Pe{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new xe,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new xe,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=Ge(e,kc(".standalone-strip")),this.overlay=Ge(this.domNode,kc(".standalone-overlay"))):(this.domNode=Ge(e,kc(".strip")),this.overlay=Ge(this.domNode,kc(".overlay"))),this.slider=Ge(this.domNode,kc(".slider")),this.slider.style.top="0px",this._register(Ye(this.domNode,kt.POINTER_DOWN,r=>this.onPointerDown(r))),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 t=this._register(new ib),i=Os(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-i.top),()=>null);const r=Ye(document,kt.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class NCt extends NOe{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:r}=e.rgba,o=new Re(new ci(t,i,r,1)),s=new Re(new ci(t,i,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class OCt extends NOe{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class ICt extends Pe{constructor(e){super(),this._onClicked=this._register(new xe),this.onClicked=this._onClicked.event,this._button=Ge(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class RCt extends U1{constructor(e,t,i,r,o=!1){super(),this.model=t,this.pixelRatio=i,this._register(Wv.onDidChange(()=>this.layout()));const s=kc(".colorpicker-widget");e.appendChild(s),this.header=this._register(new ECt(s,this.model,r,o)),this.body=this._register(new MCt(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}var OOe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},IOe=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},pQ=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class HCt{constructor(e,t,i,r){this.owner=e,this.range=t,this.model=i,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let MH=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return Zo.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return pQ(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const r=e7.get(this._editor);if(!r)return[];for(const o of t){if(!r.isColorDecoration(o))continue;const s=r.getColorData(o.range.getStartPosition());if(s)return[yield ROe(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]})}renderHoverParts(e,t){return HOe(this,this._editor,this._themeService,t,e)}};MH=OOe([IOe(1,Vs)],MH);class PCt{constructor(e,t,i,r){this.owner=e,this.range=t,this.model=i,this.provider=r}}let qL=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,i){return pQ(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!e7.get(this._editor))return null;const o=yield DOe(i,this._editor.getModel(),Jn.None);let s=null,a=null;for(const d of o){const h=d.colorInfo;G.containsRange(h.range,e.range)&&(s=h,a=d.provider)}const l=s!=null?s:e,u=a!=null?a:t,c=!!s;return{colorHover:yield ROe(this,this._editor.getModel(),l,u),foundInEditor:c}})}updateEditorModel(e){return pQ(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let i=new G(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield pI(this._editor.getModel(),t,this._color,i,e),i=POe(this._editor,i,t))})}renderHoverParts(e,t){return HOe(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};qL=OOe([IOe(1,Vs)],qL);function ROe(n,e,t,i){return pQ(this,void 0,void 0,function*(){const r=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,u=new ci(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),c=new Re(u),d=yield EOe(e,t,i,Jn.None),h=new DCt(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,r),n instanceof MH?new HCt(n,G.lift(t.range),h,i):new PCt(n,G.lift(t.range),h,i)})}function HOe(n,e,t,i,r){if(i.length===0||!e.hasModel())return Pe.None;const o=new st,s=i[0],a=e.getModel(),l=s.model,u=o.add(new RCt(r.fragment,l,e.getOption(138),t,n instanceof qL));r.setColorPicker(u);let c=new G(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(n instanceof qL){const d=i[0].model.color;n.color=d,pI(a,l,d,c,s),o.add(l.onColorFlushed(h=>{n.color=h}))}else o.add(l.onColorFlushed(d=>pQ(this,void 0,void 0,function*(){yield pI(a,l,d,c,s),c=POe(e,c,l,r)})));return o.add(l.onDidChangeColor(d=>{pI(a,l,d,c,s)})),o}function POe(n,e,t,i){let r,o;if(t.presentation.textEdit){r=[t.presentation.textEdit],o=new G(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const s=n.getModel()._setTrackedRange(null,o,3);n.pushUndoStop(),n.executeEdits("colorpicker",r),o=n.getModel()._getTrackedRange(s)||o}else r=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],o=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),n.pushUndoStop(),n.executeEdits("colorpicker",r);return t.presentation.additionalTextEdits&&(r=[...t.presentation.additionalTextEdits],n.executeEdits("colorpicker",r),i&&i.hide()),n.pushUndoStop(),o}function pI(n,e,t,i,r){return pQ(this,void 0,void 0,function*(){const o=yield EOe(n,{range:i,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},r.provider,Jn.None);e.colorPresentations=o||[]})}function zie(n,e){return!!n[e]}class BZ{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=zie(e.event,t.triggerModifier),this.hasSideBySideModifier=zie(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class t9e{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=zie(e,t.triggerModifier)}}class cN{constructor(e,t,i,r){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function n9e(n){return n==="altKey"?Yn?new cN(57,"metaKey",6,"altKey"):new cN(5,"ctrlKey",6,"altKey"):Yn?new cN(6,"altKey",57,"metaKey"):new cN(6,"altKey",5,"ctrlKey")}class WF extends Pe{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new xe),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new xe),this.onExecute=this._onExecute.event,this._onCancel=this._register(new xe),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=n9e(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(75)){const r=n9e(this._editor.getOption(75));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new BZ(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new BZ(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new BZ(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new t9e(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new t9e(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.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 t=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t||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 VCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},W3=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let t7=class extends nQ{constructor(e,t,i,r,o,s,a,l,u,c,d,h,f){super(e,Object.assign(Object.assign({},r.getRawOptions()),{overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()}),i,o,s,a,l,u,c,d,h,f),this._parentEditor=r,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(g=>this._onParentConfigurationChanged(g)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){XS(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};t7=VCt([W3(4,Sn),W3(5,Mi),W3(6,Qo),W3(7,_n),W3(8,Vs),W3(9,Fo),W3(10,S7),W3(11,br),W3(12,Vt)],t7);const i9e=new Re(new ci(0,122,204)),FCt={showArrow:!0,showFrame:!0,className:"",frameColor:i9e,arrowColor:i9e,keepEditorSelection:!1},BCt="vs.editor.contrib.zoneWidget";class $Ct{constructor(e,t,i,r,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=r,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class jCt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class zF{constructor(e){this._editor=e,this._ruleName=zF._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),Zpe(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(){Zpe(this._ruleName),Gte(`.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:G.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}zF._IdGenerator=new yue(".arrow-decoration-");class WCt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new st,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=s4(t),XS(this.options,FCt,!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(i=>{const r=this._getWidth(i);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(r)}))}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 zF(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 t;if(this.domNode.style.height=`${e}px`,this.container){const i=e-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const r=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(r))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(!!e)return e.getStartPosition()}show(e,t){const i=G.isIRange(e)?G.lift(e):G.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:Vn.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.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(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(64);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(r)+"px";const s=document.createElement("div");s.style.overflow="hidden";const a=this.editor.getOption(64);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,u=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(u=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new $Ct(s,i.lineNumber,i.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new jCt(BCt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:u;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,o),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new G(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){!this.container||(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Ja(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(64),r=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+r;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 VOe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FOe=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const BOe=oi("IPeekViewService");gi(BOe,class{constructor(){this._widgets=new Map}addExclusiveWidget(n,e){const t=this._widgets.get(n);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const r=this._widgets.get(n);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(n))};this._widgets.set(n,{widget:e,listener:e.onDidClose(i)})}},1);var xu;(function(n){n.inPeekEditor=new It("inReferenceSearchEditor",!0,w("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),n.notInPeekEditor=n.inPeekEditor.toNegated()})(xu||(xu={}));let GL=class{constructor(e,t){e instanceof t7&&xu.inPeekEditor.bindTo(t)}dispose(){}};GL.ID="editor.contrib.referenceController";GL=VOe([FOe(1,_n)],GL);yi(GL.ID,GL,0);function zCt(n){const e=n.get(Mi).getFocusedCodeEditor();return e instanceof t7?e.getParentEditor():e}const UCt={headerBackgroundColor:Re.white,primaryHeadingColor:Re.fromHex("#333333"),secondaryHeadingColor:Re.fromHex("#6c6c6cb3")};let AH=class extends WCt{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new xe,this.onDidClose=this._onDidClose.event,XS(this.options,UCt,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.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=at(".head"),this._bodyElement=at(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=at(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),es(this._titleElement,"click",o=>this._onTitleClick(o))),Ge(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=at("span.filename"),this._secondaryHeading=at("span.dirname"),this._metaHeading=at("span.meta"),Ge(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=at(".peekview-actions");Ge(this._headElement,i);const r=this._getActionBarOptions();this._actionbarWidget=new F1(i,r),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new nc("peekview.close",w("label.close","Close"),dn.asClassName(_t.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:uTt.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:ys(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Uu(this._metaHeading)):ql(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(64)*1.2),r=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(r,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};AH=VOe([FOe(2,Sn)],AH);const qCt=de("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:Re.black,hcLight:Re.white},w("peekViewTitleBackground","Background color of the peek view title area.")),$Oe=de("peekViewTitleLabel.foreground",{dark:Re.white,light:Re.black,hcDark:Re.white,hcLight:_d},w("peekViewTitleForeground","Color of the peek view title.")),jOe=de("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},w("peekViewTitleInfoForeground","Color of the peek view title info.")),GCt=de("peekView.border",{dark:Ic,light:Ic,hcDark:ri,hcLight:ri},w("peekViewBorder","Color of the peek view borders and arrow.")),KCt=de("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:Re.black,hcLight:Re.white},w("peekViewResultsBackground","Background color of the peek view result list."));de("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:Re.white,hcLight:_d},w("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));de("peekViewResult.fileForeground",{dark:Re.white,light:"#1E1E1E",hcDark:Re.white,hcLight:_d},w("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));de("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},w("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));de("peekViewResult.selectionForeground",{dark:Re.white,light:"#6C6C6C",hcDark:Re.white,hcLight:_d},w("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const sf=de("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:Re.black,hcLight:Re.white},w("peekViewEditorBackground","Background color of the peek view editor."));de("peekViewEditorGutter.background",{dark:sf,light:sf,hcDark:sf,hcLight:sf},w("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));de("peekViewEditorStickyScroll.background",{dark:sf,light:sf,hcDark:sf,hcLight:sf},w("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));de("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},w("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));de("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},w("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));de("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Nr,hcLight:Nr},w("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var ZCt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class n7{constructor(e,t,i,r){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=r,this.id=Ene.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?w({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,V1(this.uri),this.range.startLineNumber,this.range.startColumn):w("aria.oneReference","in {0} on line {1} at column {2}",V1(this.uri),this.range.startLineNumber,this.range.startColumn)}}class XCt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:r,startColumn:o,endLineNumber:s,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:r,column:o-t}),u=new G(r,l.startColumn,r,o),c=new G(s,a,s,1073741824),d=i.getValueInRange(u).replace(/^\s+/,""),h=i.getValueInRange(e),f=i.getValueInRange(c).replace(/\s+$/,"");return{value:d+h+f,highlight:{start:d.length,end:d.length+h.length}}}}class KL{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new xl}dispose(){$i(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?w("aria.fileReferences.1","1 symbol in {0}, full path {1}",V1(this.uri),this.uri.fsPath):w("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,V1(this.uri),this.uri.fsPath)}resolve(e){return ZCt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new XCt(i))}catch(i){$n(i)}return this})}}class rc{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new xe,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(rc._compareReferences);let r;for(const o of e)if((!r||!Or.isEqual(r.uri,o.uri,!0))&&(r=new KL(this,o.uri),this.groups.push(r)),r.children.length===0||rc._compareReferences(o,r.children[r.children.length-1])!==0){const s=new n7(i===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){$i(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new rc(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?w("aria.result.0","No results found"):this.references.length===1?w("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?w("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):w("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let r=i.children.indexOf(e);const o=i.children.length,s=i.parent.groups.length;return s===1||t&&r+10?(t?r=(r+1)%o:r=(r+o-1)%o,i.children[r]):(r=i.parent.groups.indexOf(i),t?(r=(r+1)%s,i.parent.groups[r].children[0]):(r=(r+s-1)%s,i.parent.groups[r].children[i.parent.groups[r].children.length-1]))}nearestReference(e,t){const i=this.references.map((r,o)=>({idx:o,prefixLen:Yg(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-t.lineNumber)*100+Math.abs(r.range.startColumn-t.column)})).sort((r,o)=>r.prefixLen>o.prefixLen?-1:r.prefixLeno.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&G.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return Or.compare(e.uri,t.uri)||G.compareRangesUsingStarts(e.range,t.range)}}var UF=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qF=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let Uie=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof rc||e instanceof KL}getChildren(e){if(e instanceof rc)return e.groups;if(e instanceof KL)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};Uie=UF([qF(0,Lu)],Uie);class YCt{getHeight(){return 23}getTemplateId(e){return e instanceof KL?ZL.id:ED.id}}let qie=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof n7){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return V1(e.uri)}};qie=UF([qF(0,Ir)],qie);class JCt{getId(e){return e instanceof n7?e.id:e.uri}}let Gie=class extends Pe{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new CH(i,{supportHighlights:!0})),this.badge=new pie(Ge(i,at(".count")),{},GAe),e.appendChild(i)}set(e,t){const i=dF(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(w("referencesCount","{0} references",r)):this.badge.setTitleFormat(w("referenceCount","{0} reference",r))}};Gie=UF([qF(1,oQ)],Gie);let ZL=class WOe{constructor(e){this._instantiationService=e,this.templateId=WOe.id}renderTemplate(e){return this._instantiationService.createInstance(Gie,e)}renderElement(e,t,i){i.set(e.element,TF(e.filterData))}disposeTemplate(e){e.dispose()}};ZL.id="FileReferencesRenderer";ZL=UF([qF(0,Sn)],ZL);class ewt{constructor(e){this.label=new Df(e)}set(e,t){var i;const r=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!r||!r.value)this.label.set(`${V1(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:o,highlight:s}=r;t&&!z2.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,TF(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}}class ED{constructor(){this.templateId=ED.id}renderTemplate(e){return new ewt(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}ED.id="OneReferenceRenderer";class twt{getWidgetAriaLabel(){return w("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var nwt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},z3=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},r9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class GF{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new st,this._callOnModelChange=new st,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 t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let r=0,o=e.children.length;r{const o=r.deltaDecorations([],t);for(let s=0;s{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(rwt,"ReferencesWidget",this._treeContainer,new YCt,[this._instantiationService.createInstance(ZL),this._instantiationService.createInstance(ED)],this._instantiationService.createInstance(Uie),i),this._splitView.addView({onDidChange:Ut.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},QH.Distribute),this._splitView.addView({onDidChange:Ut.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)}},QH.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const r=(o,s)=>{o instanceof n7&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?r(o.element,"side"):o.editorOptions.pinned?r(o.element,"goto"):r(o.element,"show")}),ql(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Tr(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*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=w("noResults","No results"),Uu(this._messageContainer),Promise.resolve(void 0)):(ql(this._messageContainer),this._decorationsManager=new GF(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:t,target:i}=e;if(t.detail!==2)return;const r=this._getFocusedReference();!r||this._onDidSelectReference.fire({element:{uri:r.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),Uu(this._treeContainer),Uu(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 n7)return e;if(e instanceof KL&&e.children.length>0)return e.children[0]}revealReference(e){return r9e(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return r9e(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Un.inMemory?this.setTitle(C7t(e.uri),this._uriLabel.getUriLabel(dF(e.uri))):this.setTitle(w("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const r=yield i;if(!this._model){r.dispose();return}$i(this._previewModelReference);const o=r.object;if(o){const s=this._preview.getModel()===o.textEditorModel?0:1,a=G.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()})}};Kie=nwt([z3(3,Vs),z3(4,Lu),z3(5,Sn),z3(6,BOe),z3(7,oQ),z3(8,hF),z3(9,Ir),z3(10,$r),z3(11,br)],Kie);var owt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},N9=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},o9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const sm=new It("referenceSearchVisible",!1,w("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let i7=class Zie{static get(e){return e.getContribution(Zie.ID)}constructor(e,t,i,r,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=r,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new st,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=sm.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),!!r&&e.containsPosition(r))return;this._peekMode=i,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",s=iwt.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(Kie,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(w("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.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(l=>{const{element:u,kind:c}=l;if(!!u)switch(c){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(u,!1,!1);break;case"side":this.openReference(u,!0,!1);break;case"goto":i?this._gotoReference(u,!0):this.openReference(u,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var u;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(u=this._model)===null||u===void 0||u.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(w("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,d=new De(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(84)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return o9e(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const r=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(r),yield this._gotoReference(r,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()})}revealReference(e){return o9e(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var i;(i=this._widget)===null||i===void 0||i.hide(),this._ignoreModelChangeEvent=!0;const r=G.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:r,selectionSource:"code.jump",pinned:t}},this._editor).then(o=>{var s;if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(r),this._widget.focusOnReferenceTree();else{const a=Zie.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(r,bs(u=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,$n(o)})}openReference(e,t,i){t||this.closeWidget();const{uri:r,range:o}=e;this._editorService.openCodeEditor({resource:r,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};i7.ID="editor.contrib.referencesController";i7=owt([N9(2,_n),N9(3,Mi),N9(4,Fo),N9(5,Sn),N9(6,qd),N9(7,bi)],i7);function am(n,e){const t=zCt(n);if(!t)return;const i=i7.get(t);i&&e(i)}wu.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:ws(2089,60),when:ct.or(sm,xu.inPeekEditor),handler(n){am(n,e=>{e.changeFocusBetweenPreviewAndReferences()})}});wu.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:ct.or(sm,xu.inPeekEditor),handler(n){am(n,e=>{e.goToNextOrPreviousReference(!0)})}});wu.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:ct.or(sm,xu.inPeekEditor),handler(n){am(n,e=>{e.goToNextOrPreviousReference(!1)})}});mi.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");mi.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");mi.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");mi.registerCommand("closeReferenceSearch",n=>am(n,e=>e.closeWidget()));wu.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:ct.and(xu.inPeekEditor,ct.not("config.editor.stablePeek"))});wu.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:ct.and(sm,ct.not("config.editor.stablePeek"))});wu.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ct.and(sm,pNe,Bue.negate(),$ue.negate()),handler(n){var e;const i=(e=n.get(K1).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof n7&&am(n,r=>r.revealReference(i[0]))}});wu.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ct.and(sm,pNe,Bue.negate(),$ue.negate()),handler(n){var e;const i=(e=n.get(K1).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof n7&&am(n,r=>r.openReference(i[0],!0,!0))}});mi.registerCommand("openReference",n=>{var e;const i=(e=n.get(K1).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof n7&&am(n,r=>r.openReference(i[0],!1,!0))});var zOe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Rw=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const pce=new It("hasSymbols",!1,w("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),KF=oi("ISymbolNavigationService");let Xie=class{constructor(e,t,i,r){this._editorService=t,this._notificationService=i,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=pce.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new Yie(this._editorService),r=i.onDidChange(o=>{if(this._ignoreEditorChange)return;const s=this._editorService.getActiveCodeEditor();if(!s)return;const a=s.getModel(),l=s.getPosition();if(!a||!l)return;let u=!1,c=!1;for(const d of t.references)if(cF(d.uri,a.uri))u=!0,c=c||G.containsPosition(d.range,l);else if(u)break;(!u||!c)&&this.reset()});this._currentState=Dd(i,r)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:G.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?w("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):w("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};Xie=zOe([Rw(0,_n),Rw(1,Mi),Rw(2,Fo),Rw(3,Ir)],Xie);gi(KF,Xie,1);vt(new class extends Ps{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:pce,kbOpts:{weight:100,primary:70}})}runEditorCommand(n,e){return n.get(KF).revealNext(e)}});wu.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:pce,primary:9,handler(n){n.get(KF).reset()}});let Yie=class{constructor(e){this._listener=new Map,this._disposables=new st,this._onDidChange=new xe,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(),$i(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Dd(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};Yie=zOe([Rw(0,Mi)],Yie);var gce=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};function kD(n,e,t,i){return gce(this,void 0,void 0,function*(){const o=t.ordered(n).map(a=>Promise.resolve(i(a,n,e)).then(void 0,l=>{Cs(l)})),s=yield Promise.all(o);return Ph(s.flat())})}function ZF(n,e,t,i){return kD(e,t,n,(r,o,s)=>r.provideDefinition(o,s,i))}function UOe(n,e,t,i){return kD(e,t,n,(r,o,s)=>r.provideDeclaration(o,s,i))}function qOe(n,e,t,i){return kD(e,t,n,(r,o,s)=>r.provideImplementation(o,s,i))}function GOe(n,e,t,i){return kD(e,t,n,(r,o,s)=>r.provideTypeDefinition(o,s,i))}function XF(n,e,t,i,r){return kD(e,t,n,(o,s,a)=>gce(this,void 0,void 0,function*(){const l=yield o.provideReferences(s,a,{includeDeclaration:!0},r);if(!i||!l||l.length!==2)return l;const u=yield o.provideReferences(s,a,{includeDeclaration:!1},r);return u&&u.length===1?u:l}))}function MD(n){return gce(this,void 0,void 0,function*(){const e=yield n(),t=new rc(e,""),i=t.references.map(r=>r.link);return t.dispose(),i})}r3("_executeDefinitionProvider",(n,e,t)=>{const i=n.get(Vt),r=ZF(i.definitionProvider,e,t,Jn.None);return MD(()=>r)});r3("_executeTypeDefinitionProvider",(n,e,t)=>{const i=n.get(Vt),r=GOe(i.typeDefinitionProvider,e,t,Jn.None);return MD(()=>r)});r3("_executeDeclarationProvider",(n,e,t)=>{const i=n.get(Vt),r=UOe(i.declarationProvider,e,t,Jn.None);return MD(()=>r)});r3("_executeReferenceProvider",(n,e,t)=>{const i=n.get(Vt),r=XF(i.referenceProvider,e,t,!1,Jn.None);return MD(()=>r)});r3("_executeImplementationProvider",(n,e,t)=>{const i=n.get(Vt),r=qOe(i.implementationProvider,e,t,Jn.None);return MD(()=>r)});var kd=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},$Z,jZ,WZ,zZ,UZ,qZ,GZ,KZ;Ll.appendMenuItem(se.EditorContext,{submenu:se.EditorContextPeek,title:w("peek.submenu","Peek"),group:"navigation",order:100});class gQ{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof gQ||De.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class wl extends q8{static all(){return wl._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const i of pi.wrap(t.menu))(i.id===se.EditorContext||i.id===se.EditorContextPeek)&&(i.when=ct.and(e.precondition,i.when));return t}constructor(e,t){super(wl._patchConfig(t)),this.configuration=e,wl._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,r){if(!t.hasModel())return Promise.resolve(void 0);const o=e.get(Fo),s=e.get(Mi),a=e.get(M7),l=e.get(KF),u=e.get(Vt),c=e.get(Sn),d=t.getModel(),h=t.getPosition(),f=gQ.is(i)?i:new gQ(d,h),g=new Jf(t,5),T=jV(this._getLocationModel(u,f.model,f.position,g.token),g.token).then(v=>kd(this,void 0,void 0,function*(){var Q;if(!v||g.token.isCancellationRequested)return;Ys(v.ariaMessage);let b;if(v.referenceAt(d.uri,h)){const C=this._getAlternativeCommand(t);!wl._activeAlternativeCommands.has(C)&&wl._allSymbolNavigationCommands.has(C)&&(b=wl._allSymbolNavigationCommands.get(C))}const _=v.references.length;if(_===0){if(!this.configuration.muteMessage){const C=d.getWordAtPosition(h);(Q=ic.get(t))===null||Q===void 0||Q.showMessage(this._getNoResultFoundMessage(C),h)}}else if(_===1&&b)wl._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(C=>b.runEditorCommand(C,t,i,r).finally(()=>{wl._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,v,r)}),v=>{o.error(v)}).finally(()=>{g.dispose()});return a.showWhile(T,250),T}_onResult(e,t,i,r,o){return kd(this,void 0,void 0,function*(){const s=this._getGoToPreference(i);if(!(i instanceof t7)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(i,r,o);else{const a=r.firstReference(),l=r.references.length>1&&s==="gotoAndPeek",u=yield this._openReference(i,e,a,this.configuration.openToSide,!l);l&&u?this._openInPeek(u,r,o):r.dispose(),s==="goto"&&t.put(a)}})}_openReference(e,t,i,r,o){return kd(this,void 0,void 0,function*(){let s;if(Tdt(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:G.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(!!a){if(o){const l=a.getModel(),u=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&u.clear()},350)}return a}})}_openInPeek(e,t,i){const r=i7.get(e);r&&e.hasModel()?r.toggleWidget(i!=null?i:e.getSelection(),bs(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}wl._allSymbolNavigationCommands=new Map;wl._activeAlternativeCommands=new Set;class AD extends wl{_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield ZF(e.definitionProvider,t,i,r),w("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?w("noResultWord","No definition found for '{0}'",e.word):w("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleDefinitions}}const KOe=w7&&!cle()?2118:70;ps(($Z=class Jie extends AD{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Jie.id,title:{value:w("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:w({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:ct.and(oe.hasDefinitionProvider,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:KOe,weight:100},menu:[{id:se.EditorContext,group:"navigation",order:1.1},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),mi.registerCommandAlias("editor.action.goToDeclaration",Jie.id)}},$Z.id="editor.action.revealDefinition",$Z));ps((jZ=class ere extends AD{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:ere.id,title:{value:w("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ct.and(oe.hasDefinitionProvider,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:ws(2089,KOe),weight:100}}),mi.registerCommandAlias("editor.action.openDeclarationToTheSide",ere.id)}},jZ.id="editor.action.revealDefinitionAside",jZ));ps((WZ=class tre extends AD{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:tre.id,title:{value:w("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:ct.and(oe.hasDefinitionProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:se.EditorContextPeek,group:"peek",order:2}}),mi.registerCommandAlias("editor.action.previewDeclaration",tre.id)}},WZ.id="editor.action.peekDefinition",WZ));class ZOe extends wl{_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield UOe(e.declarationProvider,t,i,r),w("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?w("decl.noResultWord","No declaration found for '{0}'",e.word):w("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(56).multipleDeclarations}}ps((zZ=class XOe extends ZOe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:XOe.id,title:{value:w("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:w({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:ct.and(oe.hasDeclarationProvider,oe.isInWalkThroughSnippet.toNegated()),menu:[{id:se.EditorContext,group:"navigation",order:1.3},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?w("decl.noResultWord","No declaration found for '{0}'",e.word):w("decl.generic.noResults","No declaration found")}},zZ.id="editor.action.revealDeclaration",zZ));ps(class extends ZOe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:w("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:ct.and(oe.hasDeclarationProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),menu:{id:se.EditorContextPeek,group:"peek",order:3}})}});class YOe extends wl{_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield GOe(e.typeDefinitionProvider,t,i,r),w("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?w("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):w("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleTypeDefinitions}}ps((UZ=class JOe extends YOe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:JOe.ID,title:{value:w("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:w({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:ct.and(oe.hasTypeDefinitionProvider,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:0,weight:100},menu:[{id:se.EditorContext,group:"navigation",order:1.4},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},UZ.ID="editor.action.goToTypeDefinition",UZ));ps((qZ=class eIe extends YOe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:eIe.ID,title:{value:w("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:ct.and(oe.hasTypeDefinitionProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),menu:{id:se.EditorContextPeek,group:"peek",order:4}})}},qZ.ID="editor.action.peekTypeDefinition",qZ));class tIe extends wl{_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield qOe(e.implementationProvider,t,i,r),w("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?w("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):w("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(56).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(56).multipleImplementations}}ps((GZ=class nIe extends tIe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:nIe.ID,title:{value:w("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:w({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:ct.and(oe.hasImplementationProvider,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:2118,weight:100},menu:[{id:se.EditorContext,group:"navigation",order:1.45},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},GZ.ID="editor.action.goToImplementation",GZ));ps((KZ=class iIe extends tIe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:iIe.ID,title:{value:w("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:ct.and(oe.hasImplementationProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:3142,weight:100},menu:{id:se.EditorContextPeek,group:"peek",order:5}})}},KZ.ID="editor.action.peekImplementation",KZ));class rIe extends wl{_getNoResultFoundMessage(e){return e?w("references.no","No references found for '{0}'",e.word):w("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(56).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(56).multipleReferences}}ps(class extends rIe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:w("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:w({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:ct.and(oe.hasReferenceProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:1094,weight:100},menu:[{id:se.EditorContext,group:"navigation",order:1.45},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield XF(e.referenceProvider,t,i,!0,r),w("ref.title","References"))})}});ps(class extends rIe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:w("references.action.label","Peek References"),original:"Peek References"},precondition:ct.and(oe.hasReferenceProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),menu:{id:se.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield XF(e.referenceProvider,t,i,!1,r),w("ref.title","References"))})}});class swt extends wl{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:w("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ct.and(xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(this._references,w("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&w("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(56).multipleReferences}_getAlternativeCommand(){return""}}mi.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:on},{name:"position",description:"The position at which to start",constraint:De.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:(n,e,t,i,r,o,s)=>kd(void 0,void 0,void 0,function*(){Xi(on.isUri(e)),Xi(De.isIPosition(t)),Xi(Array.isArray(i)),Xi(typeof r>"u"||typeof r=="string"),Xi(typeof s>"u"||typeof s=="boolean");const a=n.get(Mi),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(Gh(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(u=>{const c=new class extends swt{_getNoResultFoundMessage(d){return o||super._getNoResultFoundMessage(d)}}({muteMessage:!Boolean(o),openInPeek:Boolean(s),openToSide:!1},i,r);u.get(Sn).invokeFunction(c.run.bind(c),l)})})});mi.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:on},{name:"position",description:"The position at which to start",constraint:De.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:(n,e,t,i,r)=>kd(void 0,void 0,void 0,function*(){n.get(Qo).executeCommand("editor.action.goToLocations",e,t,i,r,void 0,!0)})});mi.registerCommand({id:"editor.action.findReferences",handler:(n,e,t)=>{Xi(on.isUri(e)),Xi(De.isIPosition(t));const i=n.get(Vt),r=n.get(Mi);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!Gh(o)||!o.hasModel())return;const s=i7.get(o);if(!s)return;const a=bs(u=>XF(i.referenceProvider,o.getModel(),De.lift(t),!1,u).then(c=>new rc(c,w("ref.title","References")))),l=new G(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});mi.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var awt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ZZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},s9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let m8=class gI{constructor(e,t,i,r){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=r,this.toUnhook=new st,this.toUnhookForKeyboard=new st,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new WF(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,da(a))})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{$n(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(gI.ID)}startFindDefinitionFromCursor(e){return s9e(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(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;return s9e(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const r=new UL(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=bs(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){$n(a);return}if(!o||!o.length||!r.validate(this.editor)){this.removeLinkDecorations();return}const s=o[0].originSelectionRange?G.lift(o[0].originSelectionRange):new G(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(o.length>1){let a=s;for(const{originSelectionRange:l}of o)l&&(a=G.plusRange(a,l));this.addDecoration(a,new Gl().appendText(w("multipleResults","Click to show {0} definitions.",o.length)))}else{const a=o[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:u}}=l,{startLineNumber:c}=a.range;if(c<1||c>u.getLineCount()){l.dispose();return}const d=this.getPreviewValue(u,c,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(u.uri);this.addDecoration(s,d?new Gl().appendCodeblock(h||"",d):void 0),l.dispose()})}})}getPreviewValue(e,t,i){let r=i.range;return r.endLineNumber-r.startLineNumber>=gI.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,r)}stripIndentationFromPreviewRange(e,t,i){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{const r=!t&&this.editor.getOption(85)&&!this.isInPeekEditor(i);return new AD({openToSide:t,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const t=e.get(_n);return xu.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};m8.ID="editor.contrib.gotodefinitionatposition";m8.MAX_SOURCE_PREVIEW_LINES=8;m8=awt([ZZ(1,Lu),ZZ(2,$r),ZZ(3,Vt)],m8);yi(m8.ID,m8,2);const dN=at;class oIe extends Pe{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 fD(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class mce extends Pe{static render(e,t,i){return new mce(e,t,i)}constructor(e,t,i){super(),this.actionContainer=Ge(e,dN("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Ge(this.actionContainer,dN("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Ge(this.action,dN(`span.icon.${t.iconClass}`));const r=Ge(this.action,dN("span"));r.textContent=i?`${t.label} (${i})`:t.label,this._register(Ye(this.actionContainer,kt.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(Ye(this.actionContainer,kt.KEY_DOWN,o=>{const s=new vr(o);(s.equals(3)||s.equals(10))&&(o.stopPropagation(),o.preventDefault(),t.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 lwt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},uwt=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},s)}};class cwt{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class sIe extends Pe{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new xe),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Qr(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Qr(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Qr(()=>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,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=X2t(e=>this._computer.computeAsync(e)),lwt(this,void 0,void 0,function*(){var e,t,i,r;try{try{for(var o=!0,s=uwt(this._asyncIterable),a;a=yield s.next(),e=a.done,!e;o=!0){r=a.value,o=!1;const l=r;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!o&&!e&&(i=s.return)&&(yield i.call(s))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){$n(l)}})):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,t=this._state===4;this._onResult.fire(new cwt(this._result.slice(0),e,t))}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 XZ{constructor(e,t,i,r){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=r,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class mI{constructor(e,t,i,r,o,s){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=r,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const lm=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class gd{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 t=0,i=this.value.charCodeAt(e),r;if(r=gd._table[i],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(gd.isDigitCharacter(i)){r=8;do t+=1,i=this.value.charCodeAt(e+t);while(gd.isDigitCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}if(gd.isVariableCharacter(i)){r=9;do i=this.value.charCodeAt(e+ ++t);while(gd.isVariableCharacter(i)||gd.isDigitCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof gd._table[i]>"u"&&!gd.isDigitCharacter(i)&&!gd.isVariableCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}}gd._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class cb{constructor(){this._children=[]}appendChild(e){return e instanceof Kl&&this._children[this._children.length-1]instanceof Kl?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,r=i.children.indexOf(e),o=i.children.slice(0);o.splice(r,1,...t),i._children=o,function s(a,l){for(const u of a)u.parent=l,s(u.children,u)}(t,i)}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 ND)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class Kl extends cb{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Kl(this.value)}}class aIe extends cb{}class y1 extends aIe{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.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 db?this._children[0]:void 0}clone(){const e=new y1(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class db extends cb{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Kl&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new db;return this.options.forEach(e.appendChild,e),e}}class Tce extends cb{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,r=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(o=>o instanceof C2&&Boolean(o.elseValue))&&(r=this._replace([])),r}_replace(e){let t="";for(const i of this._children)if(i instanceof C2){let r=e[i.index]||"";r=i.resolve(r),t+=r}else t+=i.toString();return t}toString(){return""}clone(){const e=new Tce;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class C2 extends cb{constructor(e,t,i,r){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=r}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):"":Boolean(e)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(e)&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,r)=>r===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new C2(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class XL extends aIe{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Kl(t)],!0):!1}clone(){const e=new XL(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function a9e(n,e){const t=[...n];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class ND extends cb{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof y1&&(e.push(i),t=!t||t.indexr===e?(i=!0,!1):(t+=r.len(),!0)),i?t:-1}fullLen(e){let t=0;return a9e([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof y1&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof XL&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new ND;return this._children=this.children.map(t=>t.clone()),e}walk(e){a9e(this.children,e)}}class mQ{constructor(){this._scanner=new gd,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const r=new ND;return this.parseFragment(e,r),this.ensureFinalTabstop(r,i!=null?i:!1,t!=null?t:!1),r}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const r=new Map,o=[];t.walk(l=>(l instanceof y1&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));const s=(l,u)=>{const c=r.get(l.index);if(!c)return;const d=new y1(l.index);d.transform=l.transform;for(const h of c){const f=h.clone();d.appendChild(f),f instanceof y1&&r.has(f.index)&&!u.has(f.index)&&(u.add(f.index),s(f,u),u.delete(f.index))}t.replace(l,[d])},a=new Set;for(const l of o)s(l,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new y1(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Kl(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new y1(Number(t)):new XL(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const o=new y1(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Kl("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){const s=new db;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;i.push(r)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new Kl(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const o=new XL(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Kl("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseTransform(e){const t=new Tce;let i="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,i+=o;continue}if(this._token.type!==14){i+=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,t.appendChild(new Kl(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,r)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const r=this._accept(8,!0);if(r)if(i){if(this._accept(4))return e.appendChild(new C2(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new C2(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){const o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new C2(Number(r),o)),!0)}else if(this._accept(11)){const o=this._until(4);if(o)return e.appendChild(new C2(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){const o=this._until(4);if(o)return e.appendChild(new C2(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){const o=this._until(1);if(o){const s=this._until(4);if(s)return e.appendChild(new C2(Number(r),void 0,o,s)),!0}}else{const o=this._until(4);if(o)return e.appendChild(new C2(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Kl(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const dwt=w("defaultLabel","input"),hwt=w("label.preserveCaseToggle","Preserve Case");class fwt extends lb{constructor(e){super({icon:_t.preserveCase,title:hwt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class pwt extends U1{constructor(e,t,i,r){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new xe),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new xe),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new xe),this._onInput=this._register(new xe),this._onKeyUp=this._register(new xe),this._onPreserveCaseKeyDown=this._register(new xe),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||dwt;const o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,u=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new rNe(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:u,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new fwt(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const c=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const f=c.indexOf(document.activeElement);if(f>=0){let g=-1;h.equals(17)?g=(f+1)%c.length:h.equals(15)&&(f===0?g=c.length-1:g=f-1),h.equals(9)?(c[f].blur(),this.inputBox.focus()):g>=0&&c[g].focus(),zn.stop(h,!0)}}});const d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}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 lIe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},uIe=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const vce=new It("suggestWidgetVisible",!1,w("suggestWidgetVisible","Whether suggestion are visible")),Qce="historyNavigationWidgetFocus",cIe="historyNavigationForwardsEnabled",dIe="historyNavigationBackwardsEnabled";let B4;const hN=[];function hIe(n,e){if(hN.includes(e))throw new Error("Cannot register the same widget multiple times");hN.push(e);const t=new st,i=new It(Qce,!1).bindTo(n),r=new It(cIe,!0).bindTo(n),o=new It(dIe,!0).bindTo(n),s=()=>{i.set(!0),B4=e},a=()=>{i.set(!1),B4===e&&(B4=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(Bn(()=>{hN.splice(hN.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}let nre=class extends oNe{constructor(e,t,i,r){super(e,t,i);const o=this._register(r.createScoped(this.inputBox.element));this._register(hIe(o,this.inputBox))}};nre=lIe([uIe(3,_n)],nre);let ire=class extends pwt{constructor(e,t,i,r,o=!1){super(e,t,o,i);const s=this._register(r.createScoped(this.inputBox.element));this._register(hIe(s,this.inputBox))}};ire=lIe([uIe(3,_n)],ire);wu.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ct.and(ct.has(Qce),ct.equals(dIe,!0),vce.isEqualTo(!1)),primary:16,secondary:[528],handler:n=>{B4==null||B4.showPreviousValue()}});wu.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ct.and(ct.has(Qce),ct.equals(cIe,!0),vce.isEqualTo(!1)),primary:18,secondary:[530],handler:n=>{B4==null||B4.showNextValue()}});var Cx=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const jn={Visible:vce,HasFocusedSuggestion:new It("suggestWidgetHasFocusedSuggestion",!1,w("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new It("suggestWidgetDetailsVisible",!1,w("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new It("suggestWidgetMultipleSuggestions",!1,w("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new It("suggestionMakesTextEdit",!0,w("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new It("acceptSuggestionOnEnter",!0,w("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new It("suggestionHasInsertAndReplaceRange",!1,w("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new It("suggestionInsertMode",void 0,{type:"string",description:w("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new It("suggestionCanResolve",!1,w("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Ef=new se("suggestWidgetStatusBar");class gwt{constructor(e,t,i,r){var o;this.position=e,this.completion=t,this.container=i,this.provider=r,this.isInvalid=!1,this.score=z2.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(o=t.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,G.isIRange(t.range)?(this.editStart=new De(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new De(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new De(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||G.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new De(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new De(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new De(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||G.spansMultipleLines(t.range.insert)||G.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return Cx(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._isResolved=!0,t.dispose()},i=>{c0(i)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class YL{constructor(e=2,t=new Set,i=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=r,this.showDeprecated=o}}YL.default=new YL;let mwt;function Twt(){return mwt}class vwt{constructor(e,t,i,r){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=r}}function bce(n,e,t,i=YL.default,r={triggerKind:0},o=Jn.None){return Cx(this,void 0,void 0,function*(){const s=new nu(!0);t=t.clone();const a=e.getWordAtPosition(t),l=a?new G(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):G.fromPositions(t),u={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},c=[],d=new st,h=[];let f=!1;const g=(v,Q,b)=>{var _,C,L;let S=!1;if(!Q)return S;for(const D of Q.suggestions)if(!i.kindFilter.has(D.kind)){if(!i.showDeprecated&&((_=D==null?void 0:D.tags)===null||_===void 0?void 0:_.includes(1)))continue;D.range||(D.range=u),D.sortText||(D.sortText=typeof D.label=="string"?D.label:D.label.label),!f&&D.insertTextRules&&D.insertTextRules&4&&(f=mQ.guessNeedsClipboard(D.insertText)),c.push(new gwt(t,D,Q,v)),S=!0}return qae(Q)&&d.add(Q),h.push({providerName:(C=v._debugDisplayName)!==null&&C!==void 0?C:"unknown_provider",elapsedProvider:(L=Q.duration)!==null&&L!==void 0?L:-1,elapsedOverall:b.elapsed()}),S},T=(()=>Cx(this,void 0,void 0,function*(){}))();for(const v of n.orderedGroups(e)){let Q=!1;if(yield Promise.all(v.map(b=>Cx(this,void 0,void 0,function*(){if(i.providerItemsToReuse.has(b)){const _=i.providerItemsToReuse.get(b);_.forEach(C=>c.push(C)),Q=Q||_.length>0;return}if(!(i.providerFilter.size>0&&!i.providerFilter.has(b)))try{const _=new nu(!0),C=yield b.provideCompletionItems(e,t,r,o);Q=g(b,C,_)||Q}catch(_){Cs(_)}}))),Q||o.isCancellationRequested)break}return yield T,o.isCancellationRequested?(d.dispose(),Promise.reject(new x7)):new vwt(c.sort(ywt(i.snippetSortOrder)),f,{entries:h,elapsed:s.elapsed()},d)})}function yce(n,e){if(n.sortTextLow&&e.sortTextLow){if(n.sortTextLowe.sortTextLow)return 1}return n.textLabele.textLabel?1:n.completion.kind-e.completion.kind}function Qwt(n,e){if(n.completion.kind!==e.completion.kind){if(n.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return yce(n,e)}function bwt(n,e){if(n.completion.kind!==e.completion.kind){if(n.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return yce(n,e)}const YF=new Map;YF.set(0,Qwt);YF.set(2,bwt);YF.set(1,yce);function ywt(n){return YF.get(n)}mi.registerCommand("_executeCompletionItemProvider",(n,...e)=>Cx(void 0,void 0,void 0,function*(){const[t,i,r,o]=e;Xi(on.isUri(t)),Xi(De.isIPosition(i)),Xi(typeof r=="string"||!r),Xi(typeof o=="number"||!o);const{completionProvider:s}=n.get(Vt),a=yield n.get(Lu).createModelReference(t);try{const l={incomplete:!1,suggestions:[]},u=[],c=a.object.textEditorModel.validatePosition(i),d=yield bce(s,a.object.textEditorModel,c,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(const h of d.items)u.length<(o!=null?o:0)&&u.push(h.resolve(Jn.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return yield Promise.all(u),l}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{a.dispose()}}));function _wt(n,e){var t;(t=n.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class YT{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,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}var _ce=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},NH=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const l9e=at;let OH=class rre extends Pe{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(jg,this._editor)),this._currentResult=null,this._participants=[];for(const r of lm.getAll())this._participants.push(this._instantiationService.createInstance(r,this._editor));this._participants.sort((r,o)=>r.hoverOrdinal-o.hoverOrdinal),this._computer=new RH(this._editor,this._participants),this._hoverOperation=this._register(new sIe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{if(!this._computer.anchor)return;const o=r.hasLoadingMessage?this._addLoadingMessage(r.value):r.value;this._withResult(new fIe(this._computer.anchor,o,r.isComplete))})),this._register(es(this._widget.getDomNode(),"keydown",r=>{r.equals(9)&&this.hide()})),this._register(no.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(e){const t=[];for(const r of this._participants)if(r.suggestHoverAnchor){const o=r.suggestHoverAnchor(e);o&&t.push(o)}const i=e.target;if(i.type===6&&t.push(new XZ(0,i.range,e.event.posx,e.event.posy)),i.type===7){const r=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToTexto.priority-r.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,r){this._startShowingOrUpdateHover(new XZ(0,e,void 0,void 0),t,i,r,null)}_startShowingOrUpdateHover(e,t,i,r,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,i,r,!1),!0):!1:this._editor.getOption(58).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,r,!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,t,i,r,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,r,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,r,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=r,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_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 e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}}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,t){const{showAtPosition:i,showAtSecondaryPosition:r,highlightRange:o}=rre.computeHoverRanges(this._editor,e.range,t),s=new st,a=s.add(new IH(this._keybindingService)),l=document.createDocumentFragment();let u=null;const c={fragment:l,statusBar:a,setColorPicker:h=>u=h,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const h of this._participants){const f=t.filter(g=>g.owner===h);f.length>0&&s.add(h.renderHoverParts(c,f))}const d=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){const h=this._editor.createDecorationsCollection();h.set([{range:o,options:rre._DECORATION_OPTIONS}]),s.add(Bn(()=>{h.clear()}))}this._widget.showAt(l,new wwt(u,i,r,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,i){let r=1;if(e.hasModel()){const u=e._getViewModel(),c=u.coordinatesConverter,d=c.convertModelRangeToViewRange(t),h=new De(d.startLineNumber,u.getLineMinColumn(d.startLineNumber));r=c.convertViewPositionToModelPosition(h).column}const o=t.startLineNumber;let s=t.startColumn,a=i[0].range,l=null;for(const u of i)a=G.plusRange(a,u.range),u.range.startLineNumber===o&&u.range.endLineNumber===o&&(s=Math.max(Math.min(s,u.range.startColumn),r)),u.forceShowAtRange&&(l=u.range);return{showAtPosition:l?l.getStartPosition():new De(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new De(o,s),highlightRange:a}}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()}};OH._DECORATION_OPTIONS=Vn.register({description:"content-hover-highlight",className:"hoverHighlight"});OH=_ce([NH(1,Sn),NH(2,Ir)],OH);class fIe{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter(i=>i.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new Cwt(this,this.anchor,t,this.isComplete)}}class Cwt extends fIe{constructor(e,t,i,r){super(t,i,r),this.original=e}filter(e){return this.original.filter(e)}}class wwt{constructor(e,t,i,r,o,s,a,l,u,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=r,this.stoleFocus=o,this.source=s,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=u,this.disposables=c,this.closestMouseDistance=void 0}}let jg=class pIe extends Pe{get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return Boolean((e=this._visibleData)===null||e===void 0?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,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=oe.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=oe.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new oIe),this._focusTracker=this._register($h(this.getDomNode())),this._horizontalScrollingBy=30,this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(i=>{i.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 pIe.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(jn.Visible.key)&&(e=!0);const t=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:e?[1,2]:[2,1],positionAffinity:t}}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=Os(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=u9e(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const r=u9e(e,t,i.left,i.top,i.width,i.height);return r>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,r),!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:t,lineHeight:i}=this._editor.getOption(48);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i/t}`,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(t=>this._editor.applyFontInfo(t))}showAt(e,t){var i;this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._hoverFocusedKey.set(!1),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 i=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==i&&(this._hover.contentsDomNode.style.paddingBottom=i,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,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.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,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}escape(){this._editor.focus()}};jg.ID="editor.contrib.contentHoverWidget";jg=_ce([NH(1,_n)],jg);let IH=class extends Pe{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=l9e("div.hover-row.status-bar"),this.actionsElement=Ge(this.hoverElement,l9e("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(mce.render(this.actionsElement,e,i))}append(e){const t=Ge(this.actionsElement,e);return this._hasContent=!0,t}};IH=_ce([NH(0,Ir)],IH);class RH{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,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),r=t.range.startLineNumber;if(r>i.getLineCount())return[];const o=i.getLineMaxColumn(r);return e.getLineDecorations(r).filter(s=>{if(s.options.isWholeLine)return!0;const a=s.range.startLineNumber===r?s.range.startColumn:1,l=s.range.endLineNumber===r?s.range.endColumn:o;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return Zo.EMPTY;const i=RH._getLineDecorations(this._editor,t);return Zo.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,i,e):Zo.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=RH._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Ph(t)}}function u9e(n,e,t,i,r,o){const s=t+r/2,a=i+o/2,l=Math.max(Math.abs(n-s)-r/2,0),u=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+u*u)}var xwt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},c9e=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},gIe=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let s6=class mIe{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new xe,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const r=new st,o=r.add(_ue(e,Object.assign(Object.assign({},this._getRenderOptions(e,r)),t),i));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>r.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(i,r)=>gIe(this,void 0,void 0,function*(){var o,s,a;let l;i?l=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(l=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),l||(l=Fc);const u=yield Zpt(this._languageService,r,l),c=document.createElement("span");if(c.innerHTML=(a=(s=mIe._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(u))!==null&&a!==void 0?a:u,this._options.editor){const d=this._options.editor.getOption(48);Ia(c,d)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>Lwt(this._openerService,i,e.isTrusted),disposables:t}}}};s6._ttpTokenizer=T6("tokenizeToString",{createHTML(n){return n}});s6=xwt([c9e(1,$r),c9e(2,ac)],s6);function Lwt(n,e,t){return gIe(this,void 0,void 0,function*(){try{return yield n.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Swt(t)})}catch(i){return $n(i),!1}})}function Swt(n){return n===!0?!0:n&&Array.isArray(n.enabledCommands)?n.enabledCommands:!1}const d9e=at;class Dv extends Pe{constructor(e,t,i){super(),this._renderDisposeables=this._register(new st),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new oIe),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new s6({editor:this._editor},t,i)),this._computer=new Dwt(this._editor),this._hoverOperation=this._register(new sIe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(48)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Dv.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_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,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const r of t){const o=d9e("div.hover-row.markdown-hover"),s=Ge(o,d9e("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(r.value));s.appendChild(a.element),i.appendChild(o)}this._updateContents(i),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 t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(64),s=this._hover.containerDomNode.clientHeight,a=i-r-(s-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}Dv.ID="editor.contrib.modesGlyphHoverWidget";class Dwt{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=r=>({value:r}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const r of t){if(!r.options.glyphMarginClassName)continue;const o=r.options.glyphMarginHoverMessage;!o||rQ(o)||i.push(...Wae(o).map(e))}return i}}var Ewt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class kwt{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function Mwt(n,e,t,i,r){return Ewt(this,void 0,void 0,function*(){try{const o=yield Promise.resolve(n.provideHover(t,i,r));if(o&&Nwt(o))return new kwt(n,o,e)}catch(o){Cs(o)}})}function Cce(n,e,t,i){const o=n.ordered(e).map((s,a)=>Mwt(s,a,e,t,i));return Zo.fromPromises(o).coalesce()}function Awt(n,e,t,i){return Cce(n,e,t,i).map(r=>r.hover).toPromise()}r3("_executeHoverProvider",(n,e,t)=>{const i=n.get(Vt);return Awt(i.hoverProvider,e,t,Jn.None)});function Nwt(n){const e=typeof n.range<"u",t=typeof n.contents<"u"&&n.contents&&n.contents.length>0;return e&&t}var Owt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fN=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const h9e=at;class A2{constructor(e,t,i,r,o){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=r,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let HH=class{constructor(e,t,i,r,o){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=r,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new A2(this,e.range,[new Gl().appendText(w("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),r=e.range.startLineNumber,o=i.getLineMaxColumn(r),s=[];let a=1e3;const l=i.getLineLength(r),u=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(113),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:u});let h=!1;c>=0&&l>c&&e.range.startColumn>=c&&(h=!0,s.push(new A2(this,e.range,[{value:w("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof d=="number"&&l>=d&&s.push(new A2(this,e.range,[{value:w("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(const g of t){const T=g.range.startLineNumber===r?g.range.startColumn:1,v=g.range.endLineNumber===r?g.range.endColumn:o,Q=g.options.hoverMessage;if(!Q||rQ(Q))continue;g.options.beforeContentClassName&&(f=!0);const b=new G(e.range.startLineNumber,T,e.range.startLineNumber,v);s.push(new A2(this,b,Wae(Q),f,a++))}return s}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return Zo.EMPTY;const r=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(r))return Zo.EMPTY;const o=new De(e.range.startLineNumber,e.range.startColumn);return Cce(this._languageFeaturesService.hoverProvider,r,o,i).filter(s=>!rQ(s.hover.contents)).map(s=>{const a=s.hover.range?G.lift(s.hover.range):e.range;return new A2(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return TIe(e,t,this._editor,this._languageService,this._openerService)}};HH=Owt([fN(1,$r),fN(2,ac),fN(3,bi),fN(4,Vt)],HH);function TIe(n,e,t,i,r){e.sort((s,a)=>s.ordinal-a.ordinal);const o=new st;for(const s of e)for(const a of s.contents){if(rQ(a))continue;const l=h9e("div.hover-row.markdown-hover"),u=Ge(l,h9e("div.hover-contents")),c=o.add(new s6({editor:t},i,r));o.add(c.onDidRenderAsync(()=>{u.className="hover-contents code-hover-contents",n.onContentsChanged()}));const d=o.add(c.render(a));u.appendChild(d.element),n.fragment.appendChild(l)}return o}var vIe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},PH=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};class f9e{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let ore=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new xe,this.onDidChange=this._onDidChange.event,this._dispoables=new st,this._markers=[],this._nextIdx=-1,on.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const r=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let u=eL(a.resource.toString(),l.resource.toString());return u===0&&(r==="position"?u=G.compareRangesUsingStarts(a,l)||ro.compare(a.severity,l.severity):u=ro.compare(a.severity,l.severity)||G.compareRangesUsingStarts(a,l)),u},s=()=>{this._markers=this._markerService.read({resource:on.isUri(e)?e:void 0,severities:ro.Error|ro.Warning|ro.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),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 f9e(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let r=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=Kx(this._markers,{resource:e.uri},(s,a)=>eL(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;sr.resource.toString()===e.toString());if(!(i<0)){for(;i=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O9=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};class Rwt{constructor(e,t,i,r,o){this._openerService=r,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new st,this._editor=t;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(es(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new uMe(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){$i(this._disposables)}update(e){const{source:t,message:i,relatedInformation:r,code:o}=e;let s=((t==null?void 0:t.length)||0)+2;o&&(typeof o=="string"?s+=o.length:s+=o.value.length);const a=Fh(i);this._lines=a.length,this._longestLineLength=0;for(const h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);ys(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){const h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(o)if(typeof o=="string"){const f=document.createElement("span");f.innerText=`(${o})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=at("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=g=>{this._openerService.open(o.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()};const f=Ge(this._codeLink,at("span"));f.innerText=o.value,h.appendChild(this._codeLink)}}if(ys(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),sl(r)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(const f of r){const g=document.createElement("div"),T=document.createElement("a");T.classList.add("filename"),T.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,T.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(T,f);const v=document.createElement("span");v.innerText=f.message,g.appendChild(T),g.appendChild(v),this._lines+=1,h.appendChild(g)}}const u=this._editor.getOption(48),c=Math.ceil(u.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=u.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case ro.Error:t=w("Error","Error");break;case ro.Warning:t=w("Warning","Warning");break;case ro.Info:t=w("Info","Info");break;case ro.Hint:t=w("Hint","Hint");break}let i=w("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const r=this._editor.getModel();return r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1&&(i=`${r.getLineContent(e.startLineNumber)}, ${i}`),i}}let TQ=class bIe extends AH{constructor(e,t,i,r,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=r,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new st,this._onDidSelectRelatedInformation=new xe,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=ro.Warning,this._backgroundColor=Re.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Fwt);let t=lre,i=Hwt;this._severity===ro.Warning?(t=TI,i=Pwt):this._severity===ro.Info&&(t=ure,i=Vwt);const r=e.getColor(t),o=e.getColor(i);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor($Oe),secondaryHeadingColor:e.getColor(jOe)})}_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(r=>this.editor.focus()));const t=[],i=this._menuService.createMenu(bIe.TitleMenu,this._contextKeyService);ZAe(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=Ge(e,at(""))}_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 Rwt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const r=G.lift(e),o=this.editor.getPosition(),s=o&&r.containsPosition(o)?o:r.getStartPosition();super.show(s,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?w("problems","{0} of {1} problems",t,i):w("change","{0} of {1} problem",t,i);this.setTitle(V1(a.uri),l)}this._icon.className=`codicon ${are.className(ro.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,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,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),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()}};TQ.TitleMenu=new se("gotoErrorTitleMenu");TQ=Iwt([O9(1,Vs),O9(2,ac),O9(3,i3),O9(4,Sn),O9(5,_n),O9(6,oQ)],TQ);const p9e=dL(Th,Q4t),g9e=dL(Oc,cL),m9e=dL(Ic,tne),lre=de("editorMarkerNavigationError.background",{dark:p9e,light:p9e,hcDark:ri,hcLight:ri},w("editorMarkerNavigationError","Editor marker navigation widget error color.")),Hwt=de("editorMarkerNavigationError.headerBackground",{dark:Xt(lre,.1),light:Xt(lre,.1),hcDark:null,hcLight:null},w("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),TI=de("editorMarkerNavigationWarning.background",{dark:g9e,light:g9e,hcDark:ri,hcLight:ri},w("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Pwt=de("editorMarkerNavigationWarning.headerBackground",{dark:Xt(TI,.1),light:Xt(TI,.1),hcDark:"#0C141F",hcLight:Xt(TI,.2)},w("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ure=de("editorMarkerNavigationInfo.background",{dark:m9e,light:m9e,hcDark:ri,hcLight:ri},w("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Vwt=de("editorMarkerNavigationInfo.headerBackground",{dark:Xt(ure,.1),light:Xt(ure,.1),hcDark:null,hcLight:null},w("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Fwt=de("editorMarkerNavigation.background",{dark:Is,light:Is,hcDark:Is,hcLight:Is},w("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Bwt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},pN=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},yIe=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let r7=class vI{static get(e){return e.getContribution(vI.ID)}constructor(e,t,i,r,o){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new st,this._editor=e,this._widgetVisible=_Ie.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 t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(TQ,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(i=>{var r,o,s;(!(!((r=this._model)===null||r===void 0)&&r.selected)||!G.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,i.position))&&((s=this._model)===null||s===void 0||s.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:G.lift(i).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 t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new De(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var i,r;return yIe(this,void 0,void 0,function*(){if(this._editor.hasModel()){const o=this._getOrCreateModel(t?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 s=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&((i=vI.get(s))===null||i===void 0||i.close(),(r=vI.get(s))===null||r===void 0||r.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};r7.ID="editor.contrib.markerController";r7=Bwt([pN(1,QIe),pN(2,_n),pN(3,Mi),pN(4,Sn)],r7);class JF extends Ot{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return yIe(this,void 0,void 0,function*(){t.hasModel()&&((i=r7.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))})}}class kf extends JF{constructor(){super(!0,!1,{id:kf.ID,label:kf.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:oe.focus,primary:578,weight:100},menuOpts:{menuId:TQ.TitleMenu,title:kf.LABEL,icon:Eo("marker-navigation-next",_t.arrowDown,w("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}kf.ID="editor.action.marker.next";kf.LABEL=w("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Wg extends JF{constructor(){super(!1,!1,{id:Wg.ID,label:Wg.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:oe.focus,primary:1602,weight:100},menuOpts:{menuId:TQ.TitleMenu,title:Wg.LABEL,icon:Eo("marker-navigation-previous",_t.arrowUp,w("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Wg.ID="editor.action.marker.prev";Wg.LABEL=w("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class $wt extends JF{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:w("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:oe.focus,primary:66,weight:100},menuOpts:{menuId:se.MenubarGoMenu,title:w({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class jwt extends JF{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:w("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:oe.focus,primary:1090,weight:100},menuOpts:{menuId:se.MenubarGoMenu,title:w({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}yi(r7.ID,r7,4);dt(kf);dt(Wg);dt($wt);dt(jwt);const _Ie=new It("markersNavigationVisible",!1),Wwt=Ps.bindToContribution(r7.get);vt(new Wwt({id:"closeMarkersNavigation",precondition:_Ie,handler:n=>n.close(),kbOpts:{weight:100+50,kbExpr:oe.focus,primary:9,secondary:[1033]}}));var zwt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},YZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const ud=at;class Uwt{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const T9e={type:1,filter:{include:Mn.QuickFix},triggerAction:Gc.QuickFixHover};let cre=class{constructor(e,t,i,r){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),r=e.range.startLineNumber,o=i.getLineMaxColumn(r),s=[];for(const a of t){const l=a.range.startLineNumber===r?a.range.startColumn:1,u=a.range.endLineNumber===r?a.range.endColumn:o,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const d=new G(e.range.startLineNumber,l,e.range.startLineNumber,u);s.push(new Uwt(this,d,c))}return s}renderHoverParts(e,t){if(!t.length)return Pe.None;const i=new st;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,i)));const r=t.length===1?t[0]:t.sort((o,s)=>ro.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,r,i),i}renderMarkerHover(e,t){const i=ud("div.hover-row"),r=Ge(i,ud("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);const u=Ge(r,ud("span"));if(u.style.whiteSpace="pre-wrap",u.innerText=s,o||a)if(a&&typeof a!="string"){const c=ud("span");if(o){const g=Ge(c,ud("span"));g.innerText=o}const d=Ge(c,ud("a.code-link"));d.setAttribute("href",a.target.toString()),t.add(Ye(d,"click",g=>{this._openerService.open(a.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()}));const h=Ge(d,ud("span"));h.innerText=a.value;const f=Ge(r,c);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{const c=Ge(r,ud("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(sl(l))for(const{message:c,resource:d,startLineNumber:h,startColumn:f}of l){const g=Ge(r,ud("div"));g.style.marginTop="8px";const T=Ge(g,ud("a"));T.innerText=`${V1(d)}(${h}, ${f}): `,T.style.cursor="pointer",t.add(Ye(T,"click",Q=>{Q.stopPropagation(),Q.preventDefault(),this._openerService&&this._openerService.open(d,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:f}}}).catch($n)}));const v=Ge(g,ud("span"));v.innerText=c,this._editor.applyFontInfo(v)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===ro.Error||t.marker.severity===ro.Warning||t.marker.severity===ro.Info)&&e.statusBar.addAction({label:w("view problem","View Problem"),commandId:kf.ID,run:()=>{var r;e.hide(),(r=r7.get(this._editor))===null||r===void 0||r.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(88)){const r=e.statusBar.append(ud("div"));this.recentMarkerCodeActionsInfo&&(TH.makeKey(this.recentMarkerCodeActionsInfo.marker)===TH.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=w("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?Pe.None:i.add(Uf(()=>r.textContent=w("checkingForQuickFixes","Checking for quick fixes..."),200));r.textContent||(r.textContent=String.fromCharCode(160));const s=this.getCodeActions(t.marker);i.add(Bn(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),r.textContent=w("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;i.add(Bn(()=>{l||a.dispose()})),e.statusBar.addAction({label:w("quick fixes","Quick Fix..."),commandId:ace,run:u=>{l=!0;const c=g8.get(this._editor),d=Os(u);e.hide(),c==null||c.showCodeActions(T9e,a,{x:d.left,y:d.top,width:d.width,height:d.height})}})},$n)}}getCodeActions(e){return bs(t=>cce(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new G(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),T9e,em.None,t))}};cre=zwt([YZ(1,Dle),YZ(2,ac),YZ(3,Vt)],cre);let qwt;function o7(){return qwt}let CIe;function Gwt(n){CIe=n}class wIe{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e){return CIe(()=>{const t=wce(e);return t!==void 0?t:`${this.debugName} (mapped)`},t=>e(this.read(t),t))}}class OD extends wIe{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function _u(n,e){var t,i;const r=new xIe(n,e);try{(t=o7())===null||t===void 0||t.handleBeginTransaction(r),n(r)}finally{r.finish(),(i=o7())===null||i===void 0||i.handleEndTransaction()}}function v9e(n,e,t){n?e(n):_u(e,t)}class xIe{constructor(e,t){this.fn=e,this._getDebugName=t,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():wce(this.fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;this.updatingObservers=null;for(const{observer:t,observable:i}of e)t.endUpdate(i)}}function wce(n){const e=n.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),r=i?i[1]:void 0;return r==null?void 0:r.trim()}function vQ(n,e){return new LIe(n,e)}class LIe extends OD{constructor(e,t){super(),this.debugName=e,this._value=t}get(){return this._value}set(e,t,i){var r;if(this._value===e)return;let o;t||(t=o=new xIe(()=>{},()=>`Setting ${this.debugName}`));try{const s=this._value;this._setValue(e),(r=o7())===null||r===void 0||r.handleObservableChanged(this,{oldValue:s,newValue:e,change:i,didChange:!0});for(const a of this.observers)t.updateObserver(a,this),a.handleChange(this,i)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function dre(n,e){return new Kwt(n,e)}class Kwt extends LIe{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}function vd(n,e){return new SIe(n,e,void 0,void 0)}function Zwt(n,e,t){return new SIe(n,t,e.createEmptyChangeSummary,e.handleChange)}Gwt(vd);class SIe extends OD{get debugName(){return typeof this._debugName=="function"?this._debugName():this._debugName}constructor(e,t,i,r){var o,s;super(),this._debugName=e,this.computeFn=t,this.createChangeSummary=i,this._handleChange=r,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=o7())===null||s===void 0||s.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}get(){var e;if(this.observers.size===0){const t=this.computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){this.state=3;for(const t of this.dependencies)if(t.reportChanges(),this.state===2)break}this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const r=this.state!==0,o=this.value;this.state=3;const s=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this.computeFn(this,s)}finally{for(const l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}const a=r&&o!==this.value;if((t=o7())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:a}),a)for(const l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(const i of this.observers)i.handlePossibleChange(this);if(t)for(const i of this.observers)i.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const t=[...this.observers];for(const i of t)i.endUpdate(this)}if(this.updateCount<0)throw new ha}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary):!0,r=this.state===3;if(i&&(this.state===1||r)&&(this.state=2,r))for(const o of this.observers)o.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function oc(n,e){return new DIe(n,e,void 0,void 0)}function Xwt(n,e){return Ywt(e,n)}function Ywt(n,e){const t=new st,i=oc(e,r=>{t.clear(),n(r,t)});return Bn(()=>{i.dispose(),t.dispose()})}class DIe{constructor(e,t,i,r){var o,s;this.debugName=e,this.runFn=t,this.createChangeSummary=i,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=o7())===null||s===void 0||s.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t;if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i,this.state=3,(e=o7())===null||e===void 0||e.handleAutorunTriggered(this);try{const r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this.runFn(this,r)}finally{for(const r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,SV(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary):!0)&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(n){n.Observer=DIe})(oc||(oc={}));function EIe(n){return new Jwt(n)}class Jwt extends wIe{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function af(n,e){return new kIe(n,e)}class kIe extends OD{constructor(e,t){super(),this.event=e,this.getValue=t,this.hasValue=!1,this.handleEvent=i=>{var r;const o=this.getValue(i),s=!this.hasValue||this.value!==o;(r=o7())===null||r===void 0||r.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:o,change:void 0,didChange:s}),s&&(this.value=o,this.hasValue&&_u(a=>{for(const l of this.observers)a.updateObserver(l,this),l.handleChange(this,void 0)},()=>{const a=this.getDebugName();return"Event fired"+(a?`: ${a}`:"")}),this.hasValue=!0)}}getDebugName(){return wce(this.getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this.getValue(void 0)}}(function(n){n.Observer=kIe})(af||(af={}));function ext(n,e){return new txt(n,e)}class txt extends OD{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{_u(i=>{for(const r of this.observers)i.updateObserver(r,this),r.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function nxt(n){return new ixt(n)}class ixt extends OD{constructor(e){super(),this.debugName=e}trigger(e,t){if(!e){_u(i=>{this.trigger(i,t)},()=>`Trigger signal ${this.debugName}`);return}for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t)}get(){}}function rxt(n,e){const t=new oxt(e!=null?e:!1);return n.addObserver(t),e&&n.reportChanges(),Bn(()=>{n.removeObserver(t)})}class oxt{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,this.counter===0&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}const MIe="editor.action.inlineSuggest.commit",AIe="editor.action.inlineSuggest.showPrevious",NIe="editor.action.inlineSuggest.showNext";var sxt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class axt extends Pe{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new U1t),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new st,this.options=i,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new JL(()=>{var r;return(r=this.toggleMenuActionViewItem)===null||r===void 0?void 0:r.show()},i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new F1(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,actionViewItemProvider:(r,o)=>{var s;if(r.id===JL.ID)return this.toggleMenuActionViewItem=new cH(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:dn.asClassNameArray((s=i.moreIcon)!==null&&s!==void 0?s:_t.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(i.actionViewItemProvider){const a=i.actionViewItemProvider(r,o);if(a)return a}if(r instanceof Zv){const a=new cH(r,r.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}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,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach(r=>{this.actionBar.push(r,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){var t,i;const r=this.lookupKeybindings?(i=(t=this.options).getKeyBinding)===null||i===void 0?void 0:i.call(t,e):void 0;return da(r==null?void 0:r.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}class JL extends nc{constructor(e,t){t=t||w("moreActions","More Actions..."),super(JL.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return sxt(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}JL.ID="toolbar.toggle.more";var lxt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tC=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let hre=class extends axt{constructor(e,t,i,r,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:l=>{var u;return(u=s.lookupKeybinding(l.id))!==null&&u!==void 0?u:void 0}},t),{allowContextMenu:!0})),this._options=t,this._menuService=i,this._contextKeyService=r,this._contextMenuService=o,this._sessionDisposables=this._store.add(new st),t!=null&&t.telemetrySource&&this._store.add(this.actionBar.onDidRun(l=>a.publicLog2("workbenchActionExecuted",{id:l.action.id,from:t.telemetrySource})))}setActions(e,t=[],i){var r,o,s;this._sessionDisposables.clear();const a=e.slice(),l=t.slice(),u=[];let c=0;const d=[];let h=!1;if(((r=this._options)===null||r===void 0?void 0:r.hiddenItemStrategy)!==-1)for(let f=0;f=this._options.maxNumberOfItems&&(a[g]=void 0,d[g]=T)}}H7e(a),H7e(d),super.setActions(a,ea.join(d,l)),u.length>0&&this._sessionDisposables.add(Ye(this.getElement(),"contextmenu",f=>{var g,T,v,Q;const b=this.getItemAction(f.target);if(!b)return;f.preventDefault(),f.stopPropagation();let _=!1;if(c===1&&((g=this._options)===null||g===void 0?void 0:g.hiddenItemStrategy)===0){_=!0;for(let S=0;Sthis._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>f,getActions:()=>L,menuId:(v=this._options)===null||v===void 0?void 0:v.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(Q=this._options)===null||Q===void 0?void 0:Q.menuOptions),contextKeyService:this._contextKeyService})}))}};hre=lxt([tC(2,i3),tC(3,_n),tC(4,Ud),tC(5,Ir),tC(6,Jc)],hre);var xce=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},N2=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let fre=class extends Pe{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=af(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).showToolbar==="always"),this.sessionPosition=void 0,this.position=vd("position",r=>{var o,s,a;const l=(o=this.model.read(r))===null||o===void 0?void 0:o.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;const u=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);const c=new De(l.lineNumber,Math.min(u,(a=(s=this.sessionPosition)===null||s===void 0?void 0:s.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(Xwt("setup content widget",(r,o)=>{const s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;const a=o.add(this.instantiationService.createInstance(s7,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(l=>{var u;return(u=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&u!==void 0?u:[]})));e.addContentWidget(a),o.add(Bn(()=>e.removeContentWidget(a))),o.add(oc("request explicit",l=>{!this.position.read(l)||s.lastTriggerKind.read(l)!==P4.Explicit&&s.triggerExplicitly()}))}))}};fre=xce([N2(2,Sn)],fre);const uxt=Eo("inline-suggestion-hints-next",_t.chevronRight,w("parameterHintsNextIcon","Icon for show next parameter hint.")),cxt=Eo("inline-suggestion-hints-previous",_t.chevronLeft,w("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let s7=class pre extends Pe{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const r=new nc(e,t,i,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return o&&(s=w({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),r.tooltip=s,r}constructor(e,t,i,r,o,s,a,l,u,c,d){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=u,this._contextKeyService=c,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${pre.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=vw("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[vw("div",{style:{display:"flex"}},[vw("div@actionBar",{className:"custom-actions"}),vw("div@toolBar")])]),this.previousAction=this.createCommandAction(AIe,w("previous","Previous"),dn.asClassName(cxt)),this.availableSuggestionCountAction=new nc("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(NIe,w("next","Next"),dn.asClassName(uxt)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(se.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Qr(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Qr(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];const h=this._register(new F1(this.nodes.actionBar));h.push(this.previousAction,{icon:!0,label:!1}),h.push(this.availableSuggestionCountAction),h.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(l.createInstance(gre,this.nodes.toolBar,se.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:f=>f.startsWith("primary")},actionViewItemProvider:(f,g)=>f instanceof Hd?l.createInstance(dxt,f,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(f=>{pre._dropDownVisible=f})),this._register(oc("update position",f=>{this._position.read(f),this.editor.layoutContentWidget(this)})),this._register(oc("counts",f=>{const g=this._suggestionCount.read(f),T=this._currentSuggestionIdx.read(f);g!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${T+1}/${g}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),g!==void 0&&g>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(oc("extra commands",f=>{const g=this._extraCommands.read(f);if(Oa(this.lastCommands,g))return;this.lastCommands=g;const T=g.map(v=>({class:void 0,id:v.id,enabled:!0,tooltip:v.tooltip||"",label:v.title,run:Q=>this._commandService.executeCommand(v.id)}));for(const[v,Q]of this.inlineCompletionsActionsMenus.getActions())for(const b of Q)b instanceof Hd&&T.push(b);T.length>0&&T.unshift(new ea),this.toolBar.setAdditionalSecondaryActions(T)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};s7._dropDownVisible=!1;s7.id=0;s7=xce([N2(6,Qo),N2(7,Sn),N2(8,Ir),N2(9,_n),N2(10,i3)],s7);class dxt extends s8{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=vw("div.keybinding").root;new yD(t,Ac,Object.assign({disableTitle:!0},Svt)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let gre=class extends hre{constructor(e,t,i,r,o,s,a,l){super(e,Object.assign({resetMenu:t},i),r,o,s,a,l),this.menuId=t,this.options2=i,this.menuService=r,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,t,i,r,o,s,a;const l=[],u=[];ZAe(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:u},(i=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||i===void 0?void 0:i.primaryGroup,(o=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(a=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),u.push(...this.additionalActions),this.setActions(l,u)}setAdditionalSecondaryActions(e){Oa(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};gre=xce([N2(3,i3),N2(4,_n),N2(5,Ud),N2(6,Ir),N2(7,Jc)],gre);var hxt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},gN=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let ru=class OIe{static get(e){return e.getContribution(OIe.ID)}constructor(e,t,i,r,o){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=r,this._keybindingService=o,this._toUnhook=new st,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(s=>{s.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(58);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target;if(t.type===9&&t.detail===jg.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===Dv.ID||(t.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.containsNode(i)||this._hideWidgets()}_onEditorMouseMove(e){var t,i,r,o,s,a,l,u;const c=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&c.type===9&&c.detail===jg.ID||this._isHoverSticky&&((t=this._contentWidget)===null||t===void 0?void 0:t.containsNode((i=e.event.browserEvent.view)===null||i===void 0?void 0:i.document.activeElement))&&!(!((o=(r=e.event.browserEvent.view)===null||r===void 0?void 0:r.getSelection())===null||o===void 0)&&o.isCollapsed)||!this._isHoverSticky&&c.type===9&&c.detail===jg.ID&&((s=this._contentWidget)===null||s===void 0?void 0:s.isColorPickerVisible())||this._isHoverSticky&&c.type===12&&c.detail===Dv.ID||this._isHoverSticky&&((a=this._contentWidget)===null||a===void 0?void 0:a.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(l=this._glyphWidget)===null||l===void 0||l.hide();return}if(c.type===2&&c.position){(u=this._contentWidget)===null||u===void 0||u.hide(),this._glyphWidget||(this._glyphWidget=new Dv(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(c.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),r=i.kind===1||i.kind===2&&i.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible());e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!r&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||s7.dropDownVisible||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(OH,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i,r){this._getOrCreateContentWidget().startShowingAtRange(e,t,i,r)}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,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};ru.ID="editor.contrib.hover";ru=hxt([gN(1,Sn),gN(2,ac),gN(3,$r),gN(4,Ir)],ru);class fxt extends Ot{constructor(){super({id:"editor.action.showHover",label:w({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:oe.editorTextFocus,primary:ws(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const r=ru.get(t);if(!r)return;const o=t.getPosition(),s=new G(o.lineNumber,o.column,o.lineNumber,o.column),a=t.getOption(2)===2||!!(i!=null&&i.focus);r.isHoverVisible()?r.focus():r.showContentHover(s,1,1,a)}}class pxt extends Ot{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:w({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,t){const i=ru.get(t);if(!i)return;const r=t.getPosition();if(!r)return;const o=new G(r.lineNumber,r.column,r.lineNumber,r.column),s=m8.get(t);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{i.showContentHover(o,1,1,!0)})}}class gxt extends Ot{constructor(){super({id:"editor.action.scrollUpHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:16,weight:100}})}run(e,t){const i=ru.get(t);!i||i.scrollUp()}}class mxt extends Ot{constructor(){super({id:"editor.action.scrollDownHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:18,weight:100}})}run(e,t){const i=ru.get(t);!i||i.scrollDown()}}class Txt extends Ot{constructor(){super({id:"editor.action.scrollLeftHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:15,weight:100}})}run(e,t){const i=ru.get(t);!i||i.scrollLeft()}}class vxt extends Ot{constructor(){super({id:"editor.action.scrollRightHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:17,weight:100}})}run(e,t){const i=ru.get(t);!i||i.scrollRight()}}class Qxt extends Ot{constructor(){super({id:"editor.action.pageUpHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=ru.get(t);!i||i.pageUp()}}class bxt extends Ot{constructor(){super({id:"editor.action.pageDownHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=ru.get(t);!i||i.pageDown()}}class yxt extends Ot{constructor(){super({id:"editor.action.goToTopHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=ru.get(t);!i||i.goToTop()}}class _xt extends Ot{constructor(){super({id:"editor.action.goToBottomHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=ru.get(t);!i||i.goToBottom()}}class Cxt extends Ot{constructor(){super({id:"editor.action.escapeFocusHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:9,weight:100}})}run(e,t){const i=ru.get(t);!i||i.escape()}}yi(ru.ID,ru,2);dt(fxt);dt(pxt);dt(gxt);dt(mxt);dt(Txt);dt(vxt);dt(Qxt);dt(bxt);dt(yxt);dt(_xt);dt(Cxt);lm.register(HH);lm.register(cre);jd((n,e)=>{const t=n.getColor(O4t);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class mre extends Pe{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=e.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==MOe||!t.range)return;const i=this._editor.getContribution(ru.ID);if(!!i&&!i.isColorPickerVisible()){const r=new G(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(r,1,0,!1)}}}mre.ID="editor.contrib.colorContribution";yi(mre.ID,mre,2);lm.register(MH);var IIe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},D2=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},Q9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let a7=class RIe extends Pe{constructor(e,t,i,r,o,s,a){super(),this._editor=e,this._modelService=i,this._keybindingService=r,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=oe.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=oe.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;!this._editor.hasModel()||(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new VH(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(RIe.ID)}};a7.ID="editor.contrib.standaloneColorPickerController";a7=IIe([D2(1,_n),D2(2,Kr),D2(3,Ir),D2(4,Sn),D2(5,Vt),D2(6,br)],a7);yi(a7.ID,a7,1);const b9e=8,wxt=22;let VH=class HIe extends Pe{constructor(e,t,i,r,o,s,a,l){var u;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.body=document.createElement("div"),this._position=void 0,this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new xe),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=r.createInstance(qL,this._editor),this._position=(u=this._editor._getViewModel())===null||u===void 0?void 0:u.getPrimaryCursorState().viewState.position;const c=this._editor.getSelection(),d=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register($h(this.body));this._register(h.onDidBlur(f=>{this.hide()})),this._register(h.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var g;const T=(g=f.target.element)===null||g===void 0?void 0:g.classList;T&&T.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(d),this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return HIe.ID}getDomNode(){return this.body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(58).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this.body.focus()}_start(e){return Q9e(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);!t||this._onResult.fire(new xxt(t.result,t.foundInEditor))})}_computeAsync(e){return Q9e(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=yield this._standaloneColorPickerParticipant.createColorHover(t,new hce(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null})}_render(e,t){const i=document.createDocumentFragment(),r=this._register(new IH(this._keybindingService));let o;const s={fragment:i,statusBar:r,setColorPicker:T=>o=T,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),o===void 0)return;this.body.classList.add("standalone-colorpicker-body"),this.body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this.body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this.body.tabIndex=0,this.body.appendChild(i),o.layout();const a=o.body,l=a.saturationBox.domNode.clientWidth,u=a.domNode.clientWidth-l-wxt-b9e,c=o.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const d=o.header,h=d.pickedColorNode;h.style.width=l+b9e+"px";const f=d.originalColorNode;f.style.width=u+"px";const g=o.header.closeButton;g==null||g.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};VH.ID="editor.contrib.standaloneColorPickerWidget";VH=IIe([D2(3,Sn),D2(4,Kr),D2(5,Ir),D2(6,Vt),D2(7,br)],VH);class xxt{constructor(e,t){this.value=e,this.foundInEditor=t}}class Lxt extends q8{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:w("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:w({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:se.CommandPalette}]})}runEditorCommand(e,t){var i;(i=a7.get(t))===null||i===void 0||i.showOrFocus()}}class Sxt extends Ot{constructor(){super({id:"editor.action.hideColorPicker",label:w({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:oe.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;(i=a7.get(t))===null||i===void 0||i.hide()}}class Dxt extends Ot{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:w({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:oe.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;(i=a7.get(t))===null||i===void 0||i.insertColor()}}dt(Sxt);dt(Dxt);ps(Lxt);class lf{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const r=t.length,o=e.length;if(i+r>o)return!1;for(let s=0;s=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,r,o,s){const a=e.startLineNumber,l=e.startColumn,u=e.endLineNumber,c=e.endColumn,d=o.getLineContent(a),h=o.getLineContent(u);let f=d.lastIndexOf(t,l-1+t.length),g=h.indexOf(i,c-1-i.length);if(f!==-1&&g!==-1)if(a===u)d.substring(f+t.length,g).indexOf(i)>=0&&(f=-1,g=-1);else{const v=d.substring(f+t.length),Q=h.substring(0,g);(v.indexOf(i)>=0||Q.indexOf(i)>=0)&&(f=-1,g=-1)}let T;f!==-1&&g!==-1?(r&&f+t.length0&&h.charCodeAt(g-1)===32&&(i=" "+i,g-=1),T=lf._createRemoveBlockCommentOperations(new G(a,f+t.length+1,u,g+1),t,i)):(T=lf._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=T.length===1?i:null);for(const v of T)s.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,i){const r=[];return G.isEmpty(e)?r.push(Ur.delete(new G(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(r.push(Ur.delete(new G(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(Ur.delete(new G(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),r}static _createAddBlockCommentOperations(e,t,i,r){const o=[];return G.isEmpty(e)?o.push(Ur.replace(new G(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(Ur.insert(new De(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(Ur.insert(new De(e.endLineNumber,e.endColumn),(r?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const r=i[0],o=i[1];return new Ht(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{const r=i[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ht(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}}class o4{constructor(e,t,i,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,i,r){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;const l=[];for(let u=0,c=i-t+1;u{if(e&&typeof e=="object"||typeof e=="function")for(let r of a_t(e))!l_t.call(n,r)&&r!==t&&o_t(n,r,{get:()=>e[r],enumerable:!(i=s_t(e,r))||i.enumerable});return n},u_t=(n,e,t)=>(Ume(n,e,"default"),t&&Ume(t,e,"default")),c_t="5.0.2",hQ={};u_t(hQ,wD);var JNe=(n=>(n[n.None=0]="None",n[n.CommonJS=1]="CommonJS",n[n.AMD=2]="AMD",n[n.UMD=3]="UMD",n[n.System=4]="System",n[n.ES2015=5]="ES2015",n[n.ESNext=99]="ESNext",n))(JNe||{}),eOe=(n=>(n[n.None=0]="None",n[n.Preserve=1]="Preserve",n[n.React=2]="React",n[n.ReactNative=3]="ReactNative",n[n.ReactJSX=4]="ReactJSX",n[n.ReactJSXDev=5]="ReactJSXDev",n))(eOe||{}),tOe=(n=>(n[n.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",n[n.LineFeed=1]="LineFeed",n))(tOe||{}),nOe=(n=>(n[n.ES3=0]="ES3",n[n.ES5=1]="ES5",n[n.ES2015=2]="ES2015",n[n.ES2016=3]="ES2016",n[n.ES2017=4]="ES2017",n[n.ES2018=5]="ES2018",n[n.ES2019=6]="ES2019",n[n.ES2020=7]="ES2020",n[n.ESNext=99]="ESNext",n[n.JSON=100]="JSON",n[n.Latest=99]="Latest",n))(nOe||{}),iOe=(n=>(n[n.Classic=1]="Classic",n[n.NodeJs=2]="NodeJs",n))(iOe||{}),rOe=class{constructor(n,e,t,i,r){lo(this,"_onDidChange",new hQ.Emitter);lo(this,"_onDidExtraLibsChange",new hQ.Emitter);lo(this,"_extraLibs");lo(this,"_removedExtraLibs");lo(this,"_eagerModelSync");lo(this,"_compilerOptions");lo(this,"_diagnosticsOptions");lo(this,"_workerOptions");lo(this,"_onDidExtraLibsChangeTimeout");lo(this,"_inlayHintsOptions");lo(this,"_modeConfiguration");this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(n),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(r),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(n,e){let t;if(typeof e>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=e,this._extraLibs[t]&&this._extraLibs[t].content===n)return{dispose:()=>{}};let i=1;return this._removedExtraLibs[t]&&(i=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(i=this._extraLibs[t].version+1),this._extraLibs[t]={content:n,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let r=this._extraLibs[t];!r||r.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(n){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),n&&n.length>0)for(const e of n){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let r=1;this._removedExtraLibs[t]&&(r=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(n){this._compilerOptions=n||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(n){this._workerOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(n){this._inlayHintsOptions=n||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(n){}setEagerModelSync(n){this._eagerModelSync=n}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(void 0)}},d_t=c_t,oOe={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},sOe=new rOe({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},oOe),aOe=new rOe({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},oOe),h_t=()=>FF().then(n=>n.getTypeScriptWorker()),f_t=()=>FF().then(n=>n.getJavaScriptWorker());hQ.languages.typescript={ModuleKind:JNe,JsxEmit:eOe,NewLineKind:tOe,ScriptTarget:nOe,ModuleResolutionKind:iOe,typescriptVersion:d_t,typescriptDefaults:sOe,javascriptDefaults:aOe,getTypeScriptWorker:h_t,getJavaScriptWorker:f_t};function FF(){return Gt(()=>import("./tsMode.079db6ff.js"),[])}hQ.languages.onLanguage("typescript",()=>FF().then(n=>n.setupTypeScript(sOe)));hQ.languages.onLanguage("javascript",()=>FF().then(n=>n.setupJavaScript(aOe)));var p_t=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},g_t=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},BF=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const $F=new It("selectionAnchorSet",!1);let o6=class lOe{static get(e){return e.getContribution(lOe.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=$F.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition();this.editor.changeDecorations(t=>{this.decorationId&&t.removeDecoration(this.decorationId),this.decorationId=t.addDecoration(Ht.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Gl().appendText(w("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),Ys(w("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 t=this.editor.getPosition();this.editor.setSelection(Ht.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const e=this.decorationId;this.editor.changeDecorations(t=>{t.removeDecoration(e),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};o6.ID="editor.contrib.selectionAnchorController";o6=p_t([g_t(1,_n)],o6);class m_t extends Ot{constructor(){super({id:"editor.action.setSelectionAnchor",label:w("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:oe.editorTextFocus,primary:ws(2089,2080),weight:100}})}run(e,t){var i;return BF(this,void 0,void 0,function*(){(i=o6.get(t))===null||i===void 0||i.setSelectionAnchor()})}}class T_t extends Ot{constructor(){super({id:"editor.action.goToSelectionAnchor",label:w("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:$F})}run(e,t){var i;return BF(this,void 0,void 0,function*(){(i=o6.get(t))===null||i===void 0||i.goToSelectionAnchor()})}}class v_t extends Ot{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:w("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:$F,kbOpts:{kbExpr:oe.editorTextFocus,primary:ws(2089,2089),weight:100}})}run(e,t){var i;return BF(this,void 0,void 0,function*(){(i=o6.get(t))===null||i===void 0||i.selectFromAnchorToCursor()})}}class Q_t extends Ot{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:w("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:$F,kbOpts:{kbExpr:oe.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return BF(this,void 0,void 0,function*(){(i=o6.get(t))===null||i===void 0||i.cancelSelectionAnchor()})}}yi(o6.ID,o6,4);dt(m_t);dt(T_t);dt(v_t);dt(Q_t);const b_t=de("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},w("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class y_t extends Ot{constructor(){super({id:"editor.action.jumpToBracket",label:w("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:oe.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.jumpToBracket()}}class __t extends Ot{constructor(){super({id:"editor.action.selectToBracket",label:w("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,t,i){var r;let o=!0;i&&i.selectBrackets===!1&&(o=!1),(r=Ed.get(t))===null||r===void 0||r.selectToBracket(o)}}class C_t extends Ot{constructor(){super({id:"editor.action.removeBrackets",label:w("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:oe.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class w_t{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Ed extends Pe{static get(e){return e.getContribution(Ed.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Qr(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(69),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.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(),t=this._editor.getSelections().map(i=>{const r=i.getStartPosition(),o=e.bracketPairs.matchBracket(r);let s=null;if(o)o[0].containsPosition(r)&&!o[1].containsPosition(r)?s=o[1].getStartPosition():o[1].containsPosition(r)&&(s=o[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(r);if(a)s=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(r);l&&l.range&&(s=l.range.getStartPosition())}}return s?new Ht(s.lineNumber,s.column,s.lineNumber,s.column):new Ht(r.lineNumber,r.column,r.lineNumber,r.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(r=>{const o=r.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const u=t.bracketPairs.findNextBracket(o);u&&u.range&&(s=t.bracketPairs.matchBracket(u.range.getStartPosition()))}let a=null,l=null;if(s){s.sort(G.compareRangesUsingStarts);const[u,c]=s;if(a=e?u.getStartPosition():u.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(o)){const d=a;a=l,l=d}}a&&l&&i.push(new Ht(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}removeBrackets(e){if(!this._editor.hasModel())return;const t=this._editor.getModel();this._editor.getSelections().forEach(i=>{const r=i.getPosition();let o=t.bracketPairs.matchBracket(r);o||(o=t.bracketPairs.findEnclosingBrackets(r)),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 t=0;for(const i of this._lastBracketsData){const r=i.brackets;r&&(e[t++]={range:r[0],options:i.options},e[t++]={range:r[1],options:i.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 t=this._editor.getModel(),i=t.getVersionId();let r=[];this._lastVersionId===i&&(r=this._lastBracketsData);const o=[];let s=0;for(let d=0,h=e.length;d1&&o.sort(De.compare);const a=[];let l=0,u=0;const c=r.length;for(let d=0,h=o.length;d0&&(t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop())}}dt(D_t);var E_t=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const d8="9_cutcopypaste",k_t=B2||document.queryCommandSupported("cut"),cOe=B2||document.queryCommandSupported("copy"),M_t=typeof navigator.clipboard>"u"||I1?document.queryCommandSupported("paste"):!0;function sce(n){return n.register(),n}const A_t=k_t?sce(new nb({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:B2?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:se.MenubarEditMenu,group:"2_ccp",title:w({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:se.EditorContext,group:d8,title:w("actions.clipboard.cutLabel","Cut"),when:oe.writable,order:1},{menuId:se.CommandPalette,group:"",title:w("actions.clipboard.cutLabel","Cut"),order:1},{menuId:se.SimpleEditorContext,group:d8,title:w("actions.clipboard.cutLabel","Cut"),when:oe.writable,order:1}]})):void 0,N_t=cOe?sce(new nb({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:B2?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:se.MenubarEditMenu,group:"2_ccp",title:w({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:se.EditorContext,group:d8,title:w("actions.clipboard.copyLabel","Copy"),order:2},{menuId:se.CommandPalette,group:"",title:w("actions.clipboard.copyLabel","Copy"),order:1},{menuId:se.SimpleEditorContext,group:d8,title:w("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;Ll.appendMenuItem(se.MenubarEditMenu,{submenu:se.MenubarCopy,title:{value:w("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});Ll.appendMenuItem(se.EditorContext,{submenu:se.EditorContextCopy,title:{value:w("copy as","Copy As"),original:"Copy As"},group:d8,order:3});Ll.appendMenuItem(se.EditorContext,{submenu:se.EditorContextShare,title:{value:w("share","Share"),original:"Share"},group:"11_share",order:-1,when:ct.and(ct.notEquals("resourceScheme","output"),oe.editorTextFocus)});Ll.appendMenuItem(se.EditorTitleContext,{submenu:se.EditorTitleContextShare,title:{value:w("share","Share"),original:"Share"},group:"11_share",order:-1});Ll.appendMenuItem(se.ExplorerContext,{submenu:se.ExplorerContextShare,title:{value:w("share","Share"),original:"Share"},group:"11_share",order:-1});const IZ=M_t?sce(new nb({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:B2?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:se.MenubarEditMenu,group:"2_ccp",title:w({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:se.EditorContext,group:d8,title:w("actions.clipboard.pasteLabel","Paste"),when:oe.writable,order:4},{menuId:se.CommandPalette,group:"",title:w("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:se.SimpleEditorContext,group:d8,title:w("actions.clipboard.pasteLabel","Paste"),when:oe.writable,order:4}]})):void 0;class O_t extends Ot{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:w("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:oe.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(35)&&t.getSelection().isEmpty()||(one.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),one.forceCopyWithSyntaxHighlighting=!1)}}function dOe(n,e){!n||(n.addImplementation(1e4,"code-editor",(t,i)=>{const r=t.get(Mi).getFocusedCodeEditor();if(r&&r.hasTextFocus()){const o=r.getOption(35),s=r.getSelection();return s&&s.isEmpty()&&!o||document.execCommand(e),!0}return!1}),n.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}dOe(A_t,"cut");dOe(N_t,"copy");IZ&&(IZ.addImplementation(1e4,"code-editor",(n,e)=>{const t=n.get(Mi),i=n.get(b6),r=t.getFocusedCodeEditor();return r&&r.hasTextFocus()?!document.execCommand("paste")&&w7?(()=>E_t(void 0,void 0,void 0,function*(){const s=yield i.readText();if(s!==""){const a=mL.INSTANCE.get(s);let l=!1,u=null,c=null;a&&(l=r.getOption(35)&&!!a.isFromEmptySelection,u=typeof a.multicursorText<"u"?a.multicursorText:null,c=a.mode),r.trigger("keyboard","paste",{text:s,pasteOnNewLine:l,multicursorText:u,mode:c})}}))():!0:!1}),IZ.addImplementation(0,"generic-dom",(n,e)=>(document.execCommand("paste"),!0)));cOe&&dt(O_t);var I_t=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class Mn{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+Mn.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Mn(this.value+Mn.sep+e)}}Mn.sep=".";Mn.None=new Mn("@@none@@");Mn.Empty=new Mn("");Mn.QuickFix=new Mn("quickfix");Mn.Refactor=new Mn("refactor");Mn.RefactorExtract=Mn.Refactor.append("extract");Mn.RefactorInline=Mn.Refactor.append("inline");Mn.RefactorMove=Mn.Refactor.append("move");Mn.RefactorRewrite=Mn.Refactor.append("rewrite");Mn.Source=new Mn("source");Mn.SourceOrganizeImports=Mn.Source.append("organizeImports");Mn.SourceFixAll=Mn.Source.append("fixAll");Mn.SurroundWith=Mn.Refactor.append("surround");var Gc;(function(n){n.Refactor="refactor",n.RefactorPreview="refactor preview",n.Lightbulb="lightbulb",n.Default="other (default)",n.SourceAction="source action",n.QuickFix="quick fix action",n.FixAll="fix all",n.OrganizeImports="organize imports",n.AutoFix="auto fix",n.QuickFixHover="quick fix hover window",n.OnSave="save participants",n.ProblemsView="problems view"})(Gc||(Gc={}));function R_t(n,e){return!(n.include&&!n.include.intersects(e)||n.excludes&&n.excludes.some(t=>hOe(e,t,n.include))||!n.includeSourceActions&&Mn.Source.contains(e))}function H_t(n,e){const t=e.kind?new Mn(e.kind):void 0;return!(n.include&&(!t||!n.include.contains(t))||n.excludes&&t&&n.excludes.some(i=>hOe(t,i,n.include))||!n.includeSourceActions&&t&&Mn.Source.contains(t)||n.onlyIncludePreferredActions&&!e.isPreferred)}function hOe(n,e,t){return!(!e.contains(n)||t&&e.contains(t))}class hh{static fromUser(e,t){return!e||typeof e!="object"?new hh(t.kind,t.apply,!1):new hh(hh.getKindFromUser(e,t.kind),hh.getApplyFromUser(e,t.apply),hh.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new Mn(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class P_t{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return I_t(this,void 0,void 0,function*(){if(((t=this.provider)===null||t===void 0?void 0:t.resolveCodeAction)&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(r){Cs(r)}i&&(this.action.edit=i.edit)}return this})}}var DH=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const fOe="editor.action.codeAction",ace="editor.action.quickFix",pOe="editor.action.autoFix",gOe="editor.action.refactor",mOe="editor.action.sourceAction",lce="editor.action.organizeImports",uce="editor.action.fixAll";class _x extends Pe{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return sl(e.diagnostics)?sl(t.diagnostics)?_x.codeActionsPreferredComparator(e,t):-1:sl(t.diagnostics)?1:_x.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(_x.codeActionsComparator),this.validActions=this.allActions.filter(({action:r})=>!r.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Mn.QuickFix.contains(new Mn(e.kind))&&!!e.isPreferred)}}const qme={actions:[],documentation:void 0};function cce(n,e,t,i,r,o){var s;return DH(this,void 0,void 0,function*(){const a=i.filter||{},l={only:(s=a.include)===null||s===void 0?void 0:s.value,trigger:i.type},u=new ece(e,o),c=V_t(n,e,a),d=new st,h=c.map(g=>DH(this,void 0,void 0,function*(){try{r.report(g);const T=yield g.provideCodeActions(e,t,l,u.token);if(T&&d.add(T),u.token.isCancellationRequested)return qme;const v=((T==null?void 0:T.actions)||[]).filter(b=>b&&H_t(a,b)),Q=B_t(g,v,a.include);return{actions:v.map(b=>new P_t(b,g)),documentation:Q}}catch(T){if(c0(T))throw T;return Cs(T),qme}})),f=n.onDidChange(()=>{const g=n.all(e);Oa(g,c)||u.cancel()});try{const g=yield Promise.all(h),T=g.map(Q=>Q.actions).flat(),v=[...Ph(g.map(Q=>Q.documentation)),...F_t(n,e,i,T)];return new _x(T,v,d)}finally{f.dispose(),u.dispose()}})}function V_t(n,e,t){return n.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(r=>R_t(t,new Mn(r))):!0)}function*F_t(n,e,t,i){var r,o,s;if(e&&i.length)for(const a of n.all(e))a._getAdditionalMenuItems&&(yield*(r=a._getAdditionalMenuItems)===null||r===void 0?void 0:r.call(a,{trigger:t.type,only:(s=(o=t.filter)===null||o===void 0?void 0:o.include)===null||s===void 0?void 0:s.value},i.map(l=>l.action)))}function B_t(n,e,t){if(!n.documentation)return;const i=n.documentation.map(r=>({kind:new Mn(r.kind),command:r.command}));if(t){let r;for(const o of i)o.kind.contains(t)&&(r?r.kind.contains(o.kind)&&(r=o):r=o);if(r)return r==null?void 0:r.command}for(const r of e)if(!!r.kind){for(const o of i)if(o.kind.contains(new Mn(r.kind)))return o.command}}var EH;(function(n){n.OnSave="onSave",n.FromProblemsView="fromProblemsView",n.FromCodeActions="fromCodeActions"})(EH||(EH={}));function $_t(n,e,t,i,r=Jn.None){var o;return DH(this,void 0,void 0,function*(){const s=n.get(vD),a=n.get(Qo),l=n.get(Jc),u=n.get(Fo);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),yield e.resolve(r),!r.isCancellationRequested&&!(!((o=e.action.edit)===null||o===void 0)&&o.edits.length&&!(yield s.apply(e.action.edit,{editor:i==null?void 0:i.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==EH.OnSave,showPreview:i==null?void 0:i.preview})).isApplied)&&e.action.command)try{yield a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const d=j_t(c);u.error(typeof d=="string"?d:w("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function j_t(n){return typeof n=="string"?n:n instanceof Error&&typeof n.message=="string"?n.message:void 0}mi.registerCommand("_executeCodeActionProvider",function(n,e,t,i,r){return DH(this,void 0,void 0,function*(){if(!(e instanceof on))throw E1();const{codeActionProvider:o}=n.get(Vt),s=n.get(Kr).getModel(e);if(!s)throw E1();const a=Ht.isISelection(t)?Ht.liftSelection(t):G.isIRange(t)?s.validateRange(t):void 0;if(!a)throw E1();const l=typeof i=="string"?new Mn(i):void 0,u=yield cce(o,s,a,{type:1,triggerAction:Gc.Default,filter:{includeSourceActions:!0,include:l}},em.None,Jn.None),c=[],d=Math.min(u.validActions.length,typeof r=="number"?r:0);for(let h=0;hh.action)}finally{setTimeout(()=>u.dispose(),100)}})});var W_t=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},z_t=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let kH=class TOe{constructor(e){this.keybindingService=e}getResolver(){const e=new t3(()=>this.keybindingService.getKeybindings().filter(t=>TOe.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===lce?i={kind:Mn.SourceOrganizeImports.value}:t.command===uce&&(i={kind:Mn.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},hh.fromUser(i,{kind:Mn.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Mn(e.kind);return t.filter(r=>r.kind.contains(i)).filter(r=>r.preferred?e.isPreferred:!0).reduceRight((r,o)=>r?r.kind.contains(o.kind)?o:r:o,void 0)}};kH.codeActionCommands=[gOe,fOe,mOe,lce,uce];kH=W_t([z_t(0,Ir)],kH);de("symbolIcon.arrayForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.booleanForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},w("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.colorForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.constantForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},w("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},w("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.fileForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.folderForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.keyForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.keywordForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},w("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.moduleForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.namespaceForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.nullForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.numberForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.objectForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.operatorForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.packageForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.propertyForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.referenceForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.snippetForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.stringForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.structForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.textForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.typeParameterForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.unitForeground",{dark:gt,light:gt,hcDark:gt,hcLight:gt},w("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));de("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},w("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const vOe=Object.freeze({kind:Mn.Empty,title:w("codeAction.widget.id.more","More Actions...")}),U_t=Object.freeze([{kind:Mn.QuickFix,title:w("codeAction.widget.id.quickfix","Quick Fix...")},{kind:Mn.RefactorExtract,title:w("codeAction.widget.id.extract","Extract..."),icon:_t.wrench},{kind:Mn.RefactorInline,title:w("codeAction.widget.id.inline","Inline..."),icon:_t.wrench},{kind:Mn.RefactorRewrite,title:w("codeAction.widget.id.convert","Rewrite..."),icon:_t.wrench},{kind:Mn.RefactorMove,title:w("codeAction.widget.id.move","Move..."),icon:_t.wrench},{kind:Mn.SurroundWith,title:w("codeAction.widget.id.surround","Surround With..."),icon:_t.symbolSnippet},{kind:Mn.Source,title:w("codeAction.widget.id.source","Source Action..."),icon:_t.symbolFile},vOe]);function q_t(n,e,t){if(!e)return n.map(o=>({kind:"action",item:o,group:vOe,disabled:!!o.action.disabled,label:o.action.disabled||o.action.title}));const i=U_t.map(o=>({group:o,actions:[]}));for(const o of n){const s=o.action.kind?new Mn(o.action.kind):Mn.None;for(const a of i)if(a.group.kind.contains(s)){a.actions.push(o);break}}const r=[];for(const o of i)if(o.actions.length){r.push({kind:"header",group:o.group});for(const s of o.actions)r.push({kind:"action",item:s,group:o.group,label:s.action.title,disabled:!!s.action.disabled,keybinding:t(s.action)})}return r}var G_t=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},K_t=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},XT;(function(n){n.Hidden={type:0};class e{constructor(i,r,o,s){this.actions=i,this.trigger=r,this.editorPosition=o,this.widgetPosition=s,this.type=1}}n.Showing=e})(XT||(XT={}));let h8=class QOe extends Pe{constructor(e,t){super(),this._editor=e,this._onClick=this._register(new xe),this.onClick=this._onClick.event,this._state=XT.Hidden,this._domNode=at("div.lightBulbWidget"),this._register(gr.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(i=>{const r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),this._register(p3t(this._domNode,i=>{if(this.state.type!==1)return;this._editor.focus(),i.preventDefault();const{top:r,height:o}=Os(this._domNode),s=this._editor.getOption(64);let a=Math.floor(s/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(i.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(62)&&!this._editor.getOption(62).enabled&&this.hide()})),this._register(Ut.runAndSubscribe(t.onDidUpdateKeybindings,()=>{var i,r;this._preferredKbLabel=da((i=t.lookupKeybinding(pOe))===null||i===void 0?void 0:i.getLabel()),this._quickFixKbLabel=da((r=t.lookupKeybinding(ace))===null||r===void 0?void 0:r.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,t,i){if(e.validActions.length<=0)return this.hide();const r=this._editor.getOptions();if(!r.get(62).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:s,column:a}=o.validatePosition(i),l=o.getOptions().tabSize,u=r.get(48),c=o.getLineContent(s),d=lF(c,l),h=u.spaceWidth*d>22,f=T=>T>2&&this._editor.getTopForLineNumber(T)===this._editor.getTopForLineNumber(T-1);let g=s;if(!h){if(s>1&&!f(s-1))g-=1;else if(!f(s+1))g+=1;else if(a*u.spaceWidth<22)return this.hide()}this.state=new XT.Showing(e,t,i,{position:{lineNumber:g,column:1},preference:QOe._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==XT.Hidden&&(this.state=XT.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(...dn.asClassNameArray(_t.lightBulb)),this._domNode.classList.add(...dn.asClassNameArray(_t.lightbulbAutofix)),this._preferredKbLabel)){this.title=w("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel);return}this._domNode.classList.remove(...dn.asClassNameArray(_t.lightbulbAutofix)),this._domNode.classList.add(...dn.asClassNameArray(_t.lightBulb)),this._quickFixKbLabel?this.title=w("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):this.title=w("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};h8.ID="editor.contrib.lightbulbWidget";h8._posPref=[0];h8=G_t([K_t(1,Ir)],h8);var Z_t=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},X_t=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let ic=class Pie{static get(e){return e.getContribution(Pie.ID)}constructor(e,t){this._messageWidget=new Ha,this._messageListeners=new st,this._editor=e,this._visible=Pie.MESSAGE_VISIBLE.bindTo(t)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Ys(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new Gme(this._editor,t,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 W1(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(r=>{!r.target.position||(i?i.containsPosition(r.target.position)||this.closeMessage():i=new G(t.lineNumber-3,1,r.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(Gme.fadeOut(this._messageWidget.value))}};ic.ID="editor.contrib.messageController";ic.MESSAGE_VISIBLE=new It("messageVisible",!1,w("messageVisible","Whether the editor is currently showing an inline message"));ic=Z_t([X_t(1,_n)],ic);const Y_t=Ps.bindToContribution(ic.get);vt(new Y_t({id:"leaveEditorMessage",precondition:ic.MESSAGE_VISIBLE,handler:n=>n.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class Gme{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},r){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},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 s=document.createElement("div");s.classList.add("message"),s.textContent=r,this._domNode.appendChild(s);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),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)}}yi(ic.ID,ic,4);var bOe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Vie=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const yOe="acceptSelectedCodeAction",_Oe="previewSelectedCodeAction";class J_t{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var r,o;i.text.textContent=(o=(r=e.group)===null||r===void 0?void 0:r.title)!==null&&o!==void 0?o:""}disposeTemplate(e){}}let Fie=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}renderTemplate(e){e.classList.add(this.templateId);const t=document.createElement("div");t.className="icon",e.append(t);const i=document.createElement("span");i.className="title",e.append(i);const r=new yD(e,Ac);return{container:e,icon:t,text:i,keybinding:r}}renderElement(e,t,i){var r,o,s;if(!((r=e.group)===null||r===void 0)&&r.icon?(i.icon.className=dn.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=At(e.group.icon.color.id))):(i.icon.className=dn.asClassName(_t.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=COe(e.label),i.keybinding.set(e.keybinding),x3t(!!e.keybinding,i.keybinding.element);const a=(o=this._keybindingService.lookupKeybinding(yOe))===null||o===void 0?void 0:o.getLabel(),l=(s=this._keybindingService.lookupKeybinding(_Oe))===null||s===void 0?void 0:s.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview?i.container.title=w({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):i.container.title=w({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};Fie=bOe([Vie(1,Ir)],Fie);class eCt extends UIEvent{constructor(){super("acceptSelectedAction")}}class Kme extends UIEvent{constructor(){super("previewSelectedAction")}}let Bie=class extends Pe{constructor(e,t,i,r,o,s){super(),this._delegate=r,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new Wd(e,this.domNode,a,[new Fie(t,this._keybindingService),new J_t],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let u=l.label?COe(l==null?void 0:l.label):"";return l.disabled&&(u=w({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",u,l.disabled)),u}return null},getWidgetAriaLabel:()=>w({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(tm),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this._list.domFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=i,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 t=this._allMenuItems.filter(u=>u.kind==="header").length,r=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(r);const o=this._allMenuItems.map((u,c)=>{const d=document.getElementById(this._list.getElementID(c));if(d){d.style.width="auto";const h=d.getBoundingClientRect().width;return d.style.width="",h}return 0}),s=Math.max(...o,e),a=.7,l=Math.min(r,document.body.clientHeight*a);return this._list.layout(l,s),this.domNode.style.height=`${l}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const i=t[0],r=this._list.element(i);if(!this.focusCondition(r))return;const o=e?new Kme:new eCt;this._list.setSelection([i],o)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof Kme):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([])}};Bie=bOe([Vie(4,y6),Vie(5,Ir)],Bie);function COe(n){return n.replace(/\r\n|\r|\n/g," ")}var tCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},RZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const f8={Visible:new It("codeActionMenuVisible",!1,w("codeActionMenuVisible","Whether the action widget list is visible"))},rm=oi("actionWidgetService");let p8=class extends Pe{get isVisible(){return f8.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new Ha)}show(e,t,i,r,o,s,a){const l=f8.Visible.bindTo(this._contextKeyService),u=this._instantiationService.createInstance(Bie,e,t,i,r);this._contextViewService.showContextView({getAnchor:()=>o,render:c=>(l.set(!0),this._renderWidget(c,u,a!=null?a:[])),onHide:c=>{l.reset(),this._onWidgetClosed(c)}},s,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,i){var r;const o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,this._list.value)o.appendChild(this._list.value.domNode);else throw new Error("List has no value");const s=new st,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),s.add(Ye(l,kt.MOUSE_DOWN,g=>g.stopPropagation()));const u=document.createElement("div"),c=e.appendChild(u);c.classList.add("context-view-pointerBlock"),s.add(Ye(c,kt.POINTER_MOVE,()=>c.remove())),s.add(Ye(c,kt.MOUSE_DOWN,()=>c.remove()));let d=0;if(i.length){const g=this._createActionBar(".action-widget-action-bar",i);g&&(o.appendChild(g.getContainer().parentElement),s.add(g),d=g.getContainer().offsetWidth)}const h=(r=this._list.value)===null||r===void 0?void 0:r.layout(d);o.style.width=`${h}px`;const f=s.add($h(e));return s.add(f.onDidBlur(()=>this.hide())),s}_createActionBar(e,t){if(!t.length)return;const i=at(e),r=new F1(i);return r.push(t,{icon:!1,label:!0}),r}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};p8=tCt([RZ(0,y6),RZ(1,_n),RZ(2,Sn)],p8);gi(rm,p8,1);const LD=100+1e3;ps(class extends v6{constructor(){super({id:"hideCodeActionWidget",title:{value:w("hideCodeActionWidget.title","Hide action widget"),original:"Hide action widget"},precondition:f8.Visible,keybinding:{weight:LD,primary:9,secondary:[1033]}})}run(n){n.get(rm).hide()}});ps(class extends v6{constructor(){super({id:"selectPrevCodeAction",title:{value:w("selectPrevCodeAction.title","Select previous action"),original:"Select previous action"},precondition:f8.Visible,keybinding:{weight:LD,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(n){const e=n.get(rm);e instanceof p8&&e.focusPrevious()}});ps(class extends v6{constructor(){super({id:"selectNextCodeAction",title:{value:w("selectNextCodeAction.title","Select next action"),original:"Select next action"},precondition:f8.Visible,keybinding:{weight:LD,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(n){const e=n.get(rm);e instanceof p8&&e.focusNext()}});ps(class extends v6{constructor(){super({id:yOe,title:{value:w("acceptSelected.title","Accept selected action"),original:"Accept selected action"},precondition:f8.Visible,keybinding:{weight:LD,primary:3,secondary:[2137]}})}run(n){const e=n.get(rm);e instanceof p8&&e.acceptSelected()}});ps(class extends v6{constructor(){super({id:_Oe,title:{value:w("previewSelected.title","Preview selected action"),original:"Preview selected action"},precondition:f8.Visible,keybinding:{weight:LD,primary:2051}})}run(n){const e=n.get(rm);e instanceof p8&&e.acceptSelected(!0)}});var HZ=globalThis&&globalThis.__classPrivateFieldGet||function(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)},nCt=globalThis&&globalThis.__classPrivateFieldSet||function(n,e,t,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(n,t):r?r.value=t:e.set(n,t),t},mT;const wOe=new It("supportedCodeAction","");class iCt extends Pe{constructor(e,t,i,r=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=r,this._autoTriggerTimer=this._register(new W1),this._register(this._markerService.onMarkerChanged(o=>this._onMarkerChanges(o))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(i=>cF(i,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:Gc.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:r,column:o}=i.getPosition(),s=t.getLineContent(r);if(s.length===0)return;if(o===1){if(/\s/.test(s[0]))return}else if(o===t.getLineMaxColumn(r)){if(/\s/.test(s[s.length-1]))return}else if(/\s/.test(s[o-2])&&/\s/.test(s[o-1]))return}return i}}var gg;(function(n){n.Empty={type:0};class e{constructor(i,r,o){this.trigger=i,this.position=r,this._cancellablePromise=o,this.type=1,this.actions=o.catch(s=>{if(c0(s))return rCt;throw s})}cancel(){this._cancellablePromise.cancel()}}n.Triggered=e})(gg||(gg={}));const rCt=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class oCt extends Pe{constructor(e,t,i,r,o){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._codeActionOracle=this._register(new Ha),this._state=gg.Empty,this._onDidChangeState=this._register(new xe),this.onDidChangeState=this._onDidChangeState.event,mT.set(this,!1),this._supportedCodeActions=wOe.bindTo(r),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){HZ(this,mT,"f")||(nCt(this,mT,!0,"f"),super.dispose(),this.setState(gg.Empty,!0))}_update(){if(HZ(this,mT,"f"))return;this._codeActionOracle.value=void 0,this.setState(gg.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(88)){const t=this._registry.all(e).flatMap(i=>{var r;return(r=i.providedCodeActionKinds)!==null&&r!==void 0?r:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new iCt(this._editor,this._markerService,i=>{var r;if(!i){this.setState(gg.Empty);return}const o=bs(s=>cce(this._registry,e,i.selection,i.trigger,em.None,s));i.trigger.type===1&&((r=this._progressService)===null||r===void 0||r.showWhile(o,250)),this.setState(new gg.Triggered(i.trigger,i.selection.getStartPosition(),o))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:Gc.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!HZ(this,mT,"f")&&this._onDidChangeState.fire(e))}}mT=new WeakMap;var sCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},j3=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},uN=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},aCt=globalThis&&globalThis.__classPrivateFieldSet||function(n,e,t,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(n,t):r?r.value=t:e.set(n,t),t},lCt=globalThis&&globalThis.__classPrivateFieldGet||function(n,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!i:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(n):i?i.value:e.get(n)},fI;let g8=class xOe extends Pe{static get(e){return e.getContribution(xOe.ID)}constructor(e,t,i,r,o,s,a,l,u,c){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=u,this._instantiationService=c,this._activeCodeActions=this._register(new Ha),this._showDisabled=!1,fI.set(this,!1),this._editor=e,this._model=this._register(new oCt(this._editor,o.codeActionProvider,t,i,s)),this._register(this._model.onDidChangeState(d=>this.update(d))),this._lightBulbWidget=new t3(()=>{const d=this._editor.getContribution(h8.ID);return d&&this._register(d.onClick(h=>this.showCodeActionList(h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0}))),d}),this._resolver=r.createInstance(kH),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){aCt(this,fI,!0,"f"),super.dispose()}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,r){var o;if(!this._editor.hasModel())return;(o=ic.get(this._editor))===null||o===void 0||o.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:r,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e,t,i){return uN(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction($_t,e,EH.FromCodeActions,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:Gc.QuickFix,filter:{}})}})}update(e){var t,i,r,o,s,a,l;return uN(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let u;try{u=yield e.actions}catch(c){$n(c);return}if(!lCt(this,fI,"f"))if((i=this._lightBulbWidget.value)===null||i===void 0||i.update(u,e.trigger,e.position),e.trigger.type===1){if(!((r=e.trigger.filter)===null||r===void 0)&&r.include){const d=this.tryGetValidActionToApply(e.trigger,u);if(d){try{(o=this._lightBulbWidget.value)===null||o===void 0||o.hide(),yield this._applyCodeAction(d,!1,!1)}finally{u.dispose()}return}if(e.trigger.context){const h=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,u);if(h&&h.action.disabled){(s=ic.get(this._editor))===null||s===void 0||s.showMessage(h.action.disabled,e.trigger.context.position),u.dispose();return}}}const c=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!u.allActions.length||!c&&!u.validActions.length)){(l=ic.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=u,u.dispose();return}this._activeCodeActions.value=u,this.showCodeActionList(u,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?u.dispose():this._activeCodeActions.value=u})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(!!t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(!!t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i){return uN(this,void 0,void 0,function*(){const r=this._editor.getDomNode();if(!r)return;const o=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!o.length)return;const s=De.isIPosition(t)?this.toCoords(t):t,a={onSelect:(l,u)=>uN(this,void 0,void 0,function*(){this._applyCodeAction(l,!0,!!u),this._actionWidgetService.hide()}),onHide:()=>{var l;(l=this._editor)===null||l===void 0||l.focus()}};this._actionWidgetService.show("codeActionWidget",!0,q_t(o,this._shouldShowHeaders(),this._resolver.getResolver()),a,s,r,this._getActionBarActions(e,t,i))})}toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=Os(this._editor.getDomNode()),r=i.left+t.left,o=i.top+t.top+t.height;return{x:r,y:o}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const r=e.documentation.map(o=>{var s;return{id:o.id,label:o.title,tooltip:(s=o.tooltip)!==null&&s!==void 0?s:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(o.id,...(a=o.arguments)!==null&&a!==void 0?a:[])}}});return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&r.push(this._showDisabled?{id:"hideMoreActions",label:w("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:w("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),r}};fI=new WeakMap;g8.ID="editor.contrib.codeActionController";g8=sCt([j3(1,o3),j3(2,_n),j3(3,Sn),j3(4,Vt),j3(5,M7),j3(6,Qo),j3(7,bi),j3(8,rm),j3(9,Sn)],g8);function SD(n){return ct.regex(wOe.keys()[0],new RegExp("(\\s|^)"+zc(n.value)+"\\b"))}const dce={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:w("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:w("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[w("args.schema.apply.first","Always apply the first returned code action."),w("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),w("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:w("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function om(n,e,t,i,r=Gc.Default){if(n.hasModel()){const o=g8.get(n);o==null||o.manualTriggerAtCurrentPosition(e,r,t,i)}}class uCt extends Ot{constructor(){super({id:ace,label:w("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ct.and(oe.writable,oe.hasCodeActionsProvider),kbOpts:{kbExpr:oe.textInputFocus,primary:2137,weight:100}})}run(e,t){return om(t,w("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,Gc.QuickFix)}}class cCt extends Ps{constructor(){super({id:fOe,precondition:ct.and(oe.writable,oe.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:dce}]}})}runEditorCommand(e,t,i){const r=hh.fromUser(i,{kind:Mn.Empty,apply:"ifSingle"});return om(t,typeof(i==null?void 0:i.kind)=="string"?r.preferred?w("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):w("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):r.preferred?w("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):w("editor.action.codeAction.noneMessage","No code actions available"),{include:r.kind,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply)}}class dCt extends Ot{constructor(){super({id:gOe,label:w("refactor.label","Refactor..."),alias:"Refactor...",precondition:ct.and(oe.writable,oe.hasCodeActionsProvider),kbOpts:{kbExpr:oe.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ct.and(oe.writable,SD(Mn.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:dce}]}})}run(e,t,i){const r=hh.fromUser(i,{kind:Mn.Refactor,apply:"never"});return om(t,typeof(i==null?void 0:i.kind)=="string"?r.preferred?w("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):w("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):r.preferred?w("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):w("editor.action.refactor.noneMessage","No refactorings available"),{include:Mn.Refactor.contains(r.kind)?r.kind:Mn.None,onlyIncludePreferredActions:r.preferred},r.apply,Gc.Refactor)}}class hCt extends Ot{constructor(){super({id:mOe,label:w("source.label","Source Action..."),alias:"Source Action...",precondition:ct.and(oe.writable,oe.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ct.and(oe.writable,SD(Mn.Source))},description:{description:"Source Action...",args:[{name:"args",schema:dce}]}})}run(e,t,i){const r=hh.fromUser(i,{kind:Mn.Source,apply:"never"});return om(t,typeof(i==null?void 0:i.kind)=="string"?r.preferred?w("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):w("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):r.preferred?w("editor.action.source.noneMessage.preferred","No preferred source actions available"):w("editor.action.source.noneMessage","No source actions available"),{include:Mn.Source.contains(r.kind)?r.kind:Mn.None,includeSourceActions:!0,onlyIncludePreferredActions:r.preferred},r.apply,Gc.SourceAction)}}class fCt extends Ot{constructor(){super({id:lce,label:w("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ct.and(oe.writable,SD(Mn.SourceOrganizeImports)),kbOpts:{kbExpr:oe.textInputFocus,primary:1581,weight:100}})}run(e,t){return om(t,w("editor.action.organize.noneMessage","No organize imports action available"),{include:Mn.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",Gc.OrganizeImports)}}class pCt extends Ot{constructor(){super({id:uce,label:w("fixAll.label","Fix All"),alias:"Fix All",precondition:ct.and(oe.writable,SD(Mn.SourceFixAll))})}run(e,t){return om(t,w("fixAll.noneMessage","No fix all action available"),{include:Mn.SourceFixAll,includeSourceActions:!0},"ifSingle",Gc.FixAll)}}class gCt extends Ot{constructor(){super({id:pOe,label:w("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ct.and(oe.writable,SD(Mn.QuickFix)),kbOpts:{kbExpr:oe.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return om(t,w("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Mn.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",Gc.AutoFix)}}yi(g8.ID,g8,3);yi(h8.ID,h8,4);dt(uCt);dt(dCt);dt(hCt);dt(fCt);dt(gCt);dt(pCt);vt(new cCt);vo.as(m6.Configuration).registerConfiguration(Object.assign(Object.assign({},jAe),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:w("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}}));var Zme=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class $ie{constructor(){this.lenses=[],this._disposables=new st}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function LOe(n,e,t){return Zme(this,void 0,void 0,function*(){const i=n.ordered(e),r=new Map,o=new $ie,s=i.map((a,l)=>Zme(this,void 0,void 0,function*(){r.set(a,l);try{const u=yield Promise.resolve(a.provideCodeLenses(e,t));u&&o.add(u,a)}catch(u){Cs(u)}}));return yield Promise.all(s),o.lenses=o.lenses.sort((a,l)=>a.symbol.range.startLineNumberl.symbol.range.startLineNumber?1:r.get(a.provider)r.get(l.provider)?1:a.symbol.range.startColumnl.symbol.range.startColumn?1:0),o})}mi.registerCommand("_executeCodeLensProvider",function(n,...e){let[t,i]=e;Xi(on.isUri(t)),Xi(typeof i=="number"||!i);const{codeLensProvider:r}=n.get(Vt),o=n.get(Kr).getModel(t);if(!o)throw E1();const s=[],a=new st;return LOe(r,o,Jn.None).then(l=>{a.add(l);const u=[];for(const c of l.lenses)i==null||Boolean(c.symbol.command)?s.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&u.push(Promise.resolve(c.provider.resolveCodeLens(o,c.symbol,Jn.None)).then(d=>s.push(d||c.symbol)));return Promise.all(u)}).then(()=>s).finally(()=>{setTimeout(()=>a.dispose(),100)})});var mCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},TCt=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const SOe=oi("ICodeLensCache");class Xme{constructor(e,t){this.lineCount=e,this.data=t}}let jie=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new k7(20,.75);const t="codelens/cache";C4(()=>e.remove(t,1));const i="codelens/cache2",r=e.get(i,1,"{}");this._deserialize(r),Vh(e.onWillSaveState)(o=>{o.reason===dH.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(s=>{var a;return{range:s.symbol.range,command:s.symbol.command&&{id:"",title:(a=s.symbol.command)===null||a===void 0?void 0:a.title}}}),r=new $ie;r.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new Xme(e.getLineCount(),r);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const r=new Set;for(const o of i.data.lenses)r.add(o.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...r.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const r=t[i],o=[];for(const a of r.lines)o.push({range:new G(a,1,a,11)});const s=new $ie;s.add({lenses:o,dispose(){}},this._fakeProvider),this._cache.set(i,new Xme(r.lineCount,s))}}catch{}}};jie=mCt([TCt(0,qd)],jie);gi(SOe,jie,1);class vCt{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,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 jF{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${jF._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let r=!1;for(let o=0;o{u.symbol.command&&l.push(u.symbol),i.addDecoration({range:u.symbol.range,options:Yme},d=>this._decorationIds[c]=d),a?a=G.plusRange(a,u.symbol.range):a=G.lift(u.symbol.range)}),this._viewZone=new vCt(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new jF(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.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,t)=>{const i=this._editor.getModel().getDecorationRange(e),r=this._data[t].symbol;return!!(i&&G.isEmpty(r.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,r)=>{t.addDecoration({range:i.symbol.range,options:Yme},o=>this._decorationIds[r]=o)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},eC=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},bCt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let fQ=class{constructor(e,t,i,r,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=r,this._notificationService=o,this._codeLensCache=s,this._disposables=new st,this._localToDispose=new st,this._lenses=[],this._oldCodeLensModels=new st,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Qr(()=>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(a=>{(a.hasChanged(48)||a.hasChanged(17)||a.hasChanged(16))&&this._updateLensStyle(),a.hasChanged(15)&&this._onModelChange()})),this._disposables.add(t.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 t=this._editor.getOption(17);return(!t||t<5)&&(t=this._editor.getOption(50)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(16),r=this._editor.getOption(48),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",r.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",Ju.fontFamily)),this._editor.changeViewZones(s=>{for(const a of this._lenses)a.updateHeight(e,s)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(15))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&this._localToDispose.add(Uf(()=>{const r=this._codeLensCache.get(e);t===r&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const r of this._languageFeaturesService.codeLensProvider.all(e))if(typeof r.onDidChange=="function"){const o=r.onDidChange(()=>i.schedule());this._localToDispose.add(o)}const i=new Qr(()=>{var r;const o=Date.now();(r=this._getCodeLensModelPromise)===null||r===void 0||r.cancel(),this._getCodeLensModelPromise=bs(s=>LOe(this._languageFeaturesService.codeLensProvider,e,s)),this._getCodeLensModelPromise.then(s=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=s,this._codeLensCache.put(e,s);const a=this._provideCodeLensDebounce.update(e,Date.now()-o);i.delay=a,this._renderCodeLensSymbols(s),this._resolveCodeLensesInViewportSoon()},$n)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Bn(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var r;this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{const a=[];let l=-1;this._lenses.forEach(c=>{!c.isValid()||l===c.getLineNumber()?a.push(c):(c.update(s),l=c.getLineNumber())});const u=new PZ;a.forEach(c=>{c.dispose(u,s),this._lenses.splice(this._lenses.indexOf(c),1)}),u.commit(o)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),(r=this._resolveCodeLensesPromise)===null||r===void 0||r.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(r=>{r.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Bn(()=>{if(this._editor.getModel()){const r=J2.capture(this._editor);this._editor.changeDecorations(o=>{this._editor.changeViewZones(s=>{this._disposeAllLenses(o,s)})}),r.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(r=>{if(r.target.type!==9)return;let o=r.target.element;if((o==null?void 0:o.tagName)==="SPAN"&&(o=o.parentElement),(o==null?void 0:o.tagName)==="A")for(const s of this._lenses){const a=s.getCommand(o);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new PZ;for(const r of this._lenses)r.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;const t=this._editor.getModel().getLineCount(),i=[];let r;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(r&&r[r.length-1].symbol.range.startLineNumber===l?r.push(a):(r=[a],i.push(r)))}if(!i.length&&!this._lenses.length)return;const o=J2.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const u=new PZ;let c=0,d=0;for(;dthis._resolveCodeLensesInViewportSoon())),c++,d++)}for(;cthis._resolveCodeLensesInViewportSoon())),d++;u.commit(a)})}),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 t=this._editor.getModel();if(!t)return;const i=[],r=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),r.push(a))}),i.length===0)return;const o=Date.now(),s=bs(a=>{const l=i.map((u,c)=>{const d=new Array(u.length),h=u.map((f,g)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(T=>{d[g]=T},Cs):(d[g]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!r[c].isDisposed()&&r[c].updateCommands(d)})});return Promise.all(l)});this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{$n(a),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};fQ.ID="css.editor.codeLens";fQ=QCt([eC(1,Vt),eC(2,G1),eC(3,Qo),eC(4,Fo),eC(5,SOe)],fQ);yi(fQ.ID,fQ,1);dt(class extends Ot{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:oe.hasCodeLensProvider,label:w("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return bCt(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(d0),r=e.get(Qo),o=e.get(Fo),s=t.getSelection().positionLineNumber,a=t.getContribution(fQ.ID);if(!a)return;const l=a.getModel();if(!l)return;const u=[];for(const d of l.lenses)d.symbol.command&&d.symbol.range.startLineNumber===s&&u.push({label:d.symbol.command.title,command:d.symbol.command});if(u.length===0)return;const c=yield i.pick(u,{canPickMany:!1});if(!!c){if(l.isDisposed)return yield r.executeCommand(this.id);try{yield r.executeCommand(c.command.id,...c.command.arguments||[])}catch(d){o.error(d)}}})}});var yCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},VZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},_Ct=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class hce{constructor(e,t){this._editorWorkerClient=new yle(e,!1,"editorWorkerService",t)}provideDocumentColors(e,t){return _Ct(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)})}provideColorPresentations(e,t,i){const r=t.range,o=t.color,s=o.alpha,a=new Re(new ci(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),l=s?Re.Format.CSS.formatRGB(a):Re.Format.CSS.formatRGBA(a),u=s?Re.Format.CSS.formatHSL(a):Re.Format.CSS.formatHSLA(a),c=s?Re.Format.CSS.formatHex(a):Re.Format.CSS.formatHexA(a),d=[];return d.push({label:l,textEdit:{range:r,text:l}}),d.push({label:u,textEdit:{range:r,text:u}}),d.push({label:c,textEdit:{range:r,text:c}}),d}}let Wie=class extends Pe{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new hce(e,t)))}};Wie=yCt([VZ(0,Kr),VZ(1,br),VZ(2,Vt)],Wie);OF(Wie);var DD=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};function DOe(n,e,t,i=!0){return DD(this,void 0,void 0,function*(){return fce(new CCt,n,e,t,i)})}function EOe(n,e,t,i){return Promise.resolve(t.provideColorPresentations(n,e,i))}class CCt{constructor(){}compute(e,t,i,r){return DD(this,void 0,void 0,function*(){const o=yield e.provideDocumentColors(t,i);if(Array.isArray(o))for(const s of o)r.push({colorInfo:s,provider:e});return Array.isArray(o)})}}class wCt{constructor(){}compute(e,t,i,r){return DD(this,void 0,void 0,function*(){const o=yield e.provideDocumentColors(t,i);if(Array.isArray(o))for(const s of o)r.push({range:s.range,color:[s.color.red,s.color.green,s.color.blue,s.color.alpha]});return Array.isArray(o)})}}class xCt{constructor(e){this.colorInfo=e}compute(e,t,i,r){return DD(this,void 0,void 0,function*(){const o=yield e.provideColorPresentations(t,this.colorInfo,Jn.None);return Array.isArray(o)&&r.push(...o),Array.isArray(o)})}}function fce(n,e,t,i,r){return DD(this,void 0,void 0,function*(){let o=!1,s;const a=[],l=e.ordered(t);for(let u=l.length-1;u>=0;u--){const c=l[u];if(c instanceof hce)s=c;else try{(yield n.compute(c,t,i,a))&&(o=!0)}catch(d){Cs(d)}}return o?a:s&&r?(yield n.compute(s,t,i,a),a):[]})}function kOe(n,e){const{colorProvider:t}=n.get(Vt),i=n.get(Kr).getModel(e);if(!i)throw E1();const r=n.get(bi).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:r}}mi.registerCommand("_executeDocumentColorProvider",function(n,...e){const[t]=e;if(!(t instanceof on))throw E1();const{model:i,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:o}=kOe(n,t);return fce(new wCt,r,i,Jn.None,o)});mi.registerCommand("_executeColorPresentationProvider",function(n,...e){const[t,i]=e,{uri:r,range:o}=i;if(!(r instanceof on)||!Array.isArray(t)||t.length!==4||!G.isIRange(o))throw E1();const{model:s,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=kOe(n,r),[u,c,d,h]=t;return fce(new xCt({range:o,color:{red:u,green:c,blue:d,alpha:h}}),a,s,Jn.None,l)});var LCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},e9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const MOe=Object.create({});let e7=class AOe extends Pe{constructor(e,t,i,r){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new st),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new cD(this._editor),this._decoratorLimitReporter=new SCt,this._colorDecorationClassRefs=this._register(new st),this._debounceInformation=r.for(i.colorProvider,"Document Colors",{min:AOe.RECOMPUTE_TIME}),this._register(e.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(e.onDidChangeModelLanguage(()=>this.updateColors())),this._register(i.colorProvider.onDidChange(()=>this.updateColors())),this._register(e.onDidChangeConfiguration(o=>{const s=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142);const a=s!==this._isColorDecoratorsEnabled||o.hasChanged(19),l=o.hasChanged(142);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(142),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&typeof i=="object"){const r=i.colorDecorators;if(r&&r.enable!==void 0&&!r.enable)return r.enable}return this._editor.getOption(18)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const e=this._editor.getModel();!e||!this._languageFeaturesService.colorProvider.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new W1,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}beginCompute(){return e9e(this,void 0,void 0,function*(){this._computePromise=bs(e=>e9e(this,void 0,void 0,function*(){const t=this._editor.getModel();if(!t)return[];const i=new nu(!1),r=yield DOe(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),r}));try{const e=yield this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){$n(e)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:Vn.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((r,o)=>this._colorDatas.set(r,e[o]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(19);for(let o=0;othis._colorDatas.has(r.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};e7.ID="editor.contrib.colorDetector";e7.RECOMPUTE_TIME=1e3;e7=LCt([FZ(1,bi),FZ(2,Vt),FZ(3,G1)],e7);class SCt{constructor(){this._onDidChange=new xe,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}yi(e7.ID,e7,1);class DCt{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,t,i){this.presentationIndex=i,this._onColorFlushed=new xe,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new xe,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new xe,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let r=0;r{this.backgroundColor=s.getColor(kR)||Re.white})),this._register(Ye(this._pickedColorNode,kt.CLICK,()=>this.model.selectNextColorPresentation())),this._register(Ye(this._originalColorNode,kt.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=Re.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new kCt(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=Re.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(kc(".codicon.codicon-color-mode"))}}class kCt extends Pe{constructor(e){super(),this._onClicked=this._register(new xe),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Ge(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),Ge(this._button,t),Ge(t,kc(".button"+dn.asCSSSelector(Eo("color-picker-close",_t.close,w("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class MCt extends Pe{constructor(e,t,i,r=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=kc(".colorpicker-body"),Ge(e,this._domNode),this._saturationBox=new ACt(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 NCt(this._domNode,this.model,r),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new OCt(this._domNode,this.model,r),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),r&&(this._insertButton=this._register(new ICt(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new Re(new ph(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new Re(new ph(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new Re(new ph(i===360?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class ACt extends Pe{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new xe,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new xe,this.onColorFlushed=this._onColorFlushed.event,this._domNode=kc(".saturation-wrap"),Ge(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Ge(this._domNode,this._canvas),this.selection=kc(".saturation-selection"),Ge(this._domNode,this.selection),this.layout(),this._register(Ye(this._domNode,kt.POINTER_DOWN,r=>this.onPointerDown(r))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new ib);const t=Os(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>this.onDidChangePosition(r.pageX-t.left,r.pageY-t.top),()=>null);const i=Ye(document,kt.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),r=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,r),this._onDidChange.fire({s:i,v:r})}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,t=new Re(new ph(e.h,1,1,1)),i=this._canvas.getContext("2d"),r=i.createLinearGradient(0,0,this._canvas.width,0);r.addColorStop(0,"rgba(255, 255, 255, 1)"),r.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),r.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this._canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=Re.Format.CSS.format(t),i.fill(),i.fillStyle=r,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class NOe extends Pe{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new xe,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new xe,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=Ge(e,kc(".standalone-strip")),this.overlay=Ge(this.domNode,kc(".standalone-overlay"))):(this.domNode=Ge(e,kc(".strip")),this.overlay=Ge(this.domNode,kc(".overlay"))),this.slider=Ge(this.domNode,kc(".slider")),this.slider.style.top="0px",this._register(Ye(this.domNode,kt.POINTER_DOWN,r=>this.onPointerDown(r))),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 t=this._register(new ib),i=Os(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,o=>this.onDidChangeTop(o.pageY-i.top),()=>null);const r=Ye(document,kt.POINTER_UP,()=>{this._onColorFlushed.fire(),r.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class NCt extends NOe{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:r}=e.rgba,o=new Re(new ci(t,i,r,1)),s=new Re(new ci(t,i,r,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class OCt extends NOe{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class ICt extends Pe{constructor(e){super(),this._onClicked=this._register(new xe),this.onClicked=this._onClicked.event,this._button=Ge(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=t=>{this._onClicked.fire()}}get button(){return this._button}}class RCt extends U1{constructor(e,t,i,r,o=!1){super(),this.model=t,this.pixelRatio=i,this._register(Wv.onDidChange(()=>this.layout()));const s=kc(".colorpicker-widget");e.appendChild(s),this.header=this._register(new ECt(s,this.model,r,o)),this.body=this._register(new MCt(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}var OOe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},IOe=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},pQ=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class HCt{constructor(e,t,i,r){this.owner=e,this.range=t,this.model=i,this.provider=r,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let MH=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return Zo.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return pQ(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const r=e7.get(this._editor);if(!r)return[];for(const o of t){if(!r.isColorDecoration(o))continue;const s=r.getColorData(o.range.getStartPosition());if(s)return[yield ROe(this,this._editor.getModel(),s.colorInfo,s.provider)]}return[]})}renderHoverParts(e,t){return HOe(this,this._editor,this._themeService,t,e)}};MH=OOe([IOe(1,Vs)],MH);class PCt{constructor(e,t,i,r){this.owner=e,this.range=t,this.model=i,this.provider=r}}let qL=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}createColorHover(e,t,i){return pQ(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!e7.get(this._editor))return null;const o=yield DOe(i,this._editor.getModel(),Jn.None);let s=null,a=null;for(const d of o){const h=d.colorInfo;G.containsRange(h.range,e.range)&&(s=h,a=d.provider)}const l=s!=null?s:e,u=a!=null?a:t,c=!!s;return{colorHover:yield ROe(this,this._editor.getModel(),l,u),foundInEditor:c}})}updateEditorModel(e){return pQ(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=e.model;let i=new G(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(yield pI(this._editor.getModel(),t,this._color,i,e),i=POe(this._editor,i,t))})}renderHoverParts(e,t){return HOe(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};qL=OOe([IOe(1,Vs)],qL);function ROe(n,e,t,i){return pQ(this,void 0,void 0,function*(){const r=e.getValueInRange(t.range),{red:o,green:s,blue:a,alpha:l}=t.color,u=new ci(Math.round(o*255),Math.round(s*255),Math.round(a*255),l),c=new Re(u),d=yield EOe(e,t,i,Jn.None),h=new DCt(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,r),n instanceof MH?new HCt(n,G.lift(t.range),h,i):new PCt(n,G.lift(t.range),h,i)})}function HOe(n,e,t,i,r){if(i.length===0||!e.hasModel())return Pe.None;const o=new st,s=i[0],a=e.getModel(),l=s.model,u=o.add(new RCt(r.fragment,l,e.getOption(138),t,n instanceof qL));r.setColorPicker(u);let c=new G(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);if(n instanceof qL){const d=i[0].model.color;n.color=d,pI(a,l,d,c,s),o.add(l.onColorFlushed(h=>{n.color=h}))}else o.add(l.onColorFlushed(d=>pQ(this,void 0,void 0,function*(){yield pI(a,l,d,c,s),c=POe(e,c,l,r)})));return o.add(l.onDidChangeColor(d=>{pI(a,l,d,c,s)})),o}function POe(n,e,t,i){let r,o;if(t.presentation.textEdit){r=[t.presentation.textEdit],o=new G(t.presentation.textEdit.range.startLineNumber,t.presentation.textEdit.range.startColumn,t.presentation.textEdit.range.endLineNumber,t.presentation.textEdit.range.endColumn);const s=n.getModel()._setTrackedRange(null,o,3);n.pushUndoStop(),n.executeEdits("colorpicker",r),o=n.getModel()._getTrackedRange(s)||o}else r=[{range:e,text:t.presentation.label,forceMoveMarkers:!1}],o=e.setEndPosition(e.endLineNumber,e.startColumn+t.presentation.label.length),n.pushUndoStop(),n.executeEdits("colorpicker",r);return t.presentation.additionalTextEdits&&(r=[...t.presentation.additionalTextEdits],n.executeEdits("colorpicker",r),i&&i.hide()),n.pushUndoStop(),o}function pI(n,e,t,i,r){return pQ(this,void 0,void 0,function*(){const o=yield EOe(n,{range:i,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},r.provider,Jn.None);e.colorPresentations=o||[]})}function zie(n,e){return!!n[e]}class BZ{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=zie(e.event,t.triggerModifier),this.hasSideBySideModifier=zie(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class t9e{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=zie(e,t.triggerModifier)}}class cN{constructor(e,t,i,r){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=r}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function n9e(n){return n==="altKey"?Yn?new cN(57,"metaKey",6,"altKey"):new cN(5,"ctrlKey",6,"altKey"):Yn?new cN(6,"altKey",57,"metaKey"):new cN(6,"altKey",5,"ctrlKey")}class WF extends Pe{constructor(e,t){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new xe),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new xe),this.onExecute=this._onExecute.event,this._onCancel=this._register(new xe),this.onCancel=this._onCancel.event,this._editor=e,this._alwaysFireExecuteOnMouseUp=t,this._opts=n9e(this._editor.getOption(75)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(75)){const r=n9e(this._editor.getOption(75));if(this._opts.equals(r))return;this._opts=r,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new BZ(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new BZ(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new BZ(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new t9e(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new t9e(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.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 t=e.target.position?e.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t||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 VCt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},W3=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let t7=class extends nQ{constructor(e,t,i,r,o,s,a,l,u,c,d,h,f){super(e,Object.assign(Object.assign({},r.getRawOptions()),{overflowWidgetsDomNode:r.getOverflowWidgetsDomNode()}),i,o,s,a,l,u,c,d,h,f),this._parentEditor=r,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(r.onDidChangeConfiguration(g=>this._onParentConfigurationChanged(g)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){XS(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};t7=VCt([W3(4,Sn),W3(5,Mi),W3(6,Qo),W3(7,_n),W3(8,Vs),W3(9,Fo),W3(10,S7),W3(11,br),W3(12,Vt)],t7);const i9e=new Re(new ci(0,122,204)),FCt={showArrow:!0,showFrame:!0,className:"",frameColor:i9e,arrowColor:i9e,keepEditorSelection:!1},BCt="vs.editor.contrib.zoneWidget";class $Ct{constructor(e,t,i,r,o,s,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=r,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class jCt{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class zF{constructor(e){this._editor=e,this._ruleName=zF._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),Zpe(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(){Zpe(this._ruleName),Gte(`.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:G.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}zF._IdGenerator=new yue(".arrow-decoration-");class WCt{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new st,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=s4(t),XS(this.options,FCt,!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(i=>{const r=this._getWidth(i);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(r)}))}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 zF(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 t;if(this.domNode.style.height=`${e}px`,this.container){const i=e-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const r=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(r))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(!!e)return e.getStartPosition()}show(e,t){const i=G.isIRange(e)?G.lift(e):G.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:Vn.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.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(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(64);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),r=this.editor.getLayoutInfo(),o=this._getWidth(r);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(r)+"px";const s=document.createElement("div");s.style.overflow="hidden";const a=this.editor.getOption(64);if(!this.options.allowUnlimitedHeight){const h=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,h)}let l=0,u=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(u=Math.round(a/9)),this.editor.changeViewZones(h=>{this._viewZone&&h.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new $Ct(s,i.lineNumber,i.column,t,f=>this._onViewZoneTop(f),f=>this._onViewZoneHeight(f),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=h.addZone(this._viewZone),this._overlayWidget=new jCt(BCt+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const h=this.options.frameWidth?this.options.frameWidth:u;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}const c=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,o),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const h=d.validateRange(new G(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(h,h.startLineNumber===d.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){!this.container||(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Ja(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(64),r=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+r;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 VOe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},FOe=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const BOe=oi("IPeekViewService");gi(BOe,class{constructor(){this._widgets=new Map}addExclusiveWidget(n,e){const t=this._widgets.get(n);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const r=this._widgets.get(n);r&&r.widget===e&&(r.listener.dispose(),this._widgets.delete(n))};this._widgets.set(n,{widget:e,listener:e.onDidClose(i)})}},1);var xu;(function(n){n.inPeekEditor=new It("inReferenceSearchEditor",!0,w("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),n.notInPeekEditor=n.inPeekEditor.toNegated()})(xu||(xu={}));let GL=class{constructor(e,t){e instanceof t7&&xu.inPeekEditor.bindTo(t)}dispose(){}};GL.ID="editor.contrib.referenceController";GL=VOe([FOe(1,_n)],GL);yi(GL.ID,GL,0);function zCt(n){const e=n.get(Mi).getFocusedCodeEditor();return e instanceof t7?e.getParentEditor():e}const UCt={headerBackgroundColor:Re.white,primaryHeadingColor:Re.fromHex("#333333"),secondaryHeadingColor:Re.fromHex("#6c6c6cb3")};let AH=class extends WCt{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new xe,this.onDidClose=this._onDidClose.event,XS(this.options,UCt,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.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=at(".head"),this._bodyElement=at(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=at(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),es(this._titleElement,"click",o=>this._onTitleClick(o))),Ge(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=at("span.filename"),this._secondaryHeading=at("span.dirname"),this._metaHeading=at("span.meta"),Ge(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=at(".peekview-actions");Ge(this._headElement,i);const r=this._getActionBarOptions();this._actionbarWidget=new F1(i,r),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new nc("peekview.close",w("label.close","Close"),dn.asClassName(_t.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:uTt.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:ys(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Uu(this._metaHeading)):ql(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(64)*1.2),r=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(r,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};AH=VOe([FOe(2,Sn)],AH);const qCt=de("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:Re.black,hcLight:Re.white},w("peekViewTitleBackground","Background color of the peek view title area.")),$Oe=de("peekViewTitleLabel.foreground",{dark:Re.white,light:Re.black,hcDark:Re.white,hcLight:_d},w("peekViewTitleForeground","Color of the peek view title.")),jOe=de("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},w("peekViewTitleInfoForeground","Color of the peek view title info.")),GCt=de("peekView.border",{dark:Ic,light:Ic,hcDark:ri,hcLight:ri},w("peekViewBorder","Color of the peek view borders and arrow.")),KCt=de("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:Re.black,hcLight:Re.white},w("peekViewResultsBackground","Background color of the peek view result list."));de("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:Re.white,hcLight:_d},w("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));de("peekViewResult.fileForeground",{dark:Re.white,light:"#1E1E1E",hcDark:Re.white,hcLight:_d},w("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));de("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},w("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));de("peekViewResult.selectionForeground",{dark:Re.white,light:"#6C6C6C",hcDark:Re.white,hcLight:_d},w("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const sf=de("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:Re.black,hcLight:Re.white},w("peekViewEditorBackground","Background color of the peek view editor."));de("peekViewEditorGutter.background",{dark:sf,light:sf,hcDark:sf,hcLight:sf},w("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));de("peekViewEditorStickyScroll.background",{dark:sf,light:sf,hcDark:sf,hcLight:sf},w("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));de("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},w("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));de("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},w("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));de("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Nr,hcLight:Nr},w("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var ZCt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class n7{constructor(e,t,i,r){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=r,this.id=Ene.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?w({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,V1(this.uri),this.range.startLineNumber,this.range.startColumn):w("aria.oneReference","in {0} on line {1} at column {2}",V1(this.uri),this.range.startLineNumber,this.range.startColumn)}}class XCt{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:r,startColumn:o,endLineNumber:s,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:r,column:o-t}),u=new G(r,l.startColumn,r,o),c=new G(s,a,s,1073741824),d=i.getValueInRange(u).replace(/^\s+/,""),h=i.getValueInRange(e),f=i.getValueInRange(c).replace(/\s+$/,"");return{value:d+h+f,highlight:{start:d.length,end:d.length+h.length}}}}class KL{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new xl}dispose(){$i(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?w("aria.fileReferences.1","1 symbol in {0}, full path {1}",V1(this.uri),this.uri.fsPath):w("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,V1(this.uri),this.uri.fsPath)}resolve(e){return ZCt(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new XCt(i))}catch(i){$n(i)}return this})}}class rc{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new xe,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(rc._compareReferences);let r;for(const o of e)if((!r||!Or.isEqual(r.uri,o.uri,!0))&&(r=new KL(this,o.uri),this.groups.push(r)),r.children.length===0||rc._compareReferences(o,r.children[r.children.length-1])!==0){const s=new n7(i===o,r,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(s),r.children.push(s)}}dispose(){$i(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new rc(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?w("aria.result.0","No results found"):this.references.length===1?w("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?w("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):w("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let r=i.children.indexOf(e);const o=i.children.length,s=i.parent.groups.length;return s===1||t&&r+10?(t?r=(r+1)%o:r=(r+o-1)%o,i.children[r]):(r=i.parent.groups.indexOf(i),t?(r=(r+1)%s,i.parent.groups[r].children[0]):(r=(r+s-1)%s,i.parent.groups[r].children[i.parent.groups[r].children.length-1]))}nearestReference(e,t){const i=this.references.map((r,o)=>({idx:o,prefixLen:Yg(r.uri.toString(),e.toString()),offsetDist:Math.abs(r.range.startLineNumber-t.lineNumber)*100+Math.abs(r.range.startColumn-t.column)})).sort((r,o)=>r.prefixLen>o.prefixLen?-1:r.prefixLeno.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&G.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return Or.compare(e.uri,t.uri)||G.compareRangesUsingStarts(e.range,t.range)}}var UF=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qF=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let Uie=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof rc||e instanceof KL}getChildren(e){if(e instanceof rc)return e.groups;if(e instanceof KL)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};Uie=UF([qF(0,Lu)],Uie);class YCt{getHeight(){return 23}getTemplateId(e){return e instanceof KL?ZL.id:ED.id}}let qie=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof n7){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return V1(e.uri)}};qie=UF([qF(0,Ir)],qie);class JCt{getId(e){return e instanceof n7?e.id:e.uri}}let Gie=class extends Pe{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new CH(i,{supportHighlights:!0})),this.badge=new pie(Ge(i,at(".count")),{},GAe),e.appendChild(i)}set(e,t){const i=dF(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const r=e.children.length;this.badge.setCount(r),r>1?this.badge.setTitleFormat(w("referencesCount","{0} references",r)):this.badge.setTitleFormat(w("referenceCount","{0} reference",r))}};Gie=UF([qF(1,oQ)],Gie);let ZL=class WOe{constructor(e){this._instantiationService=e,this.templateId=WOe.id}renderTemplate(e){return this._instantiationService.createInstance(Gie,e)}renderElement(e,t,i){i.set(e.element,TF(e.filterData))}disposeTemplate(e){e.dispose()}};ZL.id="FileReferencesRenderer";ZL=UF([qF(0,Sn)],ZL);class ewt{constructor(e){this.label=new Df(e)}set(e,t){var i;const r=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!r||!r.value)this.label.set(`${V1(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:o,highlight:s}=r;t&&!z2.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(o,TF(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(o,[s]))}}}class ED{constructor(){this.templateId=ED.id}renderTemplate(e){return new ewt(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}ED.id="OneReferenceRenderer";class twt{getWidgetAriaLabel(){return w("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var nwt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},z3=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},r9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class GF{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new st,this._callOnModelChange=new st,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 t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let r=0,o=e.children.length;r{const o=r.deltaDecorations([],t);for(let s=0;s{o.equals(9)&&(this._keybindingService.dispatchEvent(o,o.target),o.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(rwt,"ReferencesWidget",this._treeContainer,new YCt,[this._instantiationService.createInstance(ZL),this._instantiationService.createInstance(ED)],this._instantiationService.createInstance(Uie),i),this._splitView.addView({onDidChange:Ut.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:o=>{this._preview.layout({height:this._dim.height,width:o})}},QH.Distribute),this._splitView.addView({onDidChange:Ut.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)}},QH.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const r=(o,s)=>{o instanceof n7&&(s==="show"&&this._revealReference(o,!1),this._onDidSelectReference.fire({element:o,kind:s,source:"tree"}))};this._tree.onDidOpen(o=>{o.sideBySide?r(o.element,"side"):o.editorOptions.pinned?r(o.element,"goto"):r(o.element,"show")}),ql(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Tr(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*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=w("noResults","No results"),Uu(this._messageContainer),Promise.resolve(void 0)):(ql(this._messageContainer),this._decorationsManager=new GF(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:t,target:i}=e;if(t.detail!==2)return;const r=this._getFocusedReference();!r||this._onDidSelectReference.fire({element:{uri:r.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),Uu(this._treeContainer),Uu(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 n7)return e;if(e instanceof KL&&e.children.length>0)return e.children[0]}revealReference(e){return r9e(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return r9e(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Un.inMemory?this.setTitle(C7t(e.uri),this._uriLabel.getUriLabel(dF(e.uri))):this.setTitle(w("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const r=yield i;if(!this._model){r.dispose();return}$i(this._previewModelReference);const o=r.object;if(o){const s=this._preview.getModel()===o.textEditorModel?0:1,a=G.lift(e.range).collapseToStart();this._previewModelReference=r,this._preview.setModel(o.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,s)}else this._preview.setModel(this._previewNotAvailableMessage),r.dispose()})}};Kie=nwt([z3(3,Vs),z3(4,Lu),z3(5,Sn),z3(6,BOe),z3(7,oQ),z3(8,hF),z3(9,Ir),z3(10,$r),z3(11,br)],Kie);var owt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},N9=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},o9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const sm=new It("referenceSearchVisible",!1,w("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let i7=class Zie{static get(e){return e.getContribution(Zie.ID)}constructor(e,t,i,r,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=r,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new st,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=sm.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let r;if(this._widget&&(r=this._widget.position),this.closeWidget(),!!r&&e.containsPosition(r))return;this._peekMode=i,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",s=iwt.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(Kie,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(w("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.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(l=>{const{element:u,kind:c}=l;if(!!u)switch(c){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(u,!1,!1);break;case"side":this.openReference(u,!0,!1);break;case"goto":i?this._gotoReference(u,!0):this.openReference(u,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var u;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(u=this._model)===null||u===void 0||u.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(w("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,d=new De(e.startLineNumber,e.startColumn),h=this._model.nearestReference(c,d);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(84)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return o9e(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const r=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(r),yield this._gotoReference(r,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()})}revealReference(e){return o9e(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var i;(i=this._widget)===null||i===void 0||i.hide(),this._ignoreModelChangeEvent=!0;const r=G.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:r,selectionSource:"code.jump",pinned:t}},this._editor).then(o=>{var s;if(this._ignoreModelChangeEvent=!1,!o||!this._widget){this.closeWidget();return}if(this._editor===o)this._widget.show(r),this._widget.focusOnReferenceTree();else{const a=Zie.get(o),l=this._model.clone();this.closeWidget(),o.focus(),a==null||a.toggleWidget(r,bs(u=>Promise.resolve(l)),(s=this._peekMode)!==null&&s!==void 0?s:!1)}},o=>{this._ignoreModelChangeEvent=!1,$n(o)})}openReference(e,t,i){t||this.closeWidget();const{uri:r,range:o}=e;this._editorService.openCodeEditor({resource:r,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};i7.ID="editor.contrib.referencesController";i7=owt([N9(2,_n),N9(3,Mi),N9(4,Fo),N9(5,Sn),N9(6,qd),N9(7,bi)],i7);function am(n,e){const t=zCt(n);if(!t)return;const i=i7.get(t);i&&e(i)}wu.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:ws(2089,60),when:ct.or(sm,xu.inPeekEditor),handler(n){am(n,e=>{e.changeFocusBetweenPreviewAndReferences()})}});wu.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:ct.or(sm,xu.inPeekEditor),handler(n){am(n,e=>{e.goToNextOrPreviousReference(!0)})}});wu.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:ct.or(sm,xu.inPeekEditor),handler(n){am(n,e=>{e.goToNextOrPreviousReference(!1)})}});mi.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");mi.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");mi.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");mi.registerCommand("closeReferenceSearch",n=>am(n,e=>e.closeWidget()));wu.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:ct.and(xu.inPeekEditor,ct.not("config.editor.stablePeek"))});wu.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:ct.and(sm,ct.not("config.editor.stablePeek"))});wu.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:ct.and(sm,pNe,Bue.negate(),$ue.negate()),handler(n){var e;const i=(e=n.get(K1).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof n7&&am(n,r=>r.revealReference(i[0]))}});wu.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:ct.and(sm,pNe,Bue.negate(),$ue.negate()),handler(n){var e;const i=(e=n.get(K1).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof n7&&am(n,r=>r.openReference(i[0],!0,!0))}});mi.registerCommand("openReference",n=>{var e;const i=(e=n.get(K1).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof n7&&am(n,r=>r.openReference(i[0],!1,!0))});var zOe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Rw=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const pce=new It("hasSymbols",!1,w("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),KF=oi("ISymbolNavigationService");let Xie=class{constructor(e,t,i,r){this._editorService=t,this._notificationService=i,this._keybindingService=r,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=pce.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new Yie(this._editorService),r=i.onDidChange(o=>{if(this._ignoreEditorChange)return;const s=this._editorService.getActiveCodeEditor();if(!s)return;const a=s.getModel(),l=s.getPosition();if(!a||!l)return;let u=!1,c=!1;for(const d of t.references)if(cF(d.uri,a.uri))u=!0,c=c||G.containsPosition(d.range,l);else if(u)break;(!u||!c)&&this.reset()});this._currentState=Dd(i,r)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:G.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?w("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):w("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};Xie=zOe([Rw(0,_n),Rw(1,Mi),Rw(2,Fo),Rw(3,Ir)],Xie);gi(KF,Xie,1);vt(new class extends Ps{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:pce,kbOpts:{weight:100,primary:70}})}runEditorCommand(n,e){return n.get(KF).revealNext(e)}});wu.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:pce,primary:9,handler(n){n.get(KF).reset()}});let Yie=class{constructor(e){this._listener=new Map,this._disposables=new st,this._onDidChange=new xe,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(),$i(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Dd(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};Yie=zOe([Rw(0,Mi)],Yie);var gce=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};function kD(n,e,t,i){return gce(this,void 0,void 0,function*(){const o=t.ordered(n).map(a=>Promise.resolve(i(a,n,e)).then(void 0,l=>{Cs(l)})),s=yield Promise.all(o);return Ph(s.flat())})}function ZF(n,e,t,i){return kD(e,t,n,(r,o,s)=>r.provideDefinition(o,s,i))}function UOe(n,e,t,i){return kD(e,t,n,(r,o,s)=>r.provideDeclaration(o,s,i))}function qOe(n,e,t,i){return kD(e,t,n,(r,o,s)=>r.provideImplementation(o,s,i))}function GOe(n,e,t,i){return kD(e,t,n,(r,o,s)=>r.provideTypeDefinition(o,s,i))}function XF(n,e,t,i,r){return kD(e,t,n,(o,s,a)=>gce(this,void 0,void 0,function*(){const l=yield o.provideReferences(s,a,{includeDeclaration:!0},r);if(!i||!l||l.length!==2)return l;const u=yield o.provideReferences(s,a,{includeDeclaration:!1},r);return u&&u.length===1?u:l}))}function MD(n){return gce(this,void 0,void 0,function*(){const e=yield n(),t=new rc(e,""),i=t.references.map(r=>r.link);return t.dispose(),i})}r3("_executeDefinitionProvider",(n,e,t)=>{const i=n.get(Vt),r=ZF(i.definitionProvider,e,t,Jn.None);return MD(()=>r)});r3("_executeTypeDefinitionProvider",(n,e,t)=>{const i=n.get(Vt),r=GOe(i.typeDefinitionProvider,e,t,Jn.None);return MD(()=>r)});r3("_executeDeclarationProvider",(n,e,t)=>{const i=n.get(Vt),r=UOe(i.declarationProvider,e,t,Jn.None);return MD(()=>r)});r3("_executeReferenceProvider",(n,e,t)=>{const i=n.get(Vt),r=XF(i.referenceProvider,e,t,!1,Jn.None);return MD(()=>r)});r3("_executeImplementationProvider",(n,e,t)=>{const i=n.get(Vt),r=qOe(i.implementationProvider,e,t,Jn.None);return MD(()=>r)});var kd=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},$Z,jZ,WZ,zZ,UZ,qZ,GZ,KZ;Ll.appendMenuItem(se.EditorContext,{submenu:se.EditorContextPeek,title:w("peek.submenu","Peek"),group:"navigation",order:100});class gQ{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof gQ||De.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class wl extends q8{static all(){return wl._allSymbolNavigationCommands.values()}static _patchConfig(e){const t=Object.assign(Object.assign({},e),{f1:!0});if(t.menu)for(const i of pi.wrap(t.menu))(i.id===se.EditorContext||i.id===se.EditorContextPeek)&&(i.when=ct.and(e.precondition,i.when));return t}constructor(e,t){super(wl._patchConfig(t)),this.configuration=e,wl._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,r){if(!t.hasModel())return Promise.resolve(void 0);const o=e.get(Fo),s=e.get(Mi),a=e.get(M7),l=e.get(KF),u=e.get(Vt),c=e.get(Sn),d=t.getModel(),h=t.getPosition(),f=gQ.is(i)?i:new gQ(d,h),g=new Jf(t,5),T=jV(this._getLocationModel(u,f.model,f.position,g.token),g.token).then(v=>kd(this,void 0,void 0,function*(){var Q;if(!v||g.token.isCancellationRequested)return;Ys(v.ariaMessage);let b;if(v.referenceAt(d.uri,h)){const C=this._getAlternativeCommand(t);!wl._activeAlternativeCommands.has(C)&&wl._allSymbolNavigationCommands.has(C)&&(b=wl._allSymbolNavigationCommands.get(C))}const _=v.references.length;if(_===0){if(!this.configuration.muteMessage){const C=d.getWordAtPosition(h);(Q=ic.get(t))===null||Q===void 0||Q.showMessage(this._getNoResultFoundMessage(C),h)}}else if(_===1&&b)wl._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(C=>b.runEditorCommand(C,t,i,r).finally(()=>{wl._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(s,l,t,v,r)}),v=>{o.error(v)}).finally(()=>{g.dispose()});return a.showWhile(T,250),T}_onResult(e,t,i,r,o){return kd(this,void 0,void 0,function*(){const s=this._getGoToPreference(i);if(!(i instanceof t7)&&(this.configuration.openInPeek||s==="peek"&&r.references.length>1))this._openInPeek(i,r,o);else{const a=r.firstReference(),l=r.references.length>1&&s==="gotoAndPeek",u=yield this._openReference(i,e,a,this.configuration.openToSide,!l);l&&u?this._openInPeek(u,r,o):r.dispose(),s==="goto"&&t.put(a)}})}_openReference(e,t,i,r,o){return kd(this,void 0,void 0,function*(){let s;if(Tdt(i)&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:G.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,r);if(!!a){if(o){const l=a.getModel(),u=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&u.clear()},350)}return a}})}_openInPeek(e,t,i){const r=i7.get(e);r&&e.hasModel()?r.toggleWidget(i!=null?i:e.getSelection(),bs(o=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}wl._allSymbolNavigationCommands=new Map;wl._activeAlternativeCommands=new Set;class AD extends wl{_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield ZF(e.definitionProvider,t,i,r),w("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?w("noResultWord","No definition found for '{0}'",e.word):w("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleDefinitions}}const KOe=w7&&!cle()?2118:70;ps(($Z=class Jie extends AD{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Jie.id,title:{value:w("actions.goToDecl.label","Go to Definition"),original:"Go to Definition",mnemonicTitle:w({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:ct.and(oe.hasDefinitionProvider,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:KOe,weight:100},menu:[{id:se.EditorContext,group:"navigation",order:1.1},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),mi.registerCommandAlias("editor.action.goToDeclaration",Jie.id)}},$Z.id="editor.action.revealDefinition",$Z));ps((jZ=class ere extends AD{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:ere.id,title:{value:w("actions.goToDeclToSide.label","Open Definition to the Side"),original:"Open Definition to the Side"},precondition:ct.and(oe.hasDefinitionProvider,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:ws(2089,KOe),weight:100}}),mi.registerCommandAlias("editor.action.openDeclarationToTheSide",ere.id)}},jZ.id="editor.action.revealDefinitionAside",jZ));ps((WZ=class tre extends AD{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:tre.id,title:{value:w("actions.previewDecl.label","Peek Definition"),original:"Peek Definition"},precondition:ct.and(oe.hasDefinitionProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:se.EditorContextPeek,group:"peek",order:2}}),mi.registerCommandAlias("editor.action.previewDeclaration",tre.id)}},WZ.id="editor.action.peekDefinition",WZ));class ZOe extends wl{_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield UOe(e.declarationProvider,t,i,r),w("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?w("decl.noResultWord","No declaration found for '{0}'",e.word):w("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(56).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(56).multipleDeclarations}}ps((zZ=class XOe extends ZOe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:XOe.id,title:{value:w("actions.goToDeclaration.label","Go to Declaration"),original:"Go to Declaration",mnemonicTitle:w({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:ct.and(oe.hasDeclarationProvider,oe.isInWalkThroughSnippet.toNegated()),menu:[{id:se.EditorContext,group:"navigation",order:1.3},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?w("decl.noResultWord","No declaration found for '{0}'",e.word):w("decl.generic.noResults","No declaration found")}},zZ.id="editor.action.revealDeclaration",zZ));ps(class extends ZOe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:w("actions.peekDecl.label","Peek Declaration"),original:"Peek Declaration"},precondition:ct.and(oe.hasDeclarationProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),menu:{id:se.EditorContextPeek,group:"peek",order:3}})}});class YOe extends wl{_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield GOe(e.typeDefinitionProvider,t,i,r),w("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?w("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):w("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(56).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(56).multipleTypeDefinitions}}ps((UZ=class JOe extends YOe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:JOe.ID,title:{value:w("actions.goToTypeDefinition.label","Go to Type Definition"),original:"Go to Type Definition",mnemonicTitle:w({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:ct.and(oe.hasTypeDefinitionProvider,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:0,weight:100},menu:[{id:se.EditorContext,group:"navigation",order:1.4},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},UZ.ID="editor.action.goToTypeDefinition",UZ));ps((qZ=class eIe extends YOe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:eIe.ID,title:{value:w("actions.peekTypeDefinition.label","Peek Type Definition"),original:"Peek Type Definition"},precondition:ct.and(oe.hasTypeDefinitionProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),menu:{id:se.EditorContextPeek,group:"peek",order:4}})}},qZ.ID="editor.action.peekTypeDefinition",qZ));class tIe extends wl{_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield qOe(e.implementationProvider,t,i,r),w("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?w("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):w("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(56).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(56).multipleImplementations}}ps((GZ=class nIe extends tIe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:nIe.ID,title:{value:w("actions.goToImplementation.label","Go to Implementations"),original:"Go to Implementations",mnemonicTitle:w({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:ct.and(oe.hasImplementationProvider,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:2118,weight:100},menu:[{id:se.EditorContext,group:"navigation",order:1.45},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},GZ.ID="editor.action.goToImplementation",GZ));ps((KZ=class iIe extends tIe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:iIe.ID,title:{value:w("actions.peekImplementation.label","Peek Implementations"),original:"Peek Implementations"},precondition:ct.and(oe.hasImplementationProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:3142,weight:100},menu:{id:se.EditorContextPeek,group:"peek",order:5}})}},KZ.ID="editor.action.peekImplementation",KZ));class rIe extends wl{_getNoResultFoundMessage(e){return e?w("references.no","No references found for '{0}'",e.word):w("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(56).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(56).multipleReferences}}ps(class extends rIe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:w("goToReferences.label","Go to References"),original:"Go to References",mnemonicTitle:w({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:ct.and(oe.hasReferenceProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),keybinding:{when:oe.editorTextFocus,primary:1094,weight:100},menu:[{id:se.EditorContext,group:"navigation",order:1.45},{id:se.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield XF(e.referenceProvider,t,i,!0,r),w("ref.title","References"))})}});ps(class extends rIe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:w("references.action.label","Peek References"),original:"Peek References"},precondition:ct.and(oe.hasReferenceProvider,xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated()),menu:{id:se.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(yield XF(e.referenceProvider,t,i,!1,r),w("ref.title","References"))})}});class swt extends wl{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:{value:w("label.generic","Go to Any Symbol"),original:"Go to Any Symbol"},precondition:ct.and(xu.notInPeekEditor,oe.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,r){return kd(this,void 0,void 0,function*(){return new rc(this._references,w("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&w("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(56).multipleReferences}_getAlternativeCommand(){return""}}mi.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:on},{name:"position",description:"The position at which to start",constraint:De.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:(n,e,t,i,r,o,s)=>kd(void 0,void 0,void 0,function*(){Xi(on.isUri(e)),Xi(De.isIPosition(t)),Xi(Array.isArray(i)),Xi(typeof r>"u"||typeof r=="string"),Xi(typeof s>"u"||typeof s=="boolean");const a=n.get(Mi),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(Gh(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(u=>{const c=new class extends swt{_getNoResultFoundMessage(d){return o||super._getNoResultFoundMessage(d)}}({muteMessage:!Boolean(o),openInPeek:Boolean(s),openToSide:!1},i,r);u.get(Sn).invokeFunction(c.run.bind(c),l)})})});mi.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:on},{name:"position",description:"The position at which to start",constraint:De.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:(n,e,t,i,r)=>kd(void 0,void 0,void 0,function*(){n.get(Qo).executeCommand("editor.action.goToLocations",e,t,i,r,void 0,!0)})});mi.registerCommand({id:"editor.action.findReferences",handler:(n,e,t)=>{Xi(on.isUri(e)),Xi(De.isIPosition(t));const i=n.get(Vt),r=n.get(Mi);return r.openCodeEditor({resource:e},r.getFocusedCodeEditor()).then(o=>{if(!Gh(o)||!o.hasModel())return;const s=i7.get(o);if(!s)return;const a=bs(u=>XF(i.referenceProvider,o.getModel(),De.lift(t),!1,u).then(c=>new rc(c,w("ref.title","References")))),l=new G(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(l,a,!1))})}});mi.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var awt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},ZZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},s9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let m8=class gI{constructor(e,t,i,r){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=r,this.toUnhook=new st,this.toUnhookForKeyboard=new st,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new WF(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown(([s,a])=>{this.startFindDefinitionFromMouse(s,da(a))})),this.toUnhook.add(o.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).catch(a=>{$n(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(o.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(gI.ID)}startFindDefinitionFromCursor(e){return s9e(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(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;return s9e(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const r=new UL(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=bs(a=>this.findDefinition(e,a));let o;try{o=yield this.previousPromise}catch(a){$n(a);return}if(!o||!o.length||!r.validate(this.editor)){this.removeLinkDecorations();return}const s=o[0].originSelectionRange?G.lift(o[0].originSelectionRange):new G(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(o.length>1){let a=s;for(const{originSelectionRange:l}of o)l&&(a=G.plusRange(a,l));this.addDecoration(a,new Gl().appendText(w("multipleResults","Click to show {0} definitions.",o.length)))}else{const a=o[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:u}}=l,{startLineNumber:c}=a.range;if(c<1||c>u.getLineCount()){l.dispose();return}const d=this.getPreviewValue(u,c,a),h=this.languageService.guessLanguageIdByFilepathOrFirstLine(u.uri);this.addDecoration(s,d?new Gl().appendCodeblock(h||"",d):void 0),l.dispose()})}})}getPreviewValue(e,t,i){let r=i.range;return r.endLineNumber-r.startLineNumber>=gI.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,r)}stripIndentationFromPreviewRange(e,t,i){let o=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a{const r=!t&&this.editor.getOption(85)&&!this.isInPeekEditor(i);return new AD({openToSide:t,openInPeek:r,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const t=e.get(_n);return xu.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};m8.ID="editor.contrib.gotodefinitionatposition";m8.MAX_SOURCE_PREVIEW_LINES=8;m8=awt([ZZ(1,Lu),ZZ(2,$r),ZZ(3,Vt)],m8);yi(m8.ID,m8,2);const dN=at;class oIe extends Pe{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 fD(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class mce extends Pe{static render(e,t,i){return new mce(e,t,i)}constructor(e,t,i){super(),this.actionContainer=Ge(e,dN("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=Ge(this.actionContainer,dN("a.action")),this.action.setAttribute("role","button"),t.iconClass&&Ge(this.action,dN(`span.icon.${t.iconClass}`));const r=Ge(this.action,dN("span"));r.textContent=i?`${t.label} (${i})`:t.label,this._register(Ye(this.actionContainer,kt.CLICK,o=>{o.stopPropagation(),o.preventDefault(),t.run(this.actionContainer)})),this._register(Ye(this.actionContainer,kt.KEY_DOWN,o=>{const s=new vr(o);(s.equals(3)||s.equals(10))&&(o.stopPropagation(),o.preventDefault(),t.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 lwt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},uwt=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},s)}};class cwt{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class sIe extends Pe{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new xe),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Qr(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Qr(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Qr(()=>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,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=X2t(e=>this._computer.computeAsync(e)),lwt(this,void 0,void 0,function*(){var e,t,i,r;try{try{for(var o=!0,s=uwt(this._asyncIterable),a;a=yield s.next(),e=a.done,!e;o=!0){r=a.value,o=!1;const l=r;l&&(this._result.push(l),this._fireResult())}}catch(l){t={error:l}}finally{try{!o&&!e&&(i=s.return)&&(yield i.call(s))}finally{if(t)throw t.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(l){$n(l)}})):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,t=this._state===4;this._onResult.fire(new cwt(this._result.slice(0),e,t))}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 XZ{constructor(e,t,i,r){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=r,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class mI{constructor(e,t,i,r,o,s){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=r,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const lm=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class gd{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 t=0,i=this.value.charCodeAt(e),r;if(r=gd._table[i],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(gd.isDigitCharacter(i)){r=8;do t+=1,i=this.value.charCodeAt(e+t);while(gd.isDigitCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}if(gd.isVariableCharacter(i)){r=9;do i=this.value.charCodeAt(e+ ++t);while(gd.isVariableCharacter(i)||gd.isDigitCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof gd._table[i]>"u"&&!gd.isDigitCharacter(i)&&!gd.isVariableCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}}gd._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class cb{constructor(){this._children=[]}appendChild(e){return e instanceof Kl&&this._children[this._children.length-1]instanceof Kl?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,r=i.children.indexOf(e),o=i.children.slice(0);o.splice(r,1,...t),i._children=o,function s(a,l){for(const u of a)u.parent=l,s(u.children,u)}(t,i)}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 ND)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class Kl extends cb{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new Kl(this.value)}}class aIe extends cb{}class y1 extends aIe{static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.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 db?this._children[0]:void 0}clone(){const e=new y1(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class db extends cb{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof Kl&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new db;return this.options.forEach(e.appendChild,e),e}}class Tce extends cb{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,r=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(o=>o instanceof C2&&Boolean(o.elseValue))&&(r=this._replace([])),r}_replace(e){let t="";for(const i of this._children)if(i instanceof C2){let r=e[i.index]||"";r=i.resolve(r),t+=r}else t+=i.toString();return t}toString(){return""}clone(){const e=new Tce;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class C2 extends cb{constructor(e,t,i,r){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=r}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):"":Boolean(e)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(e)&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,r)=>r===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new C2(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class XL extends aIe{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Kl(t)],!0):!1}clone(){const e=new XL(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function a9e(n,e){const t=[...n];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class ND extends cb{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof y1&&(e.push(i),t=!t||t.indexr===e?(i=!0,!1):(t+=r.len(),!0)),i?t:-1}fullLen(e){let t=0;return a9e([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof y1&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof XL&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){const e=new ND;return this._children=this.children.map(t=>t.clone()),e}walk(e){a9e(this.children,e)}}class mQ{constructor(){this._scanner=new gd,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const r=new ND;return this.parseFragment(e,r),this.ensureFinalTabstop(r,i!=null?i:!1,t!=null?t:!1),r}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const r=new Map,o=[];t.walk(l=>(l instanceof y1&&(l.isFinalTabstop?r.set(0,void 0):!r.has(l.index)&&l.children.length>0?r.set(l.index,l.children):o.push(l)),!0));const s=(l,u)=>{const c=r.get(l.index);if(!c)return;const d=new y1(l.index);d.transform=l.transform;for(const h of c){const f=h.clone();d.appendChild(f),f instanceof y1&&r.has(f.index)&&!u.has(f.index)&&(u.add(f.index),s(f,u),u.delete(f.index))}t.replace(l,[d])},a=new Set;for(const l of o)s(l,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(o=>o.index===0)||e.appendChild(new y1(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const r=this._scanner.next();if(r.type!==0&&r.type!==4&&r.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new Kl(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new y1(Number(t)):new XL(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const o=new y1(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Kl("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){const s=new db;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;i.push(r)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new Kl(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const o=new XL(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Kl("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseTransform(e){const t=new Tce;let i="",r="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,i+=o;continue}if(this._token.type!==14){i+=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,t.appendChild(new Kl(o));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){r+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,r)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const r=this._accept(8,!0);if(r)if(i){if(this._accept(4))return e.appendChild(new C2(Number(r))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new C2(Number(r))),!0;else return this._backTo(t),!1;if(this._accept(6)){const o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new C2(Number(r),o)),!0)}else if(this._accept(11)){const o=this._until(4);if(o)return e.appendChild(new C2(Number(r),void 0,o,void 0)),!0}else if(this._accept(12)){const o=this._until(4);if(o)return e.appendChild(new C2(Number(r),void 0,void 0,o)),!0}else if(this._accept(13)){const o=this._until(1);if(o){const s=this._until(4);if(s)return e.appendChild(new C2(Number(r),void 0,o,s)),!0}}else{const o=this._until(4);if(o)return e.appendChild(new C2(Number(r),void 0,void 0,o)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new Kl(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const dwt=w("defaultLabel","input"),hwt=w("label.preserveCaseToggle","Preserve Case");class fwt extends lb{constructor(e){super({icon:_t.preserveCase,title:hwt+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class pwt extends U1{constructor(e,t,i,r){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new xe),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new xe),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new xe),this._onInput=this._register(new xe),this._onKeyUp=this._register(new xe),this._onPreserveCaseKeyDown=this._register(new xe),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=r.placeholder||"",this.validation=r.validation,this.label=r.label||dwt;const o=r.appendPreserveCaseLabel||"",s=r.history||[],a=!!r.flexibleHeight,l=!!r.flexibleWidth,u=r.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new rNe(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:r.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:u,inputBoxStyles:r.inputBoxStyles})),this.preserveCase=this._register(new fwt(Object.assign({appendTitle:o,isChecked:!1},r.toggleStyles))),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const c=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){const f=c.indexOf(document.activeElement);if(f>=0){let g=-1;h.equals(17)?g=(f+1)%c.length:h.equals(15)&&(f===0?g=c.length-1:g=f-1),h.equals(9)?(c[f].blur(),this.inputBox.focus()):g>=0&&c[g].focus(),zn.stop(h,!0)}}});const d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.preserveCase.domNode),this.domNode.appendChild(d),e==null||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}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 lIe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},uIe=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const vce=new It("suggestWidgetVisible",!1,w("suggestWidgetVisible","Whether suggestion are visible")),Qce="historyNavigationWidgetFocus",cIe="historyNavigationForwardsEnabled",dIe="historyNavigationBackwardsEnabled";let B4;const hN=[];function hIe(n,e){if(hN.includes(e))throw new Error("Cannot register the same widget multiple times");hN.push(e);const t=new st,i=new It(Qce,!1).bindTo(n),r=new It(cIe,!0).bindTo(n),o=new It(dIe,!0).bindTo(n),s=()=>{i.set(!0),B4=e},a=()=>{i.set(!1),B4===e&&(B4=void 0)};return e.element===document.activeElement&&s(),t.add(e.onDidFocus(()=>s())),t.add(e.onDidBlur(()=>a())),t.add(Bn(()=>{hN.splice(hN.indexOf(e),1),a()})),{historyNavigationForwardsEnablement:r,historyNavigationBackwardsEnablement:o,dispose(){t.dispose()}}}let nre=class extends oNe{constructor(e,t,i,r){super(e,t,i);const o=this._register(r.createScoped(this.inputBox.element));this._register(hIe(o,this.inputBox))}};nre=lIe([uIe(3,_n)],nre);let ire=class extends pwt{constructor(e,t,i,r,o=!1){super(e,t,o,i);const s=this._register(r.createScoped(this.inputBox.element));this._register(hIe(s,this.inputBox))}};ire=lIe([uIe(3,_n)],ire);wu.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:ct.and(ct.has(Qce),ct.equals(dIe,!0),vce.isEqualTo(!1)),primary:16,secondary:[528],handler:n=>{B4==null||B4.showPreviousValue()}});wu.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:ct.and(ct.has(Qce),ct.equals(cIe,!0),vce.isEqualTo(!1)),primary:18,secondary:[530],handler:n=>{B4==null||B4.showNextValue()}});var Cx=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const jn={Visible:vce,HasFocusedSuggestion:new It("suggestWidgetHasFocusedSuggestion",!1,w("suggestWidgetHasSelection","Whether any suggestion is focused")),DetailsVisible:new It("suggestWidgetDetailsVisible",!1,w("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new It("suggestWidgetMultipleSuggestions",!1,w("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new It("suggestionMakesTextEdit",!0,w("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new It("acceptSuggestionOnEnter",!0,w("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new It("suggestionHasInsertAndReplaceRange",!1,w("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new It("suggestionInsertMode",void 0,{type:"string",description:w("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new It("suggestionCanResolve",!1,w("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Ef=new se("suggestWidgetStatusBar");class gwt{constructor(e,t,i,r){var o;this.position=e,this.completion=t,this.container=i,this.provider=r,this.isInvalid=!1,this.score=z2.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:(o=t.label)===null||o===void 0?void 0:o.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),this.extensionId=t.extensionId,G.isIRange(t.range)?(this.editStart=new De(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new De(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new De(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||G.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new De(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new De(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new De(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||G.spansMultipleLines(t.range.insert)||G.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof r.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return Cx(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._isResolved=!0,t.dispose()},i=>{c0(i)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class YL{constructor(e=2,t=new Set,i=new Set,r=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=r,this.showDeprecated=o}}YL.default=new YL;let mwt;function Twt(){return mwt}class vwt{constructor(e,t,i,r){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=r}}function bce(n,e,t,i=YL.default,r={triggerKind:0},o=Jn.None){return Cx(this,void 0,void 0,function*(){const s=new nu(!0);t=t.clone();const a=e.getWordAtPosition(t),l=a?new G(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn):G.fromPositions(t),u={replace:l,insert:l.setEndPosition(t.lineNumber,t.column)},c=[],d=new st,h=[];let f=!1;const g=(v,Q,b)=>{var _,C,L;let S=!1;if(!Q)return S;for(const D of Q.suggestions)if(!i.kindFilter.has(D.kind)){if(!i.showDeprecated&&((_=D==null?void 0:D.tags)===null||_===void 0?void 0:_.includes(1)))continue;D.range||(D.range=u),D.sortText||(D.sortText=typeof D.label=="string"?D.label:D.label.label),!f&&D.insertTextRules&&D.insertTextRules&4&&(f=mQ.guessNeedsClipboard(D.insertText)),c.push(new gwt(t,D,Q,v)),S=!0}return qae(Q)&&d.add(Q),h.push({providerName:(C=v._debugDisplayName)!==null&&C!==void 0?C:"unknown_provider",elapsedProvider:(L=Q.duration)!==null&&L!==void 0?L:-1,elapsedOverall:b.elapsed()}),S},T=(()=>Cx(this,void 0,void 0,function*(){}))();for(const v of n.orderedGroups(e)){let Q=!1;if(yield Promise.all(v.map(b=>Cx(this,void 0,void 0,function*(){if(i.providerItemsToReuse.has(b)){const _=i.providerItemsToReuse.get(b);_.forEach(C=>c.push(C)),Q=Q||_.length>0;return}if(!(i.providerFilter.size>0&&!i.providerFilter.has(b)))try{const _=new nu(!0),C=yield b.provideCompletionItems(e,t,r,o);Q=g(b,C,_)||Q}catch(_){Cs(_)}}))),Q||o.isCancellationRequested)break}return yield T,o.isCancellationRequested?(d.dispose(),Promise.reject(new x7)):new vwt(c.sort(ywt(i.snippetSortOrder)),f,{entries:h,elapsed:s.elapsed()},d)})}function yce(n,e){if(n.sortTextLow&&e.sortTextLow){if(n.sortTextLowe.sortTextLow)return 1}return n.textLabele.textLabel?1:n.completion.kind-e.completion.kind}function Qwt(n,e){if(n.completion.kind!==e.completion.kind){if(n.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return yce(n,e)}function bwt(n,e){if(n.completion.kind!==e.completion.kind){if(n.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return yce(n,e)}const YF=new Map;YF.set(0,Qwt);YF.set(2,bwt);YF.set(1,yce);function ywt(n){return YF.get(n)}mi.registerCommand("_executeCompletionItemProvider",(n,...e)=>Cx(void 0,void 0,void 0,function*(){const[t,i,r,o]=e;Xi(on.isUri(t)),Xi(De.isIPosition(i)),Xi(typeof r=="string"||!r),Xi(typeof o=="number"||!o);const{completionProvider:s}=n.get(Vt),a=yield n.get(Lu).createModelReference(t);try{const l={incomplete:!1,suggestions:[]},u=[],c=a.object.textEditorModel.validatePosition(i),d=yield bce(s,a.object.textEditorModel,c,void 0,{triggerCharacter:r!=null?r:void 0,triggerKind:r?1:0});for(const h of d.items)u.length<(o!=null?o:0)&&u.push(h.resolve(Jn.None)),l.incomplete=l.incomplete||h.container.incomplete,l.suggestions.push(h.completion);try{return yield Promise.all(u),l}finally{setTimeout(()=>d.disposable.dispose(),100)}}finally{a.dispose()}}));function _wt(n,e){var t;(t=n.getContribution("editor.contrib.suggestController"))===null||t===void 0||t.triggerSuggest(new Set().add(e),void 0,!0)}class YT{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,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}var _ce=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},NH=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const l9e=at;let OH=class rre extends Pe{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(jg,this._editor)),this._currentResult=null,this._participants=[];for(const r of lm.getAll())this._participants.push(this._instantiationService.createInstance(r,this._editor));this._participants.sort((r,o)=>r.hoverOrdinal-o.hoverOrdinal),this._computer=new RH(this._editor,this._participants),this._hoverOperation=this._register(new sIe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{if(!this._computer.anchor)return;const o=r.hasLoadingMessage?this._addLoadingMessage(r.value):r.value;this._withResult(new fIe(this._computer.anchor,o,r.isComplete))})),this._register(es(this._widget.getDomNode(),"keydown",r=>{r.equals(9)&&this.hide()})),this._register(no.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(e){const t=[];for(const r of this._participants)if(r.suggestHoverAnchor){const o=r.suggestHoverAnchor(e);o&&t.push(o)}const i=e.target;if(i.type===6&&t.push(new XZ(0,i.range,e.event.posx,e.event.posy)),i.type===7){const r=this._editor.getOption(48).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToTexto.priority-r.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,r){this._startShowingOrUpdateHover(new XZ(0,e,void 0,void 0),t,i,r,null)}_startShowingOrUpdateHover(e,t,i,r,o){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,i,r,!1),!0):!1:this._editor.getOption(58).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,r,!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,t,i,r,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,r,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,r,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=r,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_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 e?this._widget.getDomNode().contains(e):!1}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}}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,t){const{showAtPosition:i,showAtSecondaryPosition:r,highlightRange:o}=rre.computeHoverRanges(this._editor,e.range,t),s=new st,a=s.add(new IH(this._keybindingService)),l=document.createDocumentFragment();let u=null;const c={fragment:l,statusBar:a,setColorPicker:h=>u=h,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const h of this._participants){const f=t.filter(g=>g.owner===h);f.length>0&&s.add(h.renderHoverParts(c,f))}const d=t.some(h=>h.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(o){const h=this._editor.createDecorationsCollection();h.set([{range:o,options:rre._DECORATION_OPTIONS}]),s.add(Bn(()=>{h.clear()}))}this._widget.showAt(l,new wwt(u,i,r,this._editor.getOption(58).above,this._computer.shouldFocus,this._computer.source,d,e.initialMousePosX,e.initialMousePosY,s))}else s.dispose()}static computeHoverRanges(e,t,i){let r=1;if(e.hasModel()){const u=e._getViewModel(),c=u.coordinatesConverter,d=c.convertModelRangeToViewRange(t),h=new De(d.startLineNumber,u.getLineMinColumn(d.startLineNumber));r=c.convertViewPositionToModelPosition(h).column}const o=t.startLineNumber;let s=t.startColumn,a=i[0].range,l=null;for(const u of i)a=G.plusRange(a,u.range),u.range.startLineNumber===o&&u.range.endLineNumber===o&&(s=Math.max(Math.min(s,u.range.startColumn),r)),u.forceShowAtRange&&(l=u.range);return{showAtPosition:l?l.getStartPosition():new De(o,t.startColumn),showAtSecondaryPosition:l?l.getStartPosition():new De(o,s),highlightRange:a}}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()}};OH._DECORATION_OPTIONS=Vn.register({description:"content-hover-highlight",className:"hoverHighlight"});OH=_ce([NH(1,Sn),NH(2,Ir)],OH);class fIe{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter(i=>i.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new Cwt(this,this.anchor,t,this.isComplete)}}class Cwt extends fIe{constructor(e,t,i,r){super(t,i,r),this.original=e}filter(e){return this.original.filter(e)}}class wwt{constructor(e,t,i,r,o,s,a,l,u,c){this.colorPicker=e,this.showAtPosition=t,this.showAtSecondaryPosition=i,this.preferAbove=r,this.stoleFocus=o,this.source=s,this.isBeforeContent=a,this.initialMousePosX=l,this.initialMousePosY=u,this.disposables=c,this.closestMouseDistance=void 0}}let jg=class pIe extends Pe{get position(){var e,t;return(t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition)!==null&&t!==void 0?t:null}get isColorPickerVisible(){var e;return Boolean((e=this._visibleData)===null||e===void 0?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,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=oe.hoverVisible.bindTo(this._contextKeyService),this._hoverFocusedKey=oe.hoverFocused.bindTo(this._contextKeyService),this._hover=this._register(new oIe),this._focusTracker=this._register($h(this.getDomNode())),this._horizontalScrollingBy=30,this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(i=>{i.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 pIe.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;!e&&this._contextKeyService.getContextKeyValue(jn.Visible.key)&&(e=!0);const t=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:e?[1,2]:[2,1],positionAffinity:t}}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=Os(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=u9e(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const r=u9e(e,t,i.left,i.top,i.width,i.height);return r>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,r),!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:t,lineHeight:i}=this._editor.getOption(48);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i/t}`,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(t=>this._editor.applyFontInfo(t))}showAt(e,t){var i;this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(i=t.colorPicker)===null||i===void 0||i.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._hoverFocusedKey.set(!1),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 i=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==i&&(this._hover.contentsDomNode.style.paddingBottom=i,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,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(48);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.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,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e-t})}pageDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:e+t})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}escape(){this._editor.focus()}};jg.ID="editor.contrib.contentHoverWidget";jg=_ce([NH(1,_n)],jg);let IH=class extends Pe{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=l9e("div.hover-row.status-bar"),this.actionsElement=Ge(this.hoverElement,l9e("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(mce.render(this.actionsElement,e,i))}append(e){const t=Ge(this.actionsElement,e);return this._hasContent=!0,t}};IH=_ce([NH(0,Ir)],IH);class RH{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,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),r=t.range.startLineNumber;if(r>i.getLineCount())return[];const o=i.getLineMaxColumn(r);return e.getLineDecorations(r).filter(s=>{if(s.options.isWholeLine)return!0;const a=s.range.startLineNumber===r?s.range.startColumn:1,l=s.range.endLineNumber===r?s.range.endColumn:o;if(s.options.showIfCollapsed){if(a>t.range.startColumn+1||t.range.endColumn-1>l)return!1}else if(a>t.range.startColumn||t.range.endColumn>l)return!1;return!0})}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return Zo.EMPTY;const i=RH._getLineDecorations(this._editor,t);return Zo.merge(this._participants.map(r=>r.computeAsync?r.computeAsync(t,i,e):Zo.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=RH._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Ph(t)}}function u9e(n,e,t,i,r,o){const s=t+r/2,a=i+o/2,l=Math.max(Math.abs(n-s)-r/2,0),u=Math.max(Math.abs(e-a)-o/2,0);return Math.sqrt(l*l+u*u)}var xwt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},c9e=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},gIe=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let s6=class mIe{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new xe,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const r=new st,o=r.add(_ue(e,Object.assign(Object.assign({},this._getRenderOptions(e,r)),t),i));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>r.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:(i,r)=>gIe(this,void 0,void 0,function*(){var o,s,a;let l;i?l=this._languageService.getLanguageIdByLanguageName(i):this._options.editor&&(l=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),l||(l=Fc);const u=yield Zpt(this._languageService,r,l),c=document.createElement("span");if(c.innerHTML=(a=(s=mIe._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(u))!==null&&a!==void 0?a:u,this._options.editor){const d=this._options.editor.getOption(48);Ia(c,d)}else this._options.codeBlockFontFamily&&(c.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(c.style.fontSize=this._options.codeBlockFontSize),c}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>Lwt(this._openerService,i,e.isTrusted),disposables:t}}}};s6._ttpTokenizer=T6("tokenizeToString",{createHTML(n){return n}});s6=xwt([c9e(1,$r),c9e(2,ac)],s6);function Lwt(n,e,t){return gIe(this,void 0,void 0,function*(){try{return yield n.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Swt(t)})}catch(i){return $n(i),!1}})}function Swt(n){return n===!0?!0:n&&Array.isArray(n.enabledCommands)?n.enabledCommands:!1}const d9e=at;class Dv extends Pe{constructor(e,t,i){super(),this._renderDisposeables=this._register(new st),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new oIe),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new s6({editor:this._editor},t,i)),this._computer=new Dwt(this._editor),this._hoverOperation=this._register(new sIe(this._editor,this._computer)),this._register(this._hoverOperation.onResult(r=>{this._withResult(r.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(48)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Dv.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_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,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const r of t){const o=d9e("div.hover-row.markdown-hover"),s=Ge(o,d9e("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(r.value));s.appendChild(a.element),i.appendChild(o)}this._updateContents(i),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 t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),r=this._editor.getScrollTop(),o=this._editor.getOption(64),s=this._hover.containerDomNode.clientHeight,a=i-r-(s-o)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}Dv.ID="editor.contrib.modesGlyphHoverWidget";class Dwt{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}constructor(e){this._editor=e,this._lineNumber=-1}computeSync(){const e=r=>({value:r}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const r of t){if(!r.options.glyphMarginClassName)continue;const o=r.options.glyphMarginHoverMessage;!o||rQ(o)||i.push(...Wae(o).map(e))}return i}}var Ewt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class kwt{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function Mwt(n,e,t,i,r){return Ewt(this,void 0,void 0,function*(){try{const o=yield Promise.resolve(n.provideHover(t,i,r));if(o&&Nwt(o))return new kwt(n,o,e)}catch(o){Cs(o)}})}function Cce(n,e,t,i){const o=n.ordered(e).map((s,a)=>Mwt(s,a,e,t,i));return Zo.fromPromises(o).coalesce()}function Awt(n,e,t,i){return Cce(n,e,t,i).map(r=>r.hover).toPromise()}r3("_executeHoverProvider",(n,e,t)=>{const i=n.get(Vt);return Awt(i.hoverProvider,e,t,Jn.None)});function Nwt(n){const e=typeof n.range<"u",t=typeof n.contents<"u"&&n.contents&&n.contents.length>0;return e&&t}var Owt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},fN=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const h9e=at;class A2{constructor(e,t,i,r,o){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=r,this.ordinal=o}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let HH=class{constructor(e,t,i,r,o){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=r,this._languageFeaturesService=o,this.hoverOrdinal=3}createLoadingMessage(e){return new A2(this,e.range,[new Gl().appendText(w("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),r=e.range.startLineNumber,o=i.getLineMaxColumn(r),s=[];let a=1e3;const l=i.getLineLength(r),u=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(113),d=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:u});let h=!1;c>=0&&l>c&&e.range.startColumn>=c&&(h=!0,s.push(new A2(this,e.range,[{value:w("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!h&&typeof d=="number"&&l>=d&&s.push(new A2(this,e.range,[{value:w("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let f=!1;for(const g of t){const T=g.range.startLineNumber===r?g.range.startColumn:1,v=g.range.endLineNumber===r?g.range.endColumn:o,Q=g.options.hoverMessage;if(!Q||rQ(Q))continue;g.options.beforeContentClassName&&(f=!0);const b=new G(e.range.startLineNumber,T,e.range.startLineNumber,v);s.push(new A2(this,b,Wae(Q),f,a++))}return s}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return Zo.EMPTY;const r=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(r))return Zo.EMPTY;const o=new De(e.range.startLineNumber,e.range.startColumn);return Cce(this._languageFeaturesService.hoverProvider,r,o,i).filter(s=>!rQ(s.hover.contents)).map(s=>{const a=s.hover.range?G.lift(s.hover.range):e.range;return new A2(this,a,s.hover.contents,!1,s.ordinal)})}renderHoverParts(e,t){return TIe(e,t,this._editor,this._languageService,this._openerService)}};HH=Owt([fN(1,$r),fN(2,ac),fN(3,bi),fN(4,Vt)],HH);function TIe(n,e,t,i,r){e.sort((s,a)=>s.ordinal-a.ordinal);const o=new st;for(const s of e)for(const a of s.contents){if(rQ(a))continue;const l=h9e("div.hover-row.markdown-hover"),u=Ge(l,h9e("div.hover-contents")),c=o.add(new s6({editor:t},i,r));o.add(c.onDidRenderAsync(()=>{u.className="hover-contents code-hover-contents",n.onContentsChanged()}));const d=o.add(c.render(a));u.appendChild(d.element),n.fragment.appendChild(l)}return o}var vIe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},PH=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};class f9e{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let ore=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new xe,this.onDidChange=this._onDidChange.event,this._dispoables=new st,this._markers=[],this._nextIdx=-1,on.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const r=this._configService.getValue("problems.sortOrder"),o=(a,l)=>{let u=eL(a.resource.toString(),l.resource.toString());return u===0&&(r==="position"?u=G.compareRangesUsingStarts(a,l)||ro.compare(a.severity,l.severity):u=ro.compare(a.severity,l.severity)||G.compareRangesUsingStarts(a,l)),u},s=()=>{this._markers=this._markerService.read({resource:on.isUri(e)?e:void 0,severities:ro.Error|ro.Warning|ro.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(s(),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 f9e(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let r=!1,o=this._markers.findIndex(s=>s.resource.toString()===e.uri.toString());o<0&&(o=Kx(this._markers,{resource:e.uri},(s,a)=>eL(s.resource.toString(),a.resource.toString())),o<0&&(o=~o));for(let s=o;sr.resource.toString()===e.toString());if(!(i<0)){for(;i=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},O9=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};class Rwt{constructor(e,t,i,r,o){this._openerService=r,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new st,this._editor=t;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(es(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new uMe(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{s.style.left=`-${a.scrollLeft}px`,s.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){$i(this._disposables)}update(e){const{source:t,message:i,relatedInformation:r,code:o}=e;let s=((t==null?void 0:t.length)||0)+2;o&&(typeof o=="string"?s+=o.length:s+=o.value.length);const a=Fh(i);this._lines=a.length,this._longestLineLength=0;for(const h of a)this._longestLineLength=Math.max(h.length+s,this._longestLineLength);ys(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||o){const h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(o)if(typeof o=="string"){const f=document.createElement("span");f.innerText=`(${o})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=at("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=g=>{this._openerService.open(o.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()};const f=Ge(this._codeLink,at("span"));f.innerText=o.value,h.appendChild(this._codeLink)}}if(ys(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),sl(r)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(64)*.66)}px`,this._lines+=1;for(const f of r){const g=document.createElement("div"),T=document.createElement("a");T.classList.add("filename"),T.innerText=`${this._labelService.getUriBasenameLabel(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,T.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(T,f);const v=document.createElement("span");v.innerText=f.message,g.appendChild(T),g.appendChild(v),this._lines+=1,h.appendChild(g)}}const u=this._editor.getOption(48),c=Math.ceil(u.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=u.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case ro.Error:t=w("Error","Error");break;case ro.Warning:t=w("Warning","Warning");break;case ro.Info:t=w("Info","Info");break;case ro.Hint:t=w("Hint","Hint");break}let i=w("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const r=this._editor.getModel();return r&&e.startLineNumber<=r.getLineCount()&&e.startLineNumber>=1&&(i=`${r.getLineContent(e.startLineNumber)}, ${i}`),i}}let TQ=class bIe extends AH{constructor(e,t,i,r,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=r,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new st,this._onDidSelectRelatedInformation=new xe,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=ro.Warning,this._backgroundColor=Re.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Fwt);let t=lre,i=Hwt;this._severity===ro.Warning?(t=TI,i=Pwt):this._severity===ro.Info&&(t=ure,i=Vwt);const r=e.getColor(t),o=e.getColor(i);this.style({arrowColor:r,frameColor:r,headerBackgroundColor:o,primaryHeadingColor:e.getColor($Oe),secondaryHeadingColor:e.getColor(jOe)})}_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(r=>this.editor.focus()));const t=[],i=this._menuService.createMenu(bIe.TitleMenu,this._contextKeyService);ZAe(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=Ge(e,at(""))}_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 Rwt(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const r=G.lift(e),o=this.editor.getPosition(),s=o&&r.containsPosition(o)?o:r.getStartPosition();super.show(s,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?w("problems","{0} of {1} problems",t,i):w("change","{0} of {1} problem",t,i);this.setTitle(V1(a.uri),l)}this._icon.className=`codicon ${are.className(ro.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(s,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,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),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()}};TQ.TitleMenu=new se("gotoErrorTitleMenu");TQ=Iwt([O9(1,Vs),O9(2,ac),O9(3,i3),O9(4,Sn),O9(5,_n),O9(6,oQ)],TQ);const p9e=dL(Th,Q4t),g9e=dL(Oc,cL),m9e=dL(Ic,tne),lre=de("editorMarkerNavigationError.background",{dark:p9e,light:p9e,hcDark:ri,hcLight:ri},w("editorMarkerNavigationError","Editor marker navigation widget error color.")),Hwt=de("editorMarkerNavigationError.headerBackground",{dark:Xt(lre,.1),light:Xt(lre,.1),hcDark:null,hcLight:null},w("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),TI=de("editorMarkerNavigationWarning.background",{dark:g9e,light:g9e,hcDark:ri,hcLight:ri},w("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Pwt=de("editorMarkerNavigationWarning.headerBackground",{dark:Xt(TI,.1),light:Xt(TI,.1),hcDark:"#0C141F",hcLight:Xt(TI,.2)},w("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ure=de("editorMarkerNavigationInfo.background",{dark:m9e,light:m9e,hcDark:ri,hcLight:ri},w("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Vwt=de("editorMarkerNavigationInfo.headerBackground",{dark:Xt(ure,.1),light:Xt(ure,.1),hcDark:null,hcLight:null},w("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Fwt=de("editorMarkerNavigation.background",{dark:Is,light:Is,hcDark:Is,hcLight:Is},w("editorMarkerNavigationBackground","Editor marker navigation widget background."));var Bwt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},pN=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},yIe=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let r7=class vI{static get(e){return e.getContribution(vI.ID)}constructor(e,t,i,r,o){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=r,this._instantiationService=o,this._sessionDispoables=new st,this._editor=e,this._widgetVisible=_Ie.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 t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(TQ,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(i=>{var r,o,s;(!(!((r=this._model)===null||r===void 0)&&r.selected)||!G.containsPosition((o=this._model)===null||o===void 0?void 0:o.selected.marker,i.position))&&((s=this._model)===null||s===void 0||s.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:G.lift(i).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 t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new De(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){var i,r;return yIe(this,void 0,void 0,function*(){if(this._editor.hasModel()){const o=this._getOrCreateModel(t?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 s=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&((i=vI.get(s))===null||i===void 0||i.close(),(r=vI.get(s))===null||r===void 0||r.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}})}};r7.ID="editor.contrib.markerController";r7=Bwt([pN(1,QIe),pN(2,_n),pN(3,Mi),pN(4,Sn)],r7);class JF extends Ot{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return yIe(this,void 0,void 0,function*(){t.hasModel()&&((i=r7.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))})}}class kf extends JF{constructor(){super(!0,!1,{id:kf.ID,label:kf.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:oe.focus,primary:578,weight:100},menuOpts:{menuId:TQ.TitleMenu,title:kf.LABEL,icon:Eo("marker-navigation-next",_t.arrowDown,w("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}kf.ID="editor.action.marker.next";kf.LABEL=w("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Wg extends JF{constructor(){super(!1,!1,{id:Wg.ID,label:Wg.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:oe.focus,primary:1602,weight:100},menuOpts:{menuId:TQ.TitleMenu,title:Wg.LABEL,icon:Eo("marker-navigation-previous",_t.arrowUp,w("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Wg.ID="editor.action.marker.prev";Wg.LABEL=w("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class $wt extends JF{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:w("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:oe.focus,primary:66,weight:100},menuOpts:{menuId:se.MenubarGoMenu,title:w({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class jwt extends JF{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:w("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:oe.focus,primary:1090,weight:100},menuOpts:{menuId:se.MenubarGoMenu,title:w({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}yi(r7.ID,r7,4);dt(kf);dt(Wg);dt($wt);dt(jwt);const _Ie=new It("markersNavigationVisible",!1),Wwt=Ps.bindToContribution(r7.get);vt(new Wwt({id:"closeMarkersNavigation",precondition:_Ie,handler:n=>n.close(),kbOpts:{weight:100+50,kbExpr:oe.focus,primary:9,secondary:[1033]}}));var zwt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},YZ=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};const ud=at;class Uwt{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const T9e={type:1,filter:{include:Mn.QuickFix},triggerAction:Gc.QuickFixHover};let cre=class{constructor(e,t,i,r){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=r,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),r=e.range.startLineNumber,o=i.getLineMaxColumn(r),s=[];for(const a of t){const l=a.range.startLineNumber===r?a.range.startColumn:1,u=a.range.endLineNumber===r?a.range.endColumn:o,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const d=new G(e.range.startLineNumber,l,e.range.startLineNumber,u);s.push(new Uwt(this,d,c))}return s}renderHoverParts(e,t){if(!t.length)return Pe.None;const i=new st;t.forEach(o=>e.fragment.appendChild(this.renderMarkerHover(o,i)));const r=t.length===1?t[0]:t.sort((o,s)=>ro.compare(o.marker.severity,s.marker.severity))[0];return this.renderMarkerStatusbar(e,r,i),i}renderMarkerHover(e,t){const i=ud("div.hover-row"),r=Ge(i,ud("div.marker.hover-contents")),{source:o,message:s,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(r);const u=Ge(r,ud("span"));if(u.style.whiteSpace="pre-wrap",u.innerText=s,o||a)if(a&&typeof a!="string"){const c=ud("span");if(o){const g=Ge(c,ud("span"));g.innerText=o}const d=Ge(c,ud("a.code-link"));d.setAttribute("href",a.target.toString()),t.add(Ye(d,"click",g=>{this._openerService.open(a.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()}));const h=Ge(d,ud("span"));h.innerText=a.value;const f=Ge(r,c);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{const c=Ge(r,ud("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=o&&a?`${o}(${a})`:o||`(${a})`}if(sl(l))for(const{message:c,resource:d,startLineNumber:h,startColumn:f}of l){const g=Ge(r,ud("div"));g.style.marginTop="8px";const T=Ge(g,ud("a"));T.innerText=`${V1(d)}(${h}, ${f}): `,T.style.cursor="pointer",t.add(Ye(T,"click",Q=>{Q.stopPropagation(),Q.preventDefault(),this._openerService&&this._openerService.open(d,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:f}}}).catch($n)}));const v=Ge(g,ud("span"));v.innerText=c,this._editor.applyFontInfo(v)}return i}renderMarkerStatusbar(e,t,i){if((t.marker.severity===ro.Error||t.marker.severity===ro.Warning||t.marker.severity===ro.Info)&&e.statusBar.addAction({label:w("view problem","View Problem"),commandId:kf.ID,run:()=>{var r;e.hide(),(r=r7.get(this._editor))===null||r===void 0||r.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(88)){const r=e.statusBar.append(ud("div"));this.recentMarkerCodeActionsInfo&&(TH.makeKey(this.recentMarkerCodeActionsInfo.marker)===TH.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(r.textContent=w("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?Pe.None:i.add(Uf(()=>r.textContent=w("checkingForQuickFixes","Checking for quick fixes..."),200));r.textContent||(r.textContent=String.fromCharCode(160));const s=this.getCodeActions(t.marker);i.add(Bn(()=>s.cancel())),s.then(a=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),r.textContent=w("noQuickFixes","No quick fixes available");return}r.style.display="none";let l=!1;i.add(Bn(()=>{l||a.dispose()})),e.statusBar.addAction({label:w("quick fixes","Quick Fix..."),commandId:ace,run:u=>{l=!0;const c=g8.get(this._editor),d=Os(u);e.hide(),c==null||c.showCodeActions(T9e,a,{x:d.left,y:d.top,width:d.width,height:d.height})}})},$n)}}getCodeActions(e){return bs(t=>cce(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new G(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),T9e,em.None,t))}};cre=zwt([YZ(1,Dle),YZ(2,ac),YZ(3,Vt)],cre);let qwt;function o7(){return qwt}let CIe;function Gwt(n){CIe=n}class wIe{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e){return CIe(()=>{const t=wce(e);return t!==void 0?t:`${this.debugName} (mapped)`},t=>e(this.read(t),t))}}class OD extends wIe{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),t===0&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function _u(n,e){var t,i;const r=new xIe(n,e);try{(t=o7())===null||t===void 0||t.handleBeginTransaction(r),n(r)}finally{r.finish(),(i=o7())===null||i===void 0||i.handleEndTransaction()}}function v9e(n,e,t){n?e(n):_u(e,t)}class xIe{constructor(e,t){this.fn=e,this._getDebugName=t,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():wce(this.fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){const e=this.updatingObservers;this.updatingObservers=null;for(const{observer:t,observable:i}of e)t.endUpdate(i)}}function wce(n){const e=n.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(e),r=i?i[1]:void 0;return r==null?void 0:r.trim()}function vQ(n,e){return new LIe(n,e)}class LIe extends OD{constructor(e,t){super(),this.debugName=e,this._value=t}get(){return this._value}set(e,t,i){var r;if(this._value===e)return;let o;t||(t=o=new xIe(()=>{},()=>`Setting ${this.debugName}`));try{const s=this._value;this._setValue(e),(r=o7())===null||r===void 0||r.handleObservableChanged(this,{oldValue:s,newValue:e,change:i,didChange:!0});for(const a of this.observers)t.updateObserver(a,this),a.handleChange(this,i)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function dre(n,e){return new Kwt(n,e)}class Kwt extends LIe{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;(e=this._value)===null||e===void 0||e.dispose()}}function vd(n,e){return new SIe(n,e,void 0,void 0)}function Zwt(n,e,t){return new SIe(n,t,e.createEmptyChangeSummary,e.handleChange)}Gwt(vd);class SIe extends OD{get debugName(){return typeof this._debugName=="function"?this._debugName():this._debugName}constructor(e,t,i,r){var o,s;super(),this._debugName=e,this.computeFn=t,this.createChangeSummary=i,this._handleChange=r,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=o7())===null||s===void 0||s.handleDerivedCreated(this)}onLastObserverRemoved(){this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}get(){var e;if(this.observers.size===0){const t=this.computeFn(this,(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){this.state=3;for(const t of this.dependencies)if(t.reportChanges(),this.state===2)break}this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var e,t;if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const r=this.state!==0,o=this.value;this.state=3;const s=this.changeSummary;this.changeSummary=(e=this.createChangeSummary)===null||e===void 0?void 0:e.call(this);try{this.value=this.computeFn(this,s)}finally{for(const l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}const a=r&&o!==this.value;if((t=o7())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:a}),a)for(const l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(const i of this.observers)i.handlePossibleChange(this);if(t)for(const i of this.observers)i.beginUpdate(this)}endUpdate(e){if(this.updateCount--,this.updateCount===0){const t=[...this.observers];for(const i of t)i.endUpdate(this)}if(this.updateCount<0)throw new ha}handlePossibleChange(e){if(this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const t of this.observers)t.handlePossibleChange(this)}}handleChange(e,t){if(this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){const i=this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:o=>o===e},this.changeSummary):!0,r=this.state===3;if(i&&(this.state===1||r)&&(this.state=2,r))for(const o of this.observers)o.handlePossibleChange(this)}}readObservable(e){e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}addObserver(e){const t=!this.observers.has(e)&&this.updateCount>0;super.addObserver(e),t&&e.beginUpdate(this)}removeObserver(e){const t=this.observers.has(e)&&this.updateCount>0;super.removeObserver(e),t&&e.endUpdate(this)}}function oc(n,e){return new DIe(n,e,void 0,void 0)}function Xwt(n,e){return Ywt(e,n)}function Ywt(n,e){const t=new st,i=oc(e,r=>{t.clear(),n(r,t)});return Bn(()=>{i.dispose(),t.dispose()})}class DIe{constructor(e,t,i,r){var o,s;this.debugName=e,this.runFn=t,this.createChangeSummary=i,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(s=o7())===null||s===void 0||s.handleAutorunCreated(this),this._runIfNeeded()}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear()}_runIfNeeded(){var e,t;if(this.state===3)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i,this.state=3,(e=o7())===null||e===void 0||e.handleAutorunTriggered(this);try{const r=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this),this.runFn(this,r)}finally{for(const r of this.dependenciesToBeRemoved)r.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,SV(()=>this.updateCount>=0)}handlePossibleChange(e){this.state===3&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this.state=1)}handleChange(e,t){this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)&&(this._handleChange?this._handleChange({changedObservable:e,change:t,didChange:r=>r===e},this.changeSummary):!0)&&(this.state=2)}readObservable(e){if(this.disposed)return e.get();e.addObserver(this);const t=e.get();return this.dependencies.add(e),this.dependenciesToBeRemoved.delete(e),t}}(function(n){n.Observer=DIe})(oc||(oc={}));function EIe(n){return new Jwt(n)}class Jwt extends wIe{constructor(e){super(),this.value=e}get debugName(){return this.toString()}get(){return this.value}addObserver(e){}removeObserver(e){}toString(){return`Const: ${this.value}`}}function af(n,e){return new kIe(n,e)}class kIe extends OD{constructor(e,t){super(),this.event=e,this.getValue=t,this.hasValue=!1,this.handleEvent=i=>{var r;const o=this.getValue(i),s=!this.hasValue||this.value!==o;(r=o7())===null||r===void 0||r.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:o,change:void 0,didChange:s}),s&&(this.value=o,this.hasValue&&_u(a=>{for(const l of this.observers)a.updateObserver(l,this),l.handleChange(this,void 0)},()=>{const a=this.getDebugName();return"Event fired"+(a?`: ${a}`:"")}),this.hasValue=!0)}}getDebugName(){return wce(this.getValue)}get debugName(){const e=this.getDebugName();return"From Event"+(e?`: ${e}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this.getValue(void 0)}}(function(n){n.Observer=kIe})(af||(af={}));function ext(n,e){return new txt(n,e)}class txt extends OD{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{_u(i=>{for(const r of this.observers)i.updateObserver(r,this),r.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function nxt(n){return new ixt(n)}class ixt extends OD{constructor(e){super(),this.debugName=e}trigger(e,t){if(!e){_u(i=>{this.trigger(i,t)},()=>`Trigger signal ${this.debugName}`);return}for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t)}get(){}}function rxt(n,e){const t=new oxt(e!=null?e:!1);return n.addObserver(t),e&&n.reportChanges(),Bn(()=>{n.removeObserver(t)})}class oxt{constructor(e){this.forceRecompute=e,this.counter=0}beginUpdate(e){this.counter++}endUpdate(e){this.counter--,this.counter===0&&this.forceRecompute&&e.reportChanges()}handlePossibleChange(e){}handleChange(e,t){}}const MIe="editor.action.inlineSuggest.commit",AIe="editor.action.inlineSuggest.showPrevious",NIe="editor.action.inlineSuggest.showNext";var sxt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};class axt extends Pe{constructor(e,t,i={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new U1t),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new st,this.options=i,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new JL(()=>{var r;return(r=this.toggleMenuActionViewItem)===null||r===void 0?void 0:r.show()},i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new F1(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,actionViewItemProvider:(r,o)=>{var s;if(r.id===JL.ID)return this.toggleMenuActionViewItem=new cH(r,r.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:dn.asClassNameArray((s=i.moreIcon)!==null&&s!==void 0?s:_t.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(i.actionViewItemProvider){const a=i.actionViewItemProvider(r,o);if(a)return a}if(r instanceof Zv){const a=new cH(r,r.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:r.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement});return a.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(a),this.disposables.add(this._onDidChangeDropdownVisibility.add(a.onDidChangeVisibility)),a}}}))}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,t){this.clear();const i=e?e.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),i.push(this.toggleMenuAction)),i.forEach(r=>{this.actionBar.push(r,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(r)})})}getKeybindingLabel(e){var t,i;const r=this.lookupKeybindings?(i=(t=this.options).getKeyBinding)===null||i===void 0?void 0:i.call(t,e):void 0;return da(r==null?void 0:r.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}class JL extends nc{constructor(e,t){t=t||w("moreActions","More Actions..."),super(JL.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}run(){return sxt(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}JL.ID="toolbar.toggle.more";var lxt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tC=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let hre=class extends axt{constructor(e,t,i,r,o,s,a){super(e,o,Object.assign(Object.assign({getKeyBinding:l=>{var u;return(u=s.lookupKeybinding(l.id))!==null&&u!==void 0?u:void 0}},t),{allowContextMenu:!0})),this._options=t,this._menuService=i,this._contextKeyService=r,this._contextMenuService=o,this._sessionDisposables=this._store.add(new st),t!=null&&t.telemetrySource&&this._store.add(this.actionBar.onDidRun(l=>a.publicLog2("workbenchActionExecuted",{id:l.action.id,from:t.telemetrySource})))}setActions(e,t=[],i){var r,o,s;this._sessionDisposables.clear();const a=e.slice(),l=t.slice(),u=[];let c=0;const d=[];let h=!1;if(((r=this._options)===null||r===void 0?void 0:r.hiddenItemStrategy)!==-1)for(let f=0;f=this._options.maxNumberOfItems&&(a[g]=void 0,d[g]=T)}}H7e(a),H7e(d),super.setActions(a,ea.join(d,l)),u.length>0&&this._sessionDisposables.add(Ye(this.getElement(),"contextmenu",f=>{var g,T,v,Q;const b=this.getItemAction(f.target);if(!b)return;f.preventDefault(),f.stopPropagation();let _=!1;if(c===1&&((g=this._options)===null||g===void 0?void 0:g.hiddenItemStrategy)===0){_=!0;for(let S=0;Sthis._menuService.resetHiddenStates(i)}))),this._contextMenuService.showContextMenu({getAnchor:()=>f,getActions:()=>L,menuId:(v=this._options)===null||v===void 0?void 0:v.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(Q=this._options)===null||Q===void 0?void 0:Q.menuOptions),contextKeyService:this._contextKeyService})}))}};hre=lxt([tC(2,i3),tC(3,_n),tC(4,Ud),tC(5,Ir),tC(6,Jc)],hre);var xce=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},N2=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let fre=class extends Pe{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=af(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(60).showToolbar==="always"),this.sessionPosition=void 0,this.position=vd("position",r=>{var o,s,a;const l=(o=this.model.read(r))===null||o===void 0?void 0:o.ghostText.read(r);if(!this.alwaysShowToolbar.read(r)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;const u=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);const c=new De(l.lineNumber,Math.min(u,(a=(s=this.sessionPosition)===null||s===void 0?void 0:s.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(Xwt("setup content widget",(r,o)=>{const s=this.model.read(r);if(!s||!this.alwaysShowToolbar.read(r))return;const a=o.add(this.instantiationService.createInstance(s7,this.editor,!0,this.position,s.selectedInlineCompletionIndex,s.inlineCompletionsCount,s.selectedInlineCompletion.map(l=>{var u;return(u=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&u!==void 0?u:[]})));e.addContentWidget(a),o.add(Bn(()=>e.removeContentWidget(a))),o.add(oc("request explicit",l=>{!this.position.read(l)||s.lastTriggerKind.read(l)!==P4.Explicit&&s.triggerExplicitly()}))}))}};fre=xce([N2(2,Sn)],fre);const uxt=Eo("inline-suggestion-hints-next",_t.chevronRight,w("parameterHintsNextIcon","Icon for show next parameter hint.")),cxt=Eo("inline-suggestion-hints-previous",_t.chevronLeft,w("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let s7=class pre extends Pe{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const r=new nc(e,t,i,!0,()=>this._commandService.executeCommand(e)),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return o&&(s=w({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,o.getLabel())),r.tooltip=s,r}constructor(e,t,i,r,o,s,a,l,u,c,d){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=r,this._suggestionCount=o,this._extraCommands=s,this._commandService=a,this.keybindingService=u,this._contextKeyService=c,this._menuService=d,this.id=`InlineSuggestionHintsContentWidget${pre.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=vw("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[vw("div",{style:{display:"flex"}},[vw("div@actionBar",{className:"custom-actions"}),vw("div@toolBar")])]),this.previousAction=this.createCommandAction(AIe,w("previous","Previous"),dn.asClassName(cxt)),this.availableSuggestionCountAction=new nc("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(NIe,w("next","Next"),dn.asClassName(uxt)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(se.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Qr(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Qr(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[];const h=this._register(new F1(this.nodes.actionBar));h.push(this.previousAction,{icon:!0,label:!1}),h.push(this.availableSuggestionCountAction),h.push(this.nextAction,{icon:!0,label:!1}),this.toolBar=this._register(l.createInstance(gre,this.nodes.toolBar,se.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:f=>f.startsWith("primary")},actionViewItemProvider:(f,g)=>f instanceof Hd?l.createInstance(dxt,f,void 0):void 0,telemetrySource:"InlineSuggestionToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility(f=>{pre._dropDownVisible=f})),this._register(oc("update position",f=>{this._position.read(f),this.editor.layoutContentWidget(this)})),this._register(oc("counts",f=>{const g=this._suggestionCount.read(f),T=this._currentSuggestionIdx.read(f);g!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${T+1}/${g}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),g!==void 0&&g>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(oc("extra commands",f=>{const g=this._extraCommands.read(f);if(Oa(this.lastCommands,g))return;this.lastCommands=g;const T=g.map(v=>({class:void 0,id:v.id,enabled:!0,tooltip:v.tooltip||"",label:v.title,run:Q=>this._commandService.executeCommand(v.id)}));for(const[v,Q]of this.inlineCompletionsActionsMenus.getActions())for(const b of Q)b instanceof Hd&&T.push(b);T.length>0&&T.unshift(new ea),this.toolBar.setAdditionalSecondaryActions(T)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};s7._dropDownVisible=!1;s7.id=0;s7=xce([N2(6,Qo),N2(7,Sn),N2(8,Ir),N2(9,_n),N2(10,i3)],s7);class dxt extends s8{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=vw("div.keybinding").root;new yD(t,Ac,Object.assign({disableTitle:!0},Svt)).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let gre=class extends hre{constructor(e,t,i,r,o,s,a,l){super(e,Object.assign({resetMenu:t},i),r,o,s,a,l),this.menuId=t,this.options2=i,this.menuService=r,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,t,i,r,o,s,a;const l=[],u=[];ZAe(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:u},(i=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||i===void 0?void 0:i.primaryGroup,(o=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||o===void 0?void 0:o.shouldInlineSubmenu,(a=(s=this.options2)===null||s===void 0?void 0:s.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),u.push(...this.additionalActions),this.setActions(l,u)}setAdditionalSecondaryActions(e){Oa(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};gre=xce([N2(3,i3),N2(4,_n),N2(5,Ud),N2(6,Ir),N2(7,Jc)],gre);var hxt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},gN=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let ru=class OIe{static get(e){return e.getContribution(OIe.ID)}constructor(e,t,i,r,o){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=r,this._keybindingService=o,this._toUnhook=new st,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(s=>{s.hasChanged(58)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(58);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(i=>this._onEditorMouseLeave(i))),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target;if(t.type===9&&t.detail===jg.ID){this._hoverClicked=!0;return}t.type===12&&t.detail===Dv.ID||(t.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseLeave(e){var t;const i=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.containsNode(i)||this._hideWidgets()}_onEditorMouseMove(e){var t,i,r,o,s,a,l,u;const c=e.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&c.type===9&&c.detail===jg.ID||this._isHoverSticky&&((t=this._contentWidget)===null||t===void 0?void 0:t.containsNode((i=e.event.browserEvent.view)===null||i===void 0?void 0:i.document.activeElement))&&!(!((o=(r=e.event.browserEvent.view)===null||r===void 0?void 0:r.getSelection())===null||o===void 0)&&o.isCollapsed)||!this._isHoverSticky&&c.type===9&&c.detail===jg.ID&&((s=this._contentWidget)===null||s===void 0?void 0:s.isColorPickerVisible())||this._isHoverSticky&&c.type===12&&c.detail===Dv.ID||this._isHoverSticky&&((a=this._contentWidget)===null||a===void 0?void 0:a.isVisibleFromKeyboard()))return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(l=this._glyphWidget)===null||l===void 0||l.hide();return}if(c.type===2&&c.position){(u=this._contentWidget)===null||u===void 0||u.hide(),this._glyphWidget||(this._glyphWidget=new Dv(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(c.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),r=i.kind===1||i.kind===2&&i.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible());e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&!r&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||s7.dropDownVisible||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(OH,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i,r){this._getOrCreateContentWidget().startShowingAtRange(e,t,i,r)}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,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};ru.ID="editor.contrib.hover";ru=hxt([gN(1,Sn),gN(2,ac),gN(3,$r),gN(4,Ir)],ru);class fxt extends Ot{constructor(){super({id:"editor.action.showHover",label:w({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:oe.editorTextFocus,primary:ws(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const r=ru.get(t);if(!r)return;const o=t.getPosition(),s=new G(o.lineNumber,o.column,o.lineNumber,o.column),a=t.getOption(2)===2||!!(i!=null&&i.focus);r.isHoverVisible()?r.focus():r.showContentHover(s,1,1,a)}}class pxt extends Ot{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:w({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,t){const i=ru.get(t);if(!i)return;const r=t.getPosition();if(!r)return;const o=new G(r.lineNumber,r.column,r.lineNumber,r.column),s=m8.get(t);if(!s)return;s.startFindDefinitionFromCursor(r).then(()=>{i.showContentHover(o,1,1,!0)})}}class gxt extends Ot{constructor(){super({id:"editor.action.scrollUpHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:16,weight:100}})}run(e,t){const i=ru.get(t);!i||i.scrollUp()}}class mxt extends Ot{constructor(){super({id:"editor.action.scrollDownHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:18,weight:100}})}run(e,t){const i=ru.get(t);!i||i.scrollDown()}}class Txt extends Ot{constructor(){super({id:"editor.action.scrollLeftHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:15,weight:100}})}run(e,t){const i=ru.get(t);!i||i.scrollLeft()}}class vxt extends Ot{constructor(){super({id:"editor.action.scrollRightHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:17,weight:100}})}run(e,t){const i=ru.get(t);!i||i.scrollRight()}}class Qxt extends Ot{constructor(){super({id:"editor.action.pageUpHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=ru.get(t);!i||i.pageUp()}}class bxt extends Ot{constructor(){super({id:"editor.action.pageDownHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=ru.get(t);!i||i.pageDown()}}class yxt extends Ot{constructor(){super({id:"editor.action.goToTopHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=ru.get(t);!i||i.goToTop()}}class _xt extends Ot{constructor(){super({id:"editor.action.goToBottomHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=ru.get(t);!i||i.goToBottom()}}class Cxt extends Ot{constructor(){super({id:"editor.action.escapeFocusHover",label:w({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:oe.hoverFocused,kbOpts:{kbExpr:oe.hoverFocused,primary:9,weight:100}})}run(e,t){const i=ru.get(t);!i||i.escape()}}yi(ru.ID,ru,2);dt(fxt);dt(pxt);dt(gxt);dt(mxt);dt(Txt);dt(vxt);dt(Qxt);dt(bxt);dt(yxt);dt(_xt);dt(Cxt);lm.register(HH);lm.register(cre);jd((n,e)=>{const t=n.getColor(O4t);t&&(e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${t.transparent(.5)}; }`))});class mre extends Pe{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=e.target;if(t.type!==6||!t.detail.injectedText||t.detail.injectedText.options.attachedData!==MOe||!t.range)return;const i=this._editor.getContribution(ru.ID);if(!!i&&!i.isColorPickerVisible()){const r=new G(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(r,1,0,!1)}}}mre.ID="editor.contrib.colorContribution";yi(mre.ID,mre,2);lm.register(MH);var IIe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},D2=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},Q9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let a7=class RIe extends Pe{constructor(e,t,i,r,o,s,a){super(),this._editor=e,this._modelService=i,this._keybindingService=r,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=oe.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=oe.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;!this._editor.hasModel()||(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new VH(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(RIe.ID)}};a7.ID="editor.contrib.standaloneColorPickerController";a7=IIe([D2(1,_n),D2(2,Kr),D2(3,Ir),D2(4,Sn),D2(5,Vt),D2(6,br)],a7);yi(a7.ID,a7,1);const b9e=8,wxt=22;let VH=class HIe extends Pe{constructor(e,t,i,r,o,s,a,l){var u;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=a,this._languageConfigurationService=l,this.body=document.createElement("div"),this._position=void 0,this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new xe),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=r.createInstance(qL,this._editor),this._position=(u=this._editor._getViewModel())===null||u===void 0?void 0:u.getPrimaryCursorState().viewState.position;const c=this._editor.getSelection(),d=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register($h(this.body));this._register(h.onDidBlur(f=>{this.hide()})),this._register(h.onDidFocus(f=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(f=>{var g;const T=(g=f.target.element)===null||g===void 0?void 0:g.classList;T&&T.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(f=>{this._render(f.value,f.foundInEditor)})),this._start(d),this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return HIe.ID}getDomNode(){return this.body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(58).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this.body.focus()}_start(e){return Q9e(this,void 0,void 0,function*(){const t=yield this._computeAsync(e);!t||this._onResult.fire(new xxt(t.result,t.foundInEditor))})}_computeAsync(e){return Q9e(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=yield this._standaloneColorPickerParticipant.createColorHover(t,new hce(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null})}_render(e,t){const i=document.createDocumentFragment(),r=this._register(new IH(this._keybindingService));let o;const s={fragment:i,statusBar:r,setColorPicker:T=>o=T,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(s,[e])),o===void 0)return;this.body.classList.add("standalone-colorpicker-body"),this.body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this.body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this.body.tabIndex=0,this.body.appendChild(i),o.layout();const a=o.body,l=a.saturationBox.domNode.clientWidth,u=a.domNode.clientWidth-l-wxt-b9e,c=o.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const d=o.header,h=d.pickedColorNode;h.style.width=l+b9e+"px";const f=d.originalColorNode;f.style.width=u+"px";const g=o.header.closeButton;g==null||g.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};VH.ID="editor.contrib.standaloneColorPickerWidget";VH=IIe([D2(3,Sn),D2(4,Kr),D2(5,Ir),D2(6,Vt),D2(7,br)],VH);class xxt{constructor(e,t){this.value=e,this.foundInEditor=t}}class Lxt extends q8{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:w("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:w({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker"),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:se.CommandPalette}]})}runEditorCommand(e,t){var i;(i=a7.get(t))===null||i===void 0||i.showOrFocus()}}class Sxt extends Ot{constructor(){super({id:"editor.action.hideColorPicker",label:w({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:oe.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;(i=a7.get(t))===null||i===void 0||i.hide()}}class Dxt extends Ot{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:w({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:oe.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;(i=a7.get(t))===null||i===void 0||i.insertColor()}}dt(Sxt);dt(Dxt);ps(Lxt);class lf{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const r=t.length,o=e.length;if(i+r>o)return!1;for(let s=0;s=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,r,o,s){const a=e.startLineNumber,l=e.startColumn,u=e.endLineNumber,c=e.endColumn,d=o.getLineContent(a),h=o.getLineContent(u);let f=d.lastIndexOf(t,l-1+t.length),g=h.indexOf(i,c-1-i.length);if(f!==-1&&g!==-1)if(a===u)d.substring(f+t.length,g).indexOf(i)>=0&&(f=-1,g=-1);else{const v=d.substring(f+t.length),Q=h.substring(0,g);(v.indexOf(i)>=0||Q.indexOf(i)>=0)&&(f=-1,g=-1)}let T;f!==-1&&g!==-1?(r&&f+t.length0&&h.charCodeAt(g-1)===32&&(i=" "+i,g-=1),T=lf._createRemoveBlockCommentOperations(new G(a,f+t.length+1,u,g+1),t,i)):(T=lf._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=T.length===1?i:null);for(const v of T)s.addTrackedEditOperation(v.range,v.text)}static _createRemoveBlockCommentOperations(e,t,i){const r=[];return G.isEmpty(e)?r.push(Ur.delete(new G(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(r.push(Ur.delete(new G(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(Ur.delete(new G(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),r}static _createAddBlockCommentOperations(e,t,i,r){const o=[];return G.isEmpty(e)?o.push(Ur.replace(new G(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(Ur.insert(new De(e.startLineNumber,e.startColumn),t+(r?" ":""))),o.push(Ur.insert(new De(e.endLineNumber,e.endColumn),(r?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,r=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,r),s=this.languageConfigurationService.getLanguageConfiguration(o).comments;!s||!s.blockCommentStartToken||!s.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,s.blockCommentStartToken,s.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const r=i[0],o=i[1];return new Ht(r.range.endLineNumber,r.range.endColumn,o.range.startLineNumber,o.range.startColumn)}else{const r=i[0].range,o=this._usedEndToken?-this._usedEndToken.length-1:0;return new Ht(r.endLineNumber,r.endColumn+o,r.endLineNumber,r.endColumn+o)}}}class o4{constructor(e,t,i,r,o,s,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=r,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,i,r){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),s=r.getLanguageConfiguration(o).comments,a=s?s.lineCommentToken:null;if(!a)return null;const l=[];for(let u=0,c=i-t+1;uo?t[l].commentStrOffset=s-1:t[l].commentStrOffset=s}}}class Lce extends Ot{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(br);if(!t.hasModel())return;const r=t.getModel(),o=[],s=r.getOptions(),a=t.getOption(21),l=t.getSelections().map((c,d)=>({selection:c,index:d,ignoreFirstLine:!1}));l.sort((c,d)=>G.compareRangesUsingStarts(c.selection,d.selection));let u=l[0];for(let c=1;c=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Np=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}};let QQ=class PIe{static get(e){return e.getContribution(PIe.ID)}constructor(e,t,i,r,o,s,a,l){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=r,this._keybindingService=o,this._menuService=s,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new st,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(u=>this._onContextMenu(u))),this._toDispose.add(this._editor.onMouseWheel(u=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),d=u.srcElement;d.shadowRoot&&t8(c)===d.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(u=>{!this._editor.getOption(22)||u.keyCode===58&&(u.preventDefault(),u.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 i=!1;for(const r of this._editor.getSelections())if(r.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(22)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?se.SimpleEditorContext:se.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],r=this._menuService.createMenu(t,this._contextKeyService),o=r.getActions({arg:e.uri});r.dispose();for(const s of o){const[,a]=s;let l=0;for(const u of a)if(u instanceof lL){const c=this._getMenuActions(e,u.item.submenu);c.length>0&&(i.push(new Zv(u.id,u.label,c)),l++)}else i.push(u),l++;l&&i.push(new ea)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(58);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const o=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),s=Os(this._editor.getDomNode()),a=s.left+o.left,l=s.top+o.top+o.height;t={x:a,y:l}}const r=this._editor.getOption(123)&&!K2;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:o=>{const s=this._keybindingFor(o);if(s)return new kL(o,o,{label:!0,keybinding:s.getLabel(),isMenu:!0});const a=o;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new kL(o,o,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:o=>this._keybindingFor(o),onHide:o=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||V9t(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(70);let i=0;const r=u=>({id:`menu-action-${++i}`,label:u.label,tooltip:"",class:void 0,enabled:typeof u.enabled>"u"?!0:u.enabled,checked:u.checked,run:u.run}),o=(u,c)=>new Zv(`menu-action-${++i}`,u,c,void 0),s=(u,c,d,h,f)=>{if(!c)return r({label:u,enabled:c,run:()=>{}});const g=v=>()=>{this._configurationService.updateValue(d,v)},T=[];for(const v of f)T.push(r({label:v.label,checked:h===v.value,run:g(v.value)}));return o(u,T)},a=[];a.push(r({label:w("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new ea),a.push(r({label:w("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(s(w("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:w("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:w("context.minimap.size.fill","Fill"),value:"fill"},{label:w("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(s(w("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:w("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:w("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(123)&&!K2;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:u=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};QQ.ID="editor.contrib.contextmenu";QQ=Nxt([Np(1,Ud),Np(2,y6),Np(3,_n),Np(4,Ir),Np(5,i3),Np(6,bi),Np(7,o8)],QQ);class Oxt extends Ot{constructor(){super({id:"editor.action.showContextMenu",label:w("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:oe.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;(i=QQ.get(t))===null||i===void 0||i.showContextMenu()}}yi(QQ.ID,QQ,2);dt(Oxt);class JZ{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let r=0;r{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new JZ(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new eX(i,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 eX(new JZ(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 eX(new JZ(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}}T8.ID="editor.contrib.cursorUndoRedoController";class Ixt extends Ot{constructor(){super({id:"cursorUndo",label:w("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:oe.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var r;(r=T8.get(t))===null||r===void 0||r.cursorUndo()}}class Rxt extends Ot{constructor(){super({id:"cursorRedo",label:w("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var r;(r=T8.get(t))===null||r===void 0||r.cursorRedo()}}yi(T8.ID,T8,0);dt(Ixt);dt(Rxt);class Hxt{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new G(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),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 Ht(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 Ht(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(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),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)||(I9(e)&&(this._modifierPressed=!0),this._mouseDown&&I9(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(33)||this._editor.getOption(20)||(I9(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===$4.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 t=e.target;if(this._dragSelection===null){const r=(this._editor.getSelections()||[]).filter(o=>t.position&&o.containsPosition(t.position));if(r.length===1)this._dragSelection=r[0];else return}I9(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.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 t=new De(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const r=this._editor.getSelection();if(r){const{selectionStartLineNumber:o,selectionStartColumn:s}=r;i=[new Ht(o,s,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(r=>r.containsPosition(t)?new Ht(t.lineNumber,t.column,t.lineNumber,t.column):r);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(I9(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand($4.ID,new Hxt(this._dragSelection,t,I9(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 G(e.lineNumber,e.column,e.lineNumber,e.column),options:$4._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()}}$4.ID="editor.contrib.dragAndDrop";$4.TRIGGER_KEY_VALUE=Yn?6:5;$4._DECORATION_OPTIONS=Vn.register({description:"dnd-target",className:"dnd-target"});yi($4.ID,$4,2);const eB=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let n;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?n=crypto.getRandomValues.bind(crypto):n=function(i){for(let r=0;rVIe(this,void 0,void 0,function*(){return n}),asFile:()=>{},value:typeof n=="string"?n:void 0}}function Pxt(n,e,t){const i={id:eB(),name:n,uri:e,data:t};return{asString:()=>VIe(this,void 0,void 0,function*(){return""}),asFile:()=>i,value:void 0}}class FIe{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return pi.some(this,([i,r])=>r.asFile())&&t.push("files"),BIe(FH(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return FH(e)}}function FH(n){return n.toLowerCase()}function Vxt(n,e){return BIe(FH(n),e.map(FH))}function BIe(n,e){if(n==="*/*")return e.length>0;if(e.includes(n))return!0;const t=n.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,r,o]=t;return o==="*"?e.some(s=>s.startsWith(r+"/")):!1}const tB=Object.freeze({create:n=>Bf(n.map(e=>e.toString())).join(`\r `),split:n=>n.split(`\r `),parse:n=>tB.split(n).filter(e=>!e.startsWith("#"))}),y9e={EDITORS:"CodeEditors",FILES:"CodeFiles"};class Fxt{}const Bxt={DragAndDropContribution:"workbench.contributions.dragAndDrop"};vo.add(Bxt.DragAndDropContribution,new Fxt);class eS{constructor(){}static getInstance(){return eS.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}eS.INSTANCE=new eS;var $xt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};function $Ie(n){const e=new FIe;for(const t of n.items){const i=t.type;if(t.kind==="string"){const r=new Promise(o=>t.getAsString(o));e.append(i,Sce(r))}else if(t.kind==="file"){const r=t.getAsFile();r&&e.append(i,jxt(r))}}return e}function jxt(n){const e=n.path?on.parse(n.path):void 0;return Pxt(n.name,e,()=>$xt(this,void 0,void 0,function*(){return new Uint8Array(yield n.arrayBuffer())}))}const Wxt=Object.freeze([y9e.EDITORS,y9e.FILES,EL.RESOURCES,EL.INTERNAL_URI_LIST]);function jIe(n,e=!1){const t=$Ie(n),i=t.get(EL.INTERNAL_URI_LIST);if(i)t.replace(cs.uriList,i);else if(e||!t.has(cs.uriList)){const r=[];for(const o of n.items){const s=o.getAsFile();if(s){const a=s.path;try{a?r.push(on.file(a).toString()):r.push(on.parse(s.name,!0).toString())}catch{}}}r.length&&t.replace(cs.uriList,Sce(tB.create(r)))}for(const r of Wxt)t.delete(r);return t}function zxt(n,e,t){var i,r;return{edits:[...e.map(o=>new F4(n,typeof t.insertText=="string"?{range:o,text:t.insertText,insertAsSnippet:!1}:{range:o,text:t.insertText.snippet,insertAsSnippet:!0})),...(r=(i=t.additionalEdit)===null||i===void 0?void 0:i.edits)!==null&&r!==void 0?r:[]]}}var Uxt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},qxt=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},Gxt=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const Kxt=Vn.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:$Ee,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class nB extends Pe{constructor(e,t,i,r,o){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(r),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=at(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=at("span.icon");this.domNode.append(t),t.classList.add(...dn.asClassNameArray(_t.loading),"codicon-modifier-spin");const i=()=>{const r=this.editor.getOption(64);this.domNode.style.height=`${r}px`,this.domNode.style.width=`${Math.ceil(.8*r)}px`};i(),this._register(this.editor.onDidChangeConfiguration(r=>{(r.hasChanged(50)||r.hasChanged(64))&&i()})),this._register(Ye(this.domNode,kt.CLICK,r=>{this.delegate.cancel()}))}getId(){return nB.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}nB.baseId="editor.widget.inlineProgressWidget";let BH=class extends Pe{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new Ha),this._currentWidget=new Ha,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}showWhile(e,t,i){return Gxt(this,void 0,void 0,function*(){const r=this._operationIdPool++;this._currentOperation=r,this.clear(),this._showPromise.value=Uf(()=>{const o=G.fromPositions(e);this._currentDecorations.set([{range:o,options:Kxt}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(nB,this.id,this._editor,o,t,i))},this._showDelay);try{return yield i}finally{this._currentOperation===r&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};BH=Uxt([qxt(2,Sn)],BH);var WIe=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},wx=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},_9e=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};let $H=class zIe extends Pe{constructor(e,t,i,r,o,s,a,l,u,c){super(),this.typeId=e,this.editor=t,this.showCommand=r,this.range=o,this.edits=s,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(u),this.visibleContext.set(!0),this._register(Bn(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Bn(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(d=>{o.containsPosition(d.position)||this.dispose()})),this._register(Ut.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=at(".post-edit-widget"),this.button=this._register(new fie(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(Ye(this.domNode,kt.CLICK,()=>this.showSelector()))}getId(){return zIe.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Os(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>fv({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};$H.baseId="editor.widget.postEditWidget";$H=WIe([wx(7,Ud),wx(8,_n),wx(9,Ir)],$H);let jH=class extends Pe{constructor(e,t,i,r,o,s){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=r,this._instantiationService=o,this._bulkEditService=s,this._currentWidget=this._register(new Ha),this._register(Ut.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(e,t,i,r){var o,s;return _9e(this,void 0,void 0,function*(){const a=this._editor.getModel();if(!a||!e.length)return;const l=t.allEdits[t.activeEditIndex];if(!l)return;const u={edits:[...e.map(g=>new F4(a.uri,typeof l.insertText=="string"?{range:g,text:l.insertText,insertAsSnippet:!1}:{range:g,text:l.insertText.snippet,insertAsSnippet:!0})),...(s=(o=l.additionalEdit)===null||o===void 0?void 0:o.edits)!==null&&s!==void 0?s:[]]},c=e[0],d=a.deltaDecorations([],[{range:c,options:{description:"paste-line-suffix",stickiness:0}}]);let h,f;try{h=yield this._bulkEditService.apply(u,{editor:this._editor,token:r}),f=a.getDecorationRange(d[0])}finally{a.deltaDecorations(d,[])}i&&h.isApplied&&t.allEdits.length>1&&this.show(f!=null?f:c,t,g=>_9e(this,void 0,void 0,function*(){const T=this._editor.getModel();!T||(yield T.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:g,allEdits:t.allEdits},i,r))}))})}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance($H,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};jH=WIe([wx(4,Sn),wx(5,vD)],jH);var Zxt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},R9=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},p5=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const UIe="editor.changePasteType",qIe=new It("pasteWidgetVisible",!1,w("pasteWidgetVisible","Whether the paste widget is showing")),tX="application/vnd.code.copyMetadata";let v8=class GIe extends Pe{static get(e){return e.getContribution(GIe.ID)}constructor(e,t,i,r,o,s,a){super(),this._bulkEditService=i,this._clipboardService=r,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register(Ye(l,"copy",u=>this.handleCopy(u))),this._register(Ye(l,"cut",u=>this.handleCopy(u))),this._register(Ye(l,"paste",u=>this.handlePaste(u),!0)),this._pasteProgressManager=this._register(new BH("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(jH,"pasteIntoEditor",e,qIe,{id:UIe,label:w("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},document.execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(82).enabled&&!this._editor.getOption(88)}handleCopy(e){var t,i;if(!e.clipboardData||!this._editor.hasTextFocus()||!this.isPasteAsEnabled())return;const r=this._editor.getModel(),o=this._editor.getSelections();if(!r||!(o!=null&&o.length))return;const s=this._editor.getOption(35);let a=o;const l=o.length===1&&o[0].isEmpty();if(l){if(!s)return;a=[new G(a[0].startLineNumber,1,a[0].startLineNumber,1+r.getLineLength(a[0].startLineNumber))]}const u=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(o,s,ta),d={multicursorText:Array.isArray(u)?u:null,pasteOnNewLine:l,mode:null},h=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(Q=>!!Q.prepareDocumentPaste);if(!h.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});return}const f=$Ie(e.clipboardData),g=h.flatMap(Q=>{var b;return(b=Q.copyMimeTypes)!==null&&b!==void 0?b:[]}),T=eB();this.setCopyMetadata(e.clipboardData,{id:T,providerCopyMimeTypes:g,defaultPastePayload:d});const v=bs(Q=>p5(this,void 0,void 0,function*(){const b=Ph(yield Promise.all(h.map(_=>p5(this,void 0,void 0,function*(){try{return yield _.prepareDocumentPaste(r,a,f,Q)}catch(C){console.error(C);return}}))));b.reverse();for(const _ of b)for(const[C,L]of _)f.replace(C,L);return f}));(i=this._currentCopyOperation)===null||i===void 0||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:T,dataTransferPromise:v}}handlePaste(e){var t,i;return p5(this,void 0,void 0,function*(){if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=this._currentPasteOperation)===null||t===void 0||t.cancel(),this._currentPasteOperation=void 0;const r=this._editor.getModel(),o=this._editor.getSelections();if(!(o!=null&&o.length)||!r||!this.isPasteAsEnabled())return;const s=this.fetchCopyMetadata(e.clipboardData),a=jIe(e.clipboardData);a.delete(tX);const l=[...e.clipboardData.types,...(i=s==null?void 0:s.providerCopyMimeTypes)!==null&&i!==void 0?i:[],cs.uriList],u=this._languageFeaturesService.documentPasteEditProvider.ordered(r).filter(c=>{var d;return(d=c.pasteMimeTypes)===null||d===void 0?void 0:d.some(h=>Vxt(h,l))});!u.length||(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,u,o,a,s):this.doPasteInline(u,o,a,s))})}doPasteInline(e,t,i,r){const o=bs(s=>p5(this,void 0,void 0,function*(){const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),u=new Jf(a,3,void 0,s);try{if(yield this.mergeInDataFromCopy(i,r,u.token),u.token.isCancellationRequested)return;const c=e.filter(h=>C9e(h,i));if(!c.length||c.length===1&&c[0].id==="text"){yield this.applyDefaultPasteHandler(i,r,u.token);return}const d=yield this.getPasteEdits(c,i,l,t,u.token);if(u.token.isCancellationRequested)return;if(d.length){const h=a.getOption(82).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:d},h,u.token)}yield this.applyDefaultPasteHandler(i,r,u.token)}finally{u.dispose(),this._currentPasteOperation===o&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),w("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),o),this._currentPasteOperation=o}showPasteAsPick(e,t,i,r,o){const s=bs(a=>p5(this,void 0,void 0,function*(){const l=this._editor;if(!l.hasModel())return;const u=l.getModel(),c=new Jf(l,3,void 0,a);try{if(yield this.mergeInDataFromCopy(r,o,c.token),c.token.isCancellationRequested)return;const d=t.filter(T=>C9e(T,r)),h=yield this.getPasteEdits(d,r,u,i,c.token);if(c.token.isCancellationRequested||!h.length)return;let f;if(typeof e=="string")f=h.find(T=>T.id===e);else{const T=yield this._quickInputService.pick(h.map(v=>({label:v.label,description:v.id,detail:v.detail,edit:v})),{placeHolder:w("pasteAsPickerPlaceholder","Select Paste Action")});f=T==null?void 0:T.edit}if(!f)return;const g=zxt(u.uri,i,f);yield this._bulkEditService.apply(g,{editor:this._editor})}finally{c.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:w("pasteAsProgress","Running paste handlers")},()=>s)}setCopyMetadata(e,t){e.setData(tX,JSON.stringify(t))}fetchCopyMetadata(e){const t=e.getData(tX);if(t)try{return JSON.parse(t)}catch{return}}mergeInDataFromCopy(e,t,i){var r;return p5(this,void 0,void 0,function*(){if((t==null?void 0:t.id)&&((r=this._currentCopyOperation)===null||r===void 0?void 0:r.handle)===t.id){const o=yield this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[s,a]of o)e.replace(s,a)}if(!e.has(cs.uriList)){const o=yield this._clipboardService.readResources();if(i.isCancellationRequested)return;o.length&&e.append(cs.uriList,Sce(tB.create(o)))}})}getPasteEdits(e,t,i,r,o){return p5(this,void 0,void 0,function*(){const s=yield jV(Promise.all(e.map(a=>{var l;try{return(l=a.provideDocumentPasteEdits)===null||l===void 0?void 0:l.call(a,i,r,t,o)}catch(u){console.error(u);return}})).then(Ph),o);return s==null||s.sort((a,l)=>l.priority-a.priority),s!=null?s:[]})}applyDefaultPasteHandler(e,t,i){var r,o,s;return p5(this,void 0,void 0,function*(){const a=(r=e.get(cs.text))!==null&&r!==void 0?r:e.get("text");if(!a)return;const l=yield a.asString();if(i.isCancellationRequested)return;const u={text:l,pasteOnNewLine:(o=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&o!==void 0?o:!1,multicursorText:(s=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&s!==void 0?s:null,mode:null};this._editor.trigger("keyboard","paste",u)})}};v8.ID="editor.contrib.copyPasteActionController";v8=Zxt([R9(1,Sn),R9(2,vD),R9(3,b6),R9(4,Vt),R9(5,d0),R9(6,LAe)],v8);function C9e(n,e){var t;return Boolean((t=n.pasteMimeTypes)===null||t===void 0?void 0:t.some(i=>e.matches(i)))}var Dce=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},tS=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},bQ=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const Ece=w("builtIn","Built-in");class kce{provideDocumentPasteEdits(e,t,i,r){return bQ(this,void 0,void 0,function*(){const o=yield this.getEdit(i,r);return o?{id:this.id,insertText:o.insertText,label:o.label,detail:o.detail,priority:o.priority}:void 0})}provideDocumentOnDropEdits(e,t,i,r){return bQ(this,void 0,void 0,function*(){const o=yield this.getEdit(i,r);return o?{id:this.id,insertText:o.insertText,label:o.label,priority:o.priority}:void 0})}}class KIe extends kce{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[cs.text],this.pasteMimeTypes=[cs.text]}getEdit(e,t){return bQ(this,void 0,void 0,function*(){const i=e.get(cs.text);if(!i||e.has(cs.uriList))return;const r=yield i.asString();return{id:this.id,priority:0,label:w("text.label","Insert Plain Text"),detail:Ece,insertText:r}})}}class ZIe extends kce{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[cs.uriList],this.pasteMimeTypes=[cs.uriList]}getEdit(e,t){return bQ(this,void 0,void 0,function*(){const i=yield XIe(e);if(!i.length||t.isCancellationRequested)return;let r=0;const o=i.map(({uri:a,originalText:l})=>a.scheme===Un.file?a.fsPath:(r++,l)).join(" ");let s;return r>0?s=i.length>1?w("defaultDropProvider.uriList.uris","Insert Uris"):w("defaultDropProvider.uriList.uri","Insert Uri"):s=i.length>1?w("defaultDropProvider.uriList.paths","Insert Paths"):w("defaultDropProvider.uriList.path","Insert Path"),{id:this.id,priority:0,insertText:o,label:s,detail:Ece}})}}let WH=class extends kce{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[cs.uriList],this.pasteMimeTypes=[cs.uriList]}getEdit(e,t){return bQ(this,void 0,void 0,function*(){const i=yield XIe(e);if(!i.length||t.isCancellationRequested)return;const r=Ph(i.map(({uri:o})=>{const s=this._workspaceContextService.getWorkspaceFolder(o);return s?S7t(s.uri,o):void 0}));if(!!r.length)return{id:this.id,priority:0,insertText:r.join(" "),label:i.length>1?w("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):w("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:Ece}})}};WH=Dce([tS(0,o8)],WH);function XIe(n){return bQ(this,void 0,void 0,function*(){const e=n.get(cs.uriList);if(!e)return[];const t=yield e.asString(),i=[];for(const r of tB.parse(t))try{i.push({uri:on.parse(r),originalText:r})}catch{}return i})}let Tre=class extends Pe{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new KIe)),this._register(e.documentOnDropEditProvider.register("*",new ZIe)),this._register(e.documentOnDropEditProvider.register("*",new WH(t)))}};Tre=Dce([tS(0,Vt),tS(1,o8)],Tre);let vre=class extends Pe{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new KIe)),this._register(e.documentPasteEditProvider.register("*",new ZIe)),this._register(e.documentPasteEditProvider.register("*",new WH(t)))}};vre=Dce([tS(0,Vt),tS(1,o8)],vre);yi(v8.ID,v8,0);OF(vre);vt(new class extends Ps{constructor(){super({id:UIe,precondition:qIe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(n,e,t){var i;return(i=v8.get(e))===null||i===void 0?void 0:i.changePasteType()}});dt(class extends Ot{constructor(){super({id:"editor.action.pasteAs",label:w("pasteAs","Paste As..."),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:w("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(n,e,t){var i;const r=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(i=v8.get(e))===null||i===void 0?void 0:i.pasteAs(r)}});class Xxt{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class w9e{constructor(e){this.identifier=e}}const YIe=oi("treeViewsDndService");gi(YIe,Xxt,1);var Yxt=globalThis&&globalThis.__decorate||function(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},nX=globalThis&&globalThis.__param||function(n,e){return function(t,i){e(t,i,n)}},mN=globalThis&&globalThis.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(d){s(d)}}function l(c){try{u(i.throw(c))}catch(d){s(d)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})};const JIe="editor.changeDropType",eRe=new It("dropWidgetVisible",!1,w("dropWidgetVisible","Whether the drop widget is showing"));let yQ=class tRe extends Pe{static get(e){return e.getContribution(tRe.ID)}constructor(e,t,i,r){super(),this._languageFeaturesService=i,this._treeViewsDragAndDropService=r,this.treeItemsTransfer=eS.getInstance(),this._dropProgressManager=this._register(t.createInstance(BH,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(jH,"dropIntoEditor",e,eRe,{id:JIe,label:w("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(o=>this.onDropIntoEditor(e,o.position,o.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(e,t,i){var r;return mN(this,void 0,void 0,function*(){if(!i.dataTransfer||!e.hasModel())return;(r=this._currentOperation)===null||r===void 0||r.cancel(),e.focus(),e.setPosition(t);const o=bs(s=>mN(this,void 0,void 0,function*(){const a=new Jf(e,1,void 0,s);try{const l=yield this.extractDataTransferData(i);if(l.size===0||a.token.isCancellationRequested)return;const u=e.getModel();if(!u)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(u).filter(h=>h.dropMimeTypes?h.dropMimeTypes.some(f=>l.matches(f)):!0),d=yield this.getDropEdits(c,u,t,l,a);if(a.token.isCancellationRequested)return;if(d.length){const h=e.getOption(34).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([G.fromPositions(t)],{activeEditIndex:0,allEdits:d},h,s)}}finally{a.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,w("dropIntoEditorProgress","Running drop handlers. Click to cancel"),o),this._currentOperation=o})}getDropEdits(e,t,i,r,o){return mN(this,void 0,void 0,function*(){const s=yield jV(Promise.all(e.map(l=>l.provideDocumentOnDropEdits(t,i,r,o.token))),o.token),a=Ph(s!=null?s:[]);return a.sort((l,u)=>u.priority-l.priority),a})}extractDataTransferData(e){return mN(this,void 0,void 0,function*(){if(!e.dataTransfer)return new FIe;const t=jIe(e.dataTransfer);if(this.treeItemsTransfer.hasData(w9e.prototype)){const i=this.treeItemsTransfer.getData(w9e.prototype);if(Array.isArray(i))for(const r of i){const o=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(r.identifier);if(o)for(const[s,a]of o)t.replace(s,a)}}return t})}};yQ.ID="editor.contrib.dropIntoEditorController";yQ=Yxt([nX(1,Sn),nX(2,Vt),nX(3,YIe)],yQ);yi(yQ.ID,yQ,2);vt(new class extends Ps{constructor(){super({id:JIe,precondition:eRe,kbOpts:{weight:100,primary:2137}})}runEditorCommand(n,e,t){var i;(i=yQ.get(e))===null||i===void 0||i.changeDropType()}});OF(Tre);class _l{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(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getDecorationRangeAt(e){const t=e{if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,_l._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,r.changeDecorationOptions(this._highlightedDecorationId,_l._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let o=this._editor.getModel().getDecorationRange(t);if(o.startLineNumber!==o.endLineNumber&&o.endColumn===1){const s=o.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(s);o=new G(o.startLineNumber,o.startColumn,s,a)}this._rangeHighlightDecorationId=r.addDecoration(o,_l._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let r=_l._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){r=_l._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),u=this._editor.getLayoutInfo().height/a,c=Math.max(2,Math.ceil(3/u));let d=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let f=1,g=e.length;f=T.startLineNumber?T.endLineNumber>h&&(h=T.endLineNumber):(o.push({range:new G(d,1,h,1),options:_l._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=T.startLineNumber,h=T.endLineNumber)}o.push({range:new G(d,1,h,1),options:_l._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let a=0,l=e.length;ai.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,_l._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],r=this._editor.getModel().getDecorationRange(i);if(!(!r||r.endLineNumber>e.lineNumber)){if(r.endLineNumbere.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return o;if(!(o.startColumn0){const i=[];for(let s=0;sG.compareRangesUsingStarts(s.range,a.range));const r=[];let o=i[0];for(let s=1;s0?e[0].toUpperCase()+e.substr(1):n[0][0].toUpperCase()!==n[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function x9e(n,e,t){return n[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&n[0].split(t).length===e.split(t).length}function L9e(n,e,t){const i=e.split(t),r=n[0].split(t);let o="";return i.forEach((s,a)=>{o+=nRe([r[a]],s)+t}),o.slice(0,-1)}class S9e{constructor(e){this.staticValue=e,this.kind=0}}class eLt{constructor(e){this.pieces=e,this.kind=1}}class _Q{static fromStaticValue(e){return new _Q([zg.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new S9e(""):e.length===1&&e[0].staticValue!==null?this._state=new S9e(e[0].staticValue):this._state=new eLt(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?nRe(e,this._state.staticValue):this._state.staticValue;let i="";for(let r=0,o=this._state.pieces.length;r0){const l=[],u=s.caseOps.length;let c=0;for(let d=0,h=a.length;d=u){l.push(a.slice(d));break}switch(s.caseOps[c]){case"U":l.push(a[d].toUpperCase());break;case"u":l.push(a[d].toUpperCase()),c++;break;case"L":l.push(a[d].toLowerCase());break;case"l":l.push(a[d].toLowerCase()),c++;break;default:l.push(a[d])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e=r)break;const s=n.charCodeAt(i);switch(s){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` @@ -1311,7 +1311,7 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, `),u&&(f+=c.move(u+` `)),f+=c.move(d),h(),f}function i(o,s,a){let l=o.value||"",u=1;for(e||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const c="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let d=-1;for(;++d{const e=()=>n.rehypePlugin===void 0?[]:n.rehypePlugin==="rehypeKatex"?[LVt]:[jZt];return pe(QPe,{className:"h-full w-full",children:n.content,remarkPlugins:[iXt],rehypePlugins:e(),components:{h1:({node:t,...i})=>pe("h1",{...i,className:"my-6 text-4xl font-bold"},void 0,!1,{fileName:Xp,lineNumber:29,columnNumber:11},void 0),h2:({node:t,...i})=>pe("h2",{...i,className:"my-5 text-3xl font-bold"},void 0,!1,{fileName:Xp,lineNumber:33,columnNumber:11},void 0),h3:({node:t,...i})=>pe("h3",{...i,className:"my-4 text-2xl font-bold"},void 0,!1,{fileName:Xp,lineNumber:37,columnNumber:11},void 0),h4:({node:t,...i})=>pe("h4",{...i,className:"my-3 text-xl font-bold"},void 0,!1,{fileName:Xp,lineNumber:41,columnNumber:11},void 0),h5:({node:t,...i})=>pe("h5",{...i,className:"my-2 text-lg font-bold"},void 0,!1,{fileName:Xp,lineNumber:45,columnNumber:11},void 0),h6:({node:t,...i})=>pe("h6",{...i,className:"my-1 text-base font-bold"},void 0,!1,{fileName:Xp,lineNumber:49,columnNumber:11},void 0)}},void 0,!1,{fileName:Xp,lineNumber:21,columnNumber:5},void 0)};function eBe(n,e){return function(){return n.apply(e,arguments)}}const{toString:rXt}=Object.prototype,{getPrototypeOf:Rde}=Object,qj=(n=>e=>{const t=rXt.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),d3=n=>(n=n.toLowerCase(),e=>qj(e)===n),Gj=n=>e=>typeof e===n,{isArray:kb}=Array,OS=Gj("undefined");function oXt(n){return n!==null&&!OS(n)&&n.constructor!==null&&!OS(n.constructor)&&Nd(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const tBe=d3("ArrayBuffer");function sXt(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&tBe(n.buffer),e}const aXt=Gj("string"),Nd=Gj("function"),nBe=Gj("number"),Kj=n=>n!==null&&typeof n=="object",lXt=n=>n===!0||n===!1,MI=n=>{if(qj(n)!=="object")return!1;const e=Rde(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},uXt=d3("Date"),cXt=d3("File"),dXt=d3("Blob"),hXt=d3("FileList"),fXt=n=>Kj(n)&&Nd(n.pipe),pXt=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Nd(n.append)&&((e=qj(n))==="formdata"||e==="object"&&Nd(n.toString)&&n.toString()==="[object FormData]"))},gXt=d3("URLSearchParams"),mXt=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wE(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let i,r;if(typeof n!="object"&&(n=[n]),kb(n))for(i=0,r=n.length;i0;)if(r=t[i],e===r.toLowerCase())return r;return null}const rBe=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),oBe=n=>!OS(n)&&n!==rBe;function hse(){const{caseless:n}=oBe(this)&&this||{},e={},t=(i,r)=>{const o=n&&iBe(e,r)||r;MI(e[o])&&MI(i)?e[o]=hse(e[o],i):MI(i)?e[o]=hse({},i):kb(i)?e[o]=i.slice():e[o]=i};for(let i=0,r=arguments.length;i(wE(e,(r,o)=>{t&&Nd(r)?n[o]=eBe(r,t):n[o]=r},{allOwnKeys:i}),n),vXt=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),QXt=(n,e,t,i)=>{n.prototype=Object.create(e.prototype,i),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},bXt=(n,e,t,i)=>{let r,o,s;const a={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),o=r.length;o-- >0;)s=r[o],(!i||i(s,n,e))&&!a[s]&&(e[s]=n[s],a[s]=!0);n=t!==!1&&Rde(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},yXt=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const i=n.indexOf(e,t);return i!==-1&&i===t},_Xt=n=>{if(!n)return null;if(kb(n))return n;let e=n.length;if(!nBe(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},CXt=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Rde(Uint8Array)),wXt=(n,e)=>{const i=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=i.next())&&!r.done;){const o=r.value;e.call(n,o[0],o[1])}},xXt=(n,e)=>{let t;const i=[];for(;(t=n.exec(e))!==null;)i.push(t);return i},LXt=d3("HTMLFormElement"),SXt=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,r){return i.toUpperCase()+r}),r_e=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),DXt=d3("RegExp"),sBe=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),i={};wE(t,(r,o)=>{let s;(s=e(r,o,n))!==!1&&(i[o]=s||r)}),Object.defineProperties(n,i)},EXt=n=>{sBe(n,(e,t)=>{if(Nd(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=n[t];if(!!Nd(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},kXt=(n,e)=>{const t={},i=r=>{r.forEach(o=>{t[o]=!0})};return kb(n)?i(n):i(String(n).split(e)),t},MXt=()=>{},AXt=(n,e)=>(n=+n,Number.isFinite(n)?n:e),VY="abcdefghijklmnopqrstuvwxyz",o_e="0123456789",aBe={DIGIT:o_e,ALPHA:VY,ALPHA_DIGIT:VY+VY.toUpperCase()+o_e},NXt=(n=16,e=aBe.ALPHA_DIGIT)=>{let t="";const{length:i}=e;for(;n--;)t+=e[Math.random()*i|0];return t};function OXt(n){return!!(n&&Nd(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const IXt=n=>{const e=new Array(10),t=(i,r)=>{if(Kj(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const o=kb(i)?[]:{};return wE(i,(s,a)=>{const l=t(s,r+1);!OS(l)&&(o[a]=l)}),e[r]=void 0,o}}return i};return t(n,0)},RXt=d3("AsyncFunction"),HXt=n=>n&&(Kj(n)||Nd(n))&&Nd(n.then)&&Nd(n.catch),Nt={isArray:kb,isArrayBuffer:tBe,isBuffer:oXt,isFormData:pXt,isArrayBufferView:sXt,isString:aXt,isNumber:nBe,isBoolean:lXt,isObject:Kj,isPlainObject:MI,isUndefined:OS,isDate:uXt,isFile:cXt,isBlob:dXt,isRegExp:DXt,isFunction:Nd,isStream:fXt,isURLSearchParams:gXt,isTypedArray:CXt,isFileList:hXt,forEach:wE,merge:hse,extend:TXt,trim:mXt,stripBOM:vXt,inherits:QXt,toFlatObject:bXt,kindOf:qj,kindOfTest:d3,endsWith:yXt,toArray:_Xt,forEachEntry:wXt,matchAll:xXt,isHTMLForm:LXt,hasOwnProperty:r_e,hasOwnProp:r_e,reduceDescriptors:sBe,freezeMethods:EXt,toObjectSet:kXt,toCamelCase:SXt,noop:MXt,toFiniteNumber:AXt,findKey:iBe,global:rBe,isContextDefined:oBe,ALPHABET:aBe,generateString:NXt,isSpecCompliantForm:OXt,toJSONObject:IXt,isAsyncFn:RXt,isThenable:HXt};function Fr(n,e,t,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),i&&(this.request=i),r&&(this.response=r)}Nt.inherits(Fr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Nt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const lBe=Fr.prototype,uBe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{uBe[n]={value:n}});Object.defineProperties(Fr,uBe);Object.defineProperty(lBe,"isAxiosError",{value:!0});Fr.from=(n,e,t,i,r,o)=>{const s=Object.create(lBe);return Nt.toFlatObject(n,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Fr.call(s,n.message,e,t,i,r),s.cause=n,s.name=n.name,o&&Object.assign(s,o),s};const PXt=null;function fse(n){return Nt.isPlainObject(n)||Nt.isArray(n)}function cBe(n){return Nt.endsWith(n,"[]")?n.slice(0,-2):n}function s_e(n,e,t){return n?n.concat(e).map(function(r,o){return r=cBe(r),!t&&o?"["+r+"]":r}).join(t?".":""):e}function VXt(n){return Nt.isArray(n)&&!n.some(fse)}const FXt=Nt.toFlatObject(Nt,{},null,function(e){return/^is[A-Z]/.test(e)});function Zj(n,e,t){if(!Nt.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Nt.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,v){return!Nt.isUndefined(v[T])});const i=t.metaTokens,r=t.visitor||c,o=t.dots,s=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&Nt.isSpecCompliantForm(e);if(!Nt.isFunction(r))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(Nt.isDate(g))return g.toISOString();if(!l&&Nt.isBlob(g))throw new Fr("Blob is not supported. Use a Buffer instead.");return Nt.isArrayBuffer(g)||Nt.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,T,v){let Q=g;if(g&&!v&&typeof g=="object"){if(Nt.endsWith(T,"{}"))T=i?T:T.slice(0,-2),g=JSON.stringify(g);else if(Nt.isArray(g)&&VXt(g)||(Nt.isFileList(g)||Nt.endsWith(T,"[]"))&&(Q=Nt.toArray(g)))return T=cBe(T),Q.forEach(function(_,C){!(Nt.isUndefined(_)||_===null)&&e.append(s===!0?s_e([T],C,o):s===null?T:T+"[]",u(_))}),!1}return fse(g)?!0:(e.append(s_e(v,T,o),u(g)),!1)}const d=[],h=Object.assign(FXt,{defaultVisitor:c,convertValue:u,isVisitable:fse});function f(g,T){if(!Nt.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+T.join("."));d.push(g),Nt.forEach(g,function(Q,b){(!(Nt.isUndefined(Q)||Q===null)&&r.call(e,Q,Nt.isString(b)?b.trim():b,T,h))===!0&&f(Q,T?T.concat(b):[b])}),d.pop()}}if(!Nt.isObject(n))throw new TypeError("data must be an object");return f(n),e}function a_e(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function Hde(n,e){this._pairs=[],n&&Zj(n,this,e)}const dBe=Hde.prototype;dBe.append=function(e,t){this._pairs.push([e,t])};dBe.toString=function(e){const t=e?function(i){return e.call(this,i,a_e)}:a_e;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function BXt(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function hBe(n,e,t){if(!e)return n;const i=t&&t.encode||BXt,r=t&&t.serialize;let o;if(r?o=r(e,t):o=Nt.isURLSearchParams(e)?e.toString():new Hde(e,t).toString(i),o){const s=n.indexOf("#");s!==-1&&(n=n.slice(0,s)),n+=(n.indexOf("?")===-1?"?":"&")+o}return n}class $Xt{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Nt.forEach(this.handlers,function(i){i!==null&&e(i)})}}const l_e=$Xt,fBe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jXt=typeof URLSearchParams<"u"?URLSearchParams:Hde,WXt=typeof FormData<"u"?FormData:null,zXt=typeof Blob<"u"?Blob:null,UXt=(()=>{let n;return typeof navigator<"u"&&((n=navigator.product)==="ReactNative"||n==="NativeScript"||n==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),qXt=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),P2={isBrowser:!0,classes:{URLSearchParams:jXt,FormData:WXt,Blob:zXt},isStandardBrowserEnv:UXt,isStandardBrowserWebWorkerEnv:qXt,protocols:["http","https","file","blob","url","data"]};function GXt(n,e){return Zj(n,new P2.classes.URLSearchParams,Object.assign({visitor:function(t,i,r,o){return P2.isNode&&Nt.isBuffer(t)?(this.append(i,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function KXt(n){return Nt.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ZXt(n){const e={},t=Object.keys(n);let i;const r=t.length;let o;for(i=0;i=t.length;return s=!s&&Nt.isArray(r)?r.length:s,l?(Nt.hasOwnProp(r,s)?r[s]=[r[s],i]:r[s]=i,!a):((!r[s]||!Nt.isObject(r[s]))&&(r[s]=[]),e(t,i,r[s],o)&&Nt.isArray(r[s])&&(r[s]=ZXt(r[s])),!a)}if(Nt.isFormData(n)&&Nt.isFunction(n.entries)){const t={};return Nt.forEachEntry(n,(i,r)=>{e(KXt(i),r,t,0)}),t}return null}function XXt(n,e,t){if(Nt.isString(n))try{return(e||JSON.parse)(n),Nt.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(n)}const Pde={transitional:fBe,adapter:P2.isNode?"http":"xhr",transformRequest:[function(e,t){const i=t.getContentType()||"",r=i.indexOf("application/json")>-1,o=Nt.isObject(e);if(o&&Nt.isHTMLForm(e)&&(e=new FormData(e)),Nt.isFormData(e))return r&&r?JSON.stringify(pBe(e)):e;if(Nt.isArrayBuffer(e)||Nt.isBuffer(e)||Nt.isStream(e)||Nt.isFile(e)||Nt.isBlob(e))return e;if(Nt.isArrayBufferView(e))return e.buffer;if(Nt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return GXt(e,this.formSerializer).toString();if((a=Nt.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Zj(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),XXt(e)):e}],transformResponse:[function(e){const t=this.transitional||Pde.transitional,i=t&&t.forcedJSONParsing,r=this.responseType==="json";if(e&&Nt.isString(e)&&(i&&!this.responseType||r)){const s=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Fr.from(a,Fr.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P2.classes.FormData,Blob:P2.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Nt.forEach(["delete","get","head","post","put","patch"],n=>{Pde.headers[n]={}});const Vde=Pde,YXt=Nt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),JXt=n=>{const e={};let t,i,r;return n&&n.split(` `).forEach(function(s){r=s.indexOf(":"),t=s.substring(0,r).trim().toLowerCase(),i=s.substring(r+1).trim(),!(!t||e[t]&&YXt[t])&&(t==="set-cookie"?e[t]?e[t].push(i):e[t]=[i]:e[t]=e[t]?e[t]+", "+i:i)}),e},u_e=Symbol("internals");function zC(n){return n&&String(n).trim().toLowerCase()}function AI(n){return n===!1||n==null?n:Nt.isArray(n)?n.map(AI):String(n)}function eYt(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=t.exec(n);)e[i[1]]=i[2];return e}const tYt=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function FY(n,e,t,i,r){if(Nt.isFunction(i))return i.call(this,e,t);if(r&&(e=t),!!Nt.isString(e)){if(Nt.isString(i))return e.indexOf(i)!==-1;if(Nt.isRegExp(i))return i.test(e)}}function nYt(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}function iYt(n,e){const t=Nt.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+t,{value:function(r,o,s){return this[i].call(this,e,r,o,s)},configurable:!0})})}class Xj{constructor(e){e&&this.set(e)}set(e,t,i){const r=this;function o(a,l,u){const c=zC(l);if(!c)throw new Error("header name must be a non-empty string");const d=Nt.findKey(r,c);(!d||r[d]===void 0||u===!0||u===void 0&&r[d]!==!1)&&(r[d||l]=AI(a))}const s=(a,l)=>Nt.forEach(a,(u,c)=>o(u,c,l));return Nt.isPlainObject(e)||e instanceof this.constructor?s(e,t):Nt.isString(e)&&(e=e.trim())&&!tYt(e)?s(JXt(e),t):e!=null&&o(t,e,i),this}get(e,t){if(e=zC(e),e){const i=Nt.findKey(this,e);if(i){const r=this[i];if(!t)return r;if(t===!0)return eYt(r);if(Nt.isFunction(t))return t.call(this,r,i);if(Nt.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=zC(e),e){const i=Nt.findKey(this,e);return!!(i&&this[i]!==void 0&&(!t||FY(this,this[i],i,t)))}return!1}delete(e,t){const i=this;let r=!1;function o(s){if(s=zC(s),s){const a=Nt.findKey(i,s);a&&(!t||FY(i,i[a],a,t))&&(delete i[a],r=!0)}}return Nt.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let i=t.length,r=!1;for(;i--;){const o=t[i];(!e||FY(this,this[o],o,e,!0))&&(delete this[o],r=!0)}return r}normalize(e){const t=this,i={};return Nt.forEach(this,(r,o)=>{const s=Nt.findKey(i,o);if(s){t[s]=AI(r),delete t[o];return}const a=e?nYt(o):String(o).trim();a!==o&&delete t[o],t[a]=AI(r),i[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Nt.forEach(this,(i,r)=>{i!=null&&i!==!1&&(t[r]=e&&Nt.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[u_e]=this[u_e]={accessors:{}}).accessors,r=this.prototype;function o(s){const a=zC(s);i[a]||(iYt(r,s),i[a]=!0)}return Nt.isArray(e)?e.forEach(o):o(e),this}}Xj.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Nt.reduceDescriptors(Xj.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(i){this[t]=i}}});Nt.freezeMethods(Xj);const X4=Xj;function BY(n,e){const t=this||Vde,i=e||t,r=X4.from(i.headers);let o=i.data;return Nt.forEach(n,function(a){o=a.call(t,o,r.normalize(),e?e.status:void 0)}),r.normalize(),o}function gBe(n){return!!(n&&n.__CANCEL__)}function xE(n,e,t){Fr.call(this,n==null?"canceled":n,Fr.ERR_CANCELED,e,t),this.name="CanceledError"}Nt.inherits(xE,Fr,{__CANCEL__:!0});function rYt(n,e,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?n(t):e(new Fr("Request failed with status code "+t.status,[Fr.ERR_BAD_REQUEST,Fr.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const oYt=P2.isStandardBrowserEnv?function(){return{write:function(t,i,r,o,s,a){const l=[];l.push(t+"="+encodeURIComponent(i)),Nt.isNumber(r)&&l.push("expires="+new Date(r).toGMTString()),Nt.isString(o)&&l.push("path="+o),Nt.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(t){const i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function sYt(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function aYt(n,e){return e?n.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):n}function mBe(n,e){return n&&!sYt(e)?aYt(n,e):e}const lYt=P2.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function r(o){let s=o;return e&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=r(window.location.href),function(s){const a=Nt.isString(s)?r(s):s;return a.protocol===i.protocol&&a.host===i.host}}():function(){return function(){return!0}}();function uYt(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function cYt(n,e){n=n||10;const t=new Array(n),i=new Array(n);let r=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[o];s||(s=u),t[r]=l,i[r]=u;let d=o,h=0;for(;d!==r;)h+=t[d++],d=d%n;if(r=(r+1)%n,r===o&&(o=(o+1)%n),u-s{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-t,l=i(a),u=o<=s;t=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-o)/l:void 0,event:r};c[e?"download":"upload"]=!0,n(c)}}const dYt=typeof XMLHttpRequest<"u",hYt=dYt&&function(n){return new Promise(function(t,i){let r=n.data;const o=X4.from(n.headers).normalize(),s=n.responseType;let a;function l(){n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}Nt.isFormData(r)&&(P2.isStandardBrowserEnv||P2.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(n.auth){const f=n.auth.username||"",g=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+g))}const c=mBe(n.baseURL,n.url);u.open(n.method.toUpperCase(),hBe(c,n.params,n.paramsSerializer),!0),u.timeout=n.timeout;function d(){if(!u)return;const f=X4.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:f,config:n,request:u};rYt(function(Q){t(Q),l()},function(Q){i(Q),l()},T),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){!u||(i(new Fr("Request aborted",Fr.ECONNABORTED,n,u)),u=null)},u.onerror=function(){i(new Fr("Network Error",Fr.ERR_NETWORK,n,u)),u=null},u.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const T=n.transitional||fBe;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),i(new Fr(g,T.clarifyTimeoutError?Fr.ETIMEDOUT:Fr.ECONNABORTED,n,u)),u=null},P2.isStandardBrowserEnv){const f=(n.withCredentials||lYt(c))&&n.xsrfCookieName&&oYt.read(n.xsrfCookieName);f&&o.set(n.xsrfHeaderName,f)}r===void 0&&o.setContentType(null),"setRequestHeader"in u&&Nt.forEach(o.toJSON(),function(g,T){u.setRequestHeader(T,g)}),Nt.isUndefined(n.withCredentials)||(u.withCredentials=!!n.withCredentials),s&&s!=="json"&&(u.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&u.addEventListener("progress",c_e(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",c_e(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=f=>{!u||(i(!f||f.type?new xE(null,n,u):f),u.abort(),u=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const h=uYt(c);if(h&&P2.protocols.indexOf(h)===-1){i(new Fr("Unsupported protocol "+h+":",Fr.ERR_BAD_REQUEST,n));return}u.send(r||null)})},NI={http:PXt,xhr:hYt};Nt.forEach(NI,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const TBe={getAdapter:n=>{n=Nt.isArray(n)?n:[n];const{length:e}=n;let t,i;for(let r=0;rn instanceof X4?n.toJSON():n;function $Q(n,e){e=e||{};const t={};function i(u,c,d){return Nt.isPlainObject(u)&&Nt.isPlainObject(c)?Nt.merge.call({caseless:d},u,c):Nt.isPlainObject(c)?Nt.merge({},c):Nt.isArray(c)?c.slice():c}function r(u,c,d){if(Nt.isUndefined(c)){if(!Nt.isUndefined(u))return i(void 0,u,d)}else return i(u,c,d)}function o(u,c){if(!Nt.isUndefined(c))return i(void 0,c)}function s(u,c){if(Nt.isUndefined(c)){if(!Nt.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function a(u,c,d){if(d in e)return i(u,c);if(d in n)return i(void 0,u)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>r(h_e(u),h_e(c),!0)};return Nt.forEach(Object.keys(Object.assign({},n,e)),function(c){const d=l[c]||r,h=d(n[c],e[c],c);Nt.isUndefined(h)&&d!==a||(t[c]=h)}),t}const vBe="1.5.0",Fde={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Fde[n]=function(i){return typeof i===n||"a"+(e<1?"n ":" ")+n}});const f_e={};Fde.transitional=function(e,t,i){function r(o,s){return"[Axios v"+vBe+"] Transitional option '"+o+"'"+s+(i?". "+i:"")}return(o,s,a)=>{if(e===!1)throw new Fr(r(s," has been removed"+(t?" in "+t:"")),Fr.ERR_DEPRECATED);return t&&!f_e[s]&&(f_e[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,s,a):!0}};function fYt(n,e,t){if(typeof n!="object")throw new Fr("options must be an object",Fr.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let r=i.length;for(;r-- >0;){const o=i[r],s=e[o];if(s){const a=n[o],l=a===void 0||s(a,o,n);if(l!==!0)throw new Fr("option "+o+" must be "+l,Fr.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Fr("Unknown option "+o,Fr.ERR_BAD_OPTION)}}const pse={assertOptions:fYt,validators:Fde},_5=pse.validators;class RP{constructor(e){this.defaults=e,this.interceptors={request:new l_e,response:new l_e}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=$Q(this.defaults,t);const{transitional:i,paramsSerializer:r,headers:o}=t;i!==void 0&&pse.assertOptions(i,{silentJSONParsing:_5.transitional(_5.boolean),forcedJSONParsing:_5.transitional(_5.boolean),clarifyTimeoutError:_5.transitional(_5.boolean)},!1),r!=null&&(Nt.isFunction(r)?t.paramsSerializer={serialize:r}:pse.assertOptions(r,{encode:_5.function,serialize:_5.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&Nt.merge(o.common,o[t.method]);o&&Nt.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),t.headers=X4.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(t)===!1||(l=l&&T.synchronous,a.unshift(T.fulfilled,T.rejected))});const u=[];this.interceptors.response.forEach(function(T){u.push(T.fulfilled,T.rejected)});let c,d=0,h;if(!l){const g=[d_e.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),h=g.length,c=Promise.resolve(t);d{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](r);i._listeners=null}),this.promise.then=r=>{let o;const s=new Promise(a=>{i.subscribe(a),o=a}).then(r);return s.cancel=function(){i.unsubscribe(o)},s},e(function(o,s,a){i.reason||(i.reason=new xE(o,s,a),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new Bde(function(r){e=r}),cancel:e}}}const pYt=Bde;function gYt(n){return function(t){return n.apply(null,t)}}function mYt(n){return Nt.isObject(n)&&n.isAxiosError===!0}const gse={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gse).forEach(([n,e])=>{gse[e]=n});const TYt=gse;function QBe(n){const e=new OI(n),t=eBe(OI.prototype.request,e);return Nt.extend(t,OI.prototype,e,{allOwnKeys:!0}),Nt.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return QBe($Q(n,r))},t}const Pa=QBe(Vde);Pa.Axios=OI;Pa.CanceledError=xE;Pa.CancelToken=pYt;Pa.isCancel=gBe;Pa.VERSION=vBe;Pa.toFormData=Zj;Pa.AxiosError=Fr;Pa.Cancel=Pa.CanceledError;Pa.all=function(e){return Promise.all(e)};Pa.spread=gYt;Pa.isAxiosError=mYt;Pa.mergeConfig=$Q;Pa.AxiosHeaders=X4;Pa.formToJSON=n=>pBe(Nt.isHTMLForm(n)?new FormData(n):n);Pa.getAdapter=TBe.getAdapter;Pa.HttpStatusCode=TYt;Pa.default=Pa;const vYt=Pa,HP=vYt.create({baseURL:"",timeout:5e3});var PP;(n=>{async function e(i){let r=await HP.get(`/api/v1/problem/${i}`);if(r.status!==200)throw Error("failed to get problem info");return r.data}n.getProblem=e;async function t(){let i=await HP.get("/api/v1/problem");if(i.status!==200)throw Error("failed to get problem list");return i.data}n.getProblemInfoList=t})(PP||(PP={}));const QYt=n=>{const[e,t]=$.exports.useState(null);$.exports.useEffect(()=>{PP.getProblem(n).then(r=>{t(r)}).catch(r=>{console.log(r)})},[n]);function i(){return e}return{getProblem:i}},bBe=()=>{const[n,e]=$.exports.useState([]);$.exports.useEffect(()=>{PP.getProblemInfoList().then(i=>{e(i.list)}).catch(i=>{console.log(i)})},[]);function t(){return n}return{getProblemInfoList:t}};var X3="/home/runner/work/oj-lab-front/oj-lab-front/src/components/JudgeVerdictTable.tsx";const bYt=[{name:"RESULT",uid:"result"},{name:"TIME USAGE",uid:"time_usage"},{name:"MEMORY USAGE",uid:"memory_usage"}],yYt=n=>pe(Rae,{children:[pe(Fae,{columns:bYt,children:e=>pe(Vae,{children:e.name},e.uid,!1,{fileName:X3,lineNumber:26,columnNumber:22},void 0)},void 0,!1,{fileName:X3,lineNumber:25,columnNumber:7},void 0),pe(Pae,{items:n.data,children:e=>pe(Hae,{children:[pe(Kw,{children:pe(kae,{color:e.verdict==="Accepted"?"success":"danger",variant:"bordered",children:e.verdict},void 0,!1,{fileName:X3,lineNumber:32,columnNumber:15},void 0)},void 0,!1,{fileName:X3,lineNumber:31,columnNumber:13},void 0),pe(Kw,{children:e.time_usage},void 0,!1,{fileName:X3,lineNumber:39,columnNumber:13},void 0),pe(Kw,{children:e.memory_usage},void 0,!1,{fileName:X3,lineNumber:40,columnNumber:13},void 0)]},e.id,!0,{fileName:X3,lineNumber:30,columnNumber:11},void 0)},void 0,!1,{fileName:X3,lineNumber:28,columnNumber:7},void 0)]},void 0,!0,{fileName:X3,lineNumber:24,columnNumber:5},void 0);var mse;(n=>{async function e(t,i,r){let o={src:i,src_language:r},s=JSON.stringify(o),a=await HP.post(`/api/v1/problem/${t}/judge`,s);if(a.status!==200)throw Error("failed to run judge");return a.data}n.postJudge=e})(mse||(mse={}));const _Yt=n=>{const[e,t]=$.exports.useState(""),[i,r]=$.exports.useState(""),[o,s]=$.exports.useState([]);function a(){mse.postJudge(n,e,i).then(u=>{s(u)}).catch(u=>{console.log(u)})}function l(){return o}return{runJudge:a,getVerdicts:l,setSrc:t,setSrcLanguage:r}};function CYt(n){return n<1e3?`${n} ns`:n<1e6?`${(n/1e3).toFixed(2)} us`:n<1e9?`${(n/1e6).toFixed(2)} ms`:`${(n/1e9).toFixed(2)} s`}function wYt(n){return n<1024?`${n} bytes`:n<1024*1024?`${(n/1024).toFixed(2)} KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(2)} MB`:`${(n/1024/1024/1024).toFixed(2)} GB`}const xYt=n=>{let e=1;return n.map(i=>{let r=LYt(i);return r.id=`${e++}`,r})},LYt=n=>{let e="",t=n.verdict,i=CYt(n.time_usage.nanos),r=wYt(n.memory_usage_bytes);return{id:e,verdict:t,time_usage:i,memory_usage:r}};var SYt=Object.defineProperty,DYt=(n,e,t)=>e in n?SYt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,jY=(n,e,t)=>(DYt(n,typeof e!="symbol"?e+"":e,t),t);class EYt{constructor(){jY(this,"current",this.detect()),jY(this,"handoffState","pending"),jY(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}}let Y4=new EYt,El=(n,e)=>{Y4.isServer?$.exports.useEffect(n,e):$.exports.useLayoutEffect(n,e)};function J4(n){let e=$.exports.useRef(n);return El(()=>{e.current=n},[n]),e}function Yj(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(e=>setTimeout(()=>{throw e}))}function s0(){let n=[],e={addEventListener(t,i,r,o){return t.addEventListener(i,r,o),e.add(()=>t.removeEventListener(i,r,o))},requestAnimationFrame(...t){let i=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(i))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let i=setTimeout(...t);return e.add(()=>clearTimeout(i))},microTask(...t){let i={current:!0};return Yj(()=>{i.current&&t[0]()}),e.add(()=>{i.current=!1})},style(t,i,r){let o=t.style.getPropertyValue(i);return Object.assign(t.style,{[i]:r}),this.add(()=>{Object.assign(t.style,{[i]:o})})},group(t){let i=s0();return t(i),this.add(()=>i.dispose())},add(t){return n.push(t),()=>{let i=n.indexOf(t);if(i>=0)for(let r of n.splice(i,1))r()}},dispose(){for(let t of n.splice(0))t()}};return e}function LE(){let[n]=$.exports.useState(s0);return $.exports.useEffect(()=>()=>n.dispose(),[n]),n}let qi=function(n){let e=J4(n);return En.useCallback((...t)=>e.current(...t),[e])};function kYt(){let n=typeof document>"u";return"useSyncExternalStore"in Zg?(e=>e.useSyncExternalStore)(Zg)(()=>()=>{},()=>!1,()=>!n):!1}function Mb(){let n=kYt(),[e,t]=$.exports.useState(Y4.isHandoffComplete);return e&&Y4.isHandoffComplete===!1&&t(!1),$.exports.useEffect(()=>{e!==!0&&t(!0)},[e]),$.exports.useEffect(()=>Y4.handoff(),[]),n?!1:e}var p_e;let T0=(p_e=En.useId)!=null?p_e:function(){let n=Mb(),[e,t]=En.useState(n?()=>Y4.nextId():null);return El(()=>{e===null&&t(Y4.nextId())},[e]),e!=null?""+e:void 0};function ga(n,e,...t){if(n in e){let r=e[n];return typeof r=="function"?r(...t):r}let i=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,ga),i}function SE(n){return Y4.isServer?null:n instanceof Node?n.ownerDocument:n!=null&&n.hasOwnProperty("current")&&n.current instanceof Node?n.current.ownerDocument:document}let Tse=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var b4=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n))(b4||{}),yBe=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(yBe||{}),MYt=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(MYt||{});function _Be(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Tse)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var $de=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))($de||{});function jde(n,e=0){var t;return n===((t=SE(n))==null?void 0:t.body)?!1:ga(e,{[0](){return n.matches(Tse)},[1](){let i=n;for(;i!==null;){if(i.matches(Tse))return!0;i=i.parentElement}return!1}})}function CBe(n){let e=SE(n);s0().nextFrame(()=>{e&&!jde(e.activeElement,0)&&Of(n)})}var AYt=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(AYt||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Of(n){n==null||n.focus({preventScroll:!0})}let NYt=["textarea","input"].join(",");function OYt(n){var e,t;return(t=(e=n==null?void 0:n.matches)==null?void 0:e.call(n,NYt))!=null?t:!1}function wBe(n,e=t=>t){return n.slice().sort((t,i)=>{let r=e(t),o=e(i);if(r===null||o===null)return 0;let s=r.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function IYt(n,e){return Rx(_Be(),e,{relativeTo:n})}function Rx(n,e,{sorted:t=!0,relativeTo:i=null,skipElements:r=[]}={}){let o=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,s=Array.isArray(n)?t?wBe(n):n:_Be(n);r.length>0&&s.length>1&&(s=s.filter(f=>!r.includes(f))),i=i!=null?i:o.activeElement;let a=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,s.indexOf(i))-1;if(e&4)return Math.max(0,s.indexOf(i))+1;if(e&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=e&32?{preventScroll:!0}:{},c=0,d=s.length,h;do{if(c>=d||c+d<=0)return 0;let f=l+c;if(e&16)f=(f+d)%d;else{if(f<0)return 3;if(f>=d)return 1}h=s[f],h==null||h.focus(u),c+=a}while(h!==o.activeElement);return e&6&&OYt(h)&&h.select(),2}function QO(n,e,t){let i=J4(e);$.exports.useEffect(()=>{function r(o){i.current(o)}return document.addEventListener(n,r,t),()=>document.removeEventListener(n,r,t)},[n,t])}function xBe(n,e,t){let i=J4(e);$.exports.useEffect(()=>{function r(o){i.current(o)}return window.addEventListener(n,r,t),()=>window.removeEventListener(n,r,t)},[n,t])}function LBe(n,e,t=!0){let i=$.exports.useRef(!1);$.exports.useEffect(()=>{requestAnimationFrame(()=>{i.current=t})},[t]);function r(s,a){if(!i.current||s.defaultPrevented)return;let l=a(s);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(n);for(let c of u){if(c===null)continue;let d=c instanceof HTMLElement?c:c.current;if(d!=null&&d.contains(l)||s.composed&&s.composedPath().includes(d))return}return!jde(l,$de.Loose)&&l.tabIndex!==-1&&s.preventDefault(),e(s,l)}let o=$.exports.useRef(null);QO("pointerdown",s=>{var a,l;i.current&&(o.current=((l=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:l[0])||s.target)},!0),QO("mousedown",s=>{var a,l;i.current&&(o.current=((l=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:l[0])||s.target)},!0),QO("click",s=>{o.current&&(r(s,()=>o.current),o.current=null)},!0),QO("touchend",s=>r(s,()=>s.target instanceof HTMLElement?s.target:null),!0),xBe("blur",s=>r(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function g_e(n){var e;if(n.type)return n.type;let t=(e=n.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function SBe(n,e){let[t,i]=$.exports.useState(()=>g_e(n));return El(()=>{i(g_e(n))},[n.type,n.as]),El(()=>{t||e.current&&e.current instanceof HTMLButtonElement&&!e.current.hasAttribute("type")&&i("button")},[t,e]),t}let DBe=Symbol();function EBe(n,e=!0){return Object.assign(n,{[DBe]:e})}function Al(...n){let e=$.exports.useRef(n);$.exports.useEffect(()=>{e.current=n},[n]);let t=qi(i=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(i):r.current=i)});return n.every(i=>i==null||(i==null?void 0:i[DBe]))?void 0:t}function RYt({container:n,accept:e,walk:t,enabled:i=!0}){let r=$.exports.useRef(e),o=$.exports.useRef(t);$.exports.useEffect(()=>{r.current=e,o.current=t},[e,t]),El(()=>{if(!n||!i)return;let s=SE(n);if(!s)return;let a=r.current,l=o.current,u=Object.assign(d=>a(d),{acceptNode:a}),c=s.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)l(c.currentNode)},[n,i,r,o])}function HYt(n){throw new Error("Unexpected object: "+n)}var V2=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(V2||{});function PYt(n,e){let t=e.resolveItems();if(t.length<=0)return null;let i=e.resolveActiveIndex(),r=i!=null?i:-1,o=(()=>{switch(n.focus){case 0:return t.findIndex(s=>!e.resolveDisabled(s));case 1:{let s=t.slice().reverse().findIndex((a,l,u)=>r!==-1&&u.length-l-1>=r?!1:!e.resolveDisabled(a));return s===-1?s:t.length-1-s}case 2:return t.findIndex((s,a)=>a<=r?!1:!e.resolveDisabled(s));case 3:{let s=t.slice().reverse().findIndex(a=>!e.resolveDisabled(a));return s===-1?s:t.length-1-s}case 4:return t.findIndex(s=>e.resolveId(s)===n.id);case 5:return null;default:HYt(n)}})();return o===-1?i:o}function VP(...n){return Array.from(new Set(n.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}var m7=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(m7||{}),hf=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(hf||{});function fl({ourProps:n,theirProps:e,slot:t,defaultTag:i,features:r,visible:o=!0,name:s}){let a=kBe(e,n);if(o)return bO(a,t,i,s);let l=r!=null?r:0;if(l&2){let{static:u=!1,...c}=a;if(u)return bO(c,t,i,s)}if(l&1){let{unmount:u=!0,...c}=a;return ga(u?0:1,{[0](){return null},[1](){return bO({...c,hidden:!0,style:{display:"none"}},t,i,s)}})}return bO(a,t,i,s)}function bO(n,e={},t,i){let{as:r=t,children:o,refName:s="ref",...a}=WY(n,["unmount","static"]),l=n.ref!==void 0?{[s]:n.ref}:{},u=typeof o=="function"?o(e):o;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(e));let c={};if(e){let d=!1,h=[];for(let[f,g]of Object.entries(e))typeof g=="boolean"&&(d=!0),g===!0&&h.push(f);d&&(c["data-headlessui-state"]=h.join(" "))}if(r===$.exports.Fragment&&Object.keys(m_e(a)).length>0){if(!$.exports.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${i} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(g=>` - ${g}`).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[u_e]=this[u_e]={accessors:{}}).accessors,r=this.prototype;function o(s){const a=zC(s);i[a]||(iYt(r,s),i[a]=!0)}return Nt.isArray(e)?e.forEach(o):o(e),this}}Xj.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Nt.reduceDescriptors(Xj.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(i){this[t]=i}}});Nt.freezeMethods(Xj);const X4=Xj;function BY(n,e){const t=this||Vde,i=e||t,r=X4.from(i.headers);let o=i.data;return Nt.forEach(n,function(a){o=a.call(t,o,r.normalize(),e?e.status:void 0)}),r.normalize(),o}function gBe(n){return!!(n&&n.__CANCEL__)}function xE(n,e,t){Fr.call(this,n==null?"canceled":n,Fr.ERR_CANCELED,e,t),this.name="CanceledError"}Nt.inherits(xE,Fr,{__CANCEL__:!0});function rYt(n,e,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?n(t):e(new Fr("Request failed with status code "+t.status,[Fr.ERR_BAD_REQUEST,Fr.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const oYt=P2.isStandardBrowserEnv?function(){return{write:function(t,i,r,o,s,a){const l=[];l.push(t+"="+encodeURIComponent(i)),Nt.isNumber(r)&&l.push("expires="+new Date(r).toGMTString()),Nt.isString(o)&&l.push("path="+o),Nt.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(t){const i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function sYt(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function aYt(n,e){return e?n.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):n}function mBe(n,e){return n&&!sYt(e)?aYt(n,e):e}const lYt=P2.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function r(o){let s=o;return e&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=r(window.location.href),function(s){const a=Nt.isString(s)?r(s):s;return a.protocol===i.protocol&&a.host===i.host}}():function(){return function(){return!0}}();function uYt(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function cYt(n,e){n=n||10;const t=new Array(n),i=new Array(n);let r=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[o];s||(s=u),t[r]=l,i[r]=u;let d=o,h=0;for(;d!==r;)h+=t[d++],d=d%n;if(r=(r+1)%n,r===o&&(o=(o+1)%n),u-s{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-t,l=i(a),u=o<=s;t=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-o)/l:void 0,event:r};c[e?"download":"upload"]=!0,n(c)}}const dYt=typeof XMLHttpRequest<"u",hYt=dYt&&function(n){return new Promise(function(t,i){let r=n.data;const o=X4.from(n.headers).normalize(),s=n.responseType;let a;function l(){n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}Nt.isFormData(r)&&(P2.isStandardBrowserEnv||P2.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(n.auth){const f=n.auth.username||"",g=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+g))}const c=mBe(n.baseURL,n.url);u.open(n.method.toUpperCase(),hBe(c,n.params,n.paramsSerializer),!0),u.timeout=n.timeout;function d(){if(!u)return;const f=X4.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:f,config:n,request:u};rYt(function(Q){t(Q),l()},function(Q){i(Q),l()},T),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){!u||(i(new Fr("Request aborted",Fr.ECONNABORTED,n,u)),u=null)},u.onerror=function(){i(new Fr("Network Error",Fr.ERR_NETWORK,n,u)),u=null},u.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const T=n.transitional||fBe;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),i(new Fr(g,T.clarifyTimeoutError?Fr.ETIMEDOUT:Fr.ECONNABORTED,n,u)),u=null},P2.isStandardBrowserEnv){const f=(n.withCredentials||lYt(c))&&n.xsrfCookieName&&oYt.read(n.xsrfCookieName);f&&o.set(n.xsrfHeaderName,f)}r===void 0&&o.setContentType(null),"setRequestHeader"in u&&Nt.forEach(o.toJSON(),function(g,T){u.setRequestHeader(T,g)}),Nt.isUndefined(n.withCredentials)||(u.withCredentials=!!n.withCredentials),s&&s!=="json"&&(u.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&u.addEventListener("progress",c_e(n.onDownloadProgress,!0)),typeof n.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",c_e(n.onUploadProgress)),(n.cancelToken||n.signal)&&(a=f=>{!u||(i(!f||f.type?new xE(null,n,u):f),u.abort(),u=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const h=uYt(c);if(h&&P2.protocols.indexOf(h)===-1){i(new Fr("Unsupported protocol "+h+":",Fr.ERR_BAD_REQUEST,n));return}u.send(r||null)})},NI={http:PXt,xhr:hYt};Nt.forEach(NI,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const TBe={getAdapter:n=>{n=Nt.isArray(n)?n:[n];const{length:e}=n;let t,i;for(let r=0;rn instanceof X4?n.toJSON():n;function $Q(n,e){e=e||{};const t={};function i(u,c,d){return Nt.isPlainObject(u)&&Nt.isPlainObject(c)?Nt.merge.call({caseless:d},u,c):Nt.isPlainObject(c)?Nt.merge({},c):Nt.isArray(c)?c.slice():c}function r(u,c,d){if(Nt.isUndefined(c)){if(!Nt.isUndefined(u))return i(void 0,u,d)}else return i(u,c,d)}function o(u,c){if(!Nt.isUndefined(c))return i(void 0,c)}function s(u,c){if(Nt.isUndefined(c)){if(!Nt.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function a(u,c,d){if(d in e)return i(u,c);if(d in n)return i(void 0,u)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>r(h_e(u),h_e(c),!0)};return Nt.forEach(Object.keys(Object.assign({},n,e)),function(c){const d=l[c]||r,h=d(n[c],e[c],c);Nt.isUndefined(h)&&d!==a||(t[c]=h)}),t}const vBe="1.5.0",Fde={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Fde[n]=function(i){return typeof i===n||"a"+(e<1?"n ":" ")+n}});const f_e={};Fde.transitional=function(e,t,i){function r(o,s){return"[Axios v"+vBe+"] Transitional option '"+o+"'"+s+(i?". "+i:"")}return(o,s,a)=>{if(e===!1)throw new Fr(r(s," has been removed"+(t?" in "+t:"")),Fr.ERR_DEPRECATED);return t&&!f_e[s]&&(f_e[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,s,a):!0}};function fYt(n,e,t){if(typeof n!="object")throw new Fr("options must be an object",Fr.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let r=i.length;for(;r-- >0;){const o=i[r],s=e[o];if(s){const a=n[o],l=a===void 0||s(a,o,n);if(l!==!0)throw new Fr("option "+o+" must be "+l,Fr.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Fr("Unknown option "+o,Fr.ERR_BAD_OPTION)}}const pse={assertOptions:fYt,validators:Fde},_5=pse.validators;class RP{constructor(e){this.defaults=e,this.interceptors={request:new l_e,response:new l_e}}request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=$Q(this.defaults,t);const{transitional:i,paramsSerializer:r,headers:o}=t;i!==void 0&&pse.assertOptions(i,{silentJSONParsing:_5.transitional(_5.boolean),forcedJSONParsing:_5.transitional(_5.boolean),clarifyTimeoutError:_5.transitional(_5.boolean)},!1),r!=null&&(Nt.isFunction(r)?t.paramsSerializer={serialize:r}:pse.assertOptions(r,{encode:_5.function,serialize:_5.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&Nt.merge(o.common,o[t.method]);o&&Nt.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),t.headers=X4.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(t)===!1||(l=l&&T.synchronous,a.unshift(T.fulfilled,T.rejected))});const u=[];this.interceptors.response.forEach(function(T){u.push(T.fulfilled,T.rejected)});let c,d=0,h;if(!l){const g=[d_e.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),h=g.length,c=Promise.resolve(t);d{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](r);i._listeners=null}),this.promise.then=r=>{let o;const s=new Promise(a=>{i.subscribe(a),o=a}).then(r);return s.cancel=function(){i.unsubscribe(o)},s},e(function(o,s,a){i.reason||(i.reason=new xE(o,s,a),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}static source(){let e;return{token:new Bde(function(r){e=r}),cancel:e}}}const pYt=Bde;function gYt(n){return function(t){return n.apply(null,t)}}function mYt(n){return Nt.isObject(n)&&n.isAxiosError===!0}const gse={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gse).forEach(([n,e])=>{gse[e]=n});const TYt=gse;function QBe(n){const e=new OI(n),t=eBe(OI.prototype.request,e);return Nt.extend(t,OI.prototype,e,{allOwnKeys:!0}),Nt.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return QBe($Q(n,r))},t}const Pa=QBe(Vde);Pa.Axios=OI;Pa.CanceledError=xE;Pa.CancelToken=pYt;Pa.isCancel=gBe;Pa.VERSION=vBe;Pa.toFormData=Zj;Pa.AxiosError=Fr;Pa.Cancel=Pa.CanceledError;Pa.all=function(e){return Promise.all(e)};Pa.spread=gYt;Pa.isAxiosError=mYt;Pa.mergeConfig=$Q;Pa.AxiosHeaders=X4;Pa.formToJSON=n=>pBe(Nt.isHTMLForm(n)?new FormData(n):n);Pa.getAdapter=TBe.getAdapter;Pa.HttpStatusCode=TYt;Pa.default=Pa;const vYt=Pa,HP=vYt.create({baseURL:"",timeout:5e3});var PP;(n=>{async function e(i){let r=await HP.get(`/api/v1/problem/${i}`);if(r.status!==200)throw Error("failed to get problem info");return r.data}n.getProblem=e;async function t(){let i=await HP.get("/api/v1/problem");if(i.status!==200)throw Error("failed to get problem list");return i.data}n.getProblemInfoList=t})(PP||(PP={}));const QYt=n=>{const[e,t]=$.exports.useState(null);$.exports.useEffect(()=>{PP.getProblem(n).then(r=>{t(r)}).catch(r=>{console.log(r)})},[n]);function i(){return e}return{getProblem:i}},bBe=()=>{const[n,e]=$.exports.useState([]);$.exports.useEffect(()=>{PP.getProblemInfoList().then(i=>{e(i.list)}).catch(i=>{console.log(i)})},[]);function t(){return n}return{getProblemInfoList:t}};var X3="/home/runner/work/oj-lab-front/oj-lab-front/src/components/JudgeVerdictTable.tsx";const bYt=[{name:"RESULT",uid:"result"},{name:"TIME USAGE",uid:"time_usage"},{name:"MEMORY USAGE",uid:"memory_usage"}],yYt=n=>pe(Rae,{children:[pe(Fae,{columns:bYt,children:e=>pe(Vae,{children:e.name},e.uid,!1,{fileName:X3,lineNumber:26,columnNumber:22},void 0)},void 0,!1,{fileName:X3,lineNumber:25,columnNumber:7},void 0),pe(Pae,{items:n.data,children:e=>pe(Hae,{children:[pe(Kw,{children:pe(kae,{color:e.verdict==="Accepted"?"success":"danger",variant:"bordered",children:e.verdict},void 0,!1,{fileName:X3,lineNumber:32,columnNumber:15},void 0)},void 0,!1,{fileName:X3,lineNumber:31,columnNumber:13},void 0),pe(Kw,{children:e.time_usage},void 0,!1,{fileName:X3,lineNumber:39,columnNumber:13},void 0),pe(Kw,{children:e.memory_usage},void 0,!1,{fileName:X3,lineNumber:40,columnNumber:13},void 0)]},e.id,!0,{fileName:X3,lineNumber:30,columnNumber:11},void 0)},void 0,!1,{fileName:X3,lineNumber:28,columnNumber:7},void 0)]},void 0,!0,{fileName:X3,lineNumber:24,columnNumber:5},void 0);var mse;(n=>{async function e(t,i,r){let o={code:i,language:r},s=JSON.stringify(o),a=await HP.post(`/api/v1/problem/${t}/submission`,s);if(a.status!==200)throw Error("failed to run judge");return a.data}n.postSubmission=e})(mse||(mse={}));const _Yt=n=>{const[e,t]=$.exports.useState(""),[i,r]=$.exports.useState(""),[o,s]=$.exports.useState([]);function a(){mse.postSubmission(n,e,i).then(u=>{s(u)}).catch(u=>{console.log(u)})}function l(){return o}return{runJudge:a,getVerdicts:l,setSrc:t,setSrcLanguage:r}};function CYt(n){return n<1e3?`${n} ns`:n<1e6?`${(n/1e3).toFixed(2)} us`:n<1e9?`${(n/1e6).toFixed(2)} ms`:`${(n/1e9).toFixed(2)} s`}function wYt(n){return n<1024?`${n} bytes`:n<1024*1024?`${(n/1024).toFixed(2)} KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(2)} MB`:`${(n/1024/1024/1024).toFixed(2)} GB`}const xYt=n=>{let e=1;return n.map(i=>{let r=LYt(i);return r.id=`${e++}`,r})},LYt=n=>{let e="",t=n.verdict,i=CYt(n.time_usage.nanos),r=wYt(n.memory_usage_bytes);return{id:e,verdict:t,time_usage:i,memory_usage:r}};var SYt=Object.defineProperty,DYt=(n,e,t)=>e in n?SYt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,jY=(n,e,t)=>(DYt(n,typeof e!="symbol"?e+"":e,t),t);class EYt{constructor(){jY(this,"current",this.detect()),jY(this,"handoffState","pending"),jY(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}}let Y4=new EYt,El=(n,e)=>{Y4.isServer?$.exports.useEffect(n,e):$.exports.useLayoutEffect(n,e)};function J4(n){let e=$.exports.useRef(n);return El(()=>{e.current=n},[n]),e}function Yj(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(e=>setTimeout(()=>{throw e}))}function s0(){let n=[],e={addEventListener(t,i,r,o){return t.addEventListener(i,r,o),e.add(()=>t.removeEventListener(i,r,o))},requestAnimationFrame(...t){let i=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(i))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let i=setTimeout(...t);return e.add(()=>clearTimeout(i))},microTask(...t){let i={current:!0};return Yj(()=>{i.current&&t[0]()}),e.add(()=>{i.current=!1})},style(t,i,r){let o=t.style.getPropertyValue(i);return Object.assign(t.style,{[i]:r}),this.add(()=>{Object.assign(t.style,{[i]:o})})},group(t){let i=s0();return t(i),this.add(()=>i.dispose())},add(t){return n.push(t),()=>{let i=n.indexOf(t);if(i>=0)for(let r of n.splice(i,1))r()}},dispose(){for(let t of n.splice(0))t()}};return e}function LE(){let[n]=$.exports.useState(s0);return $.exports.useEffect(()=>()=>n.dispose(),[n]),n}let qi=function(n){let e=J4(n);return En.useCallback((...t)=>e.current(...t),[e])};function kYt(){let n=typeof document>"u";return"useSyncExternalStore"in Zg?(e=>e.useSyncExternalStore)(Zg)(()=>()=>{},()=>!1,()=>!n):!1}function Mb(){let n=kYt(),[e,t]=$.exports.useState(Y4.isHandoffComplete);return e&&Y4.isHandoffComplete===!1&&t(!1),$.exports.useEffect(()=>{e!==!0&&t(!0)},[e]),$.exports.useEffect(()=>Y4.handoff(),[]),n?!1:e}var p_e;let T0=(p_e=En.useId)!=null?p_e:function(){let n=Mb(),[e,t]=En.useState(n?()=>Y4.nextId():null);return El(()=>{e===null&&t(Y4.nextId())},[e]),e!=null?""+e:void 0};function ga(n,e,...t){if(n in e){let r=e[n];return typeof r=="function"?r(...t):r}let i=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,ga),i}function SE(n){return Y4.isServer?null:n instanceof Node?n.ownerDocument:n!=null&&n.hasOwnProperty("current")&&n.current instanceof Node?n.current.ownerDocument:document}let Tse=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var b4=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n))(b4||{}),yBe=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(yBe||{}),MYt=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(MYt||{});function _Be(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Tse)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var $de=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))($de||{});function jde(n,e=0){var t;return n===((t=SE(n))==null?void 0:t.body)?!1:ga(e,{[0](){return n.matches(Tse)},[1](){let i=n;for(;i!==null;){if(i.matches(Tse))return!0;i=i.parentElement}return!1}})}function CBe(n){let e=SE(n);s0().nextFrame(()=>{e&&!jde(e.activeElement,0)&&Of(n)})}var AYt=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(AYt||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Of(n){n==null||n.focus({preventScroll:!0})}let NYt=["textarea","input"].join(",");function OYt(n){var e,t;return(t=(e=n==null?void 0:n.matches)==null?void 0:e.call(n,NYt))!=null?t:!1}function wBe(n,e=t=>t){return n.slice().sort((t,i)=>{let r=e(t),o=e(i);if(r===null||o===null)return 0;let s=r.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function IYt(n,e){return Rx(_Be(),e,{relativeTo:n})}function Rx(n,e,{sorted:t=!0,relativeTo:i=null,skipElements:r=[]}={}){let o=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,s=Array.isArray(n)?t?wBe(n):n:_Be(n);r.length>0&&s.length>1&&(s=s.filter(f=>!r.includes(f))),i=i!=null?i:o.activeElement;let a=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,s.indexOf(i))-1;if(e&4)return Math.max(0,s.indexOf(i))+1;if(e&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=e&32?{preventScroll:!0}:{},c=0,d=s.length,h;do{if(c>=d||c+d<=0)return 0;let f=l+c;if(e&16)f=(f+d)%d;else{if(f<0)return 3;if(f>=d)return 1}h=s[f],h==null||h.focus(u),c+=a}while(h!==o.activeElement);return e&6&&OYt(h)&&h.select(),2}function QO(n,e,t){let i=J4(e);$.exports.useEffect(()=>{function r(o){i.current(o)}return document.addEventListener(n,r,t),()=>document.removeEventListener(n,r,t)},[n,t])}function xBe(n,e,t){let i=J4(e);$.exports.useEffect(()=>{function r(o){i.current(o)}return window.addEventListener(n,r,t),()=>window.removeEventListener(n,r,t)},[n,t])}function LBe(n,e,t=!0){let i=$.exports.useRef(!1);$.exports.useEffect(()=>{requestAnimationFrame(()=>{i.current=t})},[t]);function r(s,a){if(!i.current||s.defaultPrevented)return;let l=a(s);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(n);for(let c of u){if(c===null)continue;let d=c instanceof HTMLElement?c:c.current;if(d!=null&&d.contains(l)||s.composed&&s.composedPath().includes(d))return}return!jde(l,$de.Loose)&&l.tabIndex!==-1&&s.preventDefault(),e(s,l)}let o=$.exports.useRef(null);QO("pointerdown",s=>{var a,l;i.current&&(o.current=((l=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:l[0])||s.target)},!0),QO("mousedown",s=>{var a,l;i.current&&(o.current=((l=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:l[0])||s.target)},!0),QO("click",s=>{o.current&&(r(s,()=>o.current),o.current=null)},!0),QO("touchend",s=>r(s,()=>s.target instanceof HTMLElement?s.target:null),!0),xBe("blur",s=>r(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function g_e(n){var e;if(n.type)return n.type;let t=(e=n.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function SBe(n,e){let[t,i]=$.exports.useState(()=>g_e(n));return El(()=>{i(g_e(n))},[n.type,n.as]),El(()=>{t||e.current&&e.current instanceof HTMLButtonElement&&!e.current.hasAttribute("type")&&i("button")},[t,e]),t}let DBe=Symbol();function EBe(n,e=!0){return Object.assign(n,{[DBe]:e})}function Al(...n){let e=$.exports.useRef(n);$.exports.useEffect(()=>{e.current=n},[n]);let t=qi(i=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(i):r.current=i)});return n.every(i=>i==null||(i==null?void 0:i[DBe]))?void 0:t}function RYt({container:n,accept:e,walk:t,enabled:i=!0}){let r=$.exports.useRef(e),o=$.exports.useRef(t);$.exports.useEffect(()=>{r.current=e,o.current=t},[e,t]),El(()=>{if(!n||!i)return;let s=SE(n);if(!s)return;let a=r.current,l=o.current,u=Object.assign(d=>a(d),{acceptNode:a}),c=s.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)l(c.currentNode)},[n,i,r,o])}function HYt(n){throw new Error("Unexpected object: "+n)}var V2=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(V2||{});function PYt(n,e){let t=e.resolveItems();if(t.length<=0)return null;let i=e.resolveActiveIndex(),r=i!=null?i:-1,o=(()=>{switch(n.focus){case 0:return t.findIndex(s=>!e.resolveDisabled(s));case 1:{let s=t.slice().reverse().findIndex((a,l,u)=>r!==-1&&u.length-l-1>=r?!1:!e.resolveDisabled(a));return s===-1?s:t.length-1-s}case 2:return t.findIndex((s,a)=>a<=r?!1:!e.resolveDisabled(s));case 3:{let s=t.slice().reverse().findIndex(a=>!e.resolveDisabled(a));return s===-1?s:t.length-1-s}case 4:return t.findIndex(s=>e.resolveId(s)===n.id);case 5:return null;default:HYt(n)}})();return o===-1?i:o}function VP(...n){return Array.from(new Set(n.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}var m7=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(m7||{}),hf=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(hf||{});function fl({ourProps:n,theirProps:e,slot:t,defaultTag:i,features:r,visible:o=!0,name:s}){let a=kBe(e,n);if(o)return bO(a,t,i,s);let l=r!=null?r:0;if(l&2){let{static:u=!1,...c}=a;if(u)return bO(c,t,i,s)}if(l&1){let{unmount:u=!0,...c}=a;return ga(u?0:1,{[0](){return null},[1](){return bO({...c,hidden:!0,style:{display:"none"}},t,i,s)}})}return bO(a,t,i,s)}function bO(n,e={},t,i){let{as:r=t,children:o,refName:s="ref",...a}=WY(n,["unmount","static"]),l=n.ref!==void 0?{[s]:n.ref}:{},u=typeof o=="function"?o(e):o;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(e));let c={};if(e){let d=!1,h=[];for(let[f,g]of Object.entries(e))typeof g=="boolean"&&(d=!0),g===!0&&h.push(f);d&&(c["data-headlessui-state"]=h.join(" "))}if(r===$.exports.Fragment&&Object.keys(m_e(a)).length>0){if(!$.exports.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${i} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(g=>` - ${g}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(` `)].join(` `));let d=u.props,h=typeof(d==null?void 0:d.className)=="function"?(...g)=>VP(d==null?void 0:d.className(...g),a.className):VP(d==null?void 0:d.className,a.className),f=h?{className:h}:{};return $.exports.cloneElement(u,Object.assign({},kBe(u.props,m_e(WY(a,["ref"]))),c,l,VYt(u.ref,l.ref),f))}return $.exports.createElement(r,Object.assign({},WY(a,["ref"]),r!==$.exports.Fragment&&l,r!==$.exports.Fragment&&c),u)}function VYt(...n){return{ref:n.every(e=>e==null)?void 0:e=>{for(let t of n)t!=null&&(typeof t=="function"?t(e):t.current=e)}}}function kBe(...n){if(n.length===0)return{};if(n.length===1)return n[0];let e={},t={};for(let i of n)for(let r in i)r.startsWith("on")&&typeof i[r]=="function"?(t[r]!=null||(t[r]=[]),t[r].push(i[r])):e[r]=i[r];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(i=>[i,void 0])));for(let i in t)Object.assign(e,{[i](r,...o){let s=t[i];for(let a of s){if((r instanceof Event||(r==null?void 0:r.nativeEvent)instanceof Event)&&r.defaultPrevented)return;a(r,...o)}}});return e}function Ba(n){var e;return Object.assign($.exports.forwardRef(n),{displayName:(e=n.displayName)!=null?e:n.name})}function m_e(n){let e=Object.assign({},n);for(let t in e)e[t]===void 0&&delete e[t];return e}function WY(n,e=[]){let t=Object.assign({},n);for(let i of e)i in t&&delete t[i];return t}function Wde(n){let e=n.parentElement,t=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(t=e),e=e.parentElement;let i=(e==null?void 0:e.getAttribute("disabled"))==="";return i&&FYt(t)?!1:i}function FYt(n){if(!n)return!1;let e=n.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}let BYt="div";var FP=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(FP||{});function $Yt(n,e){let{features:t=1,...i}=n,r={ref:e,"aria-hidden":(t&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return fl({ourProps:r,theirProps:i,slot:{},defaultTag:BYt,name:"Hidden"})}let vse=Ba($Yt),zde=$.exports.createContext(null);zde.displayName="OpenClosedContext";var ca=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(ca||{});function DE(){return $.exports.useContext(zde)}function Ude({value:n,children:e}){return En.createElement(zde.Provider,{value:n},e)}var Es=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(Es||{});function qde(n,e){let t=$.exports.useRef([]),i=qi(n);$.exports.useEffect(()=>{let r=[...t.current];for(let[o,s]of e.entries())if(t.current[o]!==s){let a=i(e,r);return t.current=e,a}},[i,...e])}function T_e(n){return[n.screenX,n.screenY]}function jYt(){let n=$.exports.useRef([-1,-1]);return{wasMoved(e){let t=T_e(e);return n.current[0]===t[0]&&n.current[1]===t[1]?!1:(n.current=t,!0)},update(e){n.current=T_e(e)}}}function WYt(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ab(...n){return $.exports.useMemo(()=>SE(...n),[...n])}var Bw=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Bw||{});function zYt(){let n=$.exports.useRef(0);return xBe("keydown",e=>{e.key==="Tab"&&(n.current=e.shiftKey?1:0)},!0),n}function EE(){let n=$.exports.useRef(!1);return El(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function MBe(n,e,t,i){let r=J4(t);$.exports.useEffect(()=>{n=n!=null?n:window;function o(s){r.current(s)}return n.addEventListener(e,o,i),()=>n.removeEventListener(e,o,i)},[n,e,i])}function UYt(n){function e(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}function ABe(n){let e=qi(n),t=$.exports.useRef(!1);$.exports.useEffect(()=>(t.current=!1,()=>{t.current=!0,Yj(()=>{t.current&&e()})}),[e])}function NBe(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let e=new Set;for(let t of n.current)t.current instanceof HTMLElement&&e.add(t.current);return e}let qYt="div";var OBe=(n=>(n[n.None=1]="None",n[n.InitialFocus=2]="InitialFocus",n[n.TabLock=4]="TabLock",n[n.FocusLock=8]="FocusLock",n[n.RestoreFocus=16]="RestoreFocus",n[n.All=30]="All",n))(OBe||{});function GYt(n,e){let t=$.exports.useRef(null),i=Al(t,e),{initialFocus:r,containers:o,features:s=30,...a}=n;Mb()||(s=1);let l=Ab(t);XYt({ownerDocument:l},Boolean(s&16));let u=YYt({ownerDocument:l,container:t,initialFocus:r},Boolean(s&2));JYt({ownerDocument:l,container:t,containers:o,previousActiveElement:u},Boolean(s&8));let c=zYt(),d=qi(T=>{let v=t.current;!v||(Q=>Q())(()=>{ga(c.current,{[Bw.Forwards]:()=>{Rx(v,b4.First,{skipElements:[T.relatedTarget]})},[Bw.Backwards]:()=>{Rx(v,b4.Last,{skipElements:[T.relatedTarget]})}})})}),h=LE(),f=$.exports.useRef(!1),g={ref:i,onKeyDown(T){T.key=="Tab"&&(f.current=!0,h.requestAnimationFrame(()=>{f.current=!1}))},onBlur(T){let v=NBe(o);t.current instanceof HTMLElement&&v.add(t.current);let Q=T.relatedTarget;Q instanceof HTMLElement&&Q.dataset.headlessuiFocusGuard!=="true"&&(IBe(v,Q)||(f.current?Rx(t.current,ga(c.current,{[Bw.Forwards]:()=>b4.Next,[Bw.Backwards]:()=>b4.Previous})|b4.WrapAround,{relativeTo:T.target}):T.target instanceof HTMLElement&&Of(T.target)))}};return pe($c,{children:[Boolean(s&4)&&En.createElement(vse,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:FP.Focusable}),fl({ourProps:g,theirProps:a,defaultTag:qYt,name:"FocusTrap"}),Boolean(s&4)&&En.createElement(vse,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:FP.Focusable})]},void 0,!0)}let KYt=Ba(GYt),UC=Object.assign(KYt,{features:OBe}),U5=[];UYt(()=>{function n(e){e.target instanceof HTMLElement&&e.target!==document.body&&U5[0]!==e.target&&(U5.unshift(e.target),U5=U5.filter(t=>t!=null&&t.isConnected),U5.splice(10))}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function ZYt(n=!0){let e=$.exports.useRef(U5.slice());return qde(([t],[i])=>{i===!0&&t===!1&&Yj(()=>{e.current.splice(0)}),i===!1&&t===!0&&(e.current=U5.slice())},[n,U5,e]),qi(()=>{var t;return(t=e.current.find(i=>i!=null&&i.isConnected))!=null?t:null})}function XYt({ownerDocument:n},e){let t=ZYt(e);qde(()=>{e||(n==null?void 0:n.activeElement)===(n==null?void 0:n.body)&&Of(t())},[e]),ABe(()=>{e&&Of(t())})}function YYt({ownerDocument:n,container:e,initialFocus:t},i){let r=$.exports.useRef(null),o=EE();return qde(()=>{if(!i)return;let s=e.current;s&&Yj(()=>{if(!o.current)return;let a=n==null?void 0:n.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===a){r.current=a;return}}else if(s.contains(a)){r.current=a;return}t!=null&&t.current?Of(t.current):Rx(s,b4.First)===yBe.Error&&console.warn("There are no focusable elements inside the "),r.current=n==null?void 0:n.activeElement})},[i]),r}function JYt({ownerDocument:n,container:e,containers:t,previousActiveElement:i},r){let o=EE();MBe(n==null?void 0:n.defaultView,"focus",s=>{if(!r||!o.current)return;let a=NBe(t);e.current instanceof HTMLElement&&a.add(e.current);let l=i.current;if(!l)return;let u=s.target;u&&u instanceof HTMLElement?IBe(a,u)?(i.current=u,Of(u)):(s.preventDefault(),s.stopPropagation(),Of(l)):Of(i.current)},!0)}function IBe(n,e){for(let t of n)if(t.contains(e))return!0;return!1}let RBe=$.exports.createContext(!1);function eJt(){return $.exports.useContext(RBe)}function Qse(n){return En.createElement(RBe.Provider,{value:n.force},n.children)}function tJt(n){let e=eJt(),t=$.exports.useContext(HBe),i=Ab(n),[r,o]=$.exports.useState(()=>{if(!e&&t!==null||Y4.isServer)return null;let s=i==null?void 0:i.getElementById("headlessui-portal-root");if(s)return s;if(i===null)return null;let a=i.createElement("div");return a.setAttribute("id","headlessui-portal-root"),i.body.appendChild(a)});return $.exports.useEffect(()=>{r!==null&&(i!=null&&i.body.contains(r)||i==null||i.body.appendChild(r))},[r,i]),$.exports.useEffect(()=>{e||t!==null&&o(t.current)},[t,o,e]),r}let nJt=$.exports.Fragment;function iJt(n,e){let t=n,i=$.exports.useRef(null),r=Al(EBe(c=>{i.current=c}),e),o=Ab(i),s=tJt(i),[a]=$.exports.useState(()=>{var c;return Y4.isServer?null:(c=o==null?void 0:o.createElement("div"))!=null?c:null}),l=$.exports.useContext(bse),u=Mb();return El(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),El(()=>{if(a&&l)return l.register(a)},[l,a]),ABe(()=>{var c;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((c=s.parentElement)==null||c.removeChild(s)))}),u?!s||!a?null:sae.exports.createPortal(fl({ourProps:{ref:r},theirProps:t,defaultTag:nJt,name:"Portal"}),a):null}let rJt=$.exports.Fragment,HBe=$.exports.createContext(null);function oJt(n,e){let{target:t,...i}=n,r={ref:Al(e)};return En.createElement(HBe.Provider,{value:t},fl({ourProps:r,theirProps:i,defaultTag:rJt,name:"Popover.Group"}))}let bse=$.exports.createContext(null);function sJt(){let n=$.exports.useContext(bse),e=$.exports.useRef([]),t=qi(o=>(e.current.push(o),n&&n.register(o),()=>i(o))),i=qi(o=>{let s=e.current.indexOf(o);s!==-1&&e.current.splice(s,1),n&&n.unregister(o)}),r=$.exports.useMemo(()=>({register:t,unregister:i,portals:e}),[t,i,e]);return[e,$.exports.useMemo(()=>function({children:o}){return En.createElement(bse.Provider,{value:r},o)},[r])]}let aJt=Ba(iJt),lJt=Ba(oJt),yse=Object.assign(aJt,{Group:lJt}),PBe=$.exports.createContext(null);function VBe(){let n=$.exports.useContext(PBe);if(n===null){let e=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,VBe),e}return n}function uJt(){let[n,e]=$.exports.useState([]);return[n.length>0?n.join(" "):void 0,$.exports.useMemo(()=>function(t){let i=qi(o=>(e(s=>[...s,o]),()=>e(s=>{let a=s.slice(),l=a.indexOf(o);return l!==-1&&a.splice(l,1),a}))),r=$.exports.useMemo(()=>({register:i,slot:t.slot,name:t.name,props:t.props}),[i,t.slot,t.name,t.props]);return En.createElement(PBe.Provider,{value:r},t.children)},[e])]}let cJt="p";function dJt(n,e){let t=T0(),{id:i=`headlessui-description-${t}`,...r}=n,o=VBe(),s=Al(e);El(()=>o.register(i),[i,o.register]);let a={ref:s,...o.props,id:i};return fl({ourProps:a,theirProps:r,slot:o.slot||{},defaultTag:cJt,name:o.name||"Description"})}let hJt=Ba(dJt),fJt=Object.assign(hJt,{}),Gde=$.exports.createContext(()=>{});Gde.displayName="StackContext";var _se=(n=>(n[n.Add=0]="Add",n[n.Remove=1]="Remove",n))(_se||{});function pJt(){return $.exports.useContext(Gde)}function gJt({children:n,onUpdate:e,type:t,element:i,enabled:r}){let o=pJt(),s=qi((...a)=>{e==null||e(...a),o(...a)});return El(()=>{let a=r===void 0||r===!0;return a&&s(0,t,i),()=>{a&&s(1,t,i)}},[s,t,i,r]),En.createElement(Gde.Provider,{value:s},n)}function mJt(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}const TJt=typeof Object.is=="function"?Object.is:mJt,{useState:vJt,useEffect:QJt,useLayoutEffect:bJt,useDebugValue:yJt}=Zg;function _Jt(n,e,t){const i=e(),[{inst:r},o]=vJt({inst:{value:i,getSnapshot:e}});return bJt(()=>{r.value=i,r.getSnapshot=e,zY(r)&&o({inst:r})},[n,i,e]),QJt(()=>(zY(r)&&o({inst:r}),n(()=>{zY(r)&&o({inst:r})})),[n]),yJt(i),i}function zY(n){const e=n.getSnapshot,t=n.value;try{const i=e();return!TJt(t,i)}catch{return!0}}function CJt(n,e,t){return e()}const wJt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xJt=!wJt,LJt=xJt?CJt:_Jt,SJt="useSyncExternalStore"in Zg?(n=>n.useSyncExternalStore)(Zg):LJt;function DJt(n){return SJt(n.subscribe,n.getSnapshot,n.getSnapshot)}function EJt(n,e){let t=n(),i=new Set;return{getSnapshot(){return t},subscribe(r){return i.add(r),()=>i.delete(r)},dispatch(r,...o){let s=e[r].call(t,...o);s&&(t=s,i.forEach(a=>a()))}}}function kJt(){let n;return{before({doc:e}){var t;let i=e.documentElement;n=((t=e.defaultView)!=null?t:window).innerWidth-i.clientWidth},after({doc:e,d:t}){let i=e.documentElement,r=i.clientWidth-i.offsetWidth,o=n-r;t.style(i,"paddingRight",`${o}px`)}}}function MJt(){if(!WYt())return{};let n;return{before(){n=window.pageYOffset},after({doc:e,d:t,meta:i}){function r(o){return i.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=s0();s.style(e.documentElement,"scroll-behavior","auto"),t.add(()=>t.microTask(()=>s.dispose()))}t.style(e.body,"marginTop",`-${n}px`),window.scrollTo(0,0);let o=null;t.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let a=s.target.closest("a");if(!a)return;let{hash:l}=new URL(a.href),u=e.querySelector(l);u&&!r(u)&&(o=u)}catch{}},!0),t.addEventListener(e,"touchmove",s=>{s.target instanceof HTMLElement&&!r(s.target)&&s.preventDefault()},{passive:!1}),t.add(()=>{window.scrollTo(0,window.pageYOffset+n),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}}function AJt(){return{before({doc:n,d:e}){e.style(n.documentElement,"overflow","hidden")}}}function NJt(n){let e={};for(let t of n)Object.assign(e,t(e));return e}let kg=EJt(()=>new Map,{PUSH(n,e){var t;let i=(t=this.get(n))!=null?t:{doc:n,count:0,d:s0(),meta:new Set};return i.count++,i.meta.add(e),this.set(n,i),this},POP(n,e){let t=this.get(n);return t&&(t.count--,t.meta.delete(e)),this},SCROLL_PREVENT({doc:n,d:e,meta:t}){let i={doc:n,d:e,meta:NJt(t)},r=[MJt(),kJt(),AJt()];r.forEach(({before:o})=>o==null?void 0:o(i)),r.forEach(({after:o})=>o==null?void 0:o(i))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});kg.subscribe(()=>{let n=kg.getSnapshot(),e=new Map;for(let[t]of n)e.set(t,t.documentElement.style.overflow);for(let t of n.values()){let i=e.get(t.doc)==="hidden",r=t.count!==0;(r&&!i||!r&&i)&&kg.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&kg.dispatch("TEARDOWN",t)}});function OJt(n,e,t){let i=DJt(kg),r=n?i.get(n):void 0,o=r?r.count>0:!1;return El(()=>{if(!(!n||!e))return kg.dispatch("PUSH",n,t),()=>kg.dispatch("POP",n,t)},[e,n]),o}let UY=new Map,qC=new Map;function v_e(n,e=!0){El(()=>{var t;if(!e)return;let i=typeof n=="function"?n():n.current;if(!i)return;function r(){var s;if(!i)return;let a=(s=qC.get(i))!=null?s:1;if(a===1?qC.delete(i):qC.set(i,a-1),a!==1)return;let l=UY.get(i);l&&(l["aria-hidden"]===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",l["aria-hidden"]),i.inert=l.inert,UY.delete(i))}let o=(t=qC.get(i))!=null?t:0;return qC.set(i,o+1),o!==0||(UY.set(i,{"aria-hidden":i.getAttribute("aria-hidden"),inert:i.inert}),i.setAttribute("aria-hidden","true"),i.inert=!0),r},[n,e])}var IJt="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@headlessui/react/dist/hooks/use-root-containers.js";function RJt({defaultContainers:n=[],portals:e,mainTreeNodeRef:t}={}){var i;let r=$.exports.useRef((i=t==null?void 0:t.current)!=null?i:null),o=Ab(r),s=qi(()=>{var a;let l=[];for(let u of n)u!==null&&(u instanceof HTMLElement?l.push(u):"current"in u&&u.current instanceof HTMLElement&&l.push(u.current));if(e!=null&&e.current)for(let u of e.current)l.push(u);for(let u of(a=o==null?void 0:o.querySelectorAll("html > *, body > *"))!=null?a:[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="headlessui-portal-root"&&(u.contains(r.current)||l.some(c=>u.contains(c))||l.push(u));return l});return{resolveContainers:s,contains:qi(a=>s().some(l=>l.contains(a))),mainTreeNodeRef:r,MainTreeNode:$.exports.useMemo(()=>function(){return t!=null?null:pe(vse,{features:FP.Hidden,ref:r},void 0,!1,{fileName:IJt,lineNumber:1,columnNumber:930},this)},[r,t])}}var Q_e="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@headlessui/react/dist/components/dialog/dialog.js",HJt=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(HJt||{}),PJt=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(PJt||{});let VJt={[0](n,e){return n.titleId===e.id?n:{...n,titleId:e.id}}},BP=$.exports.createContext(null);BP.displayName="DialogContext";function kE(n){let e=$.exports.useContext(BP);if(e===null){let t=new Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,kE),t}return e}function FJt(n,e,t=()=>[document.body]){OJt(n,e,i=>{var r;return{containers:[...(r=i.containers)!=null?r:[],t]}})}function BJt(n,e){return ga(e.type,VJt,n,e)}let $Jt="div",jJt=m7.RenderStrategy|m7.Static;function WJt(n,e){var t;let i=T0(),{id:r=`headlessui-dialog-${i}`,open:o,onClose:s,initialFocus:a,__demoMode:l=!1,...u}=n,[c,d]=$.exports.useState(0),h=DE();o===void 0&&h!==null&&(o=(h&ca.Open)===ca.Open);let f=$.exports.useRef(null),g=Al(f,e),T=Ab(f),v=n.hasOwnProperty("open")||h!==null,Q=n.hasOwnProperty("onClose");if(!v&&!Q)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!v)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!Q)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof s!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${s}`);let b=o?0:1,[_,C]=$.exports.useReducer(BJt,{titleId:null,descriptionId:null,panelRef:$.exports.createRef()}),L=qi(()=>s(!1)),S=qi($e=>C({type:0,id:$e})),D=Mb()?l?!1:b===0:!1,k=c>1,M=$.exports.useContext(BP)!==null,[R,I]=sJt(),{resolveContainers:H,mainTreeNodeRef:O,MainTreeNode:B}=RJt({portals:R,defaultContainers:[(t=_.panelRef.current)!=null?t:f.current]}),K=k?"parent":"leaf",ne=h!==null?(h&ca.Closing)===ca.Closing:!1,ue=(()=>M||ne?!1:D)(),fe=$.exports.useCallback(()=>{var $e,Je;return(Je=Array.from(($e=T==null?void 0:T.querySelectorAll("body > *"))!=null?$e:[]).find(He=>He.id==="headlessui-portal-root"?!1:He.contains(O.current)&&He instanceof HTMLElement))!=null?Je:null},[O]);v_e(fe,ue);let be=(()=>k?!0:D)(),q=$.exports.useCallback(()=>{var $e,Je;return(Je=Array.from(($e=T==null?void 0:T.querySelectorAll("[data-headlessui-portal]"))!=null?$e:[]).find(He=>He.contains(O.current)&&He instanceof HTMLElement))!=null?Je:null},[O]);v_e(q,be);let he=(()=>!(!D||k))();LBe(H,L,he);let j=(()=>!(k||b!==0))();MBe(T==null?void 0:T.defaultView,"keydown",$e=>{j&&($e.defaultPrevented||$e.key===Es.Escape&&($e.preventDefault(),$e.stopPropagation(),L()))});let V=(()=>!(ne||b!==0||M))();FJt(T,V,H),$.exports.useEffect(()=>{if(b!==0||!f.current)return;let $e=new ResizeObserver(Je=>{for(let He of Je){let Ue=He.target.getBoundingClientRect();Ue.x===0&&Ue.y===0&&Ue.width===0&&Ue.height===0&&L()}});return $e.observe(f.current),()=>$e.disconnect()},[b,f,L]);let[ae,_e]=uJt(),Fe=$.exports.useMemo(()=>[{dialogState:b,close:L,setTitleId:S},_],[b,_,L,S]),ye=$.exports.useMemo(()=>({open:b===0}),[b]),Ce={ref:g,id:r,role:"dialog","aria-modal":b===0?!0:void 0,"aria-labelledby":_.titleId,"aria-describedby":ae};return En.createElement(gJt,{type:"Dialog",enabled:b===0,element:f,onUpdate:qi(($e,Je)=>{Je==="Dialog"&&ga($e,{[_se.Add]:()=>d(He=>He+1),[_se.Remove]:()=>d(He=>He-1)})})},En.createElement(Qse,{force:!0},En.createElement(yse,null,En.createElement(BP.Provider,{value:Fe},En.createElement(yse.Group,{target:f},En.createElement(Qse,{force:!1},En.createElement(_e,{slot:ye,name:"Dialog.Description"},En.createElement(UC,{initialFocus:a,containers:H,features:D?ga(K,{parent:UC.features.RestoreFocus,leaf:UC.features.All&~UC.features.FocusLock}):UC.features.None},En.createElement(I,null,fl({ourProps:Ce,theirProps:u,slot:ye,defaultTag:$Jt,features:jJt,visible:b===0,name:"Dialog"}))))))))),En.createElement(B,null))}let zJt="div";function UJt(n,e){let t=T0(),{id:i=`headlessui-dialog-overlay-${t}`,...r}=n,[{dialogState:o,close:s}]=kE("Dialog.Overlay"),a=Al(e),l=qi(c=>{if(c.target===c.currentTarget){if(Wde(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),s()}}),u=$.exports.useMemo(()=>({open:o===0}),[o]);return fl({ourProps:{ref:a,id:i,"aria-hidden":!0,onClick:l},theirProps:r,slot:u,defaultTag:zJt,name:"Dialog.Overlay"})}let qJt="div";function GJt(n,e){let t=T0(),{id:i=`headlessui-dialog-backdrop-${t}`,...r}=n,[{dialogState:o},s]=kE("Dialog.Backdrop"),a=Al(e);$.exports.useEffect(()=>{if(s.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[s.panelRef]);let l=$.exports.useMemo(()=>({open:o===0}),[o]);return pe(Qse,{force:!0,children:pe(yse,{children:fl({ourProps:{ref:a,id:i,"aria-hidden":!0},theirProps:r,slot:l,defaultTag:qJt,name:"Dialog.Backdrop"})},void 0,!1,{fileName:Q_e,lineNumber:1,columnNumber:5965},this)},void 0,!1,{fileName:Q_e,lineNumber:1,columnNumber:5936},this)}let KJt="div";function ZJt(n,e){let t=T0(),{id:i=`headlessui-dialog-panel-${t}`,...r}=n,[{dialogState:o},s]=kE("Dialog.Panel"),a=Al(e,s.panelRef),l=$.exports.useMemo(()=>({open:o===0}),[o]),u=qi(c=>{c.stopPropagation()});return fl({ourProps:{ref:a,id:i,onClick:u},theirProps:r,slot:l,defaultTag:KJt,name:"Dialog.Panel"})}let XJt="h2";function YJt(n,e){let t=T0(),{id:i=`headlessui-dialog-title-${t}`,...r}=n,[{dialogState:o,setTitleId:s}]=kE("Dialog.Title"),a=Al(e);$.exports.useEffect(()=>(s(i),()=>s(null)),[i,s]);let l=$.exports.useMemo(()=>({open:o===0}),[o]);return fl({ourProps:{ref:a,id:i},theirProps:r,slot:l,defaultTag:XJt,name:"Dialog.Title"})}let JJt=Ba(WJt),een=Ba(GJt),ten=Ba(ZJt),nen=Ba(UJt),ien=Ba(YJt),b_e=Object.assign(JJt,{Backdrop:een,Panel:ten,Overlay:nen,Title:ien,Description:fJt});var y_e;let ren=(y_e=En.startTransition)!=null?y_e:function(n){n()};var oen="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@headlessui/react/dist/components/disclosure/disclosure.js",sen=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(sen||{}),aen=(n=>(n[n.ToggleDisclosure=0]="ToggleDisclosure",n[n.CloseDisclosure=1]="CloseDisclosure",n[n.SetButtonId=2]="SetButtonId",n[n.SetPanelId=3]="SetPanelId",n[n.LinkPanel=4]="LinkPanel",n[n.UnlinkPanel=5]="UnlinkPanel",n))(aen||{});let len={[0]:n=>({...n,disclosureState:ga(n.disclosureState,{[0]:1,[1]:0})}),[1]:n=>n.disclosureState===1?n:{...n,disclosureState:1},[4](n){return n.linkedPanel===!0?n:{...n,linkedPanel:!0}},[5](n){return n.linkedPanel===!1?n:{...n,linkedPanel:!1}},[2](n,e){return n.buttonId===e.buttonId?n:{...n,buttonId:e.buttonId}},[3](n,e){return n.panelId===e.panelId?n:{...n,panelId:e.panelId}}},Kde=$.exports.createContext(null);Kde.displayName="DisclosureContext";function Zde(n){let e=$.exports.useContext(Kde);if(e===null){let t=new Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Zde),t}return e}let Xde=$.exports.createContext(null);Xde.displayName="DisclosureAPIContext";function FBe(n){let e=$.exports.useContext(Xde);if(e===null){let t=new Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,FBe),t}return e}let Yde=$.exports.createContext(null);Yde.displayName="DisclosurePanelContext";function uen(){return $.exports.useContext(Yde)}function cen(n,e){return ga(e.type,len,n,e)}let den=$.exports.Fragment;function hen(n,e){let{defaultOpen:t=!1,...i}=n,r=$.exports.useRef(null),o=Al(e,EBe(v=>{r.current=v},n.as===void 0||n.as===$.exports.Fragment)),s=$.exports.useRef(null),a=$.exports.useRef(null),l=$.exports.useReducer(cen,{disclosureState:t?0:1,linkedPanel:!1,buttonRef:a,panelRef:s,buttonId:null,panelId:null}),[{disclosureState:u,buttonId:c},d]=l,h=qi(v=>{d({type:1});let Q=SE(r);if(!Q||!c)return;let b=(()=>v?v instanceof HTMLElement?v:v.current instanceof HTMLElement?v.current:Q.getElementById(c):Q.getElementById(c))();b==null||b.focus()}),f=$.exports.useMemo(()=>({close:h}),[h]),g=$.exports.useMemo(()=>({open:u===0,close:h}),[u,h]),T={ref:o};return En.createElement(Kde.Provider,{value:l},En.createElement(Xde.Provider,{value:f},En.createElement(Ude,{value:ga(u,{[0]:ca.Open,[1]:ca.Closed})},fl({ourProps:T,theirProps:i,slot:g,defaultTag:den,name:"Disclosure"}))))}let fen="button";function pen(n,e){let t=T0(),{id:i=`headlessui-disclosure-button-${t}`,...r}=n,[o,s]=Zde("Disclosure.Button"),a=uen(),l=a===null?!1:a===o.panelId,u=$.exports.useRef(null),c=Al(u,e,l?null:o.buttonRef);$.exports.useEffect(()=>{if(!l)return s({type:2,buttonId:i}),()=>{s({type:2,buttonId:null})}},[i,s,l]);let d=qi(Q=>{var b;if(l){if(o.disclosureState===1)return;switch(Q.key){case Es.Space:case Es.Enter:Q.preventDefault(),Q.stopPropagation(),s({type:0}),(b=o.buttonRef.current)==null||b.focus();break}}else switch(Q.key){case Es.Space:case Es.Enter:Q.preventDefault(),Q.stopPropagation(),s({type:0});break}}),h=qi(Q=>{switch(Q.key){case Es.Space:Q.preventDefault();break}}),f=qi(Q=>{var b;Wde(Q.currentTarget)||n.disabled||(l?(s({type:0}),(b=o.buttonRef.current)==null||b.focus()):s({type:0}))}),g=$.exports.useMemo(()=>({open:o.disclosureState===0}),[o]),T=SBe(n,u),v=l?{ref:c,type:T,onKeyDown:d,onClick:f}:{ref:c,id:i,type:T,"aria-expanded":o.disclosureState===0,"aria-controls":o.linkedPanel?o.panelId:void 0,onKeyDown:d,onKeyUp:h,onClick:f};return fl({ourProps:v,theirProps:r,slot:g,defaultTag:fen,name:"Disclosure.Button"})}let gen="div",men=m7.RenderStrategy|m7.Static;function Ten(n,e){let t=T0(),{id:i=`headlessui-disclosure-panel-${t}`,...r}=n,[o,s]=Zde("Disclosure.Panel"),{close:a}=FBe("Disclosure.Panel"),l=Al(e,o.panelRef,f=>{ren(()=>s({type:f?4:5}))});$.exports.useEffect(()=>(s({type:3,panelId:i}),()=>{s({type:3,panelId:null})}),[i,s]);let u=DE(),c=(()=>u!==null?(u&ca.Open)===ca.Open:o.disclosureState===0)(),d=$.exports.useMemo(()=>({open:o.disclosureState===0,close:a}),[o,a]),h={ref:l,id:i};return pe(Yde.Provider,{value:o.panelId,children:fl({ourProps:h,theirProps:r,slot:d,defaultTag:gen,features:men,visible:c,name:"Disclosure.Panel"})},void 0,!1,{fileName:oen,lineNumber:1,columnNumber:4338},this)}let ven=Ba(hen),Qen=Ba(pen),ben=Ba(Ten),GC=Object.assign(ven,{Button:Qen,Panel:ben}),__e=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function C_e(n){var e,t;let i=(e=n.innerText)!=null?e:"",r=n.cloneNode(!0);if(!(r instanceof HTMLElement))return i;let o=!1;for(let a of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?(t=r.innerText)!=null?t:"":i;return __e.test(s)&&(s=s.replace(__e,"")),s}function yen(n){let e=n.getAttribute("aria-label");if(typeof e=="string")return e.trim();let t=n.getAttribute("aria-labelledby");if(t){let i=t.split(" ").map(r=>{let o=document.getElementById(r);if(o){let s=o.getAttribute("aria-label");return typeof s=="string"?s.trim():C_e(o).trim()}return null}).filter(Boolean);if(i.length>0)return i.join(", ")}return C_e(n).trim()}function _en(n){let e=$.exports.useRef(""),t=$.exports.useRef("");return qi(()=>{let i=n.current;if(!i)return"";let r=i.innerText;if(e.current===r)return t.current;let o=yen(i).trim().toLowerCase();return e.current=r,t.current=o,o})}var Cen=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Cen||{}),wen=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(wen||{}),xen=(n=>(n[n.OpenMenu=0]="OpenMenu",n[n.CloseMenu=1]="CloseMenu",n[n.GoToItem=2]="GoToItem",n[n.Search=3]="Search",n[n.ClearSearch=4]="ClearSearch",n[n.RegisterItem=5]="RegisterItem",n[n.UnregisterItem=6]="UnregisterItem",n))(xen||{});function qY(n,e=t=>t){let t=n.activeItemIndex!==null?n.items[n.activeItemIndex]:null,i=wBe(e(n.items.slice()),o=>o.dataRef.current.domRef.current),r=t?i.indexOf(t):null;return r===-1&&(r=null),{items:i,activeItemIndex:r}}let Len={[1](n){return n.menuState===1?n:{...n,activeItemIndex:null,menuState:1}},[0](n){return n.menuState===0?n:{...n,__demoMode:!1,menuState:0}},[2]:(n,e)=>{var t;let i=qY(n),r=PYt(e,{resolveItems:()=>i.items,resolveActiveIndex:()=>i.activeItemIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled});return{...n,...i,searchQuery:"",activeItemIndex:r,activationTrigger:(t=e.trigger)!=null?t:1}},[3]:(n,e)=>{let t=n.searchQuery!==""?0:1,i=n.searchQuery+e.value.toLowerCase(),r=(n.activeItemIndex!==null?n.items.slice(n.activeItemIndex+t).concat(n.items.slice(0,n.activeItemIndex+t)):n.items).find(s=>{var a;return((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(i))&&!s.dataRef.current.disabled}),o=r?n.items.indexOf(r):-1;return o===-1||o===n.activeItemIndex?{...n,searchQuery:i}:{...n,searchQuery:i,activeItemIndex:o,activationTrigger:1}},[4](n){return n.searchQuery===""?n:{...n,searchQuery:"",searchActiveItemIndex:null}},[5]:(n,e)=>{let t=qY(n,i=>[...i,{id:e.id,dataRef:e.dataRef}]);return{...n,...t}},[6]:(n,e)=>{let t=qY(n,i=>{let r=i.findIndex(o=>o.id===e.id);return r!==-1&&i.splice(r,1),i});return{...n,...t,activationTrigger:1}}},Jde=$.exports.createContext(null);Jde.displayName="MenuContext";function Jj(n){let e=$.exports.useContext(Jde);if(e===null){let t=new Error(`<${n} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Jj),t}return e}function Sen(n,e){return ga(e.type,Len,n,e)}let Den=$.exports.Fragment;function Een(n,e){let{__demoMode:t=!1,...i}=n,r=$.exports.useReducer(Sen,{__demoMode:t,menuState:t?0:1,buttonRef:$.exports.createRef(),itemsRef:$.exports.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsRef:s,buttonRef:a},l]=r,u=Al(e);LBe([a,s],(f,g)=>{var T;l({type:1}),jde(g,$de.Loose)||(f.preventDefault(),(T=a.current)==null||T.focus())},o===0);let c=qi(()=>{l({type:1})}),d=$.exports.useMemo(()=>({open:o===0,close:c}),[o,c]),h={ref:u};return En.createElement(Jde.Provider,{value:r},En.createElement(Ude,{value:ga(o,{[0]:ca.Open,[1]:ca.Closed})},fl({ourProps:h,theirProps:i,slot:d,defaultTag:Den,name:"Menu"})))}let ken="button";function Men(n,e){var t;let i=T0(),{id:r=`headlessui-menu-button-${i}`,...o}=n,[s,a]=Jj("Menu.Button"),l=Al(s.buttonRef,e),u=LE(),c=qi(T=>{switch(T.key){case Es.Space:case Es.Enter:case Es.ArrowDown:T.preventDefault(),T.stopPropagation(),a({type:0}),u.nextFrame(()=>a({type:2,focus:V2.First}));break;case Es.ArrowUp:T.preventDefault(),T.stopPropagation(),a({type:0}),u.nextFrame(()=>a({type:2,focus:V2.Last}));break}}),d=qi(T=>{switch(T.key){case Es.Space:T.preventDefault();break}}),h=qi(T=>{if(Wde(T.currentTarget))return T.preventDefault();n.disabled||(s.menuState===0?(a({type:1}),u.nextFrame(()=>{var v;return(v=s.buttonRef.current)==null?void 0:v.focus({preventScroll:!0})})):(T.preventDefault(),a({type:0})))}),f=$.exports.useMemo(()=>({open:s.menuState===0}),[s]),g={ref:l,id:r,type:SBe(n,s.buttonRef),"aria-haspopup":"menu","aria-controls":(t=s.itemsRef.current)==null?void 0:t.id,"aria-expanded":s.menuState===0,onKeyDown:c,onKeyUp:d,onClick:h};return fl({ourProps:g,theirProps:o,slot:f,defaultTag:ken,name:"Menu.Button"})}let Aen="div",Nen=m7.RenderStrategy|m7.Static;function Oen(n,e){var t,i;let r=T0(),{id:o=`headlessui-menu-items-${r}`,...s}=n,[a,l]=Jj("Menu.Items"),u=Al(a.itemsRef,e),c=Ab(a.itemsRef),d=LE(),h=DE(),f=(()=>h!==null?(h&ca.Open)===ca.Open:a.menuState===0)();$.exports.useEffect(()=>{let b=a.itemsRef.current;b&&a.menuState===0&&b!==(c==null?void 0:c.activeElement)&&b.focus({preventScroll:!0})},[a.menuState,a.itemsRef,c]),RYt({container:a.itemsRef.current,enabled:a.menuState===0,accept(b){return b.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:b.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(b){b.setAttribute("role","none")}});let g=qi(b=>{var _,C;switch(d.dispose(),b.key){case Es.Space:if(a.searchQuery!=="")return b.preventDefault(),b.stopPropagation(),l({type:3,value:b.key});case Es.Enter:if(b.preventDefault(),b.stopPropagation(),l({type:1}),a.activeItemIndex!==null){let{dataRef:L}=a.items[a.activeItemIndex];(C=(_=L.current)==null?void 0:_.domRef.current)==null||C.click()}CBe(a.buttonRef.current);break;case Es.ArrowDown:return b.preventDefault(),b.stopPropagation(),l({type:2,focus:V2.Next});case Es.ArrowUp:return b.preventDefault(),b.stopPropagation(),l({type:2,focus:V2.Previous});case Es.Home:case Es.PageUp:return b.preventDefault(),b.stopPropagation(),l({type:2,focus:V2.First});case Es.End:case Es.PageDown:return b.preventDefault(),b.stopPropagation(),l({type:2,focus:V2.Last});case Es.Escape:b.preventDefault(),b.stopPropagation(),l({type:1}),s0().nextFrame(()=>{var L;return(L=a.buttonRef.current)==null?void 0:L.focus({preventScroll:!0})});break;case Es.Tab:b.preventDefault(),b.stopPropagation(),l({type:1}),s0().nextFrame(()=>{IYt(a.buttonRef.current,b.shiftKey?b4.Previous:b4.Next)});break;default:b.key.length===1&&(l({type:3,value:b.key}),d.setTimeout(()=>l({type:4}),350));break}}),T=qi(b=>{switch(b.key){case Es.Space:b.preventDefault();break}}),v=$.exports.useMemo(()=>({open:a.menuState===0}),[a]),Q={"aria-activedescendant":a.activeItemIndex===null||(t=a.items[a.activeItemIndex])==null?void 0:t.id,"aria-labelledby":(i=a.buttonRef.current)==null?void 0:i.id,id:o,onKeyDown:g,onKeyUp:T,role:"menu",tabIndex:0,ref:u};return fl({ourProps:Q,theirProps:s,slot:v,defaultTag:Aen,features:Nen,visible:f,name:"Menu.Items"})}let Ien=$.exports.Fragment;function Ren(n,e){let t=T0(),{id:i=`headlessui-menu-item-${t}`,disabled:r=!1,...o}=n,[s,a]=Jj("Menu.Item"),l=s.activeItemIndex!==null?s.items[s.activeItemIndex].id===i:!1,u=$.exports.useRef(null),c=Al(e,u);El(()=>{if(s.__demoMode||s.menuState!==0||!l||s.activationTrigger===0)return;let L=s0();return L.requestAnimationFrame(()=>{var S,D;(D=(S=u.current)==null?void 0:S.scrollIntoView)==null||D.call(S,{block:"nearest"})}),L.dispose},[s.__demoMode,u,l,s.menuState,s.activationTrigger,s.activeItemIndex]);let d=_en(u),h=$.exports.useRef({disabled:r,domRef:u,get textValue(){return d()}});El(()=>{h.current.disabled=r},[h,r]),El(()=>(a({type:5,id:i,dataRef:h}),()=>a({type:6,id:i})),[h,i]);let f=qi(()=>{a({type:1})}),g=qi(L=>{if(r)return L.preventDefault();a({type:1}),CBe(s.buttonRef.current)}),T=qi(()=>{if(r)return a({type:2,focus:V2.Nothing});a({type:2,focus:V2.Specific,id:i})}),v=jYt(),Q=qi(L=>v.update(L)),b=qi(L=>{v.wasMoved(L)&&(r||l||a({type:2,focus:V2.Specific,id:i,trigger:0}))}),_=qi(L=>{v.wasMoved(L)&&(r||l&&a({type:2,focus:V2.Nothing}))}),C=$.exports.useMemo(()=>({active:l,disabled:r,close:f}),[l,r,f]);return fl({ourProps:{id:i,ref:c,role:"menuitem",tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,disabled:void 0,onClick:g,onFocus:T,onPointerEnter:Q,onMouseEnter:Q,onPointerMove:b,onMouseMove:b,onPointerLeave:_,onMouseLeave:_},theirProps:o,slot:C,defaultTag:Ien,name:"Menu.Item"})}let Hen=Ba(Een),Pen=Ba(Men),Ven=Ba(Oen),Fen=Ba(Ren),ff=Object.assign(Hen,{Button:Pen,Items:Ven,Item:Fen});function Ben(n=0){let[e,t]=$.exports.useState(n),i=EE(),r=$.exports.useCallback(l=>{i.current&&t(u=>u|l)},[e,i]),o=$.exports.useCallback(l=>Boolean(e&l),[e]),s=$.exports.useCallback(l=>{i.current&&t(u=>u&~l)},[t,i]),a=$.exports.useCallback(l=>{i.current&&t(u=>u^l)},[t]);return{flags:e,addFlag:r,hasFlag:o,removeFlag:s,toggleFlag:a}}function $en(n){let e={called:!1};return(...t)=>{if(!e.called)return e.called=!0,n(...t)}}function GY(n,...e){n&&e.length>0&&n.classList.add(...e)}function KY(n,...e){n&&e.length>0&&n.classList.remove(...e)}function jen(n,e){let t=s0();if(!n)return t.dispose;let{transitionDuration:i,transitionDelay:r}=getComputedStyle(n),[o,s]=[i,r].map(l=>{let[u=0]=l.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,d)=>d-c);return u}),a=o+s;if(a!==0){t.group(u=>{u.setTimeout(()=>{e(),u.dispose()},a),u.addEventListener(n,"transitionrun",c=>{c.target===c.currentTarget&&u.dispose()})});let l=t.addEventListener(n,"transitionend",u=>{u.target===u.currentTarget&&(e(),l())})}else e();return t.add(()=>e()),t.dispose}function Wen(n,e,t,i){let r=t?"enter":"leave",o=s0(),s=i!==void 0?$en(i):()=>{};r==="enter"&&(n.removeAttribute("hidden"),n.style.display="");let a=ga(r,{enter:()=>e.enter,leave:()=>e.leave}),l=ga(r,{enter:()=>e.enterTo,leave:()=>e.leaveTo}),u=ga(r,{enter:()=>e.enterFrom,leave:()=>e.leaveFrom});return KY(n,...e.base,...e.enter,...e.enterTo,...e.enterFrom,...e.leave,...e.leaveFrom,...e.leaveTo,...e.entered),GY(n,...e.base,...a,...u),o.nextFrame(()=>{KY(n,...e.base,...a,...u),GY(n,...e.base,...a,...l),jen(n,()=>(KY(n,...e.base,...a),GY(n,...e.base,...e.entered),s()))}),o.dispose}function zen({immediate:n,container:e,direction:t,classes:i,onStart:r,onStop:o}){let s=EE(),a=LE(),l=J4(t);El(()=>{n&&(l.current="enter")},[n]),El(()=>{let u=s0();a.add(u.dispose);let c=e.current;if(c&&l.current!=="idle"&&s.current)return u.dispose(),r.current(l.current),u.add(Wen(c,i.current,l.current==="enter",()=>{u.dispose(),o.current(l.current)})),u.dispose},[t])}var Uen="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@headlessui/react/dist/components/transitions/transition.js";function C5(n=""){return n.split(" ").filter(e=>e.trim().length>1)}let eW=$.exports.createContext(null);eW.displayName="TransitionContext";var qen=(n=>(n.Visible="visible",n.Hidden="hidden",n))(qen||{});function Gen(){let n=$.exports.useContext(eW);if(n===null)throw new Error("A is used but it is missing a parent or .");return n}function Ken(){let n=$.exports.useContext(tW);if(n===null)throw new Error("A is used but it is missing a parent or .");return n}let tW=$.exports.createContext(null);tW.displayName="NestingContext";function nW(n){return"children"in n?nW(n.children):n.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function BBe(n,e){let t=J4(n),i=$.exports.useRef([]),r=EE(),o=LE(),s=qi((f,g=hf.Hidden)=>{let T=i.current.findIndex(({el:v})=>v===f);T!==-1&&(ga(g,{[hf.Unmount](){i.current.splice(T,1)},[hf.Hidden](){i.current[T].state="hidden"}}),o.microTask(()=>{var v;!nW(i)&&r.current&&((v=t.current)==null||v.call(t))}))}),a=qi(f=>{let g=i.current.find(({el:T})=>T===f);return g?g.state!=="visible"&&(g.state="visible"):i.current.push({el:f,state:"visible"}),()=>s(f,hf.Unmount)}),l=$.exports.useRef([]),u=$.exports.useRef(Promise.resolve()),c=$.exports.useRef({enter:[],leave:[],idle:[]}),d=qi((f,g,T)=>{l.current.splice(0),e&&(e.chains.current[g]=e.chains.current[g].filter(([v])=>v!==f)),e==null||e.chains.current[g].push([f,new Promise(v=>{l.current.push(v)})]),e==null||e.chains.current[g].push([f,new Promise(v=>{Promise.all(c.current[g].map(([Q,b])=>b)).then(()=>v())})]),g==="enter"?u.current=u.current.then(()=>e==null?void 0:e.wait.current).then(()=>T(g)):T(g)}),h=qi((f,g,T)=>{Promise.all(c.current[g].splice(0).map(([v,Q])=>Q)).then(()=>{var v;(v=l.current.shift())==null||v()}).then(()=>T(g))});return $.exports.useMemo(()=>({children:i,register:a,unregister:s,onStart:d,onStop:h,wait:u,chains:c}),[a,s,i,d,h,c,u])}function Zen(){}let Xen=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function w_e(n){var e;let t={};for(let i of Xen)t[i]=(e=n[i])!=null?e:Zen;return t}function Yen(n){let e=$.exports.useRef(w_e(n));return $.exports.useEffect(()=>{e.current=w_e(n)},[n]),e}let Jen="div",$Be=m7.RenderStrategy;function etn(n,e){var t,i;let{beforeEnter:r,afterEnter:o,beforeLeave:s,afterLeave:a,enter:l,enterFrom:u,enterTo:c,entered:d,leave:h,leaveFrom:f,leaveTo:g,...T}=n,v=$.exports.useRef(null),Q=Al(v,e),b=(t=T.unmount)==null||t?hf.Unmount:hf.Hidden,{show:_,appear:C,initial:L}=Gen(),[S,D]=$.exports.useState(_?"visible":"hidden"),k=Ken(),{register:M,unregister:R}=k;$.exports.useEffect(()=>M(v),[M,v]),$.exports.useEffect(()=>{if(b===hf.Hidden&&v.current){if(_&&S!=="visible"){D("visible");return}return ga(S,{hidden:()=>R(v),visible:()=>M(v)})}},[S,v,M,R,_,b]);let I=J4({base:C5(T.className),enter:C5(l),enterFrom:C5(u),enterTo:C5(c),entered:C5(d),leave:C5(h),leaveFrom:C5(f),leaveTo:C5(g)}),H=Yen({beforeEnter:r,afterEnter:o,beforeLeave:s,afterLeave:a}),O=Mb();$.exports.useEffect(()=>{if(O&&S==="visible"&&v.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,S,O]);let B=L&&!C,K=C&&_&&L,ne=(()=>!O||B?"idle":_?"enter":"leave")(),ue=Ben(0),fe=qi(V=>ga(V,{enter:()=>{ue.addFlag(ca.Opening),H.current.beforeEnter()},leave:()=>{ue.addFlag(ca.Closing),H.current.beforeLeave()},idle:()=>{}})),be=qi(V=>ga(V,{enter:()=>{ue.removeFlag(ca.Opening),H.current.afterEnter()},leave:()=>{ue.removeFlag(ca.Closing),H.current.afterLeave()},idle:()=>{}})),q=BBe(()=>{D("hidden"),R(v)},k);zen({immediate:K,container:v,classes:I,direction:ne,onStart:J4(V=>{q.onStart(v,V,fe)}),onStop:J4(V=>{q.onStop(v,V,be),V==="leave"&&!nW(q)&&(D("hidden"),R(v))})});let he=T,j={ref:Q};return K?he={...he,className:VP(T.className,...I.current.enter,...I.current.enterFrom)}:(he.className=VP(T.className,(i=v.current)==null?void 0:i.className),he.className===""&&delete he.className),En.createElement(tW.Provider,{value:q},En.createElement(Ude,{value:ga(S,{visible:ca.Open,hidden:ca.Closed})|ue.flags},fl({ourProps:j,theirProps:he,defaultTag:Jen,features:$Be,visible:S==="visible",name:"Transition.Child"})))}function ttn(n,e){let{show:t,appear:i=!1,unmount:r=!0,...o}=n,s=$.exports.useRef(null),a=Al(s,e);Mb();let l=DE();if(t===void 0&&l!==null&&(t=(l&ca.Open)===ca.Open),![!0,!1].includes(t))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[u,c]=$.exports.useState(t?"visible":"hidden"),d=BBe(()=>{c("hidden")}),[h,f]=$.exports.useState(!0),g=$.exports.useRef([t]);El(()=>{h!==!1&&g.current[g.current.length-1]!==t&&(g.current.push(t),f(!1))},[g,t]);let T=$.exports.useMemo(()=>({show:t,appear:i,initial:h}),[t,i,h]);$.exports.useEffect(()=>{if(t)c("visible");else if(!nW(d))c("hidden");else{let _=s.current;if(!_)return;let C=_.getBoundingClientRect();C.x===0&&C.y===0&&C.width===0&&C.height===0&&c("hidden")}},[t,d]);let v={unmount:r},Q=qi(()=>{var _;h&&f(!1),(_=n.beforeEnter)==null||_.call(n)}),b=qi(()=>{var _;h&&f(!1),(_=n.beforeLeave)==null||_.call(n)});return En.createElement(tW.Provider,{value:d},En.createElement(eW.Provider,{value:T},fl({ourProps:{...v,as:$.exports.Fragment,children:En.createElement(jBe,{ref:a,...v,...o,beforeEnter:Q,beforeLeave:b})},theirProps:{},defaultTag:$.exports.Fragment,features:$Be,visible:u==="visible",name:"Transition"})))}function ntn(n,e){let t=$.exports.useContext(eW)!==null,i=DE()!==null;return En.createElement(En.Fragment,null,!t&&i?pe(Cse,{ref:e,...n},void 0,!1,{fileName:Uen,lineNumber:1,columnNumber:6044},this):En.createElement(jBe,{ref:e,...n}))}let Cse=Ba(ttn),jBe=Ba(etn),itn=Ba(ntn),nv=Object.assign(Cse,{Child:itn,Root:Cse});var ZY="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/Bars3Icon.js";function rtn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:ZY,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"},void 0,!1,{fileName:ZY,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:ZY,lineNumber:7,columnNumber:23},this)}const otn=$.exports.forwardRef(rtn),WBe=otn;var XY="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/HomeIcon.js";function stn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:XY,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"},void 0,!1,{fileName:XY,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:XY,lineNumber:7,columnNumber:23},this)}const atn=$.exports.forwardRef(stn),ltn=atn;var YY="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/LanguageIcon.js";function utn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:YY,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 21l5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 016-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 01-3.827-5.802"},void 0,!1,{fileName:YY,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:YY,lineNumber:7,columnNumber:23},this)}const ctn=$.exports.forwardRef(utn),dtn=ctn;var JY="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/ListBulletIcon.js";function htn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:JY,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zM3.75 12h.007v.008H3.75V12zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm-.375 5.25h.007v.008H3.75v-.008zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"},void 0,!1,{fileName:JY,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:JY,lineNumber:7,columnNumber:23},this)}const ftn=$.exports.forwardRef(htn),ptn=ftn;var eJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/PencilSquareIcon.js";function gtn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:eJ,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"},void 0,!1,{fileName:eJ,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:eJ,lineNumber:7,columnNumber:23},this)}const mtn=$.exports.forwardRef(gtn),Ttn=mtn;var tJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/PlusIcon.js";function vtn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:tJ,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"},void 0,!1,{fileName:tJ,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:tJ,lineNumber:7,columnNumber:23},this)}const Qtn=$.exports.forwardRef(vtn),zBe=Qtn;var nJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/RectangleStackIcon.js";function btn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:nJ,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6.878V6a2.25 2.25 0 012.25-2.25h7.5A2.25 2.25 0 0118 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 004.5 9v.878m13.5-3A2.25 2.25 0 0119.5 9v.878m0 0a2.246 2.246 0 00-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0121 12v6a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 18v-6c0-.98.626-1.813 1.5-2.122"},void 0,!1,{fileName:nJ,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:nJ,lineNumber:7,columnNumber:23},this)}const ytn=$.exports.forwardRef(btn),_tn=ytn;var iJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/TrashIcon.js";function Ctn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:iJ,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"},void 0,!1,{fileName:iJ,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:iJ,lineNumber:7,columnNumber:23},this)}const wtn=$.exports.forwardRef(Ctn),xtn=wtn;var rJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/TrophyIcon.js";function Ltn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:rJ,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 18.75h-9m9 0a3 3 0 013 3h-15a3 3 0 013-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 01-.982-3.172M9.497 14.25a7.454 7.454 0 00.981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 007.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 002.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 012.916.52 6.003 6.003 0 01-5.395 4.972m0 0a6.726 6.726 0 01-2.749 1.35m0 0a6.772 6.772 0 01-3.044 0"},void 0,!1,{fileName:rJ,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:rJ,lineNumber:7,columnNumber:23},this)}const Stn=$.exports.forwardRef(Ltn),Dtn=Stn;var oJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/UsersIcon.js";function Etn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:oJ,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"},void 0,!1,{fileName:oJ,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:oJ,lineNumber:7,columnNumber:23},this)}const ktn=$.exports.forwardRef(Etn),Mtn=ktn;var sJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/24/outline/esm/XMarkIcon.js";function Atn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:sJ,lineNumber:16,columnNumber:35},this):null,pe("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"},void 0,!1,{fileName:sJ,lineNumber:18,columnNumber:34},this)]},void 0,!0,{fileName:sJ,lineNumber:7,columnNumber:23},this)}const Ntn=$.exports.forwardRef(Atn),UBe=Ntn;var aJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/20/solid/esm/CheckCircleIcon.js";function Otn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:aJ,lineNumber:14,columnNumber:35},this):null,pe("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"},void 0,!1,{fileName:aJ,lineNumber:16,columnNumber:34},this)]},void 0,!0,{fileName:aJ,lineNumber:7,columnNumber:23},this)}const Itn=$.exports.forwardRef(Otn),Rtn=Itn;var lJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/20/solid/esm/ChevronDownIcon.js";function Htn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:lJ,lineNumber:14,columnNumber:35},this):null,pe("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"},void 0,!1,{fileName:lJ,lineNumber:16,columnNumber:34},this)]},void 0,!0,{fileName:lJ,lineNumber:7,columnNumber:23},this)}const Ptn=$.exports.forwardRef(Htn),Vtn=Ptn;var uJ="/home/runner/work/oj-lab-front/oj-lab-front/node_modules/@heroicons/react/20/solid/esm/XCircleIcon.js";function Ftn({title:n,titleId:e,...t},i){return pe("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:i,"aria-labelledby":e},t),children:[n?pe("title",{id:e,children:n},void 0,!1,{fileName:uJ,lineNumber:14,columnNumber:35},this):null,pe("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"},void 0,!1,{fileName:uJ,lineNumber:16,columnNumber:34},this)]},void 0,!0,{fileName:uJ,lineNumber:7,columnNumber:23},this)}const Btn=$.exports.forwardRef(Ftn),$tn=Btn;function jtn(){if(console&&console.warn){for(var n=arguments.length,e=new Array(n),t=0;t()=>{if(n.isInitialized)e();else{const t=()=>{setTimeout(()=>{n.off("initialized",t)},0),e()};n.on("initialized",t)}};function L_e(n,e,t){n.loadNamespaces(e,qBe(n,t))}function S_e(n,e,t,i){typeof t=="string"&&(t=[t]),t.forEach(r=>{n.options.ns.indexOf(r)<0&&n.options.ns.push(r)}),n.loadLanguages(e,qBe(n,i))}function Wtn(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=e.languages[0],r=e.options?e.options.fallbackLng:!1,o=e.languages[e.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=e.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,n)?!1:!!(e.hasResourceBundle(i,n)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(i,n)&&(!r||s(o,n)))}function ztn(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(wse("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(n,{lng:t.lng,precheck:(r,o)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,n))return!1}}):Wtn(n,e,t)}const Utn=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,qtn={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},Gtn=n=>qtn[n],Ktn=n=>n.replace(Utn,Gtn);let xse={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ktn};function Ztn(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xse={...xse,...n}}function Xtn(){return xse}let GBe;function Ytn(n){GBe=n}function Jtn(){return GBe}const enn={type:"3rdParty",init(n){Ztn(n.options.react),Ytn(n)}},tnn=$.exports.createContext();class nnn{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const inn=(n,e)=>{const t=$.exports.useRef();return $.exports.useEffect(()=>{t.current=e?t.current:n},[n,e]),t.current};function Nb(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:t}=e,{i18n:i,defaultNS:r}=$.exports.useContext(tnn)||{},o=t||i||Jtn();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new nnn),!o){wse("You will need to pass in an i18next instance by using initReactI18next");const _=(L,S)=>typeof S=="string"?S:S&&typeof S=="object"&&typeof S.defaultValue=="string"?S.defaultValue:Array.isArray(L)?L[L.length-1]:L,C=[_,{},!1];return C.t=_,C.i18n={},C.ready=!1,C}o.options.react&&o.options.react.wait!==void 0&&wse("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...Xtn(),...o.options.react,...e},{useSuspense:a,keyPrefix:l}=s;let u=n||r||o.options&&o.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(u);const c=(o.isInitialized||o.initializedStoreOnce)&&u.every(_=>ztn(_,o,s));function d(){return o.getFixedT(e.lng||null,s.nsMode==="fallback"?u:u[0],l)}const[h,f]=$.exports.useState(d);let g=u.join();e.lng&&(g=`${e.lng}${g}`);const T=inn(g),v=$.exports.useRef(!0);$.exports.useEffect(()=>{const{bindI18n:_,bindI18nStore:C}=s;v.current=!0,!c&&!a&&(e.lng?S_e(o,e.lng,u,()=>{v.current&&f(d)}):L_e(o,u,()=>{v.current&&f(d)})),c&&T&&T!==g&&v.current&&f(d);function L(){v.current&&f(d)}return _&&o&&o.on(_,L),C&&o&&o.store.on(C,L),()=>{v.current=!1,_&&o&&_.split(" ").forEach(S=>o.off(S,L)),C&&o&&C.split(" ").forEach(S=>o.store.off(S,L))}},[o,g]);const Q=$.exports.useRef(!0);$.exports.useEffect(()=>{v.current&&!Q.current&&f(d),Q.current=!1},[o,l]);const b=[h,o,c];if(b.t=h,b.i18n=o,b.ready=c,c||!c&&!a)return b;throw new Promise(_=>{e.lng?S_e(o,e.lng,u,()=>_()):L_e(o,u,()=>_())})}function F2(...n){return n.filter(Boolean).join(" ")}var g2="/home/runner/work/oj-lab-front/oj-lab-front/src/layouts/UserMenu.tsx";const KBe=n=>{var i;const e=v7(),{t}=Nb();return pe($c,{children:pe(ff,{as:"div",className:"relative z-50",children:[pe(ff.Button,{className:"flex items-center p-1.5",children:[pe("span",{className:"sr-only",children:"Open user menu"},void 0,!1,{fileName:g2,lineNumber:28,columnNumber:11},void 0),pe("img",{className:"h-8 w-8 rounded-full bg-gray-50",src:n.avatarUrl,alt:""},void 0,!1,{fileName:g2,lineNumber:29,columnNumber:11},void 0),pe("span",{className:"hidden lg:flex lg:items-center",children:[pe("span",{className:"ml-4 text-sm font-semibold leading-6 text-gray-900","aria-hidden":"true",children:n.userName},void 0,!1,{fileName:g2,lineNumber:35,columnNumber:13},void 0),pe(Vtn,{className:"ml-2 h-5 w-5 text-gray-400","aria-hidden":"true"},void 0,!1,{fileName:g2,lineNumber:41,columnNumber:13},void 0)]},void 0,!0,{fileName:g2,lineNumber:34,columnNumber:11},void 0)]},void 0,!0,{fileName:g2,lineNumber:27,columnNumber:9},void 0),pe(nv,{as:$.exports.Fragment,enter:"transition ease-out duration-200",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:pe(ff.Items,{className:"absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:(i=n.navigation)==null?void 0:i.map(r=>pe(ff.Item,{children:({active:o})=>pe("div",{className:F2(o?"bg-gray-100":"","block cursor-pointer px-4 py-2 text-sm text-gray-700"),onClick:()=>{e(r.href)},children:t(r.name)},void 0,!1,{fileName:g2,lineNumber:60,columnNumber:19},void 0)},r.name,!1,{fileName:g2,lineNumber:58,columnNumber:15},void 0))},void 0,!1,{fileName:g2,lineNumber:56,columnNumber:11},void 0)},void 0,!1,{fileName:g2,lineNumber:47,columnNumber:9},void 0)]},void 0,!0,{fileName:g2,lineNumber:26,columnNumber:7},void 0)},void 0,!1)},rnn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class $P{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||rnn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),i=0;i{this.observers[i]=this.observers[i]||[],this.observers[i].push(t)}),this}off(e,t){if(!!this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(i=>i!==t)}}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{s(...i)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(s=>{s.apply(s,[e,...i])})}}function KC(){let n,e;const t=new Promise((i,r)=>{n=i,e=r});return t.resolve=n,t.reject=e,t}function D_e(n){return n==null?"":""+n}function onn(n,e,t){n.forEach(i=>{e[i]&&(t[i]=e[i])})}function e2e(n,e,t){function i(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function r(){return!n||typeof n=="string"}const o=typeof e!="string"?[].concat(e):e.split(".");for(;o.length>1;){if(r())return{};const s=i(o.shift());!n[s]&&t&&(n[s]=new t),Object.prototype.hasOwnProperty.call(n,s)?n=n[s]:n={}}return r()?{}:{obj:n,k:i(o.shift())}}function E_e(n,e,t){const{obj:i,k:r}=e2e(n,e,Object);i[r]=t}function snn(n,e,t,i){const{obj:r,k:o}=e2e(n,e,Object);r[o]=r[o]||[],i&&(r[o]=r[o].concat(t)),i||r[o].push(t)}function jP(n,e){const{obj:t,k:i}=e2e(n,e);if(!!t)return t[i]}function ann(n,e,t){const i=jP(n,t);return i!==void 0?i:jP(e,t)}function ZBe(n,e,t){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in n?typeof n[i]=="string"||n[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?t&&(n[i]=e[i]):ZBe(n[i],e[i],t):n[i]=e[i]);return n}function oT(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var lnn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function unn(n){return typeof n=="string"?n.replace(/[&<>"'\/]/g,e=>lnn[e]):n}const cnn=[" ",",","?","!",";"];function dnn(n,e,t){e=e||"",t=t||"";const i=cnn.filter(s=>e.indexOf(s)<0&&t.indexOf(s)<0);if(i.length===0)return!0;const r=new RegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!r.test(n);if(!o){const s=n.indexOf(t);s>0&&!r.test(n.substring(0,s))&&(o=!0)}return o}function WP(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const i=e.split(t);let r=n;for(let o=0;oo+s;)s++,a=i.slice(o,o+s).join(t),l=r[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}const u=i.slice(o+s).join(t);return u?WP(l,u,t):void 0}r=r[i[o]]}return r}function zP(n){return n&&n.indexOf("_")>0?n.replace("_","-"):n}class k_e extends iW{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[e,t];i&&typeof i!="string"&&(a=a.concat(i)),i&&typeof i=="string"&&(a=a.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(a=e.split("."));const l=jP(this.data,a);return l||!s||typeof i!="string"?l:WP(this.data&&this.data[e]&&this.data[e][t],i,o)}addResource(e,t,i,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[e,t];i&&(a=a.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),E_e(this.data,a,r),o.silent||this.emit("added",e,t,i,r)}addResources(e,t,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in i)(typeof i[o]=="string"||Object.prototype.toString.apply(i[o])==="[object Array]")&&this.addResource(e,t,o,i[o],{silent:!0});r.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,r,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=i,i=t,t=a[1]),this.addNamespaces(t);let l=jP(this.data,a)||{};r?ZBe(l,i,o):l={...l,...i},E_e(this.data,a,l),s.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(r=>t[r]&&Object.keys(t[r]).length>0)}toJSON(){return this.data}}var XBe={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,i,r){return n.forEach(o=>{this.processors[o]&&(e=this.processors[o].process(e,t,i,r))}),e}};const M_e={};class UP extends iW{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),onn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wh.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,t);return i&&i.res!==void 0}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!dnn(e,i,r);if(s&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:o};const u=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),e=u.join(r)}return typeof o=="string"&&(o=[o]),{key:e,namespaces:o}}translate(e,t,i){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,o=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],u=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const C=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${C}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:`${l}${C}${s}`}return r?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:s}const d=this.resolve(e,t);let h=d&&d.res;const f=d&&d.usedKey||s,g=d&&d.exactUsedKey||s,T=Object.prototype.toString.apply(h),v=["[object Number]","[object Function]","[object RegExp]"],Q=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&v.indexOf(T)<0&&!(typeof Q=="string"&&T==="[object Array]")){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,h,{...t,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(d.res=C,d):C}if(o){const C=T==="[object Array]",L=C?[]:{},S=C?g:f;for(const D in h)if(Object.prototype.hasOwnProperty.call(h,D)){const k=`${S}${o}${D}`;L[D]=this.translate(k,{...t,joinArrays:!1,ns:a}),L[D]===k&&(L[D]=h[D])}h=L}}else if(b&&typeof Q=="string"&&T==="[object Array]")h=h.join(Q),h&&(h=this.extendTranslation(h,e,t,i));else{let C=!1,L=!1;const S=t.count!==void 0&&typeof t.count!="string",D=UP.hasDefaultValue(t),k=S?this.pluralResolver.getSuffix(u,t.count,t):"",M=t.ordinal&&S?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",R=t[`defaultValue${k}`]||t[`defaultValue${M}`]||t.defaultValue;!this.isValidLookup(h)&&D&&(C=!0,h=R),this.isValidLookup(h)||(L=!0,h=s);const H=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:h,O=D&&R!==h&&this.options.updateMissing;if(L||C||O){if(this.logger.log(O?"updateKey":"missingKey",u,l,s,O?R:h),o){const ue=this.resolve(s,{...t,keySeparator:!1});ue&&ue.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let B=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let ue=0;ue{const q=D&&be!==h?be:H;this.options.missingKeyHandler?this.options.missingKeyHandler(ue,l,fe,q,O,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ue,l,fe,q,O,t),this.emit("missingKey",ue,l,fe,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?B.forEach(ue=>{this.pluralResolver.getSuffixes(ue,t).forEach(fe=>{ne([ue],s+fe,t[`defaultValue${fe}`]||R)})}):ne(B,s,R))}h=this.extendTranslation(h,e,t,d,i),L&&h===s&&this.options.appendNamespaceToMissingKey&&(h=`${l}:${s}`),(L||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,C?h:void 0):h=this.options.parseMissingKeyHandler(h))}return r?(d.res=h,d):h}extendTranslation(e,t,i,r,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const h=e.match(this.interpolator.nestingRegexp);c=h&&h.length}let d=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,i.lng||this.language,i),u){const h=e.match(this.interpolator.nestingRegexp),f=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},i,r,o,s,a;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,t),c=u.key;r=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const h=t.count!==void 0&&typeof t.count!="string",f=h&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),g=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",T=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(v=>{this.isValidLookup(i)||(a=v,!M_e[`${T[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(M_e[`${T[0]}-${v}`]=!0,this.logger.warn(`key "${r}" for languages "${T.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(Q=>{if(this.isValidLookup(i))return;s=Q;const b=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(b,c,Q,v,t);else{let C;h&&(C=this.pluralResolver.getSuffix(Q,t.count,t));const L=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(b.push(c+C),t.ordinal&&C.indexOf(S)===0&&b.push(c+C.replace(S,this.options.pluralSeparator)),f&&b.push(c+L)),g){const D=`${c}${this.options.contextSeparator}${t.context}`;b.push(D),h&&(b.push(D+C),t.ordinal&&C.indexOf(S)===0&&b.push(D+C.replace(S,this.options.pluralSeparator)),f&&b.push(D+L))}}let _;for(;_=b.pop();)this.isValidLookup(i)||(o=_,i=this.getResource(Q,v,_,t))}))})}),{res:i,usedKey:r,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,i,r):this.resourceStore.getResource(e,t,i,r)}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}function cJ(n){return n.charAt(0).toUpperCase()+n.slice(1)}class A_e{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wh.create("languageUtils")}getScriptPartFromCode(e){if(e=zP(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=zP(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=cJ(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),t.indexOf(i[1].toLowerCase())>-1&&(i[1]=cJ(i[1].toLowerCase())),t.indexOf(i[2].toLowerCase())>-1&&(i[2]=cJ(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(o=>{if(o===r)return o;if(!(o.indexOf("-")<0&&r.indexOf("-")<0)&&o.indexOf(r)===0)return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=s=>{!s||(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):typeof e=="string"&&o(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&o(this.formatLanguageCode(s))}),r}}let hnn=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],fnn={1:function(n){return Number(n>1)},2:function(n){return Number(n!=1)},3:function(n){return 0},4:function(n){return Number(n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2)},5:function(n){return Number(n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5)},6:function(n){return Number(n==1?0:n>=2&&n<=4?1:2)},7:function(n){return Number(n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2)},8:function(n){return Number(n==1?0:n==2?1:n!=8&&n!=11?2:3)},9:function(n){return Number(n>=2)},10:function(n){return Number(n==1?0:n==2?1:n<7?2:n<11?3:4)},11:function(n){return Number(n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3)},12:function(n){return Number(n%10!=1||n%100==11)},13:function(n){return Number(n!==0)},14:function(n){return Number(n==1?0:n==2?1:n==3?2:3)},15:function(n){return Number(n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2)},16:function(n){return Number(n%10==1&&n%100!=11?0:n!==0?1:2)},17:function(n){return Number(n==1||n%10==1&&n%100!=11?0:1)},18:function(n){return Number(n==0?0:n==1?1:2)},19:function(n){return Number(n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3)},20:function(n){return Number(n==1?0:n==0||n%100>0&&n%100<20?1:2)},21:function(n){return Number(n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0)},22:function(n){return Number(n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3)}};const pnn=["v1","v2","v3"],gnn=["v4"],N_e={zero:0,one:1,two:2,few:3,many:4,other:5};function mnn(){const n={};return hnn.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:fnn[e.fc]}})}),n}class Tnn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=wh.create("pluralResolver"),(!this.options.compatibilityJSON||gnn.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=mnn()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(zP(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,t);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${t}${r}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,t);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,o)=>N_e[r]-N_e[o]).map(r=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,t)):[]}getSuffix(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const i=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!pnn.includes(this.options.compatibilityJSON)}}function O_e(n,e,t){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=ann(n,e,t);return!o&&r&&typeof t=="string"&&(o=WP(n,t,i),o===void 0&&(o=WP(e,t,i))),o}class vnn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wh.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const t=e.interpolation;this.escape=t.escape!==void 0?t.escape:unn,this.escapeValue=t.escapeValue!==void 0?t.escapeValue:!0,this.useRawValueToEscape=t.useRawValueToEscape!==void 0?t.useRawValueToEscape:!1,this.prefix=t.prefix?oT(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?oT(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?oT(t.nestingPrefix):t.nestingPrefixEscaped||oT("$t("),this.nestingSuffix=t.nestingSuffix?oT(t.nestingSuffix):t.nestingSuffixEscaped||oT(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=t.alwaysFormat!==void 0?t.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(t,"g");const i=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(i,"g")}interpolate(e,t,i,r){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(g){return g.replace(/\$/g,"$$$$")}const c=g=>{if(g.indexOf(this.formatSeparator)<0){const b=O_e(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,i,{...r,...t,interpolationkey:g}):b}const T=g.split(this.formatSeparator),v=T.shift().trim(),Q=T.join(this.formatSeparator).trim();return this.format(O_e(t,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),Q,i,{...r,...t,interpolationkey:v})};this.resetRegExp();const d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>u(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?u(this.escape(g)):u(g)}].forEach(g=>{for(a=0;o=g.regex.exec(e);){const T=o[1].trim();if(s=c(T),s===void 0)if(typeof d=="function"){const Q=d(e,o,r);s=typeof Q=="string"?Q:""}else if(r&&Object.prototype.hasOwnProperty.call(r,T))s="";else if(h){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=D_e(s));const v=g.safeValue(s);if(e=e.replace(o[0],v),h?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,o,s;function a(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let h=`{${d[1]}`;l=d[0],h=this.interpolate(h,s);const f=h.match(/'/g),g=h.match(/"/g);(f&&f.length%2===0&&!g||g.length%2!==0)&&(h=h.replace(/'/g,'"'));try{s=JSON.parse(h),u&&(s={...u,...s})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,T),`${l}${c}${h}`}return delete s.defaultValue,l}for(;r=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const c=r[1].split(this.formatSeparator).map(d=>d.trim());r[1]=c.shift(),l=c,u=!0}if(o=t(a.call(this,r[1].trim(),s),s),o&&r[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=D_e(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),u&&(o=l.reduce((c,d)=>this.format(c,d,i.lng,{...i,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}}function Qnn(n){let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const i=n.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?t.currency||(t.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?t.range||(t.range=r.trim()):r.split(";").forEach(s=>{if(!s)return;const[a,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");t[a.trim()]||(t[a.trim()]=u),u==="false"&&(t[a.trim()]=!1),u==="true"&&(t[a.trim()]=!0),isNaN(u)||(t[a.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:t}}function sT(n){const e={};return function(i,r,o){const s=r+JSON.stringify(o);let a=e[s];return a||(a=n(zP(r),o),e[s]=a),a(i)}}class bnn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wh.create("formatter"),this.options=e,this.formats={number:sT((t,i)=>{const r=new Intl.NumberFormat(t,{...i});return o=>r.format(o)}),currency:sT((t,i)=>{const r=new Intl.NumberFormat(t,{...i,style:"currency"});return o=>r.format(o)}),datetime:sT((t,i)=>{const r=new Intl.DateTimeFormat(t,{...i});return o=>r.format(o)}),relativetime:sT((t,i)=>{const r=new Intl.RelativeTimeFormat(t,{...i});return o=>r.format(o,i.range||"day")}),list:sT((t,i)=>{const r=new Intl.ListFormat(t,{...i});return o=>r.format(o)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=sT(t)}format(e,t,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((a,l)=>{const{formatName:u,formatOptions:c}=Qnn(l);if(this.formats[u]){let d=a;try{const h=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},f=h.locale||h.lng||r.locale||r.lng||i;d=this.formats[u](a,f,{...c,...r,...h})}catch(h){this.logger.warn(h)}return d}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}function ynn(n,e){n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)}class _nn extends iW{constructor(e,t,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=wh.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,t,i,r){const o={},s={},a={},l={};return e.forEach(u=>{let c=!0;t.forEach(d=>{const h=`${u}|${d}`;!i.reload&&this.store.hasResourceBundle(u,d)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?s[h]===void 0&&(s[h]=!0):(this.state[h]=1,c=!1,s[h]===void 0&&(s[h]=!0),o[h]===void 0&&(o[h]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,i){const r=e.split("|"),o=r[0],s=r[1];t&&this.emit("failedLoading",o,s,t),i&&this.store.addResourceBundle(o,s,i),this.state[e]=t?-1:2;const a={};this.queue.forEach(l=>{snn(l.loaded,[o],s),ynn(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:r,wait:o,callback:s});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&r{this.read.call(this,e,t,i,r+1,o*2,s)},o);return}s(u,c)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,t,a)}prepareLoading(e,t){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const o=this.queueLoad(e,t,i,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],o=i[1];this.read(r,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,s),!s&&a&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,a),this.loaded(e,s,a)})}saveMissing(e,t,i,r,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,t,i,r,l):c=u(e,t,i,r),c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}else u(e,t,i,r,a,l)}!e||!e[0]||this.store.addResource(e[0],t,i,r)}}}function I_e(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(r=>{t[r]=i[r]})}return t},interpolation:{escapeValue:!0,format:(n,e,t,i)=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function R_e(n){return typeof n.ns=="string"&&(n.ns=[n.ns]),typeof n.fallbackLng=="string"&&(n.fallbackLng=[n.fallbackLng]),typeof n.fallbackNS=="string"&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n}function yO(){}function Cnn(n){Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})}class IS extends iW{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=R_e(e),this.services={},this.logger=wh,this.modules={external:[]},Cnn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof t=="function"&&(i=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=I_e();this.options={...r,...this.options,...R_e(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);function o(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?wh.init(o(this.modules.logger),this.options):wh.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=bnn);const d=new A_e(this.options);this.store=new k_e(this.options.resources,this.options);const h=this.services;h.logger=wh,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new Tnn(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(h.formatter=o(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new vnn(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new _nn(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(f){for(var g=arguments.length,T=new Array(g>1?g-1:0),v=1;v1?g-1:0),v=1;v{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,i||(i=yO),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=KC(),u=()=>{const c=(d,h)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(h),i(d,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yO;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(a)})}else i(null)}reloadResources(e,t,i){const r=KC();return e||(e=this.languages),t||(t=this.options.ns),i||(i=yO),this.services.backendConnector.reload(e,t,o=>{r.resolve(),i(o)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&XBe.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,t){var i=this;this.isLanguageChangingTo=e;const r=KC();this.emit("languageChanging",e);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),t&&t(l,function(){return i.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),r}getFixedT(e,t,i){var r=this;const o=function(s,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${h}${g}`):f=l.keyPrefix?`${l.keyPrefix}${h}${s}`:s,r.t(f,l)};return typeof e=="string"?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=i,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};if(t.precheck){const a=t.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(o,e)))}loadNamespaces(e,t){const i=KC();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),t&&t(r)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=KC();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],o=e.filter(s=>r.indexOf(s)<0);return o.length?(this.options.preload=r.concat(o),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new A_e(I_e());return t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new IS(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yO;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new IS(r);return(e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},i&&(o.store=new k_e(this.store.data,r),o.services.resourceStore=o.store),o.translator=new UP(o.services,r),o.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c{const{t:e}=Nb();return pe($c,{children:pe(ff,{as:"div",className:F2("relative",n.className),children:[pe(ff.Button,{className:"flex items-center p-1.5",children:[pe("span",{className:"sr-only",children:"Open user menu"},void 0,!1,{fileName:w5,lineNumber:21,columnNumber:11},void 0),pe(dtn,{className:"h-5 w-5"},void 0,!1,{fileName:w5,lineNumber:22,columnNumber:11},void 0)]},void 0,!0,{fileName:w5,lineNumber:20,columnNumber:9},void 0),pe(nv,{as:$.exports.Fragment,enter:"transition ease-out duration-200",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:pe(ff.Items,{className:"absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:Snn.map(t=>pe(ff.Item,{children:({active:i})=>pe("div",{className:F2(i?"bg-gray-100":"","block cursor-pointer px-4 py-2 text-sm text-gray-700"),onClick:()=>{wnn(t.value)},children:e(t.label)},void 0,!1,{fileName:w5,lineNumber:37,columnNumber:19},void 0)},t.value,!1,{fileName:w5,lineNumber:35,columnNumber:15},void 0))},void 0,!1,{fileName:w5,lineNumber:33,columnNumber:11},void 0)},void 0,!1,{fileName:w5,lineNumber:24,columnNumber:9},void 0)]},void 0,!0,{fileName:w5,lineNumber:19,columnNumber:7},void 0)},void 0,!1)};var yr="/home/runner/work/oj-lab-front/oj-lab-front/src/layouts/userLayout/Header.tsx";const H_e="/oj-lab-front/images/oj-lab-icon.svg",ZC={name:"Tom Cook",email:"tom@example.com",imageUrl:"/oj-lab-front/avatars/male-avatar-1.svg"},P_e=[{name:"Problem",href:"/problem",icon:pe(ptn,{className:"mr-2 h-4 w-4","aria-hidden":"true"},void 0,!1,{fileName:yr,lineNumber:28,columnNumber:11},void 0)},{name:"Contest",href:"#",icon:pe(Dtn,{className:"mr-2 h-4 w-4","aria-hidden":"true"},void 0,!1,{fileName:yr,lineNumber:33,columnNumber:11},void 0)},{name:"Submission",href:"/submission",icon:pe(_tn,{className:"mr-2 h-4 w-4","aria-hidden":"true"},void 0,!1,{fileName:yr,lineNumber:38,columnNumber:11},void 0)}],V_e=[{name:"Admin page",href:"/admin"},{name:"Sign out",href:"#"}];function Enn(){const n=v7(),{t:e}=Nb();return pe(GC,{as:"nav",className:"h-auto border-b border-gray-200 bg-white",children:({open:t})=>pe($c,{children:[pe("div",{className:"mx-auto px-4",children:pe("div",{className:"flex h-16 justify-between",children:[pe("div",{className:"flex",children:[pe("div",{className:"flex flex-shrink-0 items-center",children:[pe("img",{className:"block h-14 w-auto lg:hidden",src:H_e,alt:"OJ Lab"},void 0,!1,{fileName:yr,lineNumber:58,columnNumber:19},this),pe("img",{className:"hidden h-14 w-auto lg:block",src:H_e,alt:"OJ Lab"},void 0,!1,{fileName:yr,lineNumber:63,columnNumber:19},this)]},void 0,!0,{fileName:yr,lineNumber:57,columnNumber:17},this),pe("div",{className:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8",children:P_e.map(i=>pe("div",{className:F2(i.href===window.location.pathname?"border-indigo-500 text-gray-900":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700","inline-flex cursor-pointer items-center border-b-2 px-1 pt-1 text-sm font-medium"),onClick:()=>{n(i.href)},children:[i.icon,e(i.name)]},i.name,!0,{fileName:yr,lineNumber:71,columnNumber:21},this))},void 0,!1,{fileName:yr,lineNumber:69,columnNumber:17},this)]},void 0,!0,{fileName:yr,lineNumber:56,columnNumber:15},this),pe("div",{className:"hidden sm:ml-6 sm:flex sm:items-center",children:pe("div",{className:"flex flex-row items-center justify-center gap-2",children:[pe(Lse,{},void 0,!1,{fileName:yr,lineNumber:91,columnNumber:19},this),pe(KBe,{userName:ZC.name,avatarUrl:ZC.imageUrl,navigation:V_e},void 0,!1,{fileName:yr,lineNumber:93,columnNumber:19},this)]},void 0,!0,{fileName:yr,lineNumber:90,columnNumber:17},this)},void 0,!1,{fileName:yr,lineNumber:89,columnNumber:15},this),pe("div",{className:"-mr-2 flex items-center sm:hidden",children:pe(GC.Button,{className:"inline-flex items-center justify-center rounded-md bg-white p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:[pe("span",{className:"sr-only",children:"Open main menu"},void 0,!1,{fileName:yr,lineNumber:103,columnNumber:19},this),t?pe(UBe,{className:"block h-6 w-6","aria-hidden":"true"},void 0,!1,{fileName:yr,lineNumber:105,columnNumber:21},this):pe(WBe,{className:"block h-6 w-6","aria-hidden":"true"},void 0,!1,{fileName:yr,lineNumber:107,columnNumber:21},this)]},void 0,!0,{fileName:yr,lineNumber:102,columnNumber:17},this)},void 0,!1,{fileName:yr,lineNumber:100,columnNumber:15},this)]},void 0,!0,{fileName:yr,lineNumber:55,columnNumber:13},this)},void 0,!1,{fileName:yr,lineNumber:54,columnNumber:11},this),pe(GC.Panel,{className:"sm:hidden",children:[pe("div",{className:"border-t border-gray-200 pb-3 pt-4",children:[pe("div",{className:"flex items-center px-4",children:[pe("div",{className:"flex-shrink-0",children:pe("img",{className:"h-10 w-10 rounded-full",src:ZC.imageUrl,alt:""},void 0,!1,{fileName:yr,lineNumber:118,columnNumber:19},this)},void 0,!1,{fileName:yr,lineNumber:117,columnNumber:17},this),pe("div",{className:"ml-3",children:[pe("div",{className:"text-base font-medium text-gray-800",children:ZC.name},void 0,!1,{fileName:yr,lineNumber:125,columnNumber:19},this),pe("div",{className:"text-sm font-medium text-gray-500",children:ZC.email},void 0,!1,{fileName:yr,lineNumber:128,columnNumber:19},this)]},void 0,!0,{fileName:yr,lineNumber:124,columnNumber:17},this),pe(Lse,{className:"ml-auto"},void 0,!1,{fileName:yr,lineNumber:132,columnNumber:17},this)]},void 0,!0,{fileName:yr,lineNumber:116,columnNumber:15},this),pe("div",{className:"mt-3 space-y-1",children:V_e.map(i=>pe(GC.Button,{className:"block cursor-pointer px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800",onClick:()=>{n(i.href)},children:i.name},i.name,!1,{fileName:yr,lineNumber:136,columnNumber:19},this))},void 0,!1,{fileName:yr,lineNumber:134,columnNumber:15},this)]},void 0,!0,{fileName:yr,lineNumber:115,columnNumber:13},this),pe(Lee,{},void 0,!1,{fileName:yr,lineNumber:148,columnNumber:13},this),pe("div",{className:"space-y-1 pb-3 pt-2",children:P_e.map(i=>pe(GC.Button,{className:F2(i.href===window.location.pathname?"border-indigo-500 bg-indigo-50 text-indigo-700":"border-transparent text-gray-600 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800","block w-full cursor-pointer border-l-4 py-2 pl-3 pr-4 text-base font-medium"),onClick:()=>{n(i.href)},children:e(i.name)},i.name,!1,{fileName:yr,lineNumber:151,columnNumber:17},this))},void 0,!1,{fileName:yr,lineNumber:149,columnNumber:13},this)]},void 0,!0,{fileName:yr,lineNumber:114,columnNumber:11},this)]},void 0,!0)},void 0,!1,{fileName:yr,lineNumber:51,columnNumber:5},this)}var aT="/home/runner/work/oj-lab-front/oj-lab-front/src/layouts/userLayout/UserLayout.tsx";const t2e=n=>pe("div",{className:"relative flex h-[100vh] flex-col",children:[pe(Enn,{},void 0,!1,{fileName:aT,lineNumber:11,columnNumber:7},void 0),n.title&&pe("header",{className:"h-auto bg-white shadow",children:pe("div",{className:"mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8",children:pe("h1",{className:"text-4xl font-bold tracking-tight text-gray-900",children:n.title},void 0,!1,{fileName:aT,lineNumber:15,columnNumber:13},void 0)},void 0,!1,{fileName:aT,lineNumber:14,columnNumber:11},void 0)},void 0,!1,{fileName:aT,lineNumber:13,columnNumber:9},void 0),pe("main",{className:"flex w-full max-w-7xl flex-auto flex-col self-center py-6 sm:px-6 lg:px-8",children:n.children},void 0,!1,{fileName:aT,lineNumber:21,columnNumber:7},void 0)]},void 0,!0,{fileName:aT,lineNumber:10,columnNumber:5},void 0);var Y3="/home/runner/work/oj-lab-front/oj-lab-front/src/pages/Problem.tsx";const knn=`#include diff --git a/assets/javascript.b733d9e6.js b/assets/javascript.5f6101f8.js similarity index 89% rename from assets/javascript.b733d9e6.js rename to assets/javascript.5f6101f8.js index a791d0762..490187095 100644 --- a/assets/javascript.b733d9e6.js +++ b/assets/javascript.5f6101f8.js @@ -1,4 +1,4 @@ -import{conf as t,language as e}from"./typescript.05dcf72e.js";import"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{conf as t,language as e}from"./typescript.4803e578.js";import"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/jsonMode.9fde1613.js b/assets/jsonMode.18498886.js similarity index 99% rename from assets/jsonMode.9fde1613.js rename to assets/jsonMode.18498886.js index 95cd14721..c1735ab89 100644 --- a/assets/jsonMode.9fde1613.js +++ b/assets/jsonMode.18498886.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.1d2d0b83.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.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/liquid.a6fd7aeb.js b/assets/liquid.9a397b90.js similarity index 98% rename from assets/liquid.a6fd7aeb.js rename to assets/liquid.9a397b90.js index 42e264d24..f1cb45b14 100644 --- a/assets/liquid.a6fd7aeb.js +++ b/assets/liquid.9a397b90.js @@ -1,4 +1,4 @@ -import{m as d}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m as d}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/python.9ec4f778.js b/assets/python.8b723ab4.js similarity index 98% rename from assets/python.9ec4f778.js rename to assets/python.8b723ab4.js index cf251d3a3..ba452ecfd 100644 --- a/assets/python.9ec4f778.js +++ b/assets/python.8b723ab4.js @@ -1,4 +1,4 @@ -import{m as a}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/razor.8930d238.js b/assets/razor.cdac407a.js similarity index 99% rename from assets/razor.8930d238.js rename to assets/razor.cdac407a.js index 615b6966f..ffc5a2928 100644 --- a/assets/razor.8930d238.js +++ b/assets/razor.cdac407a.js @@ -1,4 +1,4 @@ -import{m as s}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m as s}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/tsMode.eb5d7719.js b/assets/tsMode.079db6ff.js similarity index 99% rename from assets/tsMode.eb5d7719.js rename to assets/tsMode.079db6ff.js index b76015a73..165b1da10 100644 --- a/assets/tsMode.eb5d7719.js +++ b/assets/tsMode.079db6ff.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.1d2d0b83.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.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/typescript.05dcf72e.js b/assets/typescript.4803e578.js similarity index 98% rename from assets/typescript.05dcf72e.js rename to assets/typescript.4803e578.js index 51988d1d6..4dd5bfe6d 100644 --- a/assets/typescript.05dcf72e.js +++ b/assets/typescript.4803e578.js @@ -1,4 +1,4 @@ -import{m as a}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m as a}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/xml.2872fc70.js b/assets/xml.dc9ae6c8.js similarity index 97% rename from assets/xml.2872fc70.js rename to assets/xml.dc9ae6c8.js index 6d7675cf5..9ad1c067a 100644 --- a/assets/xml.2872fc70.js +++ b/assets/xml.dc9ae6c8.js @@ -1,4 +1,4 @@ -import{m}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/assets/yaml.472493f9.js b/assets/yaml.c6e4338d.js similarity index 98% rename from assets/yaml.472493f9.js rename to assets/yaml.c6e4338d.js index 2293a488c..ee534ba0e 100644 --- a/assets/yaml.472493f9.js +++ b/assets/yaml.c6e4338d.js @@ -1,4 +1,4 @@ -import{m as i}from"./index.1d2d0b83.js";/*!----------------------------------------------------------------------------- +import{m as i}from"./index.abf9ca5d.js";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.39.0(ff3621a3fa6389873be5412d17554294ea1b0941) * Released under the MIT license diff --git a/index.html b/index.html index 5e2ae43ac..cfe896076 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ --> OJ Lab - +