diff --git a/1043.7c2567c1d94fcb3078b9.js b/1043.7c2567c1d94fcb3078b9.js new file mode 100644 index 00000000..d08c065f --- /dev/null +++ b/1043.7c2567c1d94fcb3078b9.js @@ -0,0 +1,2 @@ +/*! For license information please see 1043.7c2567c1d94fcb3078b9.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[1043],{1043:function(E,T,A){A.r(T),A.d(T,{conf:function(){return N},language:function(){return R}});var N={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]}]},R={defaultToken:"",tokenPostfix:".msdax",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["VAR","RETURN","NOT","EVALUATE","DATATABLE","ORDER","BY","START","AT","DEFINE","MEASURE","ASC","DESC","IN","BOOLEAN","DOUBLE","INTEGER","DATETIME","CURRENCY","STRING"],functions:["CLOSINGBALANCEMONTH","CLOSINGBALANCEQUARTER","CLOSINGBALANCEYEAR","DATEADD","DATESBETWEEN","DATESINPERIOD","DATESMTD","DATESQTD","DATESYTD","ENDOFMONTH","ENDOFQUARTER","ENDOFYEAR","FIRSTDATE","FIRSTNONBLANK","LASTDATE","LASTNONBLANK","NEXTDAY","NEXTMONTH","NEXTQUARTER","NEXTYEAR","OPENINGBALANCEMONTH","OPENINGBALANCEQUARTER","OPENINGBALANCEYEAR","PARALLELPERIOD","PREVIOUSDAY","PREVIOUSMONTH","PREVIOUSQUARTER","PREVIOUSYEAR","SAMEPERIODLASTYEAR","STARTOFMONTH","STARTOFQUARTER","STARTOFYEAR","TOTALMTD","TOTALQTD","TOTALYTD","ADDCOLUMNS","ADDMISSINGITEMS","ALL","ALLEXCEPT","ALLNOBLANKROW","ALLSELECTED","CALCULATE","CALCULATETABLE","CALENDAR","CALENDARAUTO","CROSSFILTER","CROSSJOIN","CURRENTGROUP","DATATABLE","DETAILROWS","DISTINCT","EARLIER","EARLIEST","EXCEPT","FILTER","FILTERS","GENERATE","GENERATEALL","GROUPBY","IGNORE","INTERSECT","ISONORAFTER","KEEPFILTERS","LOOKUPVALUE","NATURALINNERJOIN","NATURALLEFTOUTERJOIN","RELATED","RELATEDTABLE","ROLLUP","ROLLUPADDISSUBTOTAL","ROLLUPGROUP","ROLLUPISSUBTOTAL","ROW","SAMPLE","SELECTCOLUMNS","SUBSTITUTEWITHINDEX","SUMMARIZE","SUMMARIZECOLUMNS","TOPN","TREATAS","UNION","USERELATIONSHIP","VALUES","SUM","SUMX","PATH","PATHCONTAINS","PATHITEM","PATHITEMREVERSE","PATHLENGTH","AVERAGE","AVERAGEA","AVERAGEX","COUNT","COUNTA","COUNTAX","COUNTBLANK","COUNTROWS","COUNTX","DISTINCTCOUNT","DIVIDE","GEOMEAN","GEOMEANX","MAX","MAXA","MAXX","MEDIAN","MEDIANX","MIN","MINA","MINX","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILEX.EXC","PERCENTILEX.INC","PRODUCT","PRODUCTX","RANK.EQ","RANKX","STDEV.P","STDEV.S","STDEVX.P","STDEVX.S","VAR.P","VAR.S","VARX.P","VARX.S","XIRR","XNPV","DATE","DATEDIFF","DATEVALUE","DAY","EDATE","EOMONTH","HOUR","MINUTE","MONTH","NOW","SECOND","TIME","TIMEVALUE","TODAY","WEEKDAY","WEEKNUM","YEAR","YEARFRAC","CONTAINS","CONTAINSROW","CUSTOMDATA","ERROR","HASONEFILTER","HASONEVALUE","ISBLANK","ISCROSSFILTERED","ISEMPTY","ISERROR","ISEVEN","ISFILTERED","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISSUBTOTAL","ISTEXT","USERNAME","USERPRINCIPALNAME","AND","FALSE","IF","IFERROR","NOT","OR","SWITCH","TRUE","ABS","ACOS","ACOSH","ACOT","ACOTH","ASIN","ASINH","ATAN","ATANH","BETA.DIST","BETA.INV","CEILING","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","COMBIN","COMBINA","CONFIDENCE.NORM","CONFIDENCE.T","COS","COSH","COT","COTH","CURRENCY","DEGREES","EVEN","EXP","EXPON.DIST","FACT","FLOOR","GCD","INT","ISO.CEILING","LCM","LN","LOG","LOG10","MOD","MROUND","ODD","PERMUT","PI","POISSON.DIST","POWER","QUOTIENT","RADIANS","RAND","RANDBETWEEN","ROUND","ROUNDDOWN","ROUNDUP","SIGN","SIN","SINH","SQRT","SQRTPI","TAN","TANH","TRUNC","BLANK","CONCATENATE","CONCATENATEX","EXACT","FIND","FIXED","FORMAT","LEFT","LEN","LOWER","MID","REPLACE","REPT","RIGHT","SEARCH","SUBSTITUTE","TRIM","UNICHAR","UNICODE","UPPER","VALUE"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},[/[;,.]/,"delimiter"],[/[({})]/,"@brackets"],[/[a-z_][a-zA-Z0-9_]*/,{cases:{"@keywords":"keyword","@functions":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/\/\/+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N"/,{token:"string",next:"@string"}],[/"/,{token:"string",next:"@string"}]],string:[[/[^"]+/,"string"],[/""/,"string"],[/"/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/'/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^']+/,"identifier"],[/''/,"identifier"],[/'/,{token:"identifier.quote",next:"@pop"}]]}}}}]); \ No newline at end of file diff --git a/1043.7c2567c1d94fcb3078b9.js.LICENSE.txt b/1043.7c2567c1d94fcb3078b9.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/1043.7c2567c1d94fcb3078b9.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/1245.530285ffe6452f04f960.js b/1245.530285ffe6452f04f960.js new file mode 100644 index 00000000..4fdeb846 --- /dev/null +++ b/1245.530285ffe6452f04f960.js @@ -0,0 +1,2 @@ +/*! For license information please see 1245.530285ffe6452f04f960.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[1245],{1245:function(e,t,i){i.r(t),i.d(t,{conf:function(){return o},language:function(){return n}});var o={comments:{lineComment:"COMMENT"},brackets:[["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:":",close:"."}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"},{open:":",close:"."}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#region"),end:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#endregion")}}},n={tokenPostfix:".lexon",ignoreCase:!0,keywords:["lexon","lex","clause","terms","contracts","may","pay","pays","appoints","into","to"],typeKeywords:["amount","person","key","time","date","asset","text"],operators:["less","greater","equal","le","gt","or","and","add","added","subtract","subtracted","multiply","multiplied","times","divide","divided","is","be","certified"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d*\.\d*/,"number.semver"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"]],quoted_identifier:[[/[^\\"]+/,"identifier"],[/"/,{token:"identifier.quote",bracket:"@close",next:"@pop"}]],space_identifier_until_period:[[":","delimiter"],[" ",{token:"white",next:"@identifier_rest"}]],identifier_until_period:[{include:"@whitespace"},[":",{token:"delimiter",next:"@identifier_rest"}],[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],identifier_rest:[[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],semver:[{include:"@whitespace"},[":","delimiter"],[/\d*\.\d*\.\d*/,{token:"number.semver",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"]]}}}}]); \ No newline at end of file diff --git a/1245.530285ffe6452f04f960.js.LICENSE.txt b/1245.530285ffe6452f04f960.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/1245.530285ffe6452f04f960.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/1318.351efcb1e91e0535f4df.js b/1318.351efcb1e91e0535f4df.js new file mode 100644 index 00000000..51bda1f7 --- /dev/null +++ b/1318.351efcb1e91e0535f4df.js @@ -0,0 +1,2 @@ +/*! For license information please see 1318.351efcb1e91e0535f4df.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[1318],{1318:function(e,t,n){n.r(t),n.d(t,{TagAngleInterpolationBracket:function(){return D},TagAngleInterpolationDollar:function(){return x},TagAutoInterpolationBracket:function(){return C},TagAutoInterpolationDollar:function(){return B},TagBracketInterpolationBracket:function(){return E},TagBracketInterpolationDollar:function(){return $}});var o=n(7448),i=Object.defineProperty,_=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s=(e,t,n,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of r(t))a.call(e,s)||s===n||i(e,s,{get:()=>t[s],enumerable:!(o=_(t,s))||o.enumerable});return e},u={};s(u,o,"default");var c=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],d=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],l={close:">",id:"angle",open:"<"},k={close:"\\]",id:"bracket",open:"\\["},p={close:"[>\\]]",id:"auto",open:"[<\\[]"},g={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},A={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function m(e){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${e.open}--`,`--${e.close}`]},autoCloseBefore:"\n\r\t }]),.:;=",autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${e.open}#(?:${d.join("|")})([^/${e.close}]*(?!/)${e.close})[^${e.open}]*$`),end:new RegExp(`${e.open}/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${e.open}#(?!(?:${c.join("|")}))([a-zA-Z_]+)([^/${e.close}]*(?!/)${e.close})[^${e.open}]*$`),afterText:new RegExp(`^${e.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${e.close}$`),action:{indentAction:u.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${e.open}#(?!(?:${c.join("|")}))([a-zA-Z_]+)([^/${e.close}]*(?!/)${e.close})[^${e.open}]*$`),action:{indentAction:u.languages.IndentAction.Indent}}]}}function f(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:"\n\r\t }]),.:;=",autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${d.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${d.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${c.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:u.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${c.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:u.languages.IndentAction.Indent}}]}}function F(e,t){const n=`_${e.id}_${t.id}`,o=e=>e.replace(/__id__/g,n),i=e=>{const t=e.source.replace(/__id__/g,n);return new RegExp(t,e.flags)};return{unicode:!0,includeLF:!1,start:o("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[o("open__id__")]:new RegExp(e.open),[o("close__id__")]:new RegExp(e.close),[o("iOpen1__id__")]:new RegExp(t.open1),[o("iOpen2__id__")]:new RegExp(t.open2),[o("iClose__id__")]:new RegExp(t.close),[o("startTag__id__")]:i(/(@open__id__)(#)/),[o("endTag__id__")]:i(/(@open__id__)(\/#)/),[o("startOrEndTag__id__")]:i(/(@open__id__)(\/?#)/),[o("closeTag1__id__")]:i(/((?:@blank)*)(@close__id__)/),[o("closeTag2__id__")]:i(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[o("default__id__")]:[{include:o("@directive_token__id__")},{include:o("@interpolation_and_text_token__id__")}],[o("fmExpression__id__.directive")]:[{include:o("@blank_and_expression_comment_token__id__")},{include:o("@directive_end_token__id__")},{include:o("@expression_token__id__")}],[o("fmExpression__id__.interpolation")]:[{include:o("@blank_and_expression_comment_token__id__")},{include:o("@expression_token__id__")},{include:o("@greater_operators_token__id__")}],[o("inParen__id__.plain")]:[{include:o("@blank_and_expression_comment_token__id__")},{include:o("@directive_end_token__id__")},{include:o("@expression_token__id__")}],[o("inParen__id__.gt")]:[{include:o("@blank_and_expression_comment_token__id__")},{include:o("@expression_token__id__")},{include:o("@greater_operators_token__id__")}],[o("noSpaceExpression__id__")]:[{include:o("@no_space_expression_end_token__id__")},{include:o("@directive_end_token__id__")},{include:o("@expression_token__id__")}],[o("unifiedCall__id__")]:[{include:o("@unified_call_token__id__")}],[o("singleString__id__")]:[{include:o("@string_single_token__id__")}],[o("doubleString__id__")]:[{include:o("@string_double_token__id__")}],[o("rawSingleString__id__")]:[{include:o("@string_single_raw_token__id__")}],[o("rawDoubleString__id__")]:[{include:o("@string_double_raw_token__id__")}],[o("expressionComment__id__")]:[{include:o("@expression_comment_token__id__")}],[o("noParse__id__")]:[{include:o("@no_parse_token__id__")}],[o("terseComment__id__")]:[{include:o("@terse_comment_token__id__")}],[o("directive_token__id__")]:[[i(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),"auto"===e.id?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${t.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${t.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:o("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[i(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),"auto"===e.id?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${t.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${t.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[i(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),"auto"===e.id?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${t.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${t.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:o("@fmExpression__id__.directive")}]],[i(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),"auto"===e.id?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${t.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${t.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[i(/(@open__id__)(@)/),"auto"===e.id?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${t.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${t.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:o("@unifiedCall__id__")}]],[i(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[i(/(@open__id__)#--/),"auto"===e.id?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${t.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${t.id}`}}}:{token:"comment",next:o("@terseComment__id__")}],[i(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),"auto"===e.id?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${t.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${t.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:o("@fmExpression__id__.directive")}]]],[o("interpolation_and_text_token__id__")]:[[i(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:"bracket"===t.id?"@brackets.interpolation":"delimiter.interpolation"},{token:"bracket"===t.id?"delimiter.interpolation":"@brackets.interpolation",next:o("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[o("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[o("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[o("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[o("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[o("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:o("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:o("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:o("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:o("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:o("@inParen__id__.gt")},"@default":{token:"@brackets",next:o("@inParen__id__.plain")}}},"\\]":{cases:{..."bracket"===t.id?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},..."bracket"===e.id?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[o("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:o("@inParen__id__.gt")},"\\)":{cases:{[o("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:o("@inParen__id__.gt")},"@default":{token:"@brackets",next:o("@inParen__id__.plain")}}},"\\}":{cases:{..."bracket"===t.id?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[o("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[o("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:o("@expressionComment__id__")}]],[o("directive_end_token__id__")]:[[/>/,"bracket"===e.id?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[i(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[o("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[o("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:o("@fmExpression__id__.directive")}]],[o("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:o("@fmExpression__id__.directive")}]],[i(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:o("@noSpaceExpression__id__")}]],[o("no_parse_token__id__")]:[[i(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[o("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[o("terse_comment_token__id__")]:[[i(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function b(e){const t=F(l,e),n=F(k,e),o=F(p,e);return{...t,...n,...o,unicode:!0,includeLF:!1,start:`default_auto_${e.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...t.tokenizer,...n.tokenizer,...o.tokenizer}}}var x={conf:m(l),language:F(l,g)},$={conf:m(k),language:F(k,g)},D={conf:m(l),language:F(l,A)},E={conf:m(k),language:F(k,A)},B={conf:f(),language:b(g)},C={conf:f(),language:b(A)}}}]); \ No newline at end of file diff --git a/1318.351efcb1e91e0535f4df.js.LICENSE.txt b/1318.351efcb1e91e0535f4df.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/1318.351efcb1e91e0535f4df.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/1546.91ab9d03fb36c9798635.js b/1546.91ab9d03fb36c9798635.js new file mode 100644 index 00000000..fae413df --- /dev/null +++ b/1546.91ab9d03fb36c9798635.js @@ -0,0 +1,2 @@ +/*! For license information please see 1546.91ab9d03fb36c9798635.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[1546],{1546:function(e,_,t){t.r(_),t.d(_,{conf:function(){return r},language:function(){return i}});var r={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},i={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","AZ64","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LANGUAGE","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY16","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}}}]); \ No newline at end of file diff --git a/1546.91ab9d03fb36c9798635.js.LICENSE.txt b/1546.91ab9d03fb36c9798635.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/1546.91ab9d03fb36c9798635.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/1600.2365316610705bb998b1.js b/1600.2365316610705bb998b1.js new file mode 100644 index 00000000..565ce728 --- /dev/null +++ b/1600.2365316610705bb998b1.js @@ -0,0 +1,2 @@ +/*! For license information please see 1600.2365316610705bb998b1.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[1600],{1600:function(e,s,o){o.r(s),o.d(s,{conf:function(){return n},language:function(){return t}});var n={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},t={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},s={defaultToken:"",ignoreCase:!1,tokenPostfix:".mips",regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:[".data",".text","syscall","trap","add","addu","addi","addiu","and","andi","div","divu","mult","multu","nor","or","ori","sll","slv","sra","srav","srl","srlv","sub","subu","xor","xori","lhi","lho","lhi","llo","slt","slti","sltu","sltiu","beq","bgtz","blez","bne","j","jal","jalr","jr","lb","lbu","lh","lhu","lw","li","la","sb","sh","sw","mfhi","mflo","mthi","mtlo","move"],symbols:/[\.,\:]+/,escapes:/\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\$[a-zA-Z_]\w*/,"variable.predefined"],[/[.a-zA-Z_]\w*/,{cases:{this:"variable.predefined","@keywords":{token:"keyword.$0"},"@default":""}}],[/[ \t\r\n]+/,""],[/#.*$/,"comment"],["///",{token:"regexp",next:"@hereregexp"}],[/^(\s*)(@regEx)/,["","regexp"]],[/(\,)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\:)(\s*)(@regEx)/,["delimiter","","regexp"]],[/@symbols/,"delimiter"],[/\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/0[0-7]+(?!\d)/,"number.octal"],[/\d+/,"number"],[/[,.]/,"delimiter"],[/"""/,"string",'@herestring."""'],[/'''/,"string","@herestring.'''"],[/"/,{cases:{"@eos":"string","@default":{token:"string",next:'@string."'}}}],[/'/,{cases:{"@eos":"string","@default":{token:"string",next:"@string.'"}}}]],string:[[/[^"'\#\\]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\./,"string.escape.invalid"],[/#{/,{cases:{'$S2=="':{token:"string",next:"root.interpolatedstring"},"@default":"string"}}],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/#/,"string"]],herestring:[[/("""|''')/,{cases:{"$1==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/[^#\\'"]+/,"string"],[/['"]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/#{/,{token:"string.quote",next:"root.interpolatedstring"}],[/#/,"string"]],comment:[[/[^#]+/,"comment"],[/#/,"comment"]],hereregexp:[[/[^\\\/#]+/,"regexp"],[/\\./,"regexp"],[/#.*$/,"comment"],["///[igm]*",{token:"regexp",next:"@pop"}],[/\//,"regexp"]]}}}}]); \ No newline at end of file diff --git a/1640.b770b579e121efc312db.js.LICENSE.txt b/1640.b770b579e121efc312db.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/1640.b770b579e121efc312db.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/1662.c87ef7d8903e400138d6.js b/1662.c87ef7d8903e400138d6.js new file mode 100644 index 00000000..bc95c7b2 --- /dev/null +++ b/1662.c87ef7d8903e400138d6.js @@ -0,0 +1,2 @@ +/*! For license information please see 1662.c87ef7d8903e400138d6.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[1662],{1662:function(e,o,t){t.r(o),t.d(o,{conf:function(){return n},language:function(){return i}});var n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},i={defaultToken:"",tokenPostfix:".swift",identifier:/[a-zA-Z_][\w$]*/,attributes:["@GKInspectable","@IBAction","@IBDesignable","@IBInspectable","@IBOutlet","@IBSegueAction","@NSApplicationMain","@NSCopying","@NSManaged","@Sendable","@UIApplicationMain","@autoclosure","@actorIndependent","@asyncHandler","@available","@convention","@derivative","@differentiable","@discardableResult","@dynamicCallable","@dynamicMemberLookup","@escaping","@frozen","@globalActor","@inlinable","@inline","@main","@noDerivative","@nonobjc","@noreturn","@objc","@objcMembers","@preconcurrency","@propertyWrapper","@requires_stored_property_inits","@resultBuilder","@testable","@unchecked","@unknown","@usableFromInline","@warn_unqualified_access"],accessmodifiers:["open","public","internal","fileprivate","private"],keywords:["#available","#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning","Any","Protocol","Self","Type","actor","as","assignment","associatedtype","associativity","async","await","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","dynamicType","else","enum","extension","fallthrough","false","fileprivate","final","for","func","get","guard","higherThan","if","import","in","indirect","infix","init","inout","internal","is","isolated","lazy","left","let","lowerThan","mutating","nil","none","nonisolated","nonmutating","open","operator","optional","override","postfix","precedence","precedencegroup","prefix","private","protocol","public","repeat","required","rethrows","return","right","safe","self","set","some","static","struct","subscript","super","switch","throw","throws","true","try","typealias","unowned","unsafe","var","weak","where","while","willSet","__consuming","__owned"],symbols:/[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],whitespace:[[/\s+/,"white"],[/"""/,"string.quote","@endDblDocString"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string.quote","@popall"],[/"/,"string"]],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/@@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}}}}]); \ No newline at end of file diff --git a/1662.c87ef7d8903e400138d6.js.LICENSE.txt b/1662.c87ef7d8903e400138d6.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/1662.c87ef7d8903e400138d6.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/177.7b37a6e9e9afe26b5965.js b/177.7b37a6e9e9afe26b5965.js new file mode 100644 index 00000000..2ba1f347 --- /dev/null +++ b/177.7b37a6e9e9afe26b5965.js @@ -0,0 +1,2 @@ +/*! For license information please see 177.7b37a6e9e9afe26b5965.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[177],{177:function(e,t,n){n.r(t),n.d(t,{conf:function(){return a},language:function(){return k}});var o=n(7448),i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of r(t))d.call(e,c)||c===n||i(e,c,{get:()=>t[c],enumerable:!(o=s(t,c))||o.enumerable});return e},p={};c(p,o,"default");var a={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:p.languages.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:p.languages.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:p.languages.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:p.languages.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:p.languages.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:p.languages.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:p.languages.IndentAction.Outdent}},...Array.from({length:100},((e,t)=>({beforeText:new RegExp(`^${t}\\. .+`),action:{indentAction:p.languages.IndentAction.None,appendText:`${t+1}. `}})))]},k={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}}}}]); \ No newline at end of file diff --git a/177.7b37a6e9e9afe26b5965.js.LICENSE.txt b/177.7b37a6e9e9afe26b5965.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/177.7b37a6e9e9afe26b5965.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/1795.53f3fde4cf080a0241e4.js b/1795.53f3fde4cf080a0241e4.js new file mode 100644 index 00000000..82721487 --- /dev/null +++ b/1795.53f3fde4cf080a0241e4.js @@ -0,0 +1,2 @@ +/*! For license information please see 1795.53f3fde4cf080a0241e4.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[1795],{1795:function(e,t,n){n.r(t),n.d(t,{conf:function(){return g},language:function(){return l}});var o=n(7448),r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,a=(e,t,n,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of s(t))c.call(e,a)||a===n||r(e,a,{get:()=>t[a],enumerable:!(o=i(t,a))||o.enumerable});return e},p={};a(p,o,"default");var g={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:p.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:p.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:p.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:p.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},l={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}}}]); \ No newline at end of file diff --git a/1795.53f3fde4cf080a0241e4.js.LICENSE.txt b/1795.53f3fde4cf080a0241e4.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/1795.53f3fde4cf080a0241e4.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/1813.6e36bf4a76f570983e5f.js b/1813.6e36bf4a76f570983e5f.js new file mode 100644 index 00000000..537a4503 --- /dev/null +++ b/1813.6e36bf4a76f570983e5f.js @@ -0,0 +1,2 @@ +/*! For license information please see 1813.6e36bf4a76f570983e5f.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[1813],{1813:function(e,i,t){t.r(i),t.d(i,{conf:function(){return n},language:function(){return s}});var n={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},s={defaultToken:"",tokenPostfix:".cypher",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","AND","AS","ASC","ASCENDING","BY","CALL","CASE","CONTAINS","CREATE","DELETE","DESC","DESCENDING","DETACH","DISTINCT","ELSE","END","ENDS","EXISTS","IN","IS","LIMIT","MANDATORY","MATCH","MERGE","NOT","ON","ON","OPTIONAL","OR","ORDER","REMOVE","RETURN","SET","SKIP","STARTS","THEN","UNION","UNWIND","WHEN","WHERE","WITH","XOR","YIELD"],builtinLiterals:["true","TRUE","false","FALSE","null","NULL"],builtinFunctions:["abs","acos","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endNode","exists","exp","floor","head","id","keys","labels","last","left","length","log","log10","lTrim","max","min","nodes","percentileCont","percentileDisc","pi","properties","radians","rand","range","relationships","replace","reverse","right","round","rTrim","sign","sin","size","split","sqrt","startNode","stDev","stDevP","substring","sum","tail","tan","timestamp","toBoolean","toFloat","toInteger","toLower","toString","toUpper","trim","type"],operators:["+","-","*","/","%","^","=","<>","<",">","<=",">=","->","<-","--\x3e","<--"],escapes:/\\(?:[tbnrf\\"'`]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+/,octaldigits:/[0-7]+/,hexdigits:/[0-9a-fA-F]+/,tokenizer:{root:[[/[{}[\]()]/,"@brackets"],{include:"common"}],common:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/:[a-zA-Z_][\w]*/,"type.identifier"],[/[a-zA-Z_][\w]*(?=\()/,{cases:{"@builtinFunctions":"predefined.function"}}],[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":"keyword","@builtinLiterals":"predefined.literal","@default":"identifier"}}],[/`/,"identifier.escape","@identifierBacktick"],[/[;,.:|]/,"delimiter"],[/[<>=%+\-*/^]+/,{cases:{"@operators":"delimiter","@default":""}}]],numbers:[[/-?(@digits)[eE](-?(@digits))?/,"number.float"],[/-?(@digits)?\.(@digits)([eE]-?(@digits))?/,"number.float"],[/-?0x(@hexdigits)/,"number.hex"],[/-?0(@octaldigits)/,"number.octal"],[/-?(@digits)/,"number"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@stringDouble"],[/'/,"string","@stringSingle"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/\/\/.*/,"comment"],[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],stringDouble:[[/[^\\"]+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/"/,"string","@pop"]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/'/,"string","@pop"]],identifierBacktick:[[/[^\\`]+/,"identifier.escape"],[/@escapes/,"identifier.escape"],[/\\./,"identifier.escape.invalid"],[/`/,"identifier.escape","@pop"]]}}}}]); \ No newline at end of file diff --git a/1813.6e36bf4a76f570983e5f.js.LICENSE.txt b/1813.6e36bf4a76f570983e5f.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/1813.6e36bf4a76f570983e5f.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/2409.d4aa155bac35102b246a.js b/2409.d4aa155bac35102b246a.js new file mode 100644 index 00000000..a61b0cd2 --- /dev/null +++ b/2409.d4aa155bac35102b246a.js @@ -0,0 +1,2 @@ +/*! For license information please see 2409.d4aa155bac35102b246a.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[2409],{2409:function(E,T,R){R.r(T),R.d(T,{conf:function(){return A},language:function(){return I}});var A={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},I={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT","ABSOLUTE","ACTION","ADA","ADD","AFTER","ALL","ALLOCATE","ALTER","ALWAYS","ANALYZE","AND","ANY","ARE","AS","ASC","ASSERTION","AT","ATTACH","AUTHORIZATION","AUTOINCREMENT","AVG","BACKUP","BEFORE","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BREAK","BROWSE","BULK","BY","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","COMPUTE","CONFLICT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATE","DAY","DBCC","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DETACH","DIAGNOSTICS","DISCONNECT","DISK","DISTINCT","DISTRIBUTED","DO","DOMAIN","DOUBLE","DROP","DUMP","EACH","ELSE","END","END-EXEC","ERRLVL","ESCAPE","EXCEPT","EXCEPTION","EXCLUDE","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTERNAL","EXTRACT","FAIL","FALSE","FETCH","FILE","FILLFACTOR","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FOREIGN","FORTRAN","FOUND","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GENERATED","GET","GLOB","GLOBAL","GO","GOTO","GRANT","GROUP","GROUPS","HAVING","HOLDLOCK","HOUR","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IGNORE","IMMEDIATE","IN","INCLUDE","INDEX","INDEXED","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISNULL","ISOLATION","JOIN","KEY","KILL","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LIMIT","LINENO","LOAD","LOCAL","LOWER","MATCH","MATERIALIZED","MAX","MERGE","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NOCHECK","NONCLUSTERED","NONE","NOT","NOTHING","NOTNULL","NULL","NULLIF","NULLS","NUMERIC","OCTET_LENGTH","OF","OFF","OFFSET","OFFSETS","ON","ONLY","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OTHERS","OUTER","OUTPUT","OVER","OVERLAPS","PAD","PARTIAL","PARTITION","PASCAL","PERCENT","PIVOT","PLAN","POSITION","PRAGMA","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRINT","PRIOR","PRIVILEGES","PROC","PROCEDURE","PUBLIC","QUERY","RAISE","RAISERROR","RANGE","READ","READTEXT","REAL","RECONFIGURE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELATIVE","RELEASE","RENAME","REPLACE","REPLICATION","RESTORE","RESTRICT","RETURN","RETURNING","REVERT","REVOKE","RIGHT","ROLLBACK","ROW","ROWCOUNT","ROWGUIDCOL","ROWS","RULE","SAVE","SAVEPOINT","SCHEMA","SCROLL","SECOND","SECTION","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION","SESSION_USER","SET","SETUSER","SHUTDOWN","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","STATISTICS","SUBSTRING","SUM","SYSTEM_USER","TABLE","TABLESAMPLE","TEMP","TEMPORARY","TEXTSIZE","THEN","TIES","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TOP","TRAILING","TRAN","TRANSACTION","TRANSLATE","TRANSLATION","TRIGGER","TRIM","TRUE","TRUNCATE","TRY_CONVERT","TSEQUAL","UNBOUNDED","UNION","UNIQUE","UNKNOWN","UNPIVOT","UPDATE","UPDATETEXT","UPPER","USAGE","USE","USER","USING","VACUUM","VALUE","VALUES","VARCHAR","VARYING","VIEW","VIRTUAL","WAITFOR","WHEN","WHENEVER","WHERE","WHILE","WINDOW","WITH","WITHIN GROUP","WITHOUT","WORK","WRITE","WRITETEXT","YEAR","ZONE"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}}}}]); \ No newline at end of file diff --git a/2409.d4aa155bac35102b246a.js.LICENSE.txt b/2409.d4aa155bac35102b246a.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/2409.d4aa155bac35102b246a.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/2410.6be2669e0b7808d2979b.js b/2410.6be2669e0b7808d2979b.js new file mode 100644 index 00000000..e085e8a6 --- /dev/null +++ b/2410.6be2669e0b7808d2979b.js @@ -0,0 +1,2 @@ +/*! For license information please see 2410.6be2669e0b7808d2979b.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[2410],{2410:function(e,t,n){n.r(t),n.d(t,{conf:function(){return p},language:function(){return g}});var r=n(7448),s=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,a=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))l.call(e,a)||a===n||s(e,a,{get:()=>t[a],enumerable:!(r=i(t,a))||r.enumerable});return e},c={};a(c,r,"default");var p={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:c.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},g={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}}}}]); \ No newline at end of file diff --git a/2410.6be2669e0b7808d2979b.js.LICENSE.txt b/2410.6be2669e0b7808d2979b.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/2410.6be2669e0b7808d2979b.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/2593.8743a5ca0b648f765cee.js b/2593.8743a5ca0b648f765cee.js new file mode 100644 index 00000000..9b3778c1 --- /dev/null +++ b/2593.8743a5ca0b648f765cee.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[2593],{2593:function(e,t,i){i.r(t),i.d(t,{Adapter:function(){return h},CodeActionAdaptor:function(){return O},DefinitionAdapter:function(){return k},DiagnosticsAdapter:function(){return f},DocumentHighlightAdapter:function(){return x},FormatAdapter:function(){return P},FormatHelper:function(){return T},FormatOnTypeAdapter:function(){return L},InlayHintsAdapter:function(){return M},Kind:function(){return D},LibFiles:function(){return b},OutlineAdapter:function(){return C},QuickInfoAdapter:function(){return S},ReferenceAdapter:function(){return v},RenameAdapter:function(){return N},SignatureHelpAdapter:function(){return w},SuggestAdapter:function(){return y},WorkerManager:function(){return u},flattenDiagnosticMessageText:function(){return p},getJavaScriptWorker:function(){return E},getTypeScriptWorker:function(){return H},setupJavaScript:function(){return R},setupTypeScript:function(){return K}});var s=i(7448),n=i(8186),r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,c=(e,t,i,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of o(t))l.call(e,n)||n===i||r(e,n,{get:()=>t[n],enumerable:!(s=a(t,n))||s.enumerable});return e},d={};c(d,s,"default");var u=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker())),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange((()=>this._updateExtraLibs()))}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=d.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(d.editor.getModels().filter((e=>e.getLanguageId()===this._modeId)).map((e=>e.uri))):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},g={};function p(e,t,i=0){if("string"==typeof e)return e;if(void 0===e)return"";let s="";if(i){s+=t;for(let e=0;ee.text)).join(""):""}g["lib.d.ts"]=!0,g["lib.decorators.d.ts"]=!0,g["lib.decorators.legacy.d.ts"]=!0,g["lib.dom.asynciterable.d.ts"]=!0,g["lib.dom.d.ts"]=!0,g["lib.dom.iterable.d.ts"]=!0,g["lib.es2015.collection.d.ts"]=!0,g["lib.es2015.core.d.ts"]=!0,g["lib.es2015.d.ts"]=!0,g["lib.es2015.generator.d.ts"]=!0,g["lib.es2015.iterable.d.ts"]=!0,g["lib.es2015.promise.d.ts"]=!0,g["lib.es2015.proxy.d.ts"]=!0,g["lib.es2015.reflect.d.ts"]=!0,g["lib.es2015.symbol.d.ts"]=!0,g["lib.es2015.symbol.wellknown.d.ts"]=!0,g["lib.es2016.array.include.d.ts"]=!0,g["lib.es2016.d.ts"]=!0,g["lib.es2016.full.d.ts"]=!0,g["lib.es2016.intl.d.ts"]=!0,g["lib.es2017.d.ts"]=!0,g["lib.es2017.date.d.ts"]=!0,g["lib.es2017.full.d.ts"]=!0,g["lib.es2017.intl.d.ts"]=!0,g["lib.es2017.object.d.ts"]=!0,g["lib.es2017.sharedmemory.d.ts"]=!0,g["lib.es2017.string.d.ts"]=!0,g["lib.es2017.typedarrays.d.ts"]=!0,g["lib.es2018.asyncgenerator.d.ts"]=!0,g["lib.es2018.asynciterable.d.ts"]=!0,g["lib.es2018.d.ts"]=!0,g["lib.es2018.full.d.ts"]=!0,g["lib.es2018.intl.d.ts"]=!0,g["lib.es2018.promise.d.ts"]=!0,g["lib.es2018.regexp.d.ts"]=!0,g["lib.es2019.array.d.ts"]=!0,g["lib.es2019.d.ts"]=!0,g["lib.es2019.full.d.ts"]=!0,g["lib.es2019.intl.d.ts"]=!0,g["lib.es2019.object.d.ts"]=!0,g["lib.es2019.string.d.ts"]=!0,g["lib.es2019.symbol.d.ts"]=!0,g["lib.es2020.bigint.d.ts"]=!0,g["lib.es2020.d.ts"]=!0,g["lib.es2020.date.d.ts"]=!0,g["lib.es2020.full.d.ts"]=!0,g["lib.es2020.intl.d.ts"]=!0,g["lib.es2020.number.d.ts"]=!0,g["lib.es2020.promise.d.ts"]=!0,g["lib.es2020.sharedmemory.d.ts"]=!0,g["lib.es2020.string.d.ts"]=!0,g["lib.es2020.symbol.wellknown.d.ts"]=!0,g["lib.es2021.d.ts"]=!0,g["lib.es2021.full.d.ts"]=!0,g["lib.es2021.intl.d.ts"]=!0,g["lib.es2021.promise.d.ts"]=!0,g["lib.es2021.string.d.ts"]=!0,g["lib.es2021.weakref.d.ts"]=!0,g["lib.es2022.array.d.ts"]=!0,g["lib.es2022.d.ts"]=!0,g["lib.es2022.error.d.ts"]=!0,g["lib.es2022.full.d.ts"]=!0,g["lib.es2022.intl.d.ts"]=!0,g["lib.es2022.object.d.ts"]=!0,g["lib.es2022.regexp.d.ts"]=!0,g["lib.es2022.sharedmemory.d.ts"]=!0,g["lib.es2022.string.d.ts"]=!0,g["lib.es2023.array.d.ts"]=!0,g["lib.es2023.collection.d.ts"]=!0,g["lib.es2023.d.ts"]=!0,g["lib.es2023.full.d.ts"]=!0,g["lib.es5.d.ts"]=!0,g["lib.es6.d.ts"]=!0,g["lib.esnext.collection.d.ts"]=!0,g["lib.esnext.d.ts"]=!0,g["lib.esnext.decorators.d.ts"]=!0,g["lib.esnext.disposable.d.ts"]=!0,g["lib.esnext.full.d.ts"]=!0,g["lib.esnext.intl.d.ts"]=!0,g["lib.esnext.object.d.ts"]=!0,g["lib.esnext.promise.d.ts"]=!0,g["lib.scripthost.d.ts"]=!0,g["lib.webworker.asynciterable.d.ts"]=!0,g["lib.webworker.d.ts"]=!0,g["lib.webworker.importscripts.d.ts"]=!0,g["lib.webworker.iterable.d.ts"]=!0;var h=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let i=e.getPositionAt(t.start),s=e.getPositionAt(t.start+t.length),{lineNumber:n,column:r}=i,{lineNumber:a,column:o}=s;return{startLineNumber:n,startColumn:r,endLineNumber:a,endColumn:o}}},b=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return!!e&&0===e.path.indexOf("/lib.")&&!!g[e.path.slice(1)]}getOrCreateModel(e){const t=d.Uri.parse(e),i=d.editor.getModel(t);if(i)return i;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return d.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const s=n.TG.getExtraLibs()[e];return s?d.editor.createModel(s.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then((e=>e.getLibFiles())).then((e=>{this._hasFetchedLibFiles=!0,this._libFiles=e}))),this._fetchLibFilesPromise}},f=class extends h{constructor(e,t,i,s){super(s),this._libFiles=e,this._defaults=t,this._selector=i,this._disposables=[],this._listener=Object.create(null);const n=e=>{if(e.getLanguageId()!==i)return;const t=()=>{const{onlyVisible:t}=this._defaults.getDiagnosticsOptions();t?e.isAttachedToEditor()&&this._doValidate(e):this._doValidate(e)};let s;const n=e.onDidChangeContent((()=>{clearTimeout(s),s=window.setTimeout(t,500)})),r=e.onDidChangeAttached((()=>{const{onlyVisible:i}=this._defaults.getDiagnosticsOptions();i&&(e.isAttachedToEditor()?t():d.editor.setModelMarkers(e,this._selector,[]))}));this._listener[e.uri.toString()]={dispose(){n.dispose(),r.dispose(),clearTimeout(s)}},t()},r=e=>{d.editor.setModelMarkers(e,this._selector,[]);const t=e.uri.toString();this._listener[t]&&(this._listener[t].dispose(),delete this._listener[t])};this._disposables.push(d.editor.onDidCreateModel((e=>n(e)))),this._disposables.push(d.editor.onWillDisposeModel(r)),this._disposables.push(d.editor.onDidChangeModelLanguage((e=>{r(e.model),n(e.model)}))),this._disposables.push({dispose(){for(const e of d.editor.getModels())r(e)}});const a=()=>{for(const e of d.editor.getModels())r(e),n(e)};this._disposables.push(this._defaults.onDidChange(a)),this._disposables.push(this._defaults.onDidExtraLibsChange(a)),d.editor.getModels().forEach((e=>n(e)))}dispose(){this._disposables.forEach((e=>e&&e.dispose())),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const i=[],{noSyntaxValidation:s,noSemanticValidation:n,noSuggestionDiagnostics:r}=this._defaults.getDiagnosticsOptions();s||i.push(t.getSyntacticDiagnostics(e.uri.toString())),n||i.push(t.getSemanticDiagnostics(e.uri.toString())),r||i.push(t.getSuggestionDiagnostics(e.uri.toString()));const a=await Promise.all(i);if(!a||e.isDisposed())return;const o=a.reduce(((e,t)=>t.concat(e)),[]).filter((e=>-1===(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code))),l=o.map((e=>e.relatedInformation||[])).reduce(((e,t)=>t.concat(e)),[]).map((e=>e.file?d.Uri.parse(e.file.fileName):null));await this._libFiles.fetchLibFilesIfNecessary(l),e.isDisposed()||d.editor.setModelMarkers(e,this._selector,o.map((t=>this._convertDiagnostics(e,t))))}_convertDiagnostics(e,t){const i=t.start||0,s=t.length||1,{lineNumber:n,column:r}=e.getPositionAt(i),{lineNumber:a,column:o}=e.getPositionAt(i+s),l=[];return t.reportsUnnecessary&&l.push(d.MarkerTag.Unnecessary),t.reportsDeprecated&&l.push(d.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:r,endLineNumber:a,endColumn:o,message:p(t.messageText,"\n"),code:t.code.toString(),tags:l,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const i=[];return t.forEach((t=>{let s=e;if(t.file&&(s=this._libFiles.getOrCreateModel(t.file.fileName)),!s)return;const n=t.start||0,r=t.length||1,{lineNumber:a,column:o}=s.getPositionAt(n),{lineNumber:l,column:c}=s.getPositionAt(n+r);i.push({resource:s.uri,startLineNumber:a,startColumn:o,endLineNumber:l,endColumn:c,message:p(t.messageText,"\n")})})),i}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return d.MarkerSeverity.Error;case 3:return d.MarkerSeverity.Info;case 0:return d.MarkerSeverity.Warning;case 2:return d.MarkerSeverity.Hint}return d.MarkerSeverity.Info}},y=class e extends h{get triggerCharacters(){return["."]}async provideCompletionItems(t,i,s,n){const r=t.getWordUntilPosition(i),a=new d.Range(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),o=t.uri,l=t.getOffsetAt(i),c=await this._worker(o);if(t.isDisposed())return;const u=await c.getCompletionsAtPosition(o.toString(),l);return u&&!t.isDisposed()?{suggestions:u.entries.map((s=>{let n=a;if(s.replacementSpan){const e=t.getPositionAt(s.replacementSpan.start),i=t.getPositionAt(s.replacementSpan.start+s.replacementSpan.length);n=new d.Range(e.lineNumber,e.column,i.lineNumber,i.column)}const r=[];return void 0!==s.kindModifiers&&-1!==s.kindModifiers.indexOf("deprecated")&&r.push(d.languages.CompletionItemTag.Deprecated),{uri:o,position:i,offset:l,range:n,label:s.name,insertText:s.name,sortText:s.sortText,kind:e.convertKind(s.kind),tags:r}}))}:void 0}async resolveCompletionItem(t,i){const s=t,n=s.uri,r=s.position,a=s.offset,o=await this._worker(n),l=await o.getCompletionEntryDetails(n.toString(),a,s.label);return l?{uri:n,position:r,label:l.name,kind:e.convertKind(l.kind),detail:m(l.displayParts),documentation:{value:e.createDocumentationString(l)}}:s}static convertKind(e){switch(e){case D.primitiveType:case D.keyword:return d.languages.CompletionItemKind.Keyword;case D.variable:case D.localVariable:return d.languages.CompletionItemKind.Variable;case D.memberVariable:case D.memberGetAccessor:case D.memberSetAccessor:return d.languages.CompletionItemKind.Field;case D.function:case D.memberFunction:case D.constructSignature:case D.callSignature:case D.indexSignature:return d.languages.CompletionItemKind.Function;case D.enum:return d.languages.CompletionItemKind.Enum;case D.module:return d.languages.CompletionItemKind.Module;case D.class:return d.languages.CompletionItemKind.Class;case D.interface:return d.languages.CompletionItemKind.Interface;case D.warning:return d.languages.CompletionItemKind.File}return d.languages.CompletionItemKind.Property}static createDocumentationString(e){let t=m(e.documentation);if(e.tags)for(const i of e.tags)t+=`\n\n${_(i)}`;return t}};function _(e){let t=`*@${e.name}*`;if("param"===e.name&&e.text){const[i,...s]=e.text;t+=`\`${i.text}\``,s.length>0&&(t+=` — ${s.map((e=>e.text)).join(" ")}`)}else Array.isArray(e.text)?t+=` — ${e.text.map((e=>e.text)).join(" ")}`:e.text&&(t+=` — ${e.text}`);return t}var w=class e extends h{constructor(){super(...arguments),this.signatureHelpTriggerCharacters=["(",","]}static _toSignatureHelpTriggerReason(e){switch(e.triggerKind){case d.languages.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case d.languages.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case d.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}}async provideSignatureHelp(t,i,s,n){const r=t.uri,a=t.getOffsetAt(i),o=await this._worker(r);if(t.isDisposed())return;const l=await o.getSignatureHelpItems(r.toString(),a,{triggerReason:e._toSignatureHelpTriggerReason(n)});if(!l||t.isDisposed())return;const c={activeSignature:l.selectedItemIndex,activeParameter:l.argumentIndex,signatures:[]};return l.items.forEach((e=>{const t={label:"",parameters:[]};t.documentation={value:m(e.documentation)},t.label+=m(e.prefixDisplayParts),e.parameters.forEach(((i,s,n)=>{const r=m(i.displayParts),a={label:r,documentation:{value:m(i.documentation)}};t.label+=r,t.parameters.push(a),s_(e))).join(" \n\n"):"",c=m(a.displayParts);return{range:this._textSpanToRange(e,a.textSpan),contents:[{value:"```typescript\n"+c+"\n```\n"},{value:o+(l?"\n\n"+l:"")}]}}},x=class extends h{async provideDocumentHighlights(e,t,i){const s=e.uri,n=e.getOffsetAt(t),r=await this._worker(s);if(e.isDisposed())return;const a=await r.getDocumentHighlights(s.toString(),n,[s.toString()]);return a&&!e.isDisposed()?a.flatMap((t=>t.highlightSpans.map((t=>({range:this._textSpanToRange(e,t.textSpan),kind:"writtenReference"===t.kind?d.languages.DocumentHighlightKind.Write:d.languages.DocumentHighlightKind.Text}))))):void 0}},k=class extends h{constructor(e,t){super(t),this._libFiles=e}async provideDefinition(e,t,i){const s=e.uri,n=e.getOffsetAt(t),r=await this._worker(s);if(e.isDisposed())return;const a=await r.getDefinitionAtPosition(s.toString(),n);if(!a||e.isDisposed())return;if(await this._libFiles.fetchLibFilesIfNecessary(a.map((e=>d.Uri.parse(e.fileName)))),e.isDisposed())return;const o=[];for(let e of a){const t=this._libFiles.getOrCreateModel(e.fileName);t&&o.push({uri:t.uri,range:this._textSpanToRange(t,e.textSpan)})}return o}},v=class extends h{constructor(e,t){super(t),this._libFiles=e}async provideReferences(e,t,i,s){const n=e.uri,r=e.getOffsetAt(t),a=await this._worker(n);if(e.isDisposed())return;const o=await a.getReferencesAtPosition(n.toString(),r);if(!o||e.isDisposed())return;if(await this._libFiles.fetchLibFilesIfNecessary(o.map((e=>d.Uri.parse(e.fileName)))),e.isDisposed())return;const l=[];for(let e of o){const t=this._libFiles.getOrCreateModel(e.fileName);t&&l.push({uri:t.uri,range:this._textSpanToRange(t,e.textSpan)})}return l}},C=class extends h{async provideDocumentSymbols(e,t){const i=e.uri,s=await this._worker(i);if(e.isDisposed())return;const n=await s.getNavigationTree(i.toString());if(!n||e.isDisposed())return;const r=(t,i)=>({name:t.text,detail:"",kind:A[t.kind]||d.languages.SymbolKind.Variable,range:this._textSpanToRange(e,t.spans[0]),selectionRange:this._textSpanToRange(e,t.spans[0]),tags:[],children:t.childItems?.map((e=>r(e,t.text))),containerName:i});return n.childItems?n.childItems.map((e=>r(e))):[]}},D=class{static{this.unknown=""}static{this.keyword="keyword"}static{this.script="script"}static{this.module="module"}static{this.class="class"}static{this.interface="interface"}static{this.type="type"}static{this.enum="enum"}static{this.variable="var"}static{this.localVariable="local var"}static{this.function="function"}static{this.localFunction="local function"}static{this.memberFunction="method"}static{this.memberGetAccessor="getter"}static{this.memberSetAccessor="setter"}static{this.memberVariable="property"}static{this.constructorImplementation="constructor"}static{this.callSignature="call"}static{this.indexSignature="index"}static{this.constructSignature="construct"}static{this.parameter="parameter"}static{this.typeParameter="type parameter"}static{this.primitiveType="primitive type"}static{this.label="label"}static{this.alias="alias"}static{this.const="const"}static{this.let="let"}static{this.warning="warning"}},A=Object.create(null);A[D.module]=d.languages.SymbolKind.Module,A[D.class]=d.languages.SymbolKind.Class,A[D.enum]=d.languages.SymbolKind.Enum,A[D.interface]=d.languages.SymbolKind.Interface,A[D.memberFunction]=d.languages.SymbolKind.Method,A[D.memberVariable]=d.languages.SymbolKind.Property,A[D.memberGetAccessor]=d.languages.SymbolKind.Property,A[D.memberSetAccessor]=d.languages.SymbolKind.Property,A[D.variable]=d.languages.SymbolKind.Variable,A[D.const]=d.languages.SymbolKind.Variable,A[D.localVariable]=d.languages.SymbolKind.Variable,A[D.variable]=d.languages.SymbolKind.Variable,A[D.function]=d.languages.SymbolKind.Function,A[D.localFunction]=d.languages.SymbolKind.Function;var F,I,T=class extends h{static _convertOptions(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:2,NewLineCharacter:"\n",InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}}_convertTextChanges(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}}},P=class extends T{constructor(){super(...arguments),this.canFormatMultipleRanges=!1}async provideDocumentRangeFormattingEdits(e,t,i,s){const n=e.uri,r=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),o=await this._worker(n);if(e.isDisposed())return;const l=await o.getFormattingEditsForRange(n.toString(),r,a,T._convertOptions(i));return l&&!e.isDisposed()?l.map((t=>this._convertTextChanges(e,t))):void 0}},L=class extends T{get autoFormatTriggerCharacters(){return[";","}","\n"]}async provideOnTypeFormattingEdits(e,t,i,s,n){const r=e.uri,a=e.getOffsetAt(t),o=await this._worker(r);if(e.isDisposed())return;const l=await o.getFormattingEditsAfterKeystroke(r.toString(),a,i,T._convertOptions(s));return l&&!e.isDisposed()?l.map((t=>this._convertTextChanges(e,t))):void 0}},O=class extends T{async provideCodeActions(e,t,i,s){const n=e.uri,r=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),o=T._convertOptions(e.getOptions()),l=i.markers.filter((e=>e.code)).map((e=>e.code)).map(Number),c=await this._worker(n);if(e.isDisposed())return;const d=await c.getCodeFixesAtPosition(n.toString(),r,a,l,o);return!d||e.isDisposed()?{actions:[],dispose:()=>{}}:{actions:d.filter((e=>0===e.changes.filter((e=>e.isNewFile)).length)).map((t=>this._tsCodeFixActionToMonacoCodeAction(e,i,t))),dispose:()=>{}}}_tsCodeFixActionToMonacoCodeAction(e,t,i){const s=[];for(const t of i.changes)for(const i of t.textChanges)s.push({resource:e.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(e,i.span),text:i.newText}});return{title:i.description,edit:{edits:s},diagnostics:t.markers,kind:"quickfix"}}},N=class extends h{constructor(e,t){super(t),this._libFiles=e}async provideRenameEdits(e,t,i,s){const n=e.uri,r=n.toString(),a=e.getOffsetAt(t),o=await this._worker(n);if(e.isDisposed())return;const l=await o.getRenameInfo(r,a,{allowRenameOfImportPath:!1});if(!1===l.canRename)return{edits:[],rejectReason:l.localizedErrorMessage};if(void 0!==l.fileToRename)throw new Error("Renaming files is not supported.");const c=await o.findRenameLocations(r,a,!1,!1,!1);if(!c||e.isDisposed())return;const d=[];for(const e of c){const t=this._libFiles.getOrCreateModel(e.fileName);if(!t)throw new Error(`Unknown file ${e.fileName}.`);d.push({resource:t.uri,versionId:void 0,textEdit:{range:this._textSpanToRange(t,e.textSpan),text:i}})}return{edits:d}}},M=class extends h{async provideInlayHints(e,t,i){const s=e.uri,n=s.toString(),r=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),a=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),o=await this._worker(s);return e.isDisposed()?null:{hints:(await o.provideInlayHints(n,r,a)).map((t=>({...t,label:t.text,position:e.getPositionAt(t.position),kind:this._convertHintKind(t.kind)}))),dispose:()=>{}}}_convertHintKind(e){return"Parameter"===e?d.languages.InlayHintKind.Parameter:d.languages.InlayHintKind.Type}};function K(e){I=V(e,"typescript")}function R(e){F=V(e,"javascript")}function E(){return new Promise(((e,t)=>{if(!F)return t("JavaScript not registered!");e(F)}))}function H(){return new Promise(((e,t)=>{if(!I)return t("TypeScript not registered!");e(I)}))}function V(e,t){const i=[],s=[],n=new u(t,e);i.push(n);const r=(...e)=>n.getLanguageServiceWorker(...e),a=new b(r);return function(){const{modeConfiguration:i}=e;j(s),i.completionItems&&s.push(d.languages.registerCompletionItemProvider(t,new y(r))),i.signatureHelp&&s.push(d.languages.registerSignatureHelpProvider(t,new w(r))),i.hovers&&s.push(d.languages.registerHoverProvider(t,new S(r))),i.documentHighlights&&s.push(d.languages.registerDocumentHighlightProvider(t,new x(r))),i.definitions&&s.push(d.languages.registerDefinitionProvider(t,new k(a,r))),i.references&&s.push(d.languages.registerReferenceProvider(t,new v(a,r))),i.documentSymbols&&s.push(d.languages.registerDocumentSymbolProvider(t,new C(r))),i.rename&&s.push(d.languages.registerRenameProvider(t,new N(a,r))),i.documentRangeFormattingEdits&&s.push(d.languages.registerDocumentRangeFormattingEditProvider(t,new P(r))),i.onTypeFormattingEdits&&s.push(d.languages.registerOnTypeFormattingEditProvider(t,new L(r))),i.codeActions&&s.push(d.languages.registerCodeActionProvider(t,new O(r))),i.inlayHints&&s.push(d.languages.registerInlayHintsProvider(t,new M(r))),i.diagnostics&&s.push(new f(a,e,t,r))}(),i.push(function(e){return{dispose:()=>j(e)}}(s)),r}function j(e){for(;e.length;)e.pop().dispose()}}}]); \ No newline at end of file diff --git a/2741.99ad8d2eea51ccec85b3.js b/2741.99ad8d2eea51ccec85b3.js new file mode 100644 index 00000000..0b6ce5ce --- /dev/null +++ b/2741.99ad8d2eea51ccec85b3.js @@ -0,0 +1,2 @@ +/*! For license information please see 2741.99ad8d2eea51ccec85b3.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[2741],{2741:function(e,t,n){n.r(t),n.d(t,{conf:function(){return r},language:function(){return i}});var r={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},i={defaultToken:"",tokenPostfix:".css",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}}}]); \ No newline at end of file diff --git a/2741.99ad8d2eea51ccec85b3.js.LICENSE.txt b/2741.99ad8d2eea51ccec85b3.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/2741.99ad8d2eea51ccec85b3.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/2826.e31bd0d120a628ff6cb9.js b/2826.e31bd0d120a628ff6cb9.js new file mode 100644 index 00000000..9fb899a1 --- /dev/null +++ b/2826.e31bd0d120a628ff6cb9.js @@ -0,0 +1,2 @@ +/*! For license information please see 2826.e31bd0d120a628ff6cb9.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[2826],{2826:function(e,o,t){t.r(o),t.d(o,{conf:function(){return n},language:function(){return s}});var n={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},s={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}}}]); \ No newline at end of file diff --git a/2826.e31bd0d120a628ff6cb9.js.LICENSE.txt b/2826.e31bd0d120a628ff6cb9.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/2826.e31bd0d120a628ff6cb9.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/2833.22bbeb994a919474cfaf.js b/2833.22bbeb994a919474cfaf.js new file mode 100644 index 00000000..3bad052a --- /dev/null +++ b/2833.22bbeb994a919474cfaf.js @@ -0,0 +1,2 @@ +/*! For license information please see 2833.22bbeb994a919474cfaf.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[2833],{2833:function(e,t,n){n.r(t),n.d(t,{conf:function(){return s},language:function(){return o}});var s={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},o={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}}}]); \ No newline at end of file diff --git a/2833.22bbeb994a919474cfaf.js.LICENSE.txt b/2833.22bbeb994a919474cfaf.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/2833.22bbeb994a919474cfaf.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/2874.284adff19ac3d74530fd.js b/2874.284adff19ac3d74530fd.js new file mode 100644 index 00000000..93a90fe5 --- /dev/null +++ b/2874.284adff19ac3d74530fd.js @@ -0,0 +1,2 @@ +/*! For license information please see 2874.284adff19ac3d74530fd.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[2874],{2874:function(e,_,t){t.r(_),t.d(_,{conf:function(){return s},language:function(){return r}});var s={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},r={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASYMMETRIC","AUTHORIZATION","BINARY","BOTH","CASE","CAST","CHECK","COLLATE","COLLATION","COLUMN","CONCURRENTLY","CONSTRAINT","CREATE","CROSS","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DEFAULT","DEFERRABLE","DESC","DISTINCT","DO","ELSE","END","EXCEPT","FALSE","FETCH","FOR","FOREIGN","FREEZE","FROM","FULL","GRANT","GROUP","HAVING","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LATERAL","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","NATURAL","NOT","NOTNULL","NULL","OFFSET","ON","ONLY","OR","ORDER","OUTER","OVERLAPS","PLACING","PRIMARY","REFERENCES","RETURNING","RIGHT","SELECT","SESSION_USER","SIMILAR","SOME","SYMMETRIC","TABLE","TABLESAMPLE","THEN","TO","TRAILING","TRUE","UNION","UNIQUE","USER","USING","VARIADIC","VERBOSE","WHEN","WHERE","WINDOW","WITH"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["abbrev","abs","acldefault","aclexplode","acos","acosd","acosh","age","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","ascii","asin","asind","asinh","atan","atan2","atan2d","atand","atanh","avg","bit","bit_and","bit_count","bit_length","bit_or","bit_xor","bool_and","bool_or","bound_box","box","brin_desummarize_range","brin_summarize_new_values","brin_summarize_range","broadcast","btrim","cardinality","cbrt","ceil","ceiling","center","char_length","character_length","chr","circle","clock_timestamp","coalesce","col_description","concat","concat_ws","convert","convert_from","convert_to","corr","cos","cosd","cosh","cot","cotd","count","covar_pop","covar_samp","cume_dist","current_catalog","current_database","current_date","current_query","current_role","current_schema","current_schemas","current_setting","current_time","current_timestamp","current_user","currval","cursor_to_xml","cursor_to_xmlschema","date_bin","date_part","date_trunc","database_to_xml","database_to_xml_and_xmlschema","database_to_xmlschema","decode","degrees","dense_rank","diagonal","diameter","div","encode","enum_first","enum_last","enum_range","every","exp","extract","factorial","family","first_value","floor","format","format_type","gcd","gen_random_uuid","generate_series","generate_subscripts","get_bit","get_byte","get_current_ts_config","gin_clean_pending_list","greatest","grouping","has_any_column_privilege","has_column_privilege","has_database_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_schema_privilege","has_sequence_privilege","has_server_privilege","has_table_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","initcap","isclosed","isempty","isfinite","isopen","json_agg","json_array_elements","json_array_elements_text","json_array_length","json_build_array","json_build_object","json_each","json_each_text","json_extract_path","json_extract_path_text","json_object","json_object_agg","json_object_keys","json_populate_record","json_populate_recordset","json_strip_nulls","json_to_record","json_to_recordset","json_to_tsvector","json_typeof","jsonb_agg","jsonb_array_elements","jsonb_array_elements_text","jsonb_array_length","jsonb_build_array","jsonb_build_object","jsonb_each","jsonb_each_text","jsonb_extract_path","jsonb_extract_path_text","jsonb_insert","jsonb_object","jsonb_object_agg","jsonb_object_keys","jsonb_path_exists","jsonb_path_match","jsonb_path_query","jsonb_path_query_array","jsonb_path_exists_tz","jsonb_path_query_first","jsonb_path_query_array_tz","jsonb_path_query_first_tz","jsonb_path_query_tz","jsonb_path_match_tz","jsonb_populate_record","jsonb_populate_recordset","jsonb_pretty","jsonb_set","jsonb_set_lax","jsonb_strip_nulls","jsonb_to_record","jsonb_to_recordset","jsonb_to_tsvector","jsonb_typeof","justify_days","justify_hours","justify_interval","lag","last_value","lastval","lcm","lead","least","left","length","line","ln","localtime","localtimestamp","log","log10","lower","lower_inc","lower_inf","lpad","lseg","ltrim","macaddr8_set7bit","make_date","make_interval","make_time","make_timestamp","make_timestamptz","makeaclitem","masklen","max","md5","min","min_scale","mod","mode","multirange","netmask","network","nextval","normalize","now","npoints","nth_value","ntile","nullif","num_nonnulls","num_nulls","numnode","obj_description","octet_length","overlay","parse_ident","path","pclose","percent_rank","percentile_cont","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backend_pid","pg_backup_start_time","pg_blocking_pids","pg_cancel_backend","pg_client_encoding","pg_collation_actual_version","pg_collation_is_visible","pg_column_compression","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_copy_logical_replication_slot","pg_copy_physical_replication_slot","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_logfile","pg_current_snapshot","pg_current_wal_flush_lsn","pg_current_wal_insert_lsn","pg_current_wal_lsn","pg_current_xact_id","pg_current_xact_id_if_assigned","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_event_trigger_ddl_commands","pg_event_trigger_dropped_objects","pg_event_trigger_table_rewrite_oid","pg_event_trigger_table_rewrite_reason","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_catalog_foreign_keys","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_statisticsobjdef","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_get_wal_replay_pause_state","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_import_system_collations","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_wal_replay_paused","pg_is_xlog_replay_paused","pg_jit_available","pg_last_committed_xact","pg_last_wal_receive_lsn","pg_last_wal_replay_lsn","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_log_backend_memory_contexts","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_archive_statusdir","pg_ls_dir","pg_ls_logdir","pg_ls_tmpdir","pg_ls_waldir","pg_mcv_list_items","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_partition_ancestors","pg_partition_root","pg_partition_tree","pg_postmaster_start_time","pg_promote","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_advance","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_replication_slot_advance","pg_rotate_logfile","pg_safe_snapshot_blocking_pids","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_snapshot_xip","pg_snapshot_xmax","pg_snapshot_xmin","pg_start_backup","pg_stat_file","pg_statistics_obj_is_visible","pg_stop_backup","pg_switch_wal","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_terminate_backend","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_visible_in_snapshot","pg_wal_lsn_diff","pg_wal_replay_pause","pg_wal_replay_resume","pg_walfile_name","pg_walfile_name_offset","pg_xact_commit_timestamp","pg_xact_commit_timestamp_origin","pg_xact_status","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","pi","plainto_tsquery","point","polygon","popen","position","power","pqserverversion","query_to_xml","query_to_xml_and_xmlschema","query_to_xmlschema","querytree","quote_ident","quote_literal","quote_nullable","radians","radius","random","range_agg","range_intersect_agg","range_merge","rank","regexp_count","regexp_instr","regexp_like","regexp_match","regexp_matches","regexp_replace","regexp_split_to_array","regexp_split_to_table","regexp_substr","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","repeat","replace","reverse","right","round","row_number","row_security_active","row_to_json","rpad","rtrim","scale","schema_to_xml","schema_to_xml_and_xmlschema","schema_to_xmlschema","session_user","set_bit","set_byte","set_config","set_masklen","setseed","setval","setweight","sha224","sha256","sha384","sha512","shobj_description","sign","sin","sind","sinh","slope","split_part","sprintf","sqrt","starts_with","statement_timestamp","stddev","stddev_pop","stddev_samp","string_agg","string_to_array","string_to_table","strip","strpos","substr","substring","sum","suppress_redundant_updates_trigger","table_to_xml","table_to_xml_and_xmlschema","table_to_xmlschema","tan","tand","tanh","text","timeofday","timezone","to_ascii","to_char","to_date","to_hex","to_json","to_number","to_regclass","to_regcollation","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_timestamp","to_tsquery","to_tsvector","transaction_timestamp","translate","trim","trim_array","trim_scale","trunc","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_if_assigned","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_status","txid_visible_in_snapshot","unistr","unnest","upper","upper_inc","upper_inf","user","var_pop","var_samp","variance","version","websearch_to_tsquery","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}}}]); \ No newline at end of file diff --git a/2874.284adff19ac3d74530fd.js.LICENSE.txt b/2874.284adff19ac3d74530fd.js.LICENSE.txt new file mode 100644 index 00000000..23168aa6 --- /dev/null +++ b/2874.284adff19ac3d74530fd.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*!----------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Version: 0.50.0(c321d0fbecb50ab8a5365fa1965476b0ae63fc87) + * Released under the MIT license + * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt + *-----------------------------------------------------------------------------*/ diff --git a/2906.3441dbdb00078e7da130.js b/2906.3441dbdb00078e7da130.js new file mode 100644 index 00000000..0397ec72 --- /dev/null +++ b/2906.3441dbdb00078e7da130.js @@ -0,0 +1,2 @@ +/*! For license information please see 2906.3441dbdb00078e7da130.js.LICENSE.txt */ +"use strict";(self.webpackChunktsdoc_playground=self.webpackChunktsdoc_playground||[]).push([[2906],{2906:function(e,t,o){o.r(t),o.d(t,{conf:function(){return n},language:function(){return s}});var n={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},s={keywords:["namespace","open","as","operation","function","body","adjoint","newtype","controlled","if","elif","else","repeat","until","fixup","for","in","while","return","fail","within","apply","Adjoint","Controlled","Adj","Ctl","is","self","auto","distribute","invert","intrinsic","let","set","w/","new","not","and","or","use","borrow","using","borrowing","mutable","internal"],typeKeywords:["Unit","Int","BigInt","Double","Bool","String","Qubit","Result","Pauli","Range"],invalidKeywords:["abstract","base","bool","break","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","enum","event","explicit","extern","finally","fixed","float","foreach","goto","implicit","int","interface","lock","long","null","object","operator","out","override","params","private","protected","public","readonly","ref","sbyte","sealed","short","sizeof","stackalloc","static","string","struct","switch","this","throw","try","typeof","unit","ulong","unchecked","unsafe","ushort","virtual","void","volatile"],constants:["true","false","PauliI","PauliX","PauliY","PauliZ","One","Zero"],builtin:["X","Y","Z","H","HY","S","T","SWAP","CNOT","CCNOT","MultiX","R","RFrac","Rx","Ry","Rz","R1","R1Frac","Exp","ExpFrac","Measure","M","MultiM","Message","Length","Assert","AssertProb","AssertEqual"],operators:["and=","<-","->","*","*=","@","!","^","^=",":","::","..","==","...","=","=>",">",">=","<","<=","-","-=","!=","or=","%","%=","|","+","+=","?","/","/=","&&&","&&&=","^^^","^^^=",">>>",">>>=","<<<","<<<=","|||","|||=","~~~","_","w/","w/="],namespaceFollows:["namespace","open"],symbols:/[=> .action-dropdown-item-separator {\n\tdisplay: flex;\n\talign-items: center;\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item > .action-dropdown-item-separator > div {\n\twidth: 1px;\n}\n",""]),t.Z=r},3997:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}",""]),t.Z=r},2512:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-text-button {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\twidth: 100%;\n\tpadding: 4px;\n\tborder-radius: 2px;\n\ttext-align: center;\n\tcursor: pointer;\n\tjustify-content: center;\n\talign-items: center;\n\tborder: 1px solid var(--vscode-button-border, transparent);\n\tline-height: 18px;\n}\n\n.monaco-text-button:focus {\n\toutline-offset: 2px !important;\n}\n\n.monaco-text-button:hover {\n\ttext-decoration: none !important;\n}\n\n.monaco-button.disabled:focus,\n.monaco-button.disabled {\n\topacity: 0.4 !important;\n\tcursor: default;\n}\n\n.monaco-text-button .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label {\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tpadding: 0 4px;\n\toverflow: hidden;\n\theight: 28px;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label {\n\tflex-basis: 100%;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label-short {\n\tflex-grow: 1;\n\twidth: 0;\n\toverflow: hidden;\n}\n\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label,\n.monaco-text-button.monaco-text-button-with-short-label > .monaco-button-label-short {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tfont-weight: normal;\n\tfont-style: inherit;\n\tpadding: 4px 0;\n}\n\n.monaco-button-dropdown {\n\tdisplay: flex;\n\tcursor: pointer;\n}\n\n.monaco-button-dropdown.disabled {\n\tcursor: default;\n}\n\n.monaco-button-dropdown > .monaco-button:focus {\n\toutline-offset: -1px !important;\n}\n\n.monaco-button-dropdown.disabled > .monaco-button.disabled,\n.monaco-button-dropdown.disabled > .monaco-button.disabled:focus,\n.monaco-button-dropdown.disabled > .monaco-button-dropdown-separator {\n\topacity: 0.4 !important;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-text-button {\n\tborder-right-width: 0 !important;\n}\n\n.monaco-button-dropdown .monaco-button-dropdown-separator {\n\tpadding: 4px 0;\n\tcursor: default;\n}\n\n.monaco-button-dropdown .monaco-button-dropdown-separator > div {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-dropdown-button {\n\tborder: 1px solid var(--vscode-button-border, transparent);\n\tborder-left-width: 0 !important;\n\tborder-radius: 0 2px 2px 0;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-button-dropdown > .monaco-button.monaco-text-button {\n\tborder-radius: 2px 0 0 2px;\n}\n\n.monaco-description-button {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tmargin: 4px 5px; /* allows button focus outline to be visible */\n}\n\n.monaco-description-button .monaco-button-description {\n\tfont-style: italic;\n\tfont-size: 11px;\n\tpadding: 4px 20px;\n}\n\n.monaco-description-button .monaco-button-label,\n.monaco-description-button .monaco-button-description {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.monaco-description-button .monaco-button-label > .codicon,\n.monaco-description-button .monaco-button-description > .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n/* default color styles - based on CSS variables */\n\n.monaco-button.default-colors,\n.monaco-button-dropdown.default-colors > .monaco-button{\n\tcolor: var(--vscode-button-foreground);\n\tbackground-color: var(--vscode-button-background);\n}\n\n.monaco-button.default-colors:hover,\n.monaco-button-dropdown.default-colors > .monaco-button:hover {\n\tbackground-color: var(--vscode-button-hoverBackground);\n}\n\n.monaco-button.default-colors.secondary,\n.monaco-button-dropdown.default-colors > .monaco-button.secondary {\n\tcolor: var(--vscode-button-secondaryForeground);\n\tbackground-color: var(--vscode-button-secondaryBackground);\n}\n\n.monaco-button.default-colors.secondary:hover,\n.monaco-button-dropdown.default-colors > .monaco-button.secondary:hover {\n\tbackground-color: var(--vscode-button-secondaryHoverBackground);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator {\n\tbackground-color: var(--vscode-button-background);\n\tborder-top: 1px solid var(--vscode-button-border);\n\tborder-bottom: 1px solid var(--vscode-button-border);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button.secondary + .monaco-button-dropdown-separator {\n\tbackground-color: var(--vscode-button-secondaryBackground);\n}\n\n.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator > div {\n\tbackground-color: var(--vscode-button-separator);\n}\n",""]),t.Z=r},250:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.codicon-wrench-subaction {\n\topacity: 0.5;\n}\n\n@keyframes codicon-spin {\n\t100% {\n\t\ttransform:rotate(360deg);\n\t}\n}\n\n.codicon-sync.codicon-modifier-spin,\n.codicon-loading.codicon-modifier-spin,\n.codicon-gear.codicon-modifier-spin,\n.codicon-notebook-state-executing.codicon-modifier-spin {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.5s steps(30) infinite;\n}\n\n.codicon-modifier-disabled {\n\topacity: 0.4;\n}\n\n/* custom speed & easing for loading icon */\n.codicon-loading,\n.codicon-tree-item-loading::before {\n\tanimation-duration: 1s !important;\n\tanimation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important;\n}\n",""]),t.Z=r},6938:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s),a=i(8601),l=i.n(a),d=new URL(i(45),i.b),c=r()(o()),h=l()(d);c.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n@font-face {\n\tfont-family: "codicon";\n\tfont-display: block;\n\tsrc: url('+h+") format(\"truetype\");\n}\n\n.codicon[class*='codicon-'] {\n\tfont: normal normal normal 16px/1 codicon;\n\tdisplay: inline-block;\n\ttext-decoration: none;\n\ttext-rendering: auto;\n\ttext-align: center;\n\ttext-transform: none;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/* icon rules are dynamically created by the platform theme service (see iconsStyleSheet.ts) */\n",""]),t.Z=c},6691:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view {\n\tposition: absolute;\n}\n\n.context-view.fixed {\n\tall: initial;\n\tfont-family: inherit;\n\tfont-size: 13px;\n\tposition: fixed;\n\tcolor: inherit;\n}\n",""]),t.Z=r},5202:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-count-badge {\n\tpadding: 3px 6px;\n\tborder-radius: 11px;\n\tfont-size: 11px;\n\tmin-width: 18px;\n\tmin-height: 18px;\n\tline-height: 11px;\n\tfont-weight: normal;\n\ttext-align: center;\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n}\n\n.monaco-count-badge.long {\n\tpadding: 2px 3px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n",""]),t.Z=r},394:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-dropdown {\n\theight: 100%;\n\tpadding: 0;\n}\n\n.monaco-dropdown > .dropdown-label {\n\tcursor: pointer;\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\n\tcursor: default;\n}\n\n.monaco-dropdown-with-primary {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-primary > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",""]),t.Z=r},7269:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- Find input ---------- */\n\n.monaco-findInput {\n\tposition: relative;\n}\n\n.monaco-findInput .monaco-inputbox {\n\tfont-size: 13px;\n\twidth: 100%;\n}\n\n.monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n.vs .monaco-findInput.disabled {\n\tbackground-color: #E1E1E1;\n}\n\n/* Theming */\n.vs-dark .monaco-findInput.disabled {\n\tbackground-color: #333;\n}\n\n/* Highlighting */\n.monaco-findInput.highlight-0 .controls,\n.hc-light .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-0 100ms linear 0s;\n}\n\n.monaco-findInput.highlight-1 .controls,\n.hc-light .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-1 100ms linear 0s;\n}\n\n.hc-black .monaco-findInput.highlight-0 .controls,\n.vs-dark .monaco-findInput.highlight-0 .controls {\n\tanimation: monaco-findInput-highlight-dark-0 100ms linear 0s;\n}\n\n.hc-black .monaco-findInput.highlight-1 .controls,\n.vs-dark .monaco-findInput.highlight-1 .controls {\n\tanimation: monaco-findInput-highlight-dark-1 100ms linear 0s;\n}\n\n@keyframes monaco-findInput-highlight-0 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-1 {\n\t0% { background: rgba(253, 255, 0, 0.8); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n\n@keyframes monaco-findInput-highlight-dark-0 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t100% { background: transparent; }\n}\n@keyframes monaco-findInput-highlight-dark-1 {\n\t0% { background: rgba(255, 255, 255, 0.44); }\n\t/* Made intentionally different such that the CSS minifier does not collapse the two animations into a single one*/\n\t99% { background: transparent; }\n}\n",""]),t.Z=r},1210:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-hover {\n\tcursor: default;\n\tposition: absolute;\n\toverflow: hidden;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tbox-sizing: border-box;\n\tanimation: fadein 100ms linear;\n\tline-height: 1.5em;\n\twhite-space: var(--vscode-hover-whiteSpace, normal);\n}\n\n.monaco-hover.hidden {\n\tdisplay: none;\n}\n\n.monaco-hover a:hover:not(.disabled) {\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-contents:not(.html-hover-contents) {\n\tpadding: 4px 8px;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\n\tmax-width: var(--vscode-hover-maxWidth, 500px);\n\tword-wrap: break-word;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\n\tmin-width: 100%;\n}\n\n.monaco-hover p,\n.monaco-hover .code,\n.monaco-hover ul,\n.monaco-hover h1,\n.monaco-hover h2,\n.monaco-hover h3,\n.monaco-hover h4,\n.monaco-hover h5,\n.monaco-hover h6 {\n\tmargin: 8px 0;\n}\n\n.monaco-hover h1,\n.monaco-hover h2,\n.monaco-hover h3,\n.monaco-hover h4,\n.monaco-hover h5,\n.monaco-hover h6 {\n\tline-height: 1.1;\n}\n\n.monaco-hover code {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-hover hr {\n\tbox-sizing: border-box;\n\tborder-left: 0px;\n\tborder-right: 0px;\n\tmargin-top: 4px;\n\tmargin-bottom: -4px;\n\tmargin-left: -8px;\n\tmargin-right: -8px;\n\theight: 1px;\n}\n\n.monaco-hover p:first-child,\n.monaco-hover .code:first-child,\n.monaco-hover ul:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-hover p:last-child,\n.monaco-hover .code:last-child,\n.monaco-hover ul:last-child {\n\tmargin-bottom: 0;\n}\n\n/* MarkupContent Layout */\n.monaco-hover ul {\n\tpadding-left: 20px;\n}\n.monaco-hover ol {\n\tpadding-left: 20px;\n}\n\n.monaco-hover li > p {\n\tmargin-bottom: 0;\n}\n\n.monaco-hover li > ul {\n\tmargin-top: 0;\n}\n\n.monaco-hover code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-hover .monaco-tokenized-source {\n\twhite-space: var(--vscode-hover-sourceWhiteSpace, pre-wrap);\n}\n\n.monaco-hover .hover-row.status-bar {\n\tfont-size: 12px;\n\tline-height: 22px;\n}\n\n.monaco-hover .hover-row.status-bar .info {\n\tfont-style: italic;\n\tpadding: 0px 8px;\n}\n\n.monaco-hover .hover-row.status-bar .actions {\n\tdisplay: flex;\n\tpadding: 0px 8px;\n\twidth: 100%;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container {\n\tmargin-right: 16px;\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\n\tpadding-right: 4px;\n}\n\n.monaco-hover .markdown-hover .hover-contents .codicon {\n\tcolor: inherit;\n\tfont-size: inherit;\n\tvertical-align: middle;\n}\n\n.monaco-hover .hover-contents a.code-link:hover,\n.monaco-hover .hover-contents a.code-link {\n\tcolor: inherit;\n}\n\n.monaco-hover .hover-contents a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-hover .hover-contents a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-hover .hover-contents a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-hover .hover-contents a.code-link > span:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span {\n\tmargin-bottom: 4px;\n\tdisplay: inline-block;\n}\n\n.monaco-hover-content .action-container a {\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-hover-content .action-container.disabled {\n\tpointer-events: none;\n\topacity: 0.4;\n\tcursor: default;\n}\n",""]),t.Z=r},8429:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* ---------- Icon label ---------- */\n\n.monaco-icon-label {\n\tdisplay: flex; /* required for icons support :before rule */\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label::before {\n\n\t/* svg icons rendered as background image */\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tline-height: inherit !important;\n\tdisplay: inline-block;\n\n\t/* fonts icons */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tvertical-align: top;\n\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\n}\n\n.monaco-icon-label-iconpath {\n\twidth: 16px;\n\theight: 16px;\n\tpadding-left: 2px;\n\tmargin-top: 2px;\n\tdisplay: flex;\n}\n\n.monaco-icon-label-container.disabled {\n\tcolor: var(--vscode-disabledForeground);\n}\n.monaco-icon-label > .monaco-icon-label-container {\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tflex: 1;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\n\tcolor: inherit;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\n\tmargin: 0 2px;\n\topacity: 0.5;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-suffix-container > .label-suffix {\n\topacity: .7;\n\twhite-space: pre;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .7;\n\tmargin-left: 0.5em;\n\tfont-size: 0.9em;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\n\twhite-space: nowrap\n}\n\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .95;\n}\n\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.deprecated {\n\ttext-decoration: line-through;\n\topacity: 0.66;\n}\n\n/* make sure apply italic font style to decorations as well */\n.monaco-icon-label.italic::after {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\ttext-decoration: line-through;\n}\n\n.monaco-icon-label::after {\n\topacity: 0.75;\n\tfont-size: 90%;\n\tfont-weight: 600;\n\tmargin: auto 16px 0 5px; /* https://github.com/microsoft/vscode/issues/113223 */\n\ttext-align: center;\n}\n\n/* make sure selection color wins when a label is being selected */\n.monaco-list:focus .selected .monaco-icon-label, /* list */\n.monaco-list:focus .selected .monaco-icon-label::after\n{\n\tcolor: inherit !important;\n}\n\n.monaco-list-row.focused.selected .label-description,\n.monaco-list-row.selected .label-description {\n\topacity: .8;\n}\n",""]),t.Z=r},9347:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-inputbox {\n\tposition: relative;\n\tdisplay: block;\n\tpadding: 0;\n\tbox-sizing:\tborder-box;\n\tborder-radius: 2px;\n\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > .input,\n.monaco-inputbox > .ibwrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px 6px;\n}\n\n.monaco-inputbox > .ibwrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-inputbox > .ibwrapper > .input {\n\tdisplay: inline-block;\n\tbox-sizing:\tborder-box;\n\twidth: 100%;\n\theight: 100%;\n\tline-height: inherit;\n\tborder: none;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tresize: none;\n\tcolor: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > input {\n\ttext-overflow: ellipsis;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input {\n\tdisplay: block;\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\n\toutline: none;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\n\twhite-space: nowrap;\n}\n\n.monaco-inputbox > .ibwrapper > .mirror {\n\tposition: absolute;\n\tdisplay: inline-block;\n\twidth: 100%;\n\ttop: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twhite-space: pre-wrap;\n\tvisibility: hidden;\n\tword-wrap: break-word;\n}\n\n/* Context view */\n\n.monaco-inputbox-container {\n\ttext-align: right;\n}\n\n.monaco-inputbox-container .monaco-inputbox-message {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\ttext-align: left;\n\twidth: 100%;\n\tbox-sizing:\tborder-box;\n\tpadding: 0.4em;\n\tfont-size: 12px;\n\tline-height: 17px;\n\tmargin-top: -1px;\n\tword-wrap: break-word;\n}\n\n/* Action bar support */\n.monaco-inputbox .monaco-action-bar {\n\tposition: absolute;\n\tright: 2px;\n\ttop: 4px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item {\n\tmargin-left: 2px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}\n",""]),t.Z=r},8827:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-keybinding {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 10px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tdisplay: inline-block;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tvertical-align: middle;\n\tfont-size: 11px;\n\tpadding: 3px 5px;\n\tmargin: 0 2px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:first-child {\n\tmargin-left: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:last-child {\n\tmargin-right: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-separator {\n\tdisplay: inline-block;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\n\twidth: 6px;\n}\n",""]),t.Z=r},5257:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-list {\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-list.mouse-support {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.monaco-list > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-list-rows {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-list.horizontal-scrolling .monaco-list-rows {\n\twidth: auto;\n\tmin-width: 100%;\n}\n\n.monaco-list-row {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n.monaco-list.mouse-support .monaco-list-row {\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n/* Make sure the scrollbar renders above overlays (sticky scroll) */\n.monaco-list .monaco-scrollable-element > .scrollbar.vertical,\n.monaco-pane-view > .monaco-split-view2.vertical > .monaco-scrollable-element > .scrollbar.vertical {\n\tz-index: 14;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-list-row.scrolling {\n\tdisplay: none !important;\n}\n\n/* Focus */\n.monaco-list.element-focused,\n.monaco-list.selection-single,\n.monaco-list.selection-multiple {\n\toutline: 0 !important;\n}\n\n/* Dnd */\n.monaco-drag-image {\n\tdisplay: inline-block;\n\tpadding: 1px 7px;\n\tborder-radius: 10px;\n\tfont-size: 12px;\n\tposition: absolute;\n\tz-index: 1000;\n}\n\n/* Filter */\n\n.monaco-list-type-filter-message {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 40px 1em 1em 1em;\n\ttext-align: center;\n\twhite-space: normal;\n\topacity: 0.7;\n\tpointer-events: none;\n}\n\n.monaco-list-type-filter-message:empty {\n\tdisplay: none;\n}\n",""]),t.Z=r},8450:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-mouse-cursor-text {\n\tcursor: text;\n}\n",""]),t.Z=r},1519:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-progress-container {\n\twidth: 100%;\n\theight: 2px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 2px;\n\tposition: absolute;\n\tleft: 0;\n\tdisplay: none;\n}\n\n.monaco-progress-container.active .progress-bit {\n\tdisplay: inherit;\n}\n\n.monaco-progress-container.discrete .progress-bit {\n\tleft: 0;\n\ttransition: width 100ms linear;\n}\n\n.monaco-progress-container.discrete.done .progress-bit {\n\twidth: 100%;\n}\n\n.monaco-progress-container.infinite .progress-bit {\n\tanimation-name: progress;\n\tanimation-duration: 4s;\n\tanimation-iteration-count: infinite;\n\ttransform: translate3d(0px, 0px, 0px);\n\tanimation-timing-function: linear;\n}\n\n.monaco-progress-container.infinite.infinite-long-running .progress-bit {\n\t/*\n\t\tThe more smooth `linear` timing function can cause\n\t\thigher GPU consumption as indicated in\n\t\thttps://github.com/microsoft/vscode/issues/97900 &\n\t\thttps://github.com/microsoft/vscode/issues/138396\n\t*/\n\tanimation-timing-function: steps(100);\n}\n\n/**\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\n * its relative size to the parent container:\n * parent width: 5000%\n * bit width: 100%\n * translateX should be as follow:\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\n */\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\n",""]),t.Z=r},3135:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n:root {\n\t--vscode-sash-size: 4px;\n\t--vscode-sash-hover-size: 4px;\n}\n\n.monaco-sash {\n\tposition: absolute;\n\tz-index: 35;\n\ttouch-action: none;\n}\n\n.monaco-sash.disabled {\n\tpointer-events: none;\n}\n\n.monaco-sash.mac.vertical {\n\tcursor: col-resize;\n}\n\n.monaco-sash.vertical.minimum {\n\tcursor: e-resize;\n}\n\n.monaco-sash.vertical.maximum {\n\tcursor: w-resize;\n}\n\n.monaco-sash.mac.horizontal {\n\tcursor: row-resize;\n}\n\n.monaco-sash.horizontal.minimum {\n\tcursor: s-resize;\n}\n\n.monaco-sash.horizontal.maximum {\n\tcursor: n-resize;\n}\n\n.monaco-sash.disabled {\n\tcursor: default !important;\n\tpointer-events: none !important;\n}\n\n.monaco-sash.vertical {\n\tcursor: ew-resize;\n\ttop: 0;\n\twidth: var(--vscode-sash-size);\n\theight: 100%;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: var(--vscode-sash-size);\n}\n\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\n\tcontent: \" \";\n\theight: calc(var(--vscode-sash-size) * 2);\n\twidth: calc(var(--vscode-sash-size) * 2);\n\tz-index: 100;\n\tdisplay: block;\n\tcursor: all-scroll;\n\tposition: absolute;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.start,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.end {\n\tcursor: nwse-resize;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.end,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.start {\n\tcursor: nesw-resize;\n}\n\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\n\tleft: calc(var(--vscode-sash-size) * -0.5);\n\ttop: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\n\tleft: calc(var(--vscode-sash-size) * -0.5);\n\tbottom: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\n\ttop: calc(var(--vscode-sash-size) * -0.5);\n\tleft: calc(var(--vscode-sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\n\ttop: calc(var(--vscode-sash-size) * -0.5);\n\tright: calc(var(--vscode-sash-size) * -1);\n}\n\n.monaco-sash:before {\n\tcontent: '';\n\tpointer-events: none;\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-sash:before {\n\ttransition: background-color 0.1s ease-out;\n}\n\n.monaco-sash.hover:before,\n.monaco-sash.active:before {\n\tbackground: var(--vscode-sash-hoverBorder);\n}\n\n.monaco-sash.vertical:before {\n\twidth: var(--vscode-sash-hover-size);\n\tleft: calc(50% - (var(--vscode-sash-hover-size) / 2));\n}\n\n.monaco-sash.horizontal:before {\n\theight: var(--vscode-sash-hover-size);\n\ttop: calc(50% - (var(--vscode-sash-hover-size) / 2));\n}\n\n.pointer-events-disabled {\n\tpointer-events: none !important;\n}\n\n/** Debug **/\n\n.monaco-sash.debug {\n\tbackground: cyan;\n}\n\n.monaco-sash.debug.disabled {\n\tbackground: rgba(0, 255, 255, 0.2);\n}\n\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\n\tbackground: red;\n}\n",""]),t.Z=r},1714:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n\t/* In front of peek view */\n\tz-index: 11;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: var(--vscode-scrollbar-shadow) 6px 0 6px -6px inset;\n}\n\n.monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: var(--vscode-scrollbarSlider-background);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: var(--vscode-scrollbarSlider-hoverBackground);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: var(--vscode-scrollbarSlider-activeBackground);\n}\n",""]),t.Z=r},5214:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-select-box {\n\twidth: 100%;\n\tcursor: pointer;\n\tborder-radius: 2px;\n}\n\n.monaco-select-box-dropdown-container {\n\tfont-size: 13px;\n\tfont-weight: normal;\n\ttext-transform: none;\n}\n\n/** Actions */\n\n.monaco-action-bar .action-item.select-container {\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item .monaco-select-box {\n\tcursor: pointer;\n\tmin-width: 100px;\n\tmin-height: 18px;\n\tpadding: 2px 23px 2px 8px;\n}\n\n.mac .monaco-action-bar .action-item .monaco-select-box {\n\tfont-size: 11px;\n\tborder-radius: 5px;\n}\n",""]),t.Z=r},5305:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Use custom CSS vars to expose padding into parent select for padding calculation */\n.monaco-select-box-dropdown-padding {\n\t--dropdown-padding-top: 1px;\n\t--dropdown-padding-bottom: 1px;\n}\n\n.hc-black .monaco-select-box-dropdown-padding,\n.hc-light .monaco-select-box-dropdown-padding {\n\t--dropdown-padding-top: 3px;\n\t--dropdown-padding-bottom: 4px;\n}\n\n.monaco-select-box-dropdown-container {\n\tdisplay: none;\n\tbox-sizing:\tborder-box;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown * {\n\tmargin: 0;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a:focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown code {\n\tline-height: 15px; /** For some reason, this is needed, otherwise will take up 20px height */\n\tfont-family: var(--monaco-monospace-font);\n}\n\n\n.monaco-select-box-dropdown-container.visible {\n\tdisplay: flex;\n\tflex-direction: column;\n\ttext-align: left;\n\twidth: 1px;\n\toverflow: hidden;\n\tborder-bottom-left-radius: 3px;\n\tborder-bottom-right-radius: 3px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container {\n\tflex: 0 0 auto;\n\talign-self: flex-start;\n\tpadding-top: var(--dropdown-padding-top);\n\tpadding-bottom: var(--dropdown-padding-bottom);\n\tpadding-left: 1px;\n\tpadding-right: 1px;\n\twidth: 100%;\n\toverflow: hidden;\n\tbox-sizing:\tborder-box;\n}\n\n.monaco-select-box-dropdown-container > .select-box-details-pane {\n\tpadding: 5px;\n}\n\n.hc-black .monaco-select-box-dropdown-container > .select-box-dropdown-list-container {\n\tpadding-top: var(--dropdown-padding-top);\n\tpadding-bottom: var(--dropdown-padding-bottom);\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row {\n\tcursor: pointer;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-text {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-left: 3.5px;\n\twhite-space: nowrap;\n\tfloat: left;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-detail {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-left: 3.5px;\n\twhite-space: nowrap;\n\tfloat: left;\n\topacity: 0.7;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .option-decorator-right {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tpadding-right: 10px;\n\twhite-space: nowrap;\n\tfloat: right;\n}\n\n\n/* Accepted CSS hiding technique for accessibility reader text */\n/* https://webaim.org/techniques/css/invisiblecontent/ */\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row > .visually-hidden {\n\t\tposition: absolute;\n\t\tleft: -10000px;\n\t\ttop: auto;\n\t\twidth: 1px;\n\t\theight: 1px;\n\t\toverflow: hidden;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control {\n\tflex: 1 1 auto;\n\talign-self: flex-start;\n\topacity: 0;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div {\n\toverflow: hidden;\n\tmax-height: 0px;\n}\n\n.monaco-select-box-dropdown-container > .select-box-dropdown-container-width-control > .width-control-div > .option-text-width-control {\n\tpadding-left: 4px;\n\tpadding-right: 8px;\n\twhite-space: nowrap;\n}\n",""]),t.Z=r},7658:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-split-view2 {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .sash-container {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n}\n\n.monaco-split-view2 > .sash-container > .monaco-sash {\n\tpointer-events: initial;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\n\twidth: 100%;\n\theight: 100%;\n\twhite-space: nowrap;\n\tposition: relative;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twhite-space: initial;\n\tposition: absolute;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\n\tdisplay: none;\n}\n\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twidth: 100%;\n}\n\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\theight: 100%;\n}\n\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\tcontent: ' ';\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tz-index: 5;\n\tpointer-events: none;\n\tbackground-color: var(--separator-border);\n}\n\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 1px;\n\twidth: 100%;\n}\n",""]),t.Z=r},4932:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-table {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.monaco-table > .monaco-split-view2 {\n\tborder-bottom: 1px solid transparent;\n}\n\n.monaco-table > .monaco-list {\n\tflex: 1;\n}\n\n.monaco-table-tr {\n\tdisplay: flex;\n\theight: 100%;\n}\n\n.monaco-table-th {\n\twidth: 100%;\n\theight: 100%;\n\tfont-weight: bold;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table-th,\n.monaco-table-td {\n\tbox-sizing: border-box;\n\tflex-shrink: 0;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\tcontent: "";\n\tposition: absolute;\n\tleft: calc(var(--vscode-sash-size) / 2);\n\twidth: 0;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\ttransition: border-color 0.2s ease-out;\n}\n',""]),t.Z=r},8939:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-custom-toggle {\n\tmargin-left: 2px;\n\tfloat: left;\n\tcursor: pointer;\n\toverflow: hidden;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tpadding: 1px;\n\tbox-sizing:\tborder-box;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.monaco-custom-toggle:hover {\n\tbackground-color: var(--vscode-inputOption-hoverBackground);\n}\n\n.hc-black .monaco-custom-toggle:hover,\n.hc-light .monaco-custom-toggle:hover {\n\tborder: 1px dashed var(--vscode-focusBorder);\n}\n\n.hc-black .monaco-custom-toggle,\n.hc-light .monaco-custom-toggle {\n\tbackground: none;\n}\n\n.hc-black .monaco-custom-toggle:hover,\n.hc-light .monaco-custom-toggle:hover {\n\tbackground: none;\n}\n\n.monaco-custom-toggle.monaco-checkbox {\n\theight: 18px;\n\twidth: 18px;\n\tborder: 1px solid transparent;\n\tborder-radius: 3px;\n\tmargin-right: 9px;\n\tmargin-left: 0px;\n\tpadding: 0px;\n\topacity: 1;\n\tbackground-size: 16px !important;\n}\n\n.monaco-action-bar .checkbox-action-item {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-action-bar .checkbox-action-item > .monaco-custom-toggle.monaco-checkbox {\n\tmargin-right: 4px;\n}\n\n.monaco-action-bar .checkbox-action-item > .checkbox-label {\n\tfont-size: 12px;\n}\n\n/* hide check when unchecked */\n.monaco-custom-toggle.monaco-checkbox:not(.checked)::before {\n\tvisibility: hidden;\n}\n",""]),t.Z=r},5478:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-toolbar {\n\theight: 100%;\n}\n\n.monaco-toolbar .toolbar-toggle-more {\n\tdisplay: inline-block;\n\tpadding: 0;\n}\n",""]),t.Z=r},5010:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-tl-row {\n\tdisplay: flex;\n\theight: 100%;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-tl-row.disabled {\n\tcursor: default;\n}\n.monaco-tl-indent {\n\theight: 100%;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 16px;\n\tpointer-events: none;\n}\n\n.hide-arrows .monaco-tl-indent {\n\tleft: 12px;\n}\n\n.monaco-tl-indent > .indent-guide {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\theight: 100%;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-tl-indent > .indent-guide {\n\ttransition: border-color 0.1s linear;\n}\n\n.monaco-tl-twistie,\n.monaco-tl-contents {\n\theight: 100%;\n}\n\n.monaco-tl-twistie {\n\tfont-size: 10px;\n\ttext-align: right;\n\tpadding-right: 6px;\n\tflex-shrink: 0;\n\twidth: 16px;\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\ttransform: translateX(3px);\n}\n\n.monaco-tl-contents {\n\tflex: 1;\n\toverflow: hidden;\n}\n\n.monaco-tl-twistie::before {\n\tborder-radius: 20px;\n}\n\n.monaco-tl-twistie.collapsed::before {\n\ttransform: rotate(-90deg);\n}\n\n.monaco-tl-twistie.codicon-tree-item-loading::before {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.25s steps(30) infinite;\n}\n\n.monaco-tree-type-filter {\n\tposition: absolute;\n\ttop: 0;\n\tdisplay: flex;\n\tpadding: 3px;\n\tmax-width: 200px;\n\tz-index: 100;\n\tmargin: 0 6px;\n\tborder: 1px solid var(--vscode-widget-border);\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n}\n\n.monaco-workbench:not(.reduce-motion) .monaco-tree-type-filter {\n\ttransition: top 0.3s;\n}\n\n.monaco-tree-type-filter.disabled {\n\ttop: -40px !important;\n}\n\n.monaco-tree-type-filter-grab {\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: grab;\n\tmargin-right: 2px;\n}\n\n.monaco-tree-type-filter-grab.grabbing {\n\tcursor: grabbing;\n}\n\n.monaco-tree-type-filter-input {\n\tflex: 1;\n}\n\n.monaco-tree-type-filter-input .monaco-inputbox {\n\theight: 23px;\n}\n\n.monaco-tree-type-filter-input .monaco-inputbox > .ibwrapper > .input,\n.monaco-tree-type-filter-input .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding: 2px 4px;\n}\n\n.monaco-tree-type-filter-input .monaco-findInput > .controls {\n\ttop: 2px;\n}\n\n.monaco-tree-type-filter-actionbar {\n\tmargin-left: 4px;\n}\n\n.monaco-tree-type-filter-actionbar .monaco-action-bar .action-label {\n\tpadding: 2px;\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container{\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 0;\n\tz-index: 13; /* Settings editor uses z-index: 12 */\n\n\t/* Backup color in case the tree does not provide the background color */\n\tbackground-color: var(--vscode-sideBar-background);\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row.monaco-list-row{\n\tposition: absolute;\n\twidth: 100%;\n\topacity: 1 !important; /* Settings editor uses opacity < 1 */\n\toverflow: hidden;\n\n\t/* Backup color in case the tree does not provide the background color */\n\tbackground-color: var(--vscode-sideBar-background);\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row:hover{\n\tbackground-color: var(--vscode-list-hoverBackground) !important;\n\tcursor: pointer;\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty,\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container.empty .monaco-tree-sticky-container-shadow {\n\tdisplay: none;\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow {\n\tposition: absolute;\n\tbottom: -3px;\n\tleft: 0px;\n\theight: 0px; /* heigt is 3px and only set when there is a treeStickyScrollShadow color */\n\twidth: 100%;\n}\n\n.monaco-list .monaco-scrollable-element .monaco-tree-sticky-container[tabindex="0"]:focus{\n\toutline: none;\n}\n',""]),t.Z=r},6432:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inputarea {\n\tmin-width: 0;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\toutline: none !important;\n\tresize: none;\n\tborder: none;\n\toverflow: hidden;\n\tcolor: transparent;\n\tbackground-color: transparent;\n\tz-index: -10;\n}\n/*.monaco-editor .inputarea {\n\tposition: fixed !important;\n\twidth: 800px !important;\n\theight: 500px !important;\n\ttop: initial !important;\n\tleft: initial !important;\n\tbottom: 0 !important;\n\tright: 0 !important;\n\tcolor: black !important;\n\tbackground: white !important;\n\tline-height: 15px !important;\n\tfont-size: 14px !important;\n\tz-index: 10 !important;\n}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n\tcaret-color: var(--vscode-editorCursor-foreground);\n\tcolor: var(--vscode-editor-foreground);\n}\n",""]),t.Z=r},6910:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-workbench .workbench-hover {\n\tposition: relative;\n\tfont-size: 13px;\n\tline-height: 19px;\n\t/* Must be higher than sash's z-index and terminal canvases */\n\tz-index: 40;\n\toverflow: hidden;\n\tmax-width: 700px;\n\tbackground: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n\tborder-radius: 3px;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbox-shadow: 0 2px 8px var(--vscode-widget-shadow);\n}\n\n.monaco-workbench .workbench-hover hr {\n\tborder-bottom: none;\n}\n\n.monaco-workbench .workbench-hover:not(.skip-fade-in) {\n\tanimation: fadein 100ms linear;\n}\n\n.monaco-workbench .workbench-hover.compact {\n\tfont-size: 12px;\n}\n\n.monaco-workbench .workbench-hover.compact .hover-contents {\n\tpadding: 2px 8px;\n}\n\n.monaco-workbench .workbench-hover-container.locked .workbench-hover {\n\toutline: 1px solid var(--vscode-editorHoverWidget-border);\n}\n.monaco-workbench .workbench-hover-container.locked .workbench-hover:focus,\n.monaco-workbench .workbench-hover-lock:focus {\n\toutline: 1px solid var(--vscode-focusBorder);\n}\n.monaco-workbench .workbench-hover-container.locked .workbench-hover-lock:hover {\n\tbackground: var(--vscode-toolbar-hoverBackground);\n}\n\n.monaco-workbench .workbench-hover-pointer {\n\tposition: absolute;\n\t/* Must be higher than workbench hover z-index */\n\tz-index: 41;\n\tpointer-events: none;\n}\n\n.monaco-workbench .workbench-hover-pointer:after {\n\tcontent: '';\n\tposition: absolute;\n\twidth: 5px;\n\theight: 5px;\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder-right: 1px solid var(--vscode-editorHoverWidget-border);\n\tborder-bottom: 1px solid var(--vscode-editorHoverWidget-border);\n}\n.monaco-workbench .locked .workbench-hover-pointer:after {\n\twidth: 4px;\n\theight: 4px;\n\tborder-right-width: 2px;\n\tborder-bottom-width: 2px;\n}\n\n.monaco-workbench .workbench-hover-pointer.left { left: -3px; }\n.monaco-workbench .workbench-hover-pointer.right { right: 3px; }\n.monaco-workbench .workbench-hover-pointer.top { top: -3px; }\n.monaco-workbench .workbench-hover-pointer.bottom { bottom: 3px; }\n\n.monaco-workbench .workbench-hover-pointer.left:after {\n\ttransform: rotate(135deg);\n}\n\n.monaco-workbench .workbench-hover-pointer.right:after {\n\ttransform: rotate(315deg);\n}\n\n.monaco-workbench .workbench-hover-pointer.top:after {\n\ttransform: rotate(225deg);\n}\n\n.monaco-workbench .workbench-hover-pointer.bottom:after {\n\ttransform: rotate(45deg);\n}\n\n.monaco-workbench .workbench-hover a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-workbench .workbench-hover a:focus {\n\toutline: 1px solid;\n\toutline-offset: -1px;\n\ttext-decoration: underline;\n\toutline-color: var(--vscode-focusBorder);\n}\n\n.monaco-workbench .workbench-hover a:hover,\n.monaco-workbench .workbench-hover a:active {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-workbench .workbench-hover code {\n\tbackground: var(--vscode-textCodeBlock-background);\n}\n\n.monaco-workbench .workbench-hover .hover-row .actions {\n\tbackground: var(--vscode-editorHoverWidget-statusBarBackground);\n}\n\n.monaco-workbench .workbench-hover.right-aligned {\n\t/* The context view service wraps strangely when it's right up against the edge without this */\n\tleft: 1px;\n}\n\n.monaco-workbench .workbench-hover.right-aligned .hover-row.status-bar .actions {\n\tflex-direction: row-reverse;\n}\n\n.monaco-workbench .workbench-hover.right-aligned .hover-row.status-bar .actions .action-container {\n\tmargin-right: 0;\n\tmargin-left: 16px;\n}\n",""]),t.Z=r},7898:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .blockDecorations-container {\n\tposition: absolute;\n\ttop: 0;\n\tpointer-events: none;\n}\n\n.monaco-editor .blockDecorations-block {\n\tposition: absolute;\n\tbox-sizing: border-box;\n}\n",""]),t.Z=r},7633:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n\theight: 100%;\n}\n\n.monaco-editor .margin-view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n\theight: 100%;\n}\n\n.monaco-editor\n\t.margin-view-overlays\n\t.current-line.current-line-margin.current-line-margin-both {\n\tborder-right: 0;\n}\n",""]),t.Z=r},5926:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcdr = core decorations rendering (div)\n*/\n.monaco-editor .lines-content .cdr {\n\tposition: absolute;\n\theight: 100%;\n}\n",""]),t.Z=r},6740:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .glyph-margin {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcgmr = core glyph margin rendering (div)\n*/\n.monaco-editor .glyph-margin-widgets .cgmr {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/*\n\tEnsure spinning icons are pixel-perfectly centered and avoid wobble.\n\tThis is only applied to icons that spin to avoid unnecessary\n\tGPU layers and blurry subpixel AA.\n*/\n.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin::before {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n",""]),t.Z=r},5938:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lines-content .core-guide {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\theight: 100%;\n}\n",""]),t.Z=r},5283:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tbottom: 0;\n\tfont-variant-numeric: tabular-nums;\n\tposition: absolute;\n\ttext-align: right;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\tcursor: default;\n}\n\n.monaco-editor .relative-current-line-number {\n\ttext-align: left;\n\tdisplay: inline-block;\n\twidth: 100%;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\n\tmargin-top: 1px;\n}\n\n.monaco-editor .line-numbers {\n\tcolor: var(--vscode-editorLineNumber-foreground);\n}\n\n.monaco-editor .line-numbers.active-line-number {\n\tcolor: var(--vscode-editorLineNumber-activeForeground);\n}\n",""]),t.Z=r},9536:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Uncomment to see lines flashing when they're painted */\n/*.monaco-editor .view-lines > .view-line {\n\tbackground-color: none;\n\tanimation-name: flash-background;\n\tanimation-duration: 800ms;\n}\n@keyframes flash-background {\n\t0% { background-color: lightgreen; }\n\t100% { background-color: none }\n}*/\n\n.mtkcontrol {\n\tcolor: rgb(255, 255, 255) !important;\n\tbackground: rgb(150, 0, 0) !important;\n}\n\n.mtkoverflow {\n\tbackground-color: var(--vscode-button-background, var(--vscode-editor-background));\n\tcolor: var(--vscode-button-foreground, var(--vscode-editor-foreground));\n\tborder-width: 1px;\n\tborder-style: solid;\n\tborder-color: var(--vscode-contrastBorder);\n\tborder-radius: 2px;\n\tpadding: 4px;\n\tcursor: pointer;\n}\n.mtkoverflow:hover {\n\tbackground-color: var(--vscode-button-hoverBackground);\n}\n\n.monaco-editor.no-user-select .lines-content,\n.monaco-editor.no-user-select .view-line,\n.monaco-editor.no-user-select .view-lines {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n/* Use user-select: text for lookup feature on macOS */\n/* https://github.com/microsoft/vscode/issues/85632 */\n.monaco-editor.mac .lines-content:hover,\n.monaco-editor.mac .view-line:hover,\n.monaco-editor.mac .view-lines:hover {\n\tuser-select: text;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n}\n\n.monaco-editor.enable-user-select {\n\tuser-select: initial;\n\t-webkit-user-select: initial;\n}\n\n.monaco-editor .view-lines {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .view-line {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n/* There are view-lines in view-zones. We have to make sure this rule does not apply to them, as they don't set a line height */\n.monaco-editor .lines-content > .view-lines > .view-line > span {\n\ttop: 0;\n\tbottom: 0;\n\tposition: absolute;\n}\n\n.monaco-editor .mtkw {\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n\n.monaco-editor .mtkz {\n\tdisplay: inline-block;\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n\n/* TODO@tokenization bootstrap fix */\n/*.monaco-editor .view-line > span > span {\n\tfloat: none;\n\tmin-height: inherit;\n\tmargin-left: inherit;\n}*/\n",""]),t.Z=r},9590:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .lines-decorations {\n\tposition: absolute;\n\ttop: 0;\n\tbackground: white;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcldr = core lines decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cldr {\n\tposition: absolute;\n\theight: 100%;\n}",""]),t.Z=r},7901:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin {\n\tbackground-color: var(--vscode-editorGutter-background);\n}\n",""]),t.Z=r},9452:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcmdr = core margin decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cmdr {\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}",""]),t.Z=r},435:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* START cover the case that slider is visible on mouseover */\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\n\topacity: 0;\n\ttransition: opacity 100ms linear;\n}\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\n\topacity: 1;\n}\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\n\topacity: 1;\n}\n/* END cover the case that slider is visible on mouseover */\n.monaco-editor .minimap-slider .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-background);\n}\n.monaco-editor .minimap-slider:hover .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-hoverBackground);\n}\n.monaco-editor .minimap-slider.active .minimap-slider-horizontal {\n\tbackground: var(--vscode-minimapSlider-activeBackground);\n}\n.monaco-editor .minimap-shadow-visible {\n\tbox-shadow: var(--vscode-scrollbar-shadow) -6px 0 6px -6px inset;\n}\n.monaco-editor .minimap-shadow-hidden {\n\tposition: absolute;\n\twidth: 0;\n}\n.monaco-editor .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -6px;\n\twidth: 6px;\n}\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -1px;\n\twidth: 1px;\n}\n\n/* 0.5s fade in/out for the minimap */\n.minimap.autohide {\n\topacity: 0;\n\ttransition: opacity 0.5s;\n}\n.minimap.autohide:hover {\n\topacity: 1;\n}\n\n.monaco-editor .minimap {\n\tz-index: 5;\n}\n",""]),t.Z=r},7173:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .overlayWidgets {\n\tposition: absolute;\n\ttop: 0;\n\tleft:0;\n}",""]),t.Z=r},509:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-ruler {\n\tposition: absolute;\n\ttop: 0;\n\tbox-shadow: 1px 0 0 0 var(--vscode-editorRuler-foreground) inset;\n}\n",""]),t.Z=r},3865:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .scroll-decoration {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 6px;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 6px 6px -6px inset;\n}\n",""]),t.Z=r},1213:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcslr = core selections layer rendering (div)\n*/\n.monaco-editor .lines-content .cslr {\n\tposition: absolute;\n}\n\n.monaco-editor .focused .selected-text {\n\tbackground-color: var(--vscode-editor-selectionBackground);\n}\n\n.monaco-editor .selected-text {\n\tbackground-color: var(--vscode-editor-inactiveSelectionBackground);\n}\n\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\n\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n\n.monaco-editor.hc-light .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-light .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-light .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-light .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n",""]),t.Z=r},7654:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .cursors-layer {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .cursors-layer > .cursor {\n\tposition: absolute;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n}\n\n/* -- smooth-caret-animation -- */\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\n\ttransition: all 80ms;\n}\n\n/* -- block-outline-style -- */\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\n\tbackground: transparent !important;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n/* -- underline-style -- */\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\n\tborder-bottom-width: 2px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n}\n\n/* -- underline-thin-style -- */\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n}\n\n@keyframes monaco-cursor-smooth {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t60%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-phase {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t90%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-expand {\n\t0%,\n\t20% {\n\t\ttransform: scaleY(1);\n\t}\n\t80%,\n\t100% {\n\t\ttransform: scaleY(0);\n\t}\n}\n\n.cursor-smooth {\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-phase {\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-expand > .cursor {\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\n}\n",""]),t.Z=r},4515:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .mwh {\n\tposition: absolute;\n\tcolor: var(--vscode-editorWhitespace-foreground) !important;\n}\n",""]),t.Z=r},5875:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n\tcolor: var(--vscode-editor-foreground);\n\tbackground-color: var(--vscode-editor-background);\n}\n.monaco-editor-background {\n\tbackground-color: var(--vscode-editor-background);\n}\n.monaco-editor .rangeHighlight {\n\tbackground-color: var(--vscode-editor-rangeHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-rangeHighlightBorder);\n}\n.monaco-editor.hc-black .rangeHighlight, .monaco-editor.hc-light .rangeHighlight {\n\tborder-style: dotted;\n}\n.monaco-editor .symbolHighlight {\n\tbackground-color: var(--vscode-editor-symbolHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-symbolHighlightBorder);\n}\n.monaco-editor.hc-black .symbolHighlight, .monaco-editor.hc-light .symbolHighlight {\n\tborder-style: dotted;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .view-overlays > div, .monaco-editor .margin-view-overlays > div {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n/*\n.monaco-editor .auto-closed-character {\n\topacity: 0.3;\n}\n*/\n\n\n.monaco-editor .squiggly-error {\n\tborder-bottom: 4px double var(--vscode-editorError-border);\n}\n.monaco-editor .squiggly-error::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorError-background);\n}\n.monaco-editor .squiggly-warning {\n\tborder-bottom: 4px double var(--vscode-editorWarning-border);\n}\n.monaco-editor .squiggly-warning::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorWarning-background);\n}\n.monaco-editor .squiggly-info {\n\tborder-bottom: 4px double var(--vscode-editorInfo-border);\n}\n.monaco-editor .squiggly-info::before {\n\tdisplay: block;\n\tcontent: '';\n\twidth: 100%;\n\theight: 100%;\n\tbackground: var(--vscode-editorInfo-background);\n}\n.monaco-editor .squiggly-hint {\n\tborder-bottom: 2px dotted var(--vscode-editorHint-border);\n}\n.monaco-editor.showUnused .squiggly-unnecessary {\n\tborder-bottom: 2px dashed var(--vscode-editorUnnecessaryCode-border);\n}\n.monaco-editor.showDeprecated .squiggly-inline-deprecated {\n\ttext-decoration: line-through;\n\ttext-decoration-color: var(--vscode-editor-foreground, inherit);\n}\n",""]),t.Z=r},7754:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-component.diff-review {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tz-index: 99;\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\n}\n\n.monaco-component.diff-review .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n\tcolor: var(--vscode-editorLineNumber-foreground);\n}\n\n.monaco-component.diff-review .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-component.diff-review .diff-review-shadow {\n\tposition: absolute;\n\tbox-shadow: var(--vscode-scrollbar-shadow) 0 -6px 6px -6px inset;\n}\n\n.monaco-component.diff-review .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-component.diff-review .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-component.diff-review .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-component.diff-review .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n\tvertical-align: middle;\n}\n\n.monaco-component.diff-review .diff-review-spacer > .codicon {\n\tfont-size: 9px !important;\n}\n\n.monaco-component.diff-review .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n\tz-index: 100;\n}\n\n.monaco-component.diff-review .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n\n.monaco-component.diff-review .revertButton {\n\tcursor: pointer;\n}\n",""]),t.Z=r},2347:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .diff-hidden-lines-widget {\n\twidth: 100%;\n}\n\n.monaco-editor .diff-hidden-lines {\n\theight: 0px; /* The children each have a fixed height, the transform confuses the browser */\n\ttransform: translate(0px, -10px);\n\tfont-size: 13px;\n\tline-height: 14px;\n}\n\n.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover,\n.monaco-editor .diff-hidden-lines:not(.dragging) .bottom:hover,\n.monaco-editor .diff-hidden-lines .top.dragging,\n.monaco-editor .diff-hidden-lines .bottom.dragging {\n\tbackground-color: var(--vscode-focusBorder);\n}\n\n.monaco-editor .diff-hidden-lines .top,\n.monaco-editor .diff-hidden-lines .bottom {\n\ttransition: background-color 0.1s ease-out;\n\theight: 4px;\n\tbackground-color: transparent;\n\tbackground-clip: padding-box;\n\tborder-bottom: 2px solid transparent;\n\tborder-top: 4px solid transparent;\n\t/*cursor: n-resize;*/\n}\n\n.monaco-editor.draggingUnchangedRegion.canMoveTop:not(.canMoveBottom) *,\n.monaco-editor .diff-hidden-lines .top.canMoveTop:not(.canMoveBottom),\n.monaco-editor .diff-hidden-lines .bottom.canMoveTop:not(.canMoveBottom) {\n\tcursor: n-resize !important;\n}\n\n.monaco-editor.draggingUnchangedRegion:not(.canMoveTop).canMoveBottom *,\n.monaco-editor .diff-hidden-lines .top:not(.canMoveTop).canMoveBottom,\n.monaco-editor .diff-hidden-lines .bottom:not(.canMoveTop).canMoveBottom {\n\tcursor: s-resize !important;\n}\n\n.monaco-editor.draggingUnchangedRegion.canMoveTop.canMoveBottom *,\n.monaco-editor .diff-hidden-lines .top.canMoveTop.canMoveBottom,\n.monaco-editor .diff-hidden-lines .bottom.canMoveTop.canMoveBottom {\n\tcursor: ns-resize !important;\n}\n\n.monaco-editor .diff-hidden-lines .top {\n\ttransform: translate(0px, 4px);\n}\n\n.monaco-editor .diff-hidden-lines .bottom {\n\ttransform: translate(0px, -6px);\n}\n\n.monaco-editor .diff-unchanged-lines {\n\tbackground: var(--vscode-diffEditor-unchangedCodeBackground);\n}\n\n.monaco-editor .noModificationsOverlay {\n\tz-index: 1;\n\tbackground: var(--vscode-editor-background);\n\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n\n.monaco-editor .diff-hidden-lines .center {\n\tbackground: var(--vscode-diffEditor-unchangedRegionBackground);\n\tcolor: var(--vscode-diffEditor-unchangedRegionForeground);\n\toverflow: hidden;\n\tdisplay: block;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\n\theight: 24px;\n\tbox-shadow: inset 0 -5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow), inset 0 5px 5px -7px var(--vscode-diffEditor-unchangedRegionShadow);\n}\n\n.monaco-editor .diff-hidden-lines .center span.codicon {\n\tvertical-align: middle;\n}\n\n.monaco-editor .diff-hidden-lines .center a:hover .codicon {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .diff-hidden-lines div.breadcrumb-item {\n\tcursor: pointer;\n}\n\n.monaco-editor .diff-hidden-lines div.breadcrumb-item:hover {\n\tcolor: var(--vscode-editorLink-activeForeground);\n}\n\n.monaco-editor .movedOriginal {\n\tborder: 2px solid var(--vscode-diffEditor-move-border);\n}\n\n.monaco-editor .movedModified {\n\tborder: 2px solid var(--vscode-diffEditor-move-border);\n}\n\n.monaco-editor .movedOriginal.currentMove, .monaco-editor .movedModified.currentMove {\n\tborder: 2px solid var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines path.currentMove {\n\tstroke: var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines path {\n\tpointer-events: visiblestroke;\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow {\n\tfill: var(--vscode-diffEditor-move-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow.currentMove {\n\tfill: var(--vscode-diffEditor-moveActive-border);\n}\n\n.monaco-diff-editor .moved-blocks-lines .arrow-rectangle {\n\tfill: var(--vscode-editor-background);\n}\n\n.monaco-diff-editor .moved-blocks-lines {\n\tposition: absolute;\n\tpointer-events: none;\n}\n\n.monaco-diff-editor .moved-blocks-lines path {\n\tfill: none;\n\tstroke: var(--vscode-diffEditor-move-border);\n\tstroke-width: 2;\n}\n\n.monaco-editor .char-delete.diff-range-empty {\n\tmargin-left: -1px;\n\tborder-left: solid var(--vscode-diffEditor-removedTextBackground) 3px;\n}\n\n.monaco-editor .char-insert.diff-range-empty {\n\tborder-left: solid var(--vscode-diffEditor-insertedTextBackground) 3px;\n}\n\n.monaco-editor .fold-unchanged {\n\tcursor: pointer;\n}\n\n.monaco-diff-editor .diff-moved-code-block {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tmargin-top: -4px;\n}\n\n.monaco-diff-editor .diff-moved-code-block .action-bar .action-label.codicon {\n\twidth: 12px;\n\theight: 12px;\n\tfont-size: 12px;\n}\n\n/* ---------- DiffEditor ---------- */\n\n.monaco-diff-editor .diffOverview {\n\tz-index: 9;\n}\n\n.monaco-diff-editor .diffOverview .diffViewport {\n\tz-index: 10;\n}\n\n/* colors not externalized: using transparancy on background */\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-light\t.scrollbar { background: none; }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\n\tz-index: 10;\n}\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\n.modified-in-monaco-diff-editor.hc-light\t.slider.active { background: none; }\n\n/* ---------- Diff ---------- */\n\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign,\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tfont-size: 11px !important;\n\topacity: 0.7 !important;\n\tdisplay: flex !important;\n\talign-items: center;\n}\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign,\n.monaco-editor.hc-light .insert-sign,\n.monaco-diff-editor.hc-light .insert-sign,\n.monaco-editor.hc-light .delete-sign,\n.monaco-diff-editor.hc-light .delete-sign {\n\topacity: 1;\n}\n\n.monaco-editor .inline-deleted-margin-view-zone {\n\ttext-align: right;\n}\n.monaco-editor .inline-added-margin-view-zone {\n\ttext-align: right;\n}\n\n.monaco-editor .arrow-revert-change {\n\tz-index: 10;\n\tposition: absolute;\n}\n\n.monaco-editor .arrow-revert-change:hover {\n\tcursor: pointer;\n}\n\n/* ---------- Inline Diff ---------- */\n\n.monaco-editor .view-zones .view-lines .view-line span {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\n\tcursor: pointer;\n}\n\n.monaco-editor .char-insert, .monaco-diff-editor .char-insert {\n\tbackground-color: var(--vscode-diffEditor-insertedTextBackground);\n}\n\n.monaco-editor .line-insert, .monaco-diff-editor .line-insert {\n\tbackground-color: var(--vscode-diffEditor-insertedLineBackground, var(--vscode-diffEditor-insertedTextBackground));\n}\n\n.monaco-editor .line-insert,\n.monaco-editor .char-insert {\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-diffEditor-insertedTextBorder);\n}\n.monaco-editor.hc-black .line-insert, .monaco-editor.hc-light .line-insert,\n.monaco-editor.hc-black .char-insert, .monaco-editor.hc-light .char-insert {\n\tborder-style: dashed;\n}\n\n.monaco-editor .line-delete,\n.monaco-editor .char-delete {\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-diffEditor-removedTextBorder);\n}\n.monaco-editor.hc-black .line-delete, .monaco-editor.hc-light .line-delete,\n.monaco-editor.hc-black .char-delete, .monaco-editor.hc-light .char-delete {\n\tborder-style: dashed;\n}\n\n.monaco-editor .inline-added-margin-view-zone,\n.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert {\n\tbackground-color: var(--vscode-diffEditorGutter-insertedLineBackground, var(--vscode-diffEditor-insertedLineBackground), var(--vscode-diffEditor-insertedTextBackground));\n}\n\n.monaco-editor .char-delete, .monaco-diff-editor .char-delete {\n\tbackground-color: var(--vscode-diffEditor-removedTextBackground);\n}\n\n.monaco-editor .line-delete, .monaco-diff-editor .line-delete {\n\tbackground-color: var(--vscode-diffEditor-removedLineBackground, var(--vscode-diffEditor-removedTextBackground));\n}\n\n.monaco-editor .inline-deleted-margin-view-zone,\n.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete {\n\tbackground-color: var(--vscode-diffEditorGutter-removedLineBackground, var(--vscode-diffEditor-removedLineBackground), var(--vscode-diffEditor-removedTextBackground));\n}\n\n.monaco-diff-editor.side-by-side .editor.modified {\n\tbox-shadow: -6px 0 5px -5px var(--vscode-scrollbar-shadow);\n\tborder-left: 1px solid var(--vscode-diffEditor-border);\n}\n\n.monaco-diff-editor.side-by-side .editor.original {\n\tbox-shadow: 6px 0 5px -5px var(--vscode-scrollbar-shadow);\n\tborder-right: 1px solid var(--vscode-diffEditor-border);\n}\n\n.monaco-diff-editor .diffViewport {\n\tbackground: var(--vscode-scrollbarSlider-background);\n}\n\n.monaco-diff-editor .diffViewport:hover {\n\tbackground: var(--vscode-scrollbarSlider-hoverBackground);\n}\n\n.monaco-diff-editor .diffViewport:active {\n\tbackground: var(--vscode-scrollbarSlider-activeBackground);\n}\n\n.monaco-editor .diagonal-fill {\n\tbackground-image: linear-gradient(\n\t\t-45deg,\n\t\tvar(--vscode-diffEditor-diagonalFill) 12.5%,\n\t\t#0000 12.5%, #0000 50%,\n\t\tvar(--vscode-diffEditor-diagonalFill) 50%, var(--vscode-diffEditor-diagonalFill) 62.5%,\n\t\t#0000 62.5%, #0000 100%\n\t);\n\tbackground-size: 8px 8px;\n}\n\n.monaco-diff-editor .gutter {\n\tposition: relative;\n\toverflow: hidden;\n\tflex-shrink: 0;\n\tflex-grow: 0;\n\n\t& > div {\n\t\tposition: absolute;\n\t}\n\n\t.gutterItem {\n\t\topacity: 0;\n\t\ttransition: opacity 0.7s;\n\n\t\t&.showAlways {\n\t\t\topacity: 1;\n\t\t\ttransition: none;\n\t\t}\n\n\t\t&.noTransition {\n\t\t\ttransition: none;\n\t\t}\n\t}\n\n\t&:hover .gutterItem {\n\t\topacity: 1;\n\t\ttransition: opacity 0.1s ease-in-out;\n\t}\n\n\t.gutterItem {\n\t\t.background {\n\t\t\tposition: absolute;\n\t\t\theight: 100%;\n\t\t\tleft: 50%;\n\t\t\twidth: 1px;\n\n\t\t\tborder-left: 2px var(--vscode-menu-border) solid;\n\t\t}\n\n\t\t.buttons {\n\t\t\tposition: absolute;\n\t\t\t/*height: 100%;*/\n\t\t\twidth: 100%;\n\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\n\t\t\t.monaco-toolbar {\n\t\t\t\theight: fit-content;\n\t\t\t\t.monaco-action-bar {\n\t\t\t\t\tline-height: 1;\n\n\t\t\t\t\t.actions-container {\n\t\t\t\t\t\twidth: fit-content;\n\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\tbackground: var(--vscode-editorGutter-commentRangeForeground);\n\n\t\t\t\t\t\t.action-item {\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tbackground: var(--vscode-toolbar-hoverBackground);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.action-label {\n\t\t\t\t\t\t\t\tpadding: 1px 2px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",""]),t.Z=r},889:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rendered-markdown kbd {\n\tbackground-color: var(--vscode-keybindingLabel-background);\n\tcolor: var(--vscode-keybindingLabel-foreground);\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tborder-color: var(--vscode-keybindingLabel-border);\n\tborder-bottom-color: var(--vscode-keybindingLabel-bottomBorder);\n\tbox-shadow: inset 0 -1px 0 var(--vscode-widget-shadow);\n\tvertical-align: middle;\n\tpadding: 1px 3px;\n}\n\n.rendered-markdown li:has(input[type=checkbox]) {\n\tlist-style-type: none;\n}\n",""]),t.Z=r},1937:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-component.multiDiffEditor {\n\tbackground: var(--vscode-multiDiffEditor-background);\n\n\tposition: relative;\n\n\theight: 100%;\n\twidth: 100%;\n\n\toverflow-y: hidden;\n\n\t> div {\n\t\tposition: absolute;\n\t\ttop: 0px;\n\t\tleft: 0px;\n\n\t\theight: 100%;\n\t\twidth: 100%;\n\n\t\t&.placeholder {\n\t\t\tvisibility: hidden;\n\n\t\t\t&.visible {\n\t\t\t\tvisibility: visible;\n\t\t\t}\n\n\t\t\tdisplay: grid;\n\t\t\tplace-items: center;\n\t\t\tplace-content: center;\n\t\t}\n\t}\n\n\t.active {\n\t\t--vscode-multiDiffEditor-border: var(--vscode-focusBorder);\n\t}\n\n\t.multiDiffEntry {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tflex: 1;\n\t\toverflow: hidden;\n\n\n\t\t.collapse-button {\n\t\t\tmargin: 0 5px;\n\t\t\tcursor: pointer;\n\n\t\t\ta {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\n\t\t.header {\n\t\t\tz-index: 1000;\n\t\t\tbackground: var(--vscode-editor-background);\n\n\t\t\t&:not(.collapsed) .header-content {\n\t\t\t\tborder-bottom: 1px solid var(--vscode-sideBarSectionHeader-border);\n\t\t\t}\n\n\t\t\t.header-content {\n\t\t\t\tmargin: 8px 0px 0px 0px;\n\t\t\t\tpadding: 4px 5px;\n\n\t\t\t\tborder-top: 1px solid var(--vscode-multiDiffEditor-border);\n\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\n\t\t\t\tcolor: var(--vscode-foreground);\n\t\t\t\tbackground: var(--vscode-multiDiffEditor-headerBackground);\n\n\t\t\t\t&.shadow {\n\t\t\t\t\tbox-shadow: var(--vscode-scrollbar-shadow) 0px 6px 6px -6px;\n\t\t\t\t}\n\n\t\t\t\t.file-path {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex: 1;\n\t\t\t\t\tmin-width: 0;\n\n\t\t\t\t\t.title {\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\tline-height: 22px;\n\n\t\t\t\t\t\t&.original {\n\t\t\t\t\t\t\tflex: 1;\n\t\t\t\t\t\t\tmin-width: 0;\n\t\t\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t.status {\n\t\t\t\t\t\tfont-weight: 600;\n\t\t\t\t\t\topacity: 0.75;\n\t\t\t\t\t\tmargin: 0px 10px;\n\t\t\t\t\t\tline-height: 22px;\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tTODO@hediet: move colors from git extension to core!\n\t\t\t\t\t\t&.renamed {\n\t\t\t\t\t\t\tcolor: v ar(--vscode-gitDecoration-renamedResourceForeground);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.deleted {\n\t\t\t\t\t\t\tcolor: v ar(--vscode-gitDecoration-deletedResourceForeground);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.added {\n\t\t\t\t\t\t\tcolor: v ar(--vscode-gitDecoration-addedResourceForeground);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.actions {\n\t\t\t\t\tpadding: 0 8px;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\t\t.editorParent {\n\t\t\tflex: 1;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\n\t\t\tborder-bottom: 1px solid var(--vscode-multiDiffEditor-border);\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t.editorContainer {\n\t\t\tflex: 1;\n\t\t}\n\t}\n}\n",""]),t.Z=r},7018:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .selection-anchor {\n\tbackground-color: #007ACC;\n\twidth: 2px !important;\n}\n",""]),t.Z=r},1710:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .bracket-match {\n\tbox-sizing: border-box;\n\tbackground-color: var(--vscode-editorBracketMatch-background);\n\tborder: 1px solid var(--vscode-editorBracketMatch-border);\n}\n",""]),t.Z=r},5528:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lightBulbWidget {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-editor .lightBulbWidget:hover{\n\tcursor: pointer;\n}\n\n.monaco-editor .lightBulbWidget.codicon-light-bulb,\n.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle {\n\tcolor: var(--vscode-editorLightBulb-foreground);\n}\n\n.monaco-editor .lightBulbWidget.codicon-lightbulb-autofix,\n.monaco-editor .lightBulbWidget.codicon-lightbulb-sparkle-autofix {\n\tcolor: var(--vscode-editorLightBulbAutoFix-foreground, var(--vscode-editorLightBulb-foreground));\n}\n\n.monaco-editor .lightBulbWidget.codicon-sparkle-filled {\n\tcolor: var(--vscode-editorLightBulbAi-foreground, var(--vscode-icon-foreground));\n}\n\n.monaco-editor .lightBulbWidget:before {\n\tposition: relative;\n\tz-index: 2;\n}\n\n.monaco-editor .lightBulbWidget:after {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tcontent: '';\n\tdisplay: block;\n\twidth: 100%;\n\theight: 100%;\n\topacity: 0.3;\n\tbackground-color: var(--vscode-editor-background);\n\tz-index: 1;\n}\n",""]),t.Z=r},9934:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codelens-decoration {\n\toverflow: hidden;\n\tdisplay: inline-block;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tcolor: var(--vscode-editorCodeLens-foreground);\n\tline-height: var(--vscode-editorCodeLens-lineHeight);\n\tfont-size: var(--vscode-editorCodeLens-fontSize);\n\tpadding-right: calc(var(--vscode-editorCodeLens-fontSize)*0.5);\n\tfont-feature-settings: var(--vscode-editorCodeLens-fontFeatureSettings);\n\tfont-family: var(--vscode-editorCodeLens-fontFamily), var(--vscode-editorCodeLens-fontFamilyDefault);\n}\n\n.monaco-editor .codelens-decoration > span,\n.monaco-editor .codelens-decoration > a {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\twhite-space: nowrap;\n\tvertical-align: sub;\n}\n\n.monaco-editor .codelens-decoration > a {\n\ttext-decoration: none;\n}\n\n.monaco-editor .codelens-decoration > a:hover {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .codelens-decoration > a:hover .codicon {\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .codelens-decoration .codicon {\n\tvertical-align: middle;\n\tcolor: currentColor !important;\n\tcolor: var(--vscode-editorCodeLens-foreground);\n\tline-height: var(--vscode-editorCodeLens-lineHeight);\n\tfont-size: var(--vscode-editorCodeLens-fontSize);\n}\n\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\n\tcursor: pointer;\n}\n\n@keyframes fadein {\n\t0% {\n\t\topacity: 0;\n\t\tvisibility: visible;\n\t}\n\n\t100% {\n\t\topacity: 1;\n\t}\n}\n\n.monaco-editor .codelens-decoration.fadein {\n\tanimation: fadein 0.1s linear;\n}\n",""]),t.Z=r},8451:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s),a=i(8601),l=i.n(a),d=new URL(i(4748),i.b),c=r()(o()),h=l()(d);c.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.colorpicker-widget {\n\theight: 190px;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/* Decoration */\n\n.colorpicker-color-decoration,\n.hc-light .colorpicker-color-decoration {\n\tborder: solid 0.1em #000;\n\tbox-sizing: border-box;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\twidth: 0.8em;\n\theight: 0.8em;\n\tline-height: 0.8em;\n\tdisplay: inline-block;\n\tcursor: pointer;\n}\n\n.hc-black .colorpicker-color-decoration,\n.vs-dark .colorpicker-color-decoration {\n\tborder: solid 0.1em #eee;\n}\n\n/* Header */\n\n.colorpicker-header {\n\tdisplay: flex;\n\theight: 24px;\n\tposition: relative;\n\tbackground: url("+h+");\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-header .picked-color {\n\twidth: 240px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tline-height: 24px;\n\tcursor: pointer;\n\tcolor: white;\n\tflex: 1;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.colorpicker-header .picked-color .picked-color-presentation {\n\twhite-space: nowrap;\n\tmargin-left: 5px;\n\tmargin-right: 5px;\n}\n\n.colorpicker-header .picked-color .codicon {\n\tcolor: inherit;\n\tfont-size: 14px;\n}\n\n.colorpicker-header .picked-color.light {\n\tcolor: black;\n}\n\n.colorpicker-header .original-color {\n\twidth: 74px;\n\tz-index: inherit;\n\tcursor: pointer;\n}\n\n.standalone-colorpicker {\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.colorpicker-header.standalone-colorpicker {\n\tborder-bottom: none;\n}\n\n.colorpicker-header .close-button {\n\tcursor: pointer;\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder-left: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.colorpicker-header .close-button-inner-div {\n\twidth: 100%;\n\theight: 100%;\n\ttext-align: center;\n}\n\n.colorpicker-header .close-button-inner-div:hover {\n\tbackground-color: var(--vscode-toolbar-hoverBackground);\n}\n\n.colorpicker-header .close-icon {\n\tpadding: 3px;\n}\n\n/* Body */\n\n.colorpicker-body {\n\tdisplay: flex;\n\tpadding: 8px;\n\tposition: relative;\n}\n\n.colorpicker-body .saturation-wrap {\n\toverflow: hidden;\n\theight: 150px;\n\tposition: relative;\n\tmin-width: 220px;\n\tflex: 1;\n}\n\n.colorpicker-body .saturation-box {\n\theight: 150px;\n\tposition: absolute;\n}\n\n.colorpicker-body .saturation-selection {\n\twidth: 9px;\n\theight: 9px;\n\tmargin: -5px 0 0 -5px;\n\tborder: 1px solid rgb(255, 255, 255);\n\tborder-radius: 100%;\n\tbox-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);\n\tposition: absolute;\n}\n\n.colorpicker-body .strip {\n\twidth: 25px;\n\theight: 150px;\n}\n\n.colorpicker-body .standalone-strip {\n\twidth: 25px;\n\theight: 122px;\n}\n\n.colorpicker-body .hue-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: grab;\n\tbackground: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);\n}\n\n.colorpicker-body .opacity-strip {\n\tposition: relative;\n\tmargin-left: 8px;\n\tcursor: grab;\n\tbackground: url("+h+");\n\tbackground-size: 9px 9px;\n\timage-rendering: pixelated;\n}\n\n.colorpicker-body .strip.grabbing {\n\tcursor: grabbing;\n}\n\n.colorpicker-body .slider {\n\tposition: absolute;\n\ttop: 0;\n\tleft: -2px;\n\twidth: calc(100% + 4px);\n\theight: 4px;\n\tbox-sizing: border-box;\n\tborder: 1px solid rgba(255, 255, 255, 0.71);\n\tbox-shadow: 0px 0px 1px rgba(0, 0, 0, 0.85);\n}\n\n.colorpicker-body .strip .overlay {\n\theight: 150px;\n\tpointer-events: none;\n}\n\n.colorpicker-body .standalone-strip .standalone-overlay {\n\theight: 122px;\n\tpointer-events: none;\n}\n\n.standalone-colorpicker-body {\n\tdisplay: block;\n\tborder: 1px solid transparent;\n\tborder-bottom: 1px solid var(--vscode-editorHoverWidget-border);\n\toverflow: hidden;\n}\n\n.colorpicker-body .insert-button {\n\tposition: absolute;\n\theight: 20px;\n\twidth: 58px;\n\tpadding: 0px;\n\tright: 8px;\n\tbottom: 8px;\n\tbackground: var(--vscode-button-background);\n\tcolor: var(--vscode-button-foreground);\n\tborder-radius: 2px;\n\tborder: none;\n\tcursor: pointer;\n}\n\n.colorpicker-body .insert-button:hover{\n\tbackground: var(--vscode-button-hoverBackground);\n}\n",""]),t.Z=c},7538:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor.vs .dnd-target,\n.monaco-editor.hc-light .dnd-target {\n\tborder-right: 2px dotted black;\n\tcolor: white; /* opposite of black */\n}\n.monaco-editor.vs-dark .dnd-target {\n\tborder-right: 2px dotted #AEAFAD;\n\tcolor: #51504f; /* opposite of #AEAFAD */\n}\n.monaco-editor.hc-black .dnd-target {\n\tborder-right: 2px dotted #fff;\n\tcolor: #000; /* opposite of #fff */\n}\n\n.monaco-editor.mouse-default .view-lines,\n.monaco-editor.vs-dark.mac.mouse-default .view-lines,\n.monaco-editor.hc-black.mac.mouse-default .view-lines,\n.monaco-editor.hc-light.mac.mouse-default .view-lines {\n\tcursor: default;\n}\n.monaco-editor.mouse-copy .view-lines,\n.monaco-editor.vs-dark.mac.mouse-copy .view-lines,\n.monaco-editor.hc-black.mac.mouse-copy .view-lines,\n.monaco-editor.hc-light.mac.mouse-copy .view-lines {\n\tcursor: copy;\n}\n",""]),t.Z=r},7094:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.post-edit-widget {\n\tbox-shadow: 0 0 8px 2px var(--vscode-widget-shadow);\n\tborder: 1px solid var(--vscode-widget-border, transparent);\n\tborder-radius: 4px;\n\tbackground-color: var(--vscode-editorWidget-background);\n\toverflow: hidden;\n}\n\n.post-edit-widget .monaco-button {\n\tpadding: 2px;\n\tborder: none;\n\tborder-radius: 0;\n}\n\n.post-edit-widget .monaco-button:hover {\n\tbackground-color: var(--vscode-button-secondaryHoverBackground) !important;\n}\n\n.post-edit-widget .monaco-button .codicon {\n\tmargin: 0;\n}\n",""]),t.Z=r},5672:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .findOptionsWidget {\n\tbackground-color: var(--vscode-editorWidget-background);\n\tcolor: var(--vscode-editorWidget-foreground);\n\tbox-shadow: 0 0 8px 2px var(--vscode-widget-shadow);\n\tborder: 2px solid var(--vscode-contrastBorder);\n}\n",""]),t.Z=r},2348:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Find widget */\n.monaco-editor .find-widget {\n\tposition: absolute;\n\tz-index: 35;\n\theight: 33px;\n\toverflow: hidden;\n\tline-height: 19px;\n\ttransition: transform 200ms linear;\n\tpadding: 0 4px;\n\tbox-sizing: border-box;\n\ttransform: translateY(calc(-100% - 10px)); /* shadow (10px) */\n\tbox-shadow: 0 0 8px 2px var(--vscode-widget-shadow);\n\tcolor: var(--vscode-editorWidget-foreground);\n\tborder-left: 1px solid var(--vscode-widget-border);\n\tborder-right: 1px solid var(--vscode-widget-border);\n\tborder-bottom: 1px solid var(--vscode-widget-border);\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tbackground-color: var(--vscode-editorWidget-background);\n}\n\n.monaco-workbench.reduce-motion .monaco-editor .find-widget {\n\ttransition: transform 0ms linear;\n}\n\n.monaco-editor .find-widget textarea {\n\tmargin: 0px;\n}\n\n.monaco-editor .find-widget.hiddenEditor {\n\tdisplay: none;\n}\n\n/* Find widget when replace is toggled on */\n.monaco-editor .find-widget.replaceToggled > .replace-part {\n\tdisplay: flex;\n}\n\n.monaco-editor .find-widget.visible {\n\ttransform: translateY(0);\n}\n\n/* This outline-color rule is used to override the outline color for synthetic-focus find input. */\n.monaco-editor .find-widget .monaco-inputbox.synthetic-focus {\n\toutline: 1px solid -webkit-focus-ring-color;\n\toutline-offset: -1px;\n\toutline-color: var(--vscode-focusBorder);\n}\n\n.monaco-editor .find-widget .monaco-inputbox .input {\n\tbackground-color: transparent;\n\tmin-height: 0;\n}\n\n.monaco-editor .find-widget .monaco-findInput .input {\n\tfont-size: 13px;\n}\n\n.monaco-editor .find-widget > .find-part,\n.monaco-editor .find-widget > .replace-part {\n\tmargin: 3px 25px 0 17px;\n\tfont-size: 12px;\n\tdisplay: flex;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox {\n\tmin-height: 25px;\n}\n\n\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding-right: 22px;\n}\n\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .input,\n.monaco-editor .find-widget > .find-part .monaco-inputbox > .ibwrapper > .mirror,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .input,\n.monaco-editor .find-widget > .replace-part .monaco-inputbox > .ibwrapper > .mirror {\n\tpadding-top: 2px;\n\tpadding-bottom: 2px;\n}\n\n.monaco-editor .find-widget > .find-part .find-actions {\n\theight: 25px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget > .replace-part .replace-actions {\n\theight: 25px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-editor .find-widget .monaco-findInput {\n\tvertical-align: middle;\n\tdisplay: flex;\n\tflex:1;\n}\n\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element {\n\t/* Make sure textarea inherits the width correctly */\n\twidth: 100%;\n}\n\n.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical {\n\t/* Hide vertical scrollbar */\n\topacity: 0;\n}\n\n.monaco-editor .find-widget .matchesCount {\n\tdisplay: flex;\n\tflex: initial;\n\tmargin: 0 0 0 3px;\n\tpadding: 2px 0 0 2px;\n\theight: 25px;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\ttext-align: center;\n\tline-height: 23px;\n}\n\n.monaco-editor .find-widget .button {\n\twidth: 16px;\n\theight: 16px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n\tdisplay: flex;\n\tflex: initial;\n\tmargin-left: 3px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* find in selection button */\n.monaco-editor .find-widget .codicon-find-selection {\n\twidth: 22px;\n\theight: 22px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-editor .find-widget .button.left {\n\tmargin-left: 0;\n\tmargin-right: 3px;\n}\n\n.monaco-editor .find-widget .button.wide {\n\twidth: auto;\n\tpadding: 1px 6px;\n\ttop: -1px;\n}\n\n.monaco-editor .find-widget .button.toggle {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 3px;\n\twidth: 18px;\n\theight: 100%;\n\tborder-radius: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .find-widget .button.toggle.disabled {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget .disabled {\n\tcolor: var(--vscode-disabledForeground);\n\tcursor: default;\n}\n\n.monaco-editor .find-widget > .replace-part {\n\tdisplay: none;\n}\n\n.monaco-editor .find-widget > .replace-part > .monaco-findInput {\n\tposition: relative;\n\tdisplay: flex;\n\tvertical-align: middle;\n\tflex: auto;\n\tflex-grow: 0;\n\tflex-shrink: 0;\n}\n\n.monaco-editor .find-widget > .replace-part > .monaco-findInput > .controls {\n\tposition: absolute;\n\ttop: 3px;\n\tright: 2px;\n}\n\n/* REDUCED */\n.monaco-editor .find-widget.reduced-find-widget .matchesCount {\n\tdisplay:none;\n}\n\n/* NARROW (SMALLER THAN REDUCED) */\n.monaco-editor .find-widget.narrow-find-widget {\n\tmax-width: 257px !important;\n}\n\n/* COLLAPSED (SMALLER THAN NARROW) */\n.monaco-editor .find-widget.collapsed-find-widget {\n\tmax-width: 170px !important;\n}\n\n.monaco-editor .find-widget.collapsed-find-widget .button.previous,\n.monaco-editor .find-widget.collapsed-find-widget .button.next,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace,\n.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,\n.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls {\n\tdisplay:none;\n}\n\n.monaco-editor .find-widget.no-results .matchesCount {\n\tcolor: var(--vscode-errorForeground);\n}\n\n.monaco-editor .findMatch {\n\tanimation-duration: 0;\n\tanimation-name: inherit !important;\n\tbackground-color: var(--vscode-editor-findMatchHighlightBackground);\n}\n\n.monaco-editor .currentFindMatch {\n\tbackground-color: var(--vscode-editor-findMatchBackground);\n\tborder: 2px solid var(--vscode-editor-findMatchBorder);\n\tpadding: 1px;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .findScope {\n\tbackground-color: var(--vscode-editor-findRangeHighlightBackground);\n}\n\n.monaco-editor .find-widget .monaco-sash {\n\tleft: 0 !important;\n\tbackground-color: var(--vscode-editorWidget-resizeBorder, var(--vscode-editorWidget-border));\n}\n\n.monaco-editor.hc-black .find-widget .button:before {\n\tposition: relative;\n\ttop: 1px;\n\tleft: 2px;\n}\n\n/* Action bars */\n.monaco-editor .find-widget .button:not(.disabled):hover,\n.monaco-editor .find-widget .codicon-find-selection:hover {\n\tbackground-color: var(--vscode-toolbar-hoverBackground) !important;\n}\n\n.monaco-editor.findMatch {\n\tbackground-color: var(--vscode-editor-findMatchHighlightBackground);\n}\n\n.monaco-editor.currentFindMatch {\n\tbackground-color: var(--vscode-editor-findMatchBackground);\n}\n\n.monaco-editor.findScope {\n\tbackground-color: var(--vscode-editor-findRangeHighlightBackground);\n}\n\n.monaco-editor.findMatch {\n\tbackground-color: var(--vscode-editorWidget-background);\n}\n\n/* Close button position. */\n.monaco-editor .find-widget > .button.codicon-widget-close {\n\tposition: absolute;\n\ttop: 5px;\n\tright: 4px;\n}\n",""]),t.Z=r},7159:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,\n.monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,\n.monaco-editor .margin-view-overlays .codicon-folding-expanded,\n.monaco-editor .margin-view-overlays .codicon-folding-collapsed {\n\tcursor: pointer;\n\topacity: 0;\n\ttransition: opacity 0.5s;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tfont-size: 140%;\n\tmargin-left: 2px;\n}\n\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-collapsed,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-manual-expanded,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-expanded,\n.monaco-workbench.reduce-motion .monaco-editor .margin-view-overlays .codicon-folding-collapsed {\n\ttransition: initial;\n}\n\n.monaco-editor .margin-view-overlays:hover .codicon,\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,\n.monaco-editor .margin-view-overlays .codicon.codicon-folding-manual-collapsed,\n.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons {\n\topacity: 1;\n}\n\n.monaco-editor .inline-folded:after {\n\tcolor: grey;\n\tmargin: 0.1em 0.2em 0 0.2em;\n\tcontent: "\\22EF"; /* ellipses unicode character */\n\tdisplay: inline;\n\tline-height: 1em;\n\tcursor: pointer;\n}\n\n.monaco-editor .folded-background {\n\tbackground-color: var(--vscode-editor-foldBackground);\n}\n\n.monaco-editor .cldr.codicon.codicon-folding-expanded,\n.monaco-editor .cldr.codicon.codicon-folding-collapsed,\n.monaco-editor .cldr.codicon.codicon-folding-manual-expanded,\n.monaco-editor .cldr.codicon.codicon-folding-manual-collapsed {\n\tcolor: var(--vscode-editorGutter-foldingControlForeground) !important;\n}\n\n',""]),t.Z=r},6241:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* marker zone */\n\n.monaco-editor .peekview-widget .head .peekview-title .severity-icon {\n\tdisplay: inline-block;\n\tvertical-align: text-top;\n\tmargin-right: 4px;\n}\n\n.monaco-editor .marker-widget {\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .marker-widget > .stale {\n\topacity: 0.6;\n\tfont-style: italic;\n}\n\n.monaco-editor .marker-widget .title {\n\tdisplay: inline-block;\n\tpadding-right: 5px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer {\n\tposition: absolute;\n\twhite-space: pre;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tpadding: 8px 12px 0 20px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message .details {\n\tpadding-left: 6px;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message .source,\n.monaco-editor .marker-widget .descriptioncontainer .message span.code {\n\topacity: 0.6;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link {\n\topacity: 0.6;\n\tcolor: inherit;\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .message a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .marker-widget .descriptioncontainer .filename {\n\tcursor: pointer;\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n",""]),t.Z=r},8979:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .goto-definition-link {\n\ttext-decoration: underline;\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n",""]),t.Z=r},5982:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -- zone widget */\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\n\tborder-top-width: 1px;\n\tborder-bottom-width: 1px;\n}\n\n.monaco-editor .reference-zone-widget .inline {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .reference-zone-widget .messages {\n\theight: 100%;\n\twidth: 100%;\n\ttext-align: center;\n\tpadding: 3em 0;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree {\n\tline-height: 23px;\n\tbackground-color: var(--vscode-peekViewResult-background);\n\tcolor: var(--vscode-peekViewResult-lineForeground);\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\n\tdisplay: inline-flex;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--vscode-peekViewResult-fileForeground);\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\n\tcolor: inherit !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) {\n\tbackground-color: var(--vscode-peekViewResult-selectionBackground);\n\tcolor: var(--vscode-peekViewResult-selectionForeground) !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\n\tmargin-right: 12px;\n\tmargin-left: auto;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight {\n\tbackground-color: var(--vscode-peekViewResult-matchHighlightBackground);\n}\n\n.monaco-editor .reference-zone-widget .preview .reference-decoration {\n\tbackground-color: var(--vscode-peekViewEditor-matchHighlightBackground);\n\tborder: 2px solid var(--vscode-peekViewEditor-matchHighlightBorder);\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,\n.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\n\tbackground-color: var(--vscode-peekViewEditor-background);\n}\n\n.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\n\tbackground-color: var(--vscode-peekViewEditorGutter-background);\n}\n\n/* High Contrast Theming */\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file,\n.monaco-editor.hc-light .reference-zone-widget .ref-tree .reference-file {\n\tfont-weight: bold;\n}\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight,\n.monaco-editor.hc-light .reference-zone-widget .ref-tree .referenceMatch .highlight {\n\tborder: 1px dotted var(--vscode-contrastActiveBorder, transparent);\n\tbox-sizing: border-box;\n}\n",""]),t.Z=r},8737:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .hoverHighlight {\n\tbackground-color: var(--vscode-editor-hoverHighlightBackground);\n}\n\n.monaco-editor .monaco-hover-content {\n\tpadding-right: 2px;\n\tpadding-bottom: 2px;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .monaco-hover {\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n\tborder-radius: 3px;\n}\n\n.monaco-editor .monaco-hover a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .monaco-hover a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .monaco-hover .hover-row {\n\tdisplay: flex;\n}\n\n.monaco-editor .monaco-hover .hover-row .hover-row-contents {\n\tmin-width:0;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.monaco-editor .monaco-hover .hover-row .verbosity-actions {\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding-left: 5px;\n\tpadding-right: 5px;\n\tjustify-content: end;\n\tborder-right: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .monaco-hover .hover-row .verbosity-actions .codicon {\n\tcursor: pointer;\n\tfont-size: 11px;\n}\n\n.monaco-editor .monaco-hover .hover-row .verbosity-actions .codicon.enabled {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .monaco-hover .hover-row .verbosity-actions .codicon.disabled {\n\topacity: 0.6;\n}\n\n.monaco-editor .monaco-hover .hover-row .actions {\n\tbackground-color: var(--vscode-editorHoverWidget-statusBarBackground);\n}\n\n.monaco-editor .monaco-hover code {\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n\n",""]),t.Z=r},330:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n.monaco-editor.vs .valueSetReplacement {\n\toutline: solid 2px var(--vscode-editorBracketMatch-border);\n}\n",""]),t.Z=r},1342:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .suggest-preview-additional-widget {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-preview-additional-widget .content-spacer {\n\tcolor: transparent;\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-preview-additional-widget .button {\n\tdisplay: inline-block;\n\tcursor: pointer;\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .ghost-text-hidden {\n\topacity: 0;\n\tfont-size: 0;\n}\n\n.monaco-editor .ghost-text-decoration, .monaco-editor .suggest-preview-text .ghost-text {\n\tfont-style: italic;\n}\n\n.monaco-editor .inline-completion-text-to-replace {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .suggest-preview-text .ghost-text {\n\tcolor: var(--vscode-editorGhostText-foreground) !important;\n\tbackground-color: var(--vscode-editorGhostText-background);\n\tborder: 1px solid var(--vscode-editorGhostText-border);\n}\n",""]),t.Z=r},9479:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inlineSuggestionsHints.withBorder {\n\tz-index: 39;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .inlineSuggestionsHints a {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineSuggestionsHints a:hover {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineSuggestionsHints .keybinding {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\topacity: 0.6;\n}\n\n.monaco-editor .inlineSuggestionsHints .keybinding .monaco-keybinding-key {\n\tfont-size: 8px;\n\tpadding: 2px 3px;\n}\n\n.monaco-editor .inlineSuggestionsHints .availableSuggestionCount a {\n\tdisplay: flex;\n\tmin-width: 19px;\n\tjustify-content: center;\n}\n\n.monaco-editor .inlineSuggestionStatusBarItemLabel {\n\tmargin-right: 2px;\n}\n",""]),t.Z=r},9823:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inline-edit-remove {\n\tbackground-color: var(--vscode-editorGhostText-background);\n\tfont-style: italic;\n\ttext-decoration: line-through;\n}\n\n.monaco-editor .inline-edit-remove.backgroundColoring {\n\tbackground-color: var(--vscode-diffEditor-removedLineBackground);\n}\n\n.monaco-editor .inline-edit-hidden {\n\topacity: 0;\n\tfont-size: 0;\n}\n\n.monaco-editor .inline-edit-decoration, .monaco-editor .suggest-preview-text .inline-edit {\n\tfont-style: italic;\n}\n\n.monaco-editor .inline-completion-text-to-replace {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .inline-edit-decoration,\n.monaco-editor .inline-edit-decoration-preview,\n.monaco-editor .suggest-preview-text .inline-edit {\n\tcolor: var(--vscode-editorGhostText-foreground) !important;\n\tbackground-color: var(--vscode-editorGhostText-background);\n\tborder: 1px solid var(--vscode-editorGhostText-border);\n}\n\n\n",""]),t.Z=r},6407:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inlineEditHints.withBorder {\n\tz-index: 39;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .inlineEditHints a {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineEditHints a:hover {\n\tcolor: var(--vscode-foreground);\n}\n\n.monaco-editor .inlineEditHints .keybinding {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\topacity: 0.6;\n}\n\n.monaco-editor .inlineEditHints .keybinding .monaco-keybinding-key {\n\tfont-size: 8px;\n\tpadding: 2px 3px;\n}\n\n.monaco-editor .inlineEditStatusBarItemLabel {\n\tmargin-right: 2px;\n}\n",""]),t.Z=r},5577:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.inline-editor-progress-decoration {\n\tdisplay: inline-block;\n\twidth: 1em;\n\theight: 1em;\n}\n\n.inline-progress-widget {\n\tdisplay: flex !important;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.inline-progress-widget .icon {\n\tfont-size: 80% !important;\n}\n\n.inline-progress-widget:hover .icon {\n\tfont-size: 90% !important;\n\tanimation: none;\n}\n\n.inline-progress-widget:hover .icon::before {\n\tcontent: var(--vscode-icon-x-content);\n\tfont-family: var(--vscode-icon-x-font-family);\n}\n",""]),t.Z=r},9717:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .linked-editing-decoration {\n\tbackground-color: var(--vscode-editor-linkedEditingBackground);\n\n\t/* Ensure decoration is visible even if range is empty */\n\tmin-width: 1px;\n}\n",""]),t.Z=r},4222:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .detected-link,\n.monaco-editor .detected-link-active {\n\ttext-decoration: underline;\n\ttext-underline-position: under;\n}\n\n.monaco-editor .detected-link-active {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n",""]),t.Z=r},4513:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .monaco-editor-overlaymessage {\n\tpadding-bottom: 8px;\n\tz-index: 10000;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below {\n\tpadding-bottom: 0;\n\tpadding-top: 8px;\n\tz-index: 10000;\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\n\tanimation: fadeIn 150ms ease-out;\n}\n\n@keyframes fadeOut {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\n\tanimation: fadeOut 100ms ease-out;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message {\n\tpadding: 2px 4px;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-inputValidation-infoBorder);\n\tborder-radius: 3px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message p {\n\tmargin-block: 0px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor.hc-black .monaco-editor-overlaymessage .message,\n.monaco-editor.hc-light .monaco-editor-overlaymessage .message {\n\tborder-width: 2px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor {\n\twidth: 0 !important;\n\theight: 0 !important;\n\tborder-color: transparent;\n\tborder-style: solid;\n\tz-index: 1000;\n\tborder-width: 8px;\n\tposition: absolute;\n\tleft: 2px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor.top {\n\tborder-bottom-color: var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor.below {\n\tborder-top-color: var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\n\tdisplay: none;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\n\tdisplay: inherit;\n\ttop: -8px;\n}\n",""]),t.Z=r},6867:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .parameter-hints-widget {\n\t/* Must be higher than the sash\'s z-index and terminal canvases but lower than the suggest widget */\n\tz-index: 39;\n\tdisplay: flex;\n\tflex-direction: column;\n\tline-height: 1.5em;\n\tcursor: default;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.hc-black .monaco-editor .parameter-hints-widget,\n.hc-light .monaco-editor .parameter-hints-widget {\n\tborder-width: 2px;\n}\n\n.monaco-editor .parameter-hints-widget > .phwrapper {\n\tmax-width: 440px;\n\tdisplay: flex;\n\tflex-direction: row;\n}\n\n.monaco-editor .parameter-hints-widget.multiple {\n\tmin-height: 3.3em;\n\tpadding: 0;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .body::before {\n\tcontent: "";\n\tdisplay: block;\n\theight: 100%;\n\tposition: absolute;\n\topacity: 0.5;\n\tborder-left: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .parameter-hints-widget p,\n.monaco-editor .parameter-hints-widget ul {\n\tmargin: 8px 0;\n}\n\n.monaco-editor .parameter-hints-widget .monaco-scrollable-element,\n.monaco-editor .parameter-hints-widget .body {\n\tdisplay: flex;\n\tflex: 1;\n\tflex-direction: column;\n\tmin-height: 100%;\n}\n\n.monaco-editor .parameter-hints-widget .signature {\n\tpadding: 4px 5px;\n\tposition: relative;\n}\n\n.monaco-editor .parameter-hints-widget .signature.has-docs::after {\n\tcontent: "";\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\twidth: 100%;\n\tpadding-top: 4px;\n\topacity: 0.5;\n\tborder-bottom: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .parameter-hints-widget .docs {\n\tpadding: 0 10px 0 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .docs.empty {\n\tdisplay: none;\n}\n\n.monaco-editor .parameter-hints-widget .docs a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .parameter-hints-widget .docs a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .docs .markdown-docs {\n\twhite-space: initial;\n}\n\n.monaco-editor .parameter-hints-widget .docs code {\n\tfont-family: var(--monaco-monospace-font);\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source,\n.monaco-editor .parameter-hints-widget .docs .code {\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .parameter-hints-widget .controls {\n\tdisplay: none;\n\tflex-direction: column;\n\talign-items: center;\n\tmin-width: 22px;\n\tjustify-content: flex-end;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .controls {\n\tdisplay: flex;\n\tpadding: 0 2px;\n}\n\n.monaco-editor .parameter-hints-widget.multiple .button {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tcursor: pointer;\n}\n\n.monaco-editor .parameter-hints-widget .button.previous {\n\tbottom: 24px;\n}\n\n.monaco-editor .parameter-hints-widget .overloads {\n\ttext-align: center;\n\theight: 12px;\n\tline-height: 12px;\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .parameter-hints-widget .signature .parameter.active {\n\tcolor: var(--vscode-editorHoverWidget-highlightForeground);\n\tfont-weight: bold;\n}\n\n.monaco-editor .parameter-hints-widget .documentation-parameter > .parameter {\n\tfont-weight: bold;\n\tmargin-right: 0.5em;\n}\n',""]),t.Z=r},4350:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .peekview-widget .head {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-wrap: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title {\n\tdisplay: flex;\n\talign-items: baseline;\n\tfont-size: 13px;\n\tmargin-left: 20px;\n\tmin-width: 0;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title.clickable {\n\tcursor: pointer;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\n\tfont-size: 0.9em;\n\tmargin-left: 0.5em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta {\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .filename {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\n\tcontent: '-';\n\tpadding: 0 0.3em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions {\n\tflex: 1;\n\ttext-align: right;\n\tpadding-right: 2px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\n\theight: 100%;\n}\n\n.monaco-editor .peekview-widget > .body {\n\tborder-top: 1px solid;\n\tposition: relative;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\n\tmargin-right: 4px;\n\talign-self: center;\n}\n\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: inherit !important;\n}\n",""]),t.Z=r},871:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .rename-box {\n\tz-index: 100;\n\tcolor: inherit;\n\tborder-radius: 4px;\n}\n\n.monaco-editor .rename-box.preview {\n\tpadding: 4px 4px 0 4px;\n}\n\n.monaco-editor .rename-box .rename-input-with-button {\n\tpadding: 3px;\n\tborder-radius: 2px;\n\twidth: calc(100% - 8px); /* 4px padding on each side */\n}\n\n.monaco-editor .rename-box .rename-input {\n\twidth: calc(100% - 8px); /* 4px padding on each side */\n\tpadding: 0;\n}\n\n.monaco-editor .rename-box .rename-input:focus {\n\toutline: none;\n}\n\n.monaco-editor .rename-box .rename-suggestions-button {\n\tdisplay: flex;\n\talign-items: center;\n\tpadding: 3px;\n\tbackground-color: transparent;\n\tborder: none;\n\tborder-radius: 5px;\n\tcursor: pointer;\n}\n\n.monaco-editor .rename-box .rename-suggestions-button:hover {\n\tbackground-color: var(--vscode-toolbar-hoverBackground)\n}\n\n.monaco-editor .rename-box .rename-candidate-list-container .monaco-list-row {\n\tborder-radius: 2px;\n}\n\n.monaco-editor .rename-box .rename-label {\n\tdisplay: none;\n\topacity: .8;\n}\n\n.monaco-editor .rename-box.preview .rename-label {\n\tdisplay: inherit;\n}\n",""]),t.Z=r},9793:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .snippet-placeholder {\n\tmin-width: 2px;\n\toutline-style: solid;\n\toutline-width: 1px;\n\tbackground-color: var(--vscode-editor-snippetTabstopHighlightBackground, transparent);\n\toutline-color: var(--vscode-editor-snippetTabstopHighlightBorder, transparent);\n}\n\n.monaco-editor .finish-snippet-placeholder {\n\toutline-style: solid;\n\toutline-width: 1px;\n\tbackground-color: var(--vscode-editor-snippetFinalTabstopHighlightBackground, transparent);\n\toutline-color: var(--vscode-editor-snippetFinalTabstopHighlightBorder, transparent);\n}\n",""]),t.Z=r},5896:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .sticky-widget {\n\toverflow: hidden;\n}\n\n.monaco-editor .sticky-widget-line-numbers {\n\tfloat: left;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-widget-lines-scrollable {\n\tdisplay: inline-block;\n\tposition: absolute;\n\toverflow: hidden;\n\twidth: var(--vscode-editorStickyScroll-scrollableWidth);\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-widget-lines {\n\tposition: absolute;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-line-number, .monaco-editor .sticky-line-content {\n\tcolor: var(--vscode-editorLineNumber-foreground);\n\twhite-space: nowrap;\n\tdisplay: inline-block;\n\tposition: absolute;\n\tbackground-color: inherit;\n}\n\n.monaco-editor .sticky-line-number .codicon-folding-expanded,\n.monaco-editor .sticky-line-number .codicon-folding-collapsed {\n\tfloat: right;\n\ttransition: var(--vscode-editorStickyScroll-foldingOpacityTransition);\n}\n\n.monaco-editor .sticky-line-content {\n\twidth: var(--vscode-editorStickyScroll-scrollableWidth);\n\tbackground-color: inherit;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .sticky-line-number-inner {\n\tdisplay: inline-block;\n\ttext-align: right;\n}\n\n.monaco-editor .sticky-widget {\n\tborder-bottom: 1px solid var(--vscode-editorStickyScroll-border);\n}\n\n.monaco-editor .sticky-line-content:hover {\n\tbackground-color: var(--vscode-editorStickyScrollHover-background);\n\tcursor: pointer;\n}\n\n.monaco-editor .sticky-widget {\n\twidth: 100%;\n\tbox-shadow: var(--vscode-editorStickyScroll-shadow) 0 3px 2px -2px;\n\tz-index: 4;\n\tbackground-color: var(--vscode-editorStickyScroll-background);\n\tright: initial !important;\n}\n\n.monaco-editor .sticky-widget.peek {\n\tbackground-color: var(--vscode-peekViewEditorStickyScroll-background);\n}\n",""]),t.Z=r},6315:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Suggest widget*/\n\n.monaco-editor .suggest-widget {\n\twidth: 430px;\n\tz-index: 40;\n\tdisplay: flex;\n\tflex-direction: column;\n\tborder-radius: 3px;\n}\n\n.monaco-editor .suggest-widget.message {\n\tflex-direction: row;\n\talign-items: center;\n}\n\n.monaco-editor .suggest-widget,\n.monaco-editor .suggest-details {\n\tflex: 0 1 auto;\n\twidth: 100%;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: var(--vscode-editorSuggestWidget-border);\n\tbackground-color: var(--vscode-editorSuggestWidget-background);\n}\n\n.monaco-editor.hc-black .suggest-widget,\n.monaco-editor.hc-black .suggest-details,\n.monaco-editor.hc-light .suggest-widget,\n.monaco-editor.hc-light .suggest-details {\n\tborder-width: 2px;\n}\n\n/* Styles for status bar part */\n\n\n.monaco-editor .suggest-widget .suggest-status-bar {\n\tbox-sizing: border-box;\n\tdisplay: none;\n\tflex-flow: row nowrap;\n\tjustify-content: space-between;\n\twidth: 100%;\n\tfont-size: 80%;\n\tpadding: 0 4px 0 4px;\n\tborder-top: 1px solid var(--vscode-editorSuggestWidget-border);\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar {\n\tdisplay: flex;\n}\n\n.monaco-editor .suggest-widget .suggest-status-bar .left {\n\tpadding-right: 8px;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label {\n\tcolor: var(--vscode-editorSuggestWidgetStatus-foreground);\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label::after {\n\tcontent: ', ';\n\tmargin-right: 0.3em;\n}\n\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row > .contents > .main > .right > .readMore,\n.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover > .contents > .main > .right.can-expand-details > .details-label {\n\twidth: 100%;\n}\n\n/* Styles for Message element for when widget is loading or is empty */\n\n.monaco-editor .suggest-widget > .message {\n\tpadding-left: 22px;\n}\n\n/** Styles for the list element **/\n\n.monaco-editor .suggest-widget > .tree {\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list {\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n/** Styles for each row in the list element **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row {\n\tdisplay: flex;\n\t-mox-box-sizing: border-box;\n\tbox-sizing: border-box;\n\tpadding-right: 10px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 2px 2px;\n\twhite-space: nowrap;\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused {\n\tcolor: var(--vscode-editorSuggestWidget-selectedForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: var(--vscode-editorSuggestWidget-selectedIconForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents {\n\tflex: 1;\n\theight: 100%;\n\toverflow: hidden;\n\tpadding-left: 2px;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main {\n\tdisplay: flex;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: pre;\n\tjustify-content: space-between;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {\n\tdisplay: flex;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused) > .contents > .main .monaco-icon-label {\n\tcolor: var(--vscode-editorSuggestWidget-foreground);\n}\n\n.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main .monaco-highlighted-label .highlight {\n\tcolor: var(--vscode-editorSuggestWidget-highlightForeground);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main .monaco-highlighted-label .highlight {\n\tcolor: var(--vscode-editorSuggestWidget-focusHighlightForeground);\n}\n\n/** ReadMore Icon styles **/\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore::before {\n\tcolor: inherit;\n\topacity: 1;\n\tfont-size: 14px;\n\tcursor: pointer;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close {\n\tposition: absolute;\n\ttop: 6px;\n\tright: 2px;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .codicon-close:hover,\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore:hover {\n\topacity: 1;\n}\n\n/** signature, qualifier, type/details opacity **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\n\topacity: 0.7;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .signature-label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.6;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .qualifier-label {\n\tmargin-left: 12px;\n\topacity: 0.4;\n\tfont-size: 85%;\n\tline-height: initial;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\talign-self: center;\n}\n\n/** Type Info and icon next to the label in the focused completion item **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\n\tfont-size: 85%;\n\tmargin-left: 1.1em;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label > .monaco-tokenized-source {\n\tdisplay: inline;\n}\n\n/** Details: if using CompletionItem#details, show on focus **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .details-label {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused > .contents > .main > .right > .details-label {\n\tdisplay: inline;\n}\n\n/** Details: if using CompletionItemLabel#details, always show **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .right > .details-label,\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label) > .contents > .main > .right > .details-label {\n\tdisplay: inline;\n}\n\n/** Ellipsis on hover **/\n\n.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover > .contents > .main > .right.can-expand-details > .details-label {\n\twidth: calc(100% - 26px);\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left {\n\tflex-shrink: 1;\n\tflex-grow: 1;\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .left > .monaco-icon-label {\n\tflex-shrink: 0;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label) > .contents > .main > .left > .monaco-icon-label {\n\tmax-width: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .left > .monaco-icon-label {\n\tflex-shrink: 1;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right {\n\toverflow: hidden;\n\tflex-shrink: 4;\n\tmax-width: 70%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\twidth: 18px;\n\theight: 18px;\n\tvisibility: hidden;\n}\n\n/** Do NOT display ReadMore when docs is side/below **/\n\n.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row > .contents > .main > .right > .readMore {\n\tdisplay: none !important;\n}\n\n/** Do NOT display ReadMore when using plain CompletionItemLabel (details/documentation might not be resolved) **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label > .contents > .main > .right > .readMore {\n\tdisplay: none;\n}\n\n/** Focused item can show ReadMore, but can't when docs is side/below **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label > .contents > .main > .right > .readMore {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover > .contents > .main > .right > .readMore {\n\tvisibility: visible;\n}\n\n/** Styles for each row in the list **/\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated {\n\topacity: 0.66;\n\ttext-decoration: unset;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated > .monaco-icon-label-container > .monaco-icon-name-container {\n\ttext-decoration: line-through;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label::before {\n\theight: 100%;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon {\n\tdisplay: block;\n\theight: 16px;\n\twidth: 16px;\n\tmargin-left: 2px;\n\tbackground-repeat: no-repeat;\n\tbackground-size: 80%;\n\tbackground-position: center;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon {\n\tdisplay: flex;\n\talign-items: center;\n\tmargin-right: 4px;\n}\n\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,\n.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon::before {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan {\n\tmargin: 0 0 0 0.3em;\n\tborder: 0.1em solid #000;\n\twidth: 0.7em;\n\theight: 0.7em;\n\tdisplay: inline-block;\n}\n\n/** Styles for the docs of the completion item in focus **/\n\n.monaco-editor .suggest-details-container {\n\tz-index: 41;\n}\n\n.monaco-editor .suggest-details {\n\tdisplay: flex;\n\tflex-direction: column;\n\tcursor: default;\n\tcolor: var(--vscode-editorSuggestWidget-foreground);\n}\n\n.monaco-editor .suggest-details.focused {\n\tborder-color: var(--vscode-focusBorder);\n}\n\n.monaco-editor .suggest-details a {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-editor .suggest-details a:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n.monaco-editor .suggest-details code {\n\tbackground-color: var(--vscode-textCodeBlock-background);\n}\n\n.monaco-editor .suggest-details.no-docs {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element {\n\tflex: 1;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body {\n\tbox-sizing: border-box;\n\theight: 100%;\n\twidth: 100%;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .type {\n\tflex: 2;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\topacity: 0.7;\n\twhite-space: pre;\n\tmargin: 0 24px 0 0;\n\tpadding: 4px 0 12px 5px;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .header > .type.auto-wrap {\n\twhite-space: normal;\n\tword-break: break-all;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs {\n\tmargin: 0;\n\tpadding: 4px 5px;\n\twhite-space: pre-wrap;\n}\n\n.monaco-editor .suggest-details.no-type > .monaco-scrollable-element > .body > .docs {\n\tmargin-right: 24px;\n\toverflow: hidden;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs {\n\tpadding: 0;\n\twhite-space: initial;\n\tmin-height: calc(1rem + 8px);\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div,\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > span:not(:empty) {\n\tpadding: 4px 5px;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs > div > p:last-child {\n\tmargin-bottom: 0;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs .monaco-tokenized-source {\n\twhite-space: pre;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs .code {\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > .docs.markdown-docs .codicon {\n\tvertical-align: sub;\n}\n\n.monaco-editor .suggest-details > .monaco-scrollable-element > .body > p:empty {\n\tdisplay: none;\n}\n\n.monaco-editor .suggest-details code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-editor .suggest-details ul {\n\tpadding-left: 20px;\n}\n\n.monaco-editor .suggest-details ol {\n\tpadding-left: 20px;\n}\n\n.monaco-editor .suggest-details p code {\n\tfont-family: var(--monaco-monospace-font);\n}\n",""]),t.Z=r},6865:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codicon.codicon-symbol-array,\n.monaco-workbench .codicon.codicon-symbol-array { color: var(--vscode-symbolIcon-arrayForeground); }\n.monaco-editor .codicon.codicon-symbol-boolean,\n.monaco-workbench .codicon.codicon-symbol-boolean { color: var(--vscode-symbolIcon-booleanForeground); }\n.monaco-editor .codicon.codicon-symbol-class,\n.monaco-workbench .codicon.codicon-symbol-class { color: var(--vscode-symbolIcon-classForeground); }\n.monaco-editor .codicon.codicon-symbol-method,\n.monaco-workbench .codicon.codicon-symbol-method { color: var(--vscode-symbolIcon-methodForeground); }\n.monaco-editor .codicon.codicon-symbol-color,\n.monaco-workbench .codicon.codicon-symbol-color { color: var(--vscode-symbolIcon-colorForeground); }\n.monaco-editor .codicon.codicon-symbol-constant,\n.monaco-workbench .codicon.codicon-symbol-constant { color: var(--vscode-symbolIcon-constantForeground); }\n.monaco-editor .codicon.codicon-symbol-constructor,\n.monaco-workbench .codicon.codicon-symbol-constructor { color: var(--vscode-symbolIcon-constructorForeground); }\n.monaco-editor .codicon.codicon-symbol-value,\n.monaco-workbench .codicon.codicon-symbol-value,\n.monaco-editor .codicon.codicon-symbol-enum,\n.monaco-workbench .codicon.codicon-symbol-enum { color: var(--vscode-symbolIcon-enumeratorForeground); }\n.monaco-editor .codicon.codicon-symbol-enum-member,\n.monaco-workbench .codicon.codicon-symbol-enum-member { color: var(--vscode-symbolIcon-enumeratorMemberForeground); }\n.monaco-editor .codicon.codicon-symbol-event,\n.monaco-workbench .codicon.codicon-symbol-event { color: var(--vscode-symbolIcon-eventForeground); }\n.monaco-editor .codicon.codicon-symbol-field,\n.monaco-workbench .codicon.codicon-symbol-field { color: var(--vscode-symbolIcon-fieldForeground); }\n.monaco-editor .codicon.codicon-symbol-file,\n.monaco-workbench .codicon.codicon-symbol-file { color: var(--vscode-symbolIcon-fileForeground); }\n.monaco-editor .codicon.codicon-symbol-folder,\n.monaco-workbench .codicon.codicon-symbol-folder { color: var(--vscode-symbolIcon-folderForeground); }\n.monaco-editor .codicon.codicon-symbol-function,\n.monaco-workbench .codicon.codicon-symbol-function { color: var(--vscode-symbolIcon-functionForeground); }\n.monaco-editor .codicon.codicon-symbol-interface,\n.monaco-workbench .codicon.codicon-symbol-interface { color: var(--vscode-symbolIcon-interfaceForeground); }\n.monaco-editor .codicon.codicon-symbol-key,\n.monaco-workbench .codicon.codicon-symbol-key { color: var(--vscode-symbolIcon-keyForeground); }\n.monaco-editor .codicon.codicon-symbol-keyword,\n.monaco-workbench .codicon.codicon-symbol-keyword { color: var(--vscode-symbolIcon-keywordForeground); }\n.monaco-editor .codicon.codicon-symbol-module,\n.monaco-workbench .codicon.codicon-symbol-module { color: var(--vscode-symbolIcon-moduleForeground); }\n.monaco-editor .codicon.codicon-symbol-namespace,\n.monaco-workbench .codicon.codicon-symbol-namespace { color: var(--vscode-symbolIcon-namespaceForeground); }\n.monaco-editor .codicon.codicon-symbol-null,\n.monaco-workbench .codicon.codicon-symbol-null { color: var(--vscode-symbolIcon-nullForeground); }\n.monaco-editor .codicon.codicon-symbol-number,\n.monaco-workbench .codicon.codicon-symbol-number { color: var(--vscode-symbolIcon-numberForeground); }\n.monaco-editor .codicon.codicon-symbol-object,\n.monaco-workbench .codicon.codicon-symbol-object { color: var(--vscode-symbolIcon-objectForeground); }\n.monaco-editor .codicon.codicon-symbol-operator,\n.monaco-workbench .codicon.codicon-symbol-operator { color: var(--vscode-symbolIcon-operatorForeground); }\n.monaco-editor .codicon.codicon-symbol-package,\n.monaco-workbench .codicon.codicon-symbol-package { color: var(--vscode-symbolIcon-packageForeground); }\n.monaco-editor .codicon.codicon-symbol-property,\n.monaco-workbench .codicon.codicon-symbol-property { color: var(--vscode-symbolIcon-propertyForeground); }\n.monaco-editor .codicon.codicon-symbol-reference,\n.monaco-workbench .codicon.codicon-symbol-reference { color: var(--vscode-symbolIcon-referenceForeground); }\n.monaco-editor .codicon.codicon-symbol-snippet,\n.monaco-workbench .codicon.codicon-symbol-snippet { color: var(--vscode-symbolIcon-snippetForeground); }\n.monaco-editor .codicon.codicon-symbol-string,\n.monaco-workbench .codicon.codicon-symbol-string { color: var(--vscode-symbolIcon-stringForeground); }\n.monaco-editor .codicon.codicon-symbol-struct,\n.monaco-workbench .codicon.codicon-symbol-struct { color: var(--vscode-symbolIcon-structForeground); }\n.monaco-editor .codicon.codicon-symbol-text,\n.monaco-workbench .codicon.codicon-symbol-text { color: var(--vscode-symbolIcon-textForeground); }\n.monaco-editor .codicon.codicon-symbol-type-parameter,\n.monaco-workbench .codicon.codicon-symbol-type-parameter { color: var(--vscode-symbolIcon-typeParameterForeground); }\n.monaco-editor .codicon.codicon-symbol-unit,\n.monaco-workbench .codicon.codicon-symbol-unit { color: var(--vscode-symbolIcon-unitForeground); }\n.monaco-editor .codicon.codicon-symbol-variable,\n.monaco-workbench .codicon.codicon-symbol-variable { color: var(--vscode-symbolIcon-variableForeground); }\n",""]),t.Z=r},5385:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.editor-banner {\n\tbox-sizing: border-box;\n\tcursor: default;\n\twidth: 100%;\n\tfont-size: 12px;\n\tdisplay: flex;\n\toverflow: visible;\n\n\theight: 26px;\n\n\tbackground: var(--vscode-banner-background);\n}\n\n\n.editor-banner .icon-container {\n\tdisplay: flex;\n\tflex-shrink: 0;\n\talign-items: center;\n\tpadding: 0 6px 0 10px;\n}\n\n.editor-banner .icon-container.custom-icon {\n\tbackground-repeat: no-repeat;\n\tbackground-position: center center;\n\tbackground-size: 16px;\n\twidth: 16px;\n\tpadding: 0;\n\tmargin: 0 6px 0 10px;\n}\n\n.editor-banner .message-container {\n\tdisplay: flex;\n\talign-items: center;\n\tline-height: 26px;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n\n.editor-banner .message-container p {\n\tmargin-block-start: 0;\n\tmargin-block-end: 0;\n}\n\n.editor-banner .message-actions-container {\n\tflex-grow: 1;\n\tflex-shrink: 0;\n\tline-height: 26px;\n\tmargin: 0 4px;\n}\n\n.editor-banner .message-actions-container a.monaco-button {\n\twidth: inherit;\n\tmargin: 2px 8px;\n\tpadding: 0px 12px;\n}\n\n.editor-banner .message-actions-container a {\n\tpadding: 3px;\n\tmargin-left: 12px;\n\ttext-decoration: underline;\n}\n\n.editor-banner .action-container {\n\tpadding: 0 10px 0 6px;\n}\n\n.editor-banner {\n\tbackground-color: var(--vscode-banner-background);\n}\n\n.editor-banner,\n.editor-banner .action-container .codicon,\n.editor-banner .message-actions-container .monaco-link {\n\tcolor: var(--vscode-banner-foreground);\n}\n\n.editor-banner .icon-container .codicon {\n\tcolor: var(--vscode-banner-iconForeground);\n}\n",""]),t.Z=r},2316:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .unicode-highlight {\n\tborder: 1px solid var(--vscode-editorUnicodeHighlight-border);\n\tbackground-color: var(--vscode-editorUnicodeHighlight-background);\n\tbox-sizing: border-box;\n}\n",""]),t.Z=r},6174:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .focused .selectionHighlight {\n\tbackground-color: var(--vscode-editor-selectionHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-selectionHighlightBorder);\n}\n.monaco-editor.hc-black .focused .selectionHighlight, .monaco-editor.hc-light .focused .selectionHighlight {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlight {\n\tbackground-color: var(--vscode-editor-wordHighlightBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightBorder);\n}\n.monaco-editor.hc-black .wordHighlight, .monaco-editor.hc-light .wordHighlight {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlightStrong {\n\tbackground-color: var(--vscode-editor-wordHighlightStrongBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightStrongBorder);\n}\n.monaco-editor.hc-black .wordHighlightStrong, .monaco-editor.hc-light .wordHighlightStrong {\n\tborder-style: dotted;\n}\n\n.monaco-editor .wordHighlightText {\n\tbackground-color: var(--vscode-editor-wordHighlightTextBackground);\n\tbox-sizing: border-box;\n\tborder: 1px solid var(--vscode-editor-wordHighlightTextBorder);\n}\n.monaco-editor.hc-black .wordHighlightText, .monaco-editor.hc-light .wordHighlightText {\n\tborder-style: dotted;\n}\n",""]),t.Z=r},5798:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .zone-widget {\n\tposition: absolute;\n\tz-index: 10;\n}\n\n\n.monaco-editor .zone-widget .zone-widget-container {\n\tborder-top-style: solid;\n\tborder-bottom-style: solid;\n\tborder-top-width: 0;\n\tborder-bottom-width: 0;\n\tposition: relative;\n}\n",""]),t.Z=r},5795:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s),a=i(8601),l=i.n(a),d=new URL(i(6161),i.b),c=new URL(i(1096),i.b),h=r()(o()),u=l()(d),g=l()(c);h.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .iPadShowKeyboard {\n\twidth: 58px;\n\tmin-width: 0;\n\theight: 36px;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\tresize: none;\n\toverflow: hidden;\n\tbackground: url("+u+") center center no-repeat;\n\tborder: 4px solid #F6F6F6;\n\tborder-radius: 4px;\n}\n\n.monaco-editor.vs-dark .iPadShowKeyboard {\n\tbackground: url("+g+") center center no-repeat;\n\tborder: 4px solid #252526;\n}",""]),t.Z=h},6907:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .tokens-inspect-widget {\n\tz-index: 50;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\tpadding: 10px;\n\tcolor: var(--vscode-editorHoverWidget-foreground);\n\tbackground-color: var(--vscode-editorHoverWidget-background);\n\tborder: 1px solid var(--vscode-editorHoverWidget-border);\n}\n.monaco-editor.hc-black .tokens-inspect-widget, .monaco-editor.hc-light .tokens-inspect-widget {\n\tborder-width: 2px;\n}\n\n.monaco-editor .tokens-inspect-widget .tokens-inspect-separator {\n\theight: 1px;\n\tborder: 0;\n\tbackground-color: var(--vscode-editorHoverWidget-border);\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-length {\n\tfont-weight: normal;\n\tfont-size: 60%;\n\tfloat: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-table {\n\twidth: 100%;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-metadata-value {\n\tfont-family: var(--monaco-monospace-font);\n\ttext-align: right;\n}\n\n.monaco-editor .tokens-inspect-widget .tm-token-type {\n\tfont-family: var(--monaco-monospace-font);\n}\n",""]),t.Z=r},3455:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tfont-size: 13px;\n}\n\n.quick-input-widget .monaco-highlighted-label .highlight,\n.quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0066BF;\n}\n\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\n\tcolor: #9DDDFF;\n}\n\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0097fb;\n}\n\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #F38518;\n}\n\n.hc-light .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-light .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0F4A85;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(221, 221, 221, 0.4);\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\n\tcolor: #555;\n}\n\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px rgb(111, 195, 223);\n\tbox-shadow: none;\n\tcolor: #fff;\n}\n\n.hc-light .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px #0F4A85;\n\tbox-shadow: none;\n\tcolor: #292929;\n}\n\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(128, 128, 128, 0.17);\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\n\tcolor: #ccc;\n}\n",""]),t.Z=r},953:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n/* Default standalone editor fonts */\n.monaco-editor {\n\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n.monaco-editor.hc-light .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\tstroke-width: 1.2px;\n}\n\n.monaco-hover p {\n\tmargin: 0;\n}\n\n/* See https://github.com/microsoft/monaco-editor/issues/2168#issuecomment-780078600 */\n.monaco-aria-container {\n\tposition: absolute !important;\n\ttop: 0; /* avoid being placed underneath a sibling element */\n\theight: 1px;\n\twidth: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n}\n\n.monaco-editor, .monaco-diff-editor .synthetic-focus,\n.monaco-editor, .monaco-diff-editor [tabindex="0"]:focus,\n.monaco-editor, .monaco-diff-editor [tabindex="-1"]:focus,\n.monaco-editor, .monaco-diff-editor button:focus,\n.monaco-editor, .monaco-diff-editor input[type=button]:focus,\n.monaco-editor, .monaco-diff-editor input[type=checkbox]:focus,\n.monaco-editor, .monaco-diff-editor input[type=search]:focus,\n.monaco-editor, .monaco-diff-editor input[type=text]:focus,\n.monaco-editor, .monaco-diff-editor select:focus,\n.monaco-editor, .monaco-diff-editor textarea:focus {\n\toutline-width: 1px;\n\toutline-style: solid;\n\toutline-offset: -1px;\n\toutline-color: var(--vscode-focusBorder);\n\topacity: 1\n}\n',""]),t.Z=r},2749:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,'/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.action-widget {\n\tfont-size: 13px;\n\tborder-radius: 0;\n\tmin-width: 160px;\n\tmax-width: 80vw;\n\tz-index: 40;\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid var(--vscode-editorWidget-border) !important;\n\tborder-radius: 2px;\n\tbackground-color: var(--vscode-editorWidget-background);\n\tcolor: var(--vscode-editorWidget-foreground);\n}\n\n.context-view-block {\n\tposition: fixed;\n\tcursor: initial;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: -1;\n}\n\n.context-view-pointerBlock {\n\tposition: fixed;\n\tcursor: initial;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 2;\n}\n\n.action-widget .monaco-list {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tborder: none !important;\n\tborder-width: 0 !important;\n}\n\n.action-widget .monaco-list:focus:before {\n\toutline: 0 !important;\n}\n\n.action-widget .monaco-list .monaco-scrollable-element {\n\toverflow: visible;\n}\n\n/** Styles for each row in the list element **/\n.action-widget .monaco-list .monaco-list-row {\n\tpadding: 0 10px;\n\twhite-space: nowrap;\n\tcursor: pointer;\n\ttouch-action: none;\n\twidth: 100%;\n}\n\n.action-widget .monaco-list .monaco-list-row.action.focused:not(.option-disabled) {\n\tbackground-color: var(--vscode-quickInputList-focusBackground) !important;\n\tcolor: var(--vscode-quickInputList-focusForeground);\n\toutline: 1px solid var(--vscode-menu-selectionBorder, transparent);\n\toutline-offset: -1px;\n}\n\n.action-widget .monaco-list-row.group-header {\n\tcolor: var(--vscode-descriptionForeground) !important;\n\tfont-weight: 600;\n}\n\n.action-widget .monaco-list .group-header,\n.action-widget .monaco-list .option-disabled,\n.action-widget .monaco-list .option-disabled:before,\n.action-widget .monaco-list .option-disabled .focused,\n.action-widget .monaco-list .option-disabled .focused:before {\n\tcursor: default !important;\n\t-webkit-touch-callout: none;\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tbackground-color: transparent !important;\n\toutline: 0 solid !important;\n}\n\n.action-widget .monaco-list-row.action {\n\tdisplay: flex;\n\tgap: 6px;\n\talign-items: center;\n}\n\n.action-widget .monaco-list-row.action.option-disabled,\n.action-widget .monaco-list:focus .monaco-list-row.focused.action.option-disabled,\n.action-widget .monaco-list-row.action.option-disabled .codicon,\n.action-widget .monaco-list:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused).option-disabled {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n\n.action-widget .monaco-list-row.action:not(.option-disabled) .codicon {\n\tcolor: inherit;\n}\n\n.action-widget .monaco-list-row.action .title {\n\tflex: 1;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.action-widget .monaco-list-row.action .monaco-keybinding > .monaco-keybinding-key {\n\t\tbackground-color: var(--vscode-keybindingLabel-background);\n\t\tcolor: var(--vscode-keybindingLabel-foreground);\n\t\tborder-style: solid;\n\t\tborder-width: 1px;\n\t\tborder-radius: 3px;\n\t\tborder-color: var(--vscode-keybindingLabel-border);\n\t\tborder-bottom-color: var(--vscode-keybindingLabel-bottomBorder);\n\t\tbox-shadow: inset 0 -1px 0 var(--vscode-widget-shadow);\n}\n\n/* Action bar */\n\n.action-widget .action-widget-action-bar {\n\tbackground-color: var(--vscode-editorHoverWidget-statusBarBackground);\n\tborder-top: 1px solid var(--vscode-editorHoverWidget-border);\n}\n\n.action-widget .action-widget-action-bar::before {\n\tdisplay: block;\n\tcontent: "";\n\twidth: 100%;\n}\n\n.action-widget .action-widget-action-bar .actions-container {\n\tpadding: 0 8px;\n}\n\n.action-widget-action-bar .action-label {\n\tcolor: var(--vscode-textLink-activeForeground);\n\tfont-size: 12px;\n\tline-height: 22px;\n\tpadding: 0;\n\tpointer-events: all;\n}\n\n.action-widget-action-bar .action-item {\n\tmargin-right: 16px;\n\tpointer-events: none;\n}\n\n.action-widget-action-bar .action-label:hover {\n\tbackground-color: transparent !important;\n}\n\n.monaco-action-bar .actions-container.highlight-toggled .action-label.checked {\n\t/* The important gives this rule precedence over the hover rule. */\n\tbackground: var(--vscode-actionBar-toggledBackground) !important;\n}\n',""]),t.Z=r},5498:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar .action-item.menu-entry .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-dropdown-with-default {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-default > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-dropdown-with-default:hover {\n\tbackground-color: var(--vscode-toolbar-hoverBackground);\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",""]),t.Z=r},5464:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-link {\n\tcolor: var(--vscode-textLink-foreground);\n}\n\n.monaco-link:hover {\n\tcolor: var(--vscode-textLink-activeForeground);\n}\n\n",""]),t.Z=r},8044:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tposition: absolute;\n\twidth: 600px;\n\tz-index: 2550;\n\tleft: 50%;\n\tmargin-left: -300px;\n\t-webkit-app-region: no-drag;\n\tborder-radius: 6px;\n}\n\n.quick-input-titlebar {\n\tdisplay: flex;\n\talign-items: center;\n\tborder-radius: inherit;\n}\n\n.quick-input-left-action-bar {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\tflex: 1;\n}\n\n.quick-input-title {\n\tpadding: 3px 0px;\n\ttext-align: center;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-right-action-bar {\n\tdisplay: flex;\n\tmargin-right: 4px;\n\tflex: 1;\n}\n\n.quick-input-right-action-bar > .actions-container {\n\tjustify-content: flex-end;\n}\n\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n\tpadding: 2px;\n}\n\n.quick-input-description {\n\tmargin: 6px 6px 6px 11px;\n}\n\n.quick-input-header .quick-input-description {\n\tmargin: 4px 2px;\n\tflex: 1;\n}\n\n.quick-input-header {\n\tdisplay: flex;\n\tpadding: 8px 6px 2px 6px;\n}\n\n.quick-input-widget.hidden-input .quick-input-header {\n\t/* reduce margins and paddings when input box hidden */\n\tpadding: 0;\n\tmargin-bottom: 0;\n}\n\n.quick-input-and-message {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-grow: 1;\n\tmin-width: 0;\n\tposition: relative;\n}\n\n.quick-input-check-all {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-filter {\n\tflex-grow: 1;\n\tdisplay: flex;\n\tposition: relative;\n}\n\n.quick-input-box {\n\tflex-grow: 1;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-box,\n.quick-input-widget.show-checkboxes .quick-input-message {\n\tmargin-left: 5px;\n}\n\n.quick-input-visible-count {\n\tposition: absolute;\n\tleft: -10000px;\n}\n\n.quick-input-count {\n\talign-self: center;\n\tposition: absolute;\n\tright: 4px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-count .monaco-count-badge {\n\tvertical-align: middle;\n\tpadding: 2px 4px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n\n.quick-input-action {\n\tmargin-left: 6px;\n}\n\n.quick-input-action .monaco-text-button {\n\tfont-size: 11px;\n\tpadding: 0 6px;\n\tdisplay: flex;\n\theight: 25px;\n\talign-items: center;\n}\n\n.quick-input-message {\n\tmargin-top: -1px;\n\tpadding: 5px;\n\toverflow-wrap: break-word;\n}\n\n.quick-input-message > .codicon {\n\tmargin: 0 0.2em;\n\tvertical-align: text-bottom;\n}\n\n/* Links in descriptions & validations */\n.quick-input-message a {\n\tcolor: inherit;\n}\n\n.quick-input-progress.monaco-progress-container {\n\tposition: relative;\n}\n\n.quick-input-list {\n\tline-height: 22px;\n}\n\n.quick-input-widget.hidden-input .quick-input-list {\n\tmargin-top: 4px; /* reduce margins when input box hidden */\n\tpadding-bottom: 4px;\n}\n\n.quick-input-list .monaco-list {\n\toverflow: hidden;\n\tmax-height: calc(20 * 22px);\n\tpadding-bottom: 5px;\n}\n\n.quick-input-list .monaco-scrollable-element {\n\tpadding: 0px 5px;\n}\n\n.quick-input-list .quick-input-list-entry {\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tpadding: 0 6px;\n}\n\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-width: 1px;\n\tborder-top-style: solid;\n}\n\n.quick-input-list .monaco-list-row {\n\tborder-radius: 3px;\n}\n\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-style: none;\n}\n\n.quick-input-list .quick-input-list-label {\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tflex: 1;\n}\n\n.quick-input-list .quick-input-list-checkbox {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-list .quick-input-list-icon {\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.quick-input-list .quick-input-list-rows {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tflex: 1;\n\tmargin-left: 5px;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\n\tmargin-left: 10px;\n}\n\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\n\tdisplay: none;\n}\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\n\tdisplay: inline;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\n\tflex: 1; /* make sure the icon label grows within the row */\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\n\tvertical-align: text-bottom;\n}\n\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label > span {\n\topacity: 1;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\n}\n\n.quick-input-list .quick-input-list-label-meta {\n\topacity: 0.7;\n\tline-height: normal;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n/* preserve list-like styling instead of tree-like styling */\n.quick-input-list .monaco-list .monaco-list-row .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n\tbackground-color: unset;\n\tcolor: var(--vscode-list-highlightForeground) !important;\n}\n\n/* preserve list-like styling instead of tree-like styling */\n.quick-input-list .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight {\n\tcolor: var(--vscode-list-focusHighlightForeground) !important;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\n\tmargin-right: 4px; /* separate from keybindings or actions */\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tdisplay: flex;\n\tflex: 0;\n\toverflow: visible;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\n\t/*\n\t * By default, actions in the quick input action bar are hidden\n\t * until hovered over them or selected.\n\t */\n\tdisplay: none;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\n\tmargin-right: 4px;\n\tpadding: 0px 2px 2px 2px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-top: 1px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-right: 4px; /* separate from scrollbar */\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\n.quick-input-list .quick-input-list-entry.focus-inside .quick-input-list-entry-action-bar .action-label,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,\n.quick-input-list .monaco-list-row.passive-focused .quick-input-list-entry-action-bar .action-label {\n\tdisplay: flex;\n}\n\n/* focused items in quick pick */\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\n\tcolor: inherit\n}\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\n\tbackground: none;\n}\n\n.quick-input-list .quick-input-list-separator-as-item {\n\tpadding: 4px 6px;\n\tfont-size: 12px;\n}\n\n/* Quick input separators as full-row item */\n.quick-input-list .quick-input-list-separator-as-item .label-name {\n\tfont-weight: 600;\n}\n\n.quick-input-list .quick-input-list-separator-as-item .label-description {\n\t/* Override default description opacity so we don't have a contrast ratio issue. */\n\topacity: 1 !important;\n}\n\n/* Hide border when the item becomes the sticky one */\n.quick-input-list .monaco-tree-sticky-row .quick-input-list-entry.quick-input-list-separator-as-item.quick-input-list-separator-border {\n\tborder-top-style: none;\n}\n\n/* Give sticky row the same padding as the scrollable list */\n.quick-input-list .monaco-tree-sticky-row {\n\tpadding: 0 5px;\n}\n\n/* Hide the twistie containers so that there isn't blank indent */\n.quick-input-list .monaco-tl-twistie {\n\tdisplay: none !important;\n}\n",""]),t.Z=r},6199:function(e,t,i){var n=i(3594),o=i.n(n),s=i(3528),r=i.n(s)()(o());r.push([e.id,"/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .zone-widget .codicon.codicon-error,\n.markers-panel .marker-icon.error, .markers-panel .marker-icon .codicon.codicon-error,\n.text-search-provider-messages .providerMessage .codicon.codicon-error,\n.extensions-viewlet > .extensions .codicon.codicon-error,\n.extension-editor .codicon.codicon-error,\n.preferences-editor .codicon.codicon-error {\n\tcolor: var(--vscode-problemsErrorIcon-foreground);\n}\n\n.monaco-editor .zone-widget .codicon.codicon-warning,\n.markers-panel .marker-icon.warning, .markers-panel .marker-icon .codicon.codicon-warning,\n.text-search-provider-messages .providerMessage .codicon.codicon-warning,\n.extensions-viewlet > .extensions .codicon.codicon-warning,\n.extension-editor .codicon.codicon-warning,\n.preferences-editor .codicon.codicon-warning {\n\tcolor: var(--vscode-problemsWarningIcon-foreground);\n}\n\n.monaco-editor .zone-widget .codicon.codicon-info,\n.markers-panel .marker-icon.info, .markers-panel .marker-icon .codicon.codicon-info,\n.text-search-provider-messages .providerMessage .codicon.codicon-info,\n.extensions-viewlet > .extensions .codicon.codicon-info,\n.extension-editor .codicon.codicon-info,\n.preferences-editor .codicon.codicon-info {\n\tcolor: var(--vscode-problemsInfoIcon-foreground);\n}\n",""]),t.Z=r},3528:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,n,o,s){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(n)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},8601:function(e){e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},3594:function(e){e.exports=function(e){return e[1]}},7448:function(e,t,i){i.r(t),i.d(t,{CancellationTokenSource:function(){return Uae},Emitter:function(){return Kae},KeyCode:function(){return jae},KeyMod:function(){return qae},MarkerSeverity:function(){return Qae},MarkerTag:function(){return Xae},Position:function(){return $ae},Range:function(){return Gae},Selection:function(){return Zae},SelectionDirection:function(){return Yae},Token:function(){return ele},Uri:function(){return Jae},default:function(){return ede},editor:function(){return tle},languages:function(){return ile}});var n={};i.r(n),i.d(n,{CancellationTokenSource:function(){return Uae},Emitter:function(){return Kae},KeyCode:function(){return jae},KeyMod:function(){return qae},MarkerSeverity:function(){return Qae},MarkerTag:function(){return Xae},Position:function(){return $ae},Range:function(){return Gae},Selection:function(){return Zae},SelectionDirection:function(){return Yae},Token:function(){return ele},Uri:function(){return Jae},editor:function(){return tle},languages:function(){return ile}});var o={};i.r(o),i.d(o,{CancellationTokenSource:function(){return Uae},Emitter:function(){return Kae},KeyCode:function(){return jae},KeyMod:function(){return qae},MarkerSeverity:function(){return Qae},MarkerTag:function(){return Xae},Position:function(){return $ae},Range:function(){return Gae},Selection:function(){return Zae},SelectionDirection:function(){return Yae},Token:function(){return ele},Uri:function(){return Jae},default:function(){return ede},editor:function(){return tle},languages:function(){return ile}});const s=window;class r{constructor(){this.mapWindowIdToZoomFactor=new Map}getZoomFactor(e){var t;return null!==(t=this.mapWindowIdToZoomFactor.get(this.getWindowId(e)))&&void 0!==t?t:1}getWindowId(e){return e.vscodeWindowId}}function a(e,t,i){"string"==typeof t&&(t=e.matchMedia(t)),t.addEventListener("change",i)}r.INSTANCE=new r;const l=navigator.userAgent,d=l.indexOf("Firefox")>=0,c=l.indexOf("AppleWebKit")>=0,h=l.indexOf("Chrome")>=0,u=!h&&l.indexOf("Safari")>=0,g=!h&&!u&&c,p=(l.indexOf("Electron/"),l.indexOf("Android")>=0);let m=!1;if("function"==typeof s.matchMedia){const e=s.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=s.matchMedia("(display-mode: fullscreen)");m=e.matches,a(s,e,(({matches:e})=>{m&&t.matches||(m=e)}))}let f="undefined"!=typeof document&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function _(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,((e,i)=>{const n=i[0],o=t[n];let s=e;return"string"==typeof o?s=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(s=String(o)),s})),f&&(i="["+i.replace(/[aouei]/g,"$&$&")+"]"),i}function v(e,t,...i){return _(t,i)}function b(e,t,...i){const n=_(t,i);return{value:n,original:n}}var w,C;const y="en";let S,k,x=!1,L=!1,D=!1,E=!1,N=!1,I=!1,T=!1,M=!1,A=!1,R=!1,P=y,O=null,F=null;const B=globalThis;let W;void 0!==B.vscode&&void 0!==B.vscode.process?W=B.vscode.process:"undefined"!=typeof process&&"string"==typeof(null===(w=null===process||void 0===process?void 0:process.versions)||void 0===w?void 0:w.node)&&(W=process);const V="string"==typeof(null===(C=null==W?void 0:W.versions)||void 0===C?void 0:C.electron),H=V&&"renderer"===(null==W?void 0:W.type);if("object"==typeof W){x="win32"===W.platform,L="darwin"===W.platform,D="linux"===W.platform,E=D&&!!W.env.SNAP&&!!W.env.SNAP_REVISION,T=V,A=!!W.env.CI||!!W.env.BUILD_ARTIFACTSTAGINGDIRECTORY,S=y,P=y;const e=W.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];S=t.locale,O=t.osLocale,P=i||y,F=t._translationsConfigFile}catch(e){}N=!0}else"object"!=typeof navigator||H?console.error("Unable to resolve platform."):(k=navigator.userAgent,x=k.indexOf("Windows")>=0,L=k.indexOf("Macintosh")>=0,M=(k.indexOf("Macintosh")>=0||k.indexOf("iPad")>=0||k.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,D=k.indexOf("Linux")>=0,R=(null==k?void 0:k.indexOf("Mobi"))>=0,I=!0,S=void v(0,"_")||y,P=S,O=navigator.language);let z=0;L?z=1:x?z=3:D&&(z=2);const U=x,K=L,j=D,q=N,$=I,G=I&&"function"==typeof B.importScripts?B.origin:void 0,Z=M,Y=R,Q=k,X=P,J="function"==typeof B.postMessage&&!B.importScripts,ee=(()=>{if(J){const e=[];B.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),B.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),te=L||M?2:x?1:3;let ie=!0,ne=!1;function oe(){if(!ne){ne=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);ie=513===t[0]}return ie}const se=!!(Q&&Q.indexOf("Chrome")>=0),re=!!(Q&&Q.indexOf("Firefox")>=0),ae=!!(!se&&Q&&Q.indexOf("Safari")>=0),le=!!(Q&&Q.indexOf("Edg/")>=0),de=!!(Q&&Q.indexOf("Android")>=0),ce=(q||document.queryCommandSupported&&document.queryCommandSupported("copy")||navigator&&navigator.clipboard&&navigator.clipboard.writeText,q||navigator&&navigator.clipboard&&navigator.clipboard.readText,q||m||navigator.keyboard,"ontouchstart"in s||navigator.maxTouchPoints,s.PointerEvent&&("ontouchstart"in s||navigator.maxTouchPoints>0));class he{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const ue=new he,ge=new he,pe=new he,me=new Array(230),fe={},_e=[],ve=Object.create(null),be=Object.create(null),we=[],Ce=[];for(let e=0;e<=193;e++)we[e]=-1;for(let e=0;e<=132;e++)Ce[e]=-1;var ye;function Se(e,t){return(e|(65535&t)<<16>>>0)>>>0}!function(){const e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],i=[],n=[];for(const e of t){const[t,o,s,r,a,l,d,c,h]=e;if(n[o]||(n[o]=!0,_e[o]=s,ve[s]=o,be[s.toLowerCase()]=o,t&&(we[o]=r,0!==r&&3!==r&&5!==r&&4!==r&&6!==r&&57!==r&&(Ce[r]=o))),!i[r]){if(i[r]=!0,!a)throw new Error(`String representation missing for key code ${r} around scan code ${s}`);ue.define(r,a),ge.define(r,c||a),pe.define(r,h||c||a)}l&&(me[l]=r),d&&(fe[d]=r)}Ce[3]=46}(),function(e){e.toString=function(e){return ue.keyCodeToStr(e)},e.fromString=function(e){return ue.strToKeyCode(e)},e.toUserSettingsUS=function(e){return ge.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return pe.keyCodeToStr(e)},e.fromUserSettings=function(e){return ge.strToKeyCode(e)||pe.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=98&&e<=113)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return ue.keyCodeToStr(e)}}(ye||(ye={}));const ke=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(Re.isErrorNoTelemetry(e))throw new Re(e.message+"\n\n"+e.stack);throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function xe(e){Ne(e)||ke.onUnexpectedError(e)}function Le(e){Ne(e)||ke.onUnexpectedExternalError(e)}function De(e){if(e instanceof Error){const{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack,noTelemetry:Re.isErrorNoTelemetry(e)}}return e}const Ee="Canceled";function Ne(e){return e instanceof Ie||e instanceof Error&&e.name===Ee&&e.message===Ee}class Ie extends Error{constructor(){super(Ee),this.name=this.message}}function Te(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function Me(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class Ae extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}class Re extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Re)return e;const t=new Re;return t.message=e.message,t.stack=e.stack,t}static isErrorNoTelemetry(e){return"CodeExpectedError"===e.name}}class Pe extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,Pe.prototype)}}function Oe(e,t){if("number"==typeof e){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new We(0!==n?[Fe(i,t),Fe(n,t)]:[Fe(i,t)])}{const i=[];for(let n=0;n=0;t--)yield e[t]},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)yield*t},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function st(...e){const t=rt((()=>ot(e)));return function(e,t){if(Xe)for(const i of e)Xe.setParent(i,t)}(e,t),t}function rt(e){const t=Je({dispose:Ye((()=>{et(t),e()}))});return t}class at{constructor(){this._toDispose=new Set,this._isDisposed=!1,Je(this)}dispose(){this._isDisposed||(et(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{ot(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return tt(e,this),this._isDisposed?at.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),tt(e,null))}}at.DISABLE_DISPOSED_WARNING=!1;class lt{constructor(){this._store=new at,Je(this),tt(this._store,this)}dispose(){et(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}lt.None=Object.freeze({dispose(){}});class dt{constructor(){this._isDisposed=!1,Je(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),e&&tt(e,this),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,et(this),null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}}class ct{constructor(e){this._disposable=e,this._counter=1}acquire(){return this._counter++,this}release(){return 0==--this._counter&&this._disposable.dispose(),this}}class ht{constructor(e){this.object=e}dispose(){}}class ut{constructor(){this._store=new Map,this._isDisposed=!1,Je(this)}dispose(){et(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{ot(this._store.values())}finally{this._store.clear()}}get(e){return this._store.get(e)}set(e,t,i=!1){var n;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),i||null===(n=this._store.get(e))||void 0===n||n.dispose(),this._store.set(e,t)}deleteAndDispose(e){var t;null===(t=this._store.get(e))||void 0===t||t.dispose(),this._store.delete(e)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}class gt{constructor(e){this.element=e,this.next=gt.Undefined,this.prev=gt.Undefined}}gt.Undefined=new gt(void 0);class pt{constructor(){this._first=gt.Undefined,this._last=gt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===gt.Undefined}clear(){let e=this._first;for(;e!==gt.Undefined;){const t=e.next;e.prev=gt.Undefined,e.next=gt.Undefined,e=t}this._first=gt.Undefined,this._last=gt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new gt(e);if(this._first===gt.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==gt.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==gt.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==gt.Undefined&&e.next!==gt.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===gt.Undefined&&e.next===gt.Undefined?(this._first=gt.Undefined,this._last=gt.Undefined):e.next===gt.Undefined?(this._last=this._last.prev,this._last.next=gt.Undefined):e.prev===gt.Undefined&&(this._first=this._first.next,this._first.prev=gt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==gt.Undefined;)yield e.element,e=e.next}}const mt=globalThis.performance&&"function"==typeof globalThis.performance.now;class ft{static create(e){return new ft(e)}constructor(e){this._now=mt&&!1===e?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}}var _t;!function(e){function t(e){return(t,i=null,n)=>{let o,s=!1;return o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n),s&&o.dispose(),o}}function i(e,t,i){return o(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)),i)}function n(e,t,i){return o(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)),i)}function o(e,t){let i;const n=new kt({onWillAddFirstListener(){i=e(n.fire,n)},onDidRemoveLastListener(){null==i||i.dispose()}});return null==t||t.add(n),n.event}function s(e,t,i=100,n=!1,o=!1,s,r){let a,l,d,c,h=0;const u=new kt({leakWarningThreshold:s,onWillAddFirstListener(){a=e((e=>{h++,l=t(l,e),n&&!d&&(u.fire(l),l=void 0),c=()=>{const e=l;l=void 0,d=void 0,(!n||h>1)&&u.fire(e),h=0},"number"==typeof i?(clearTimeout(d),d=setTimeout(c,i)):void 0===d&&(d=0,queueMicrotask(c))}))},onWillRemoveListener(){o&&h>0&&(null==c||c())},onDidRemoveLastListener(){c=void 0,a.dispose()}});return null==r||r.add(u),u.event}e.None=()=>lt.None,e.defer=function(e,t){return s(e,(()=>{}),0,void 0,!0,void 0,t)},e.once=t,e.map=i,e.forEach=function(e,t,i){return o(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)),i)},e.filter=n,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>{return o=st(...e.map((e=>e((e=>t.call(i,e)))))),(s=n)instanceof Array?s.push(o):s&&s.add(o),o;var o,s}},e.reduce=function(e,t,n,o){let s=n;return i(e,(e=>(s=t(s,e),s)),o)},e.debounce=s,e.accumulate=function(t,i=0,n){return e.debounce(t,((e,t)=>e?(e.push(t),e):[t]),i,void 0,!0,void 0,n)},e.latch=function(e,t=((e,t)=>e===t),i){let o,s=!0;return n(e,(e=>{const i=s||!t(e,o);return s=!1,o=e,i}),i)},e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[],n){let o=i.slice(),s=e((e=>{o?o.push(e):a.fire(e)}));n&&n.add(s);const r=()=>{null==o||o.forEach((e=>a.fire(e))),o=null},a=new kt({onWillAddFirstListener(){s||(s=e((e=>a.fire(e))),n&&n.add(s))},onDidAddFirstListener(){o&&(t?setTimeout(r):r())},onDidRemoveLastListener(){s&&s.dispose(),s=null}});return n&&n.add(a),a.event},e.chain=function(e,t){return(i,n,o)=>{const s=t(new a);return e((function(e){const t=s.evaluate(e);t!==r&&i.call(n,t)}),void 0,o)}};const r=Symbol("HaltChainable");class a{constructor(){this.steps=[]}map(e){return this.steps.push(e),this}forEach(e){return this.steps.push((t=>(e(t),t))),this}filter(e){return this.steps.push((t=>e(t)?t:r)),this}reduce(e,t){let i=t;return this.steps.push((t=>(i=e(i,t),i))),this}latch(e=((e,t)=>e===t)){let t,i=!0;return this.steps.push((n=>{const o=i||!e(n,t);return i=!1,t=n,o?n:r})),this}evaluate(e){for(const t of this.steps)if((e=t(e))===r)break;return e}}e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new kt({onWillAddFirstListener:()=>e.on(t,n),onDidRemoveLastListener:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new kt({onWillAddFirstListener:()=>e.addEventListener(t,n),onDidRemoveLastListener:()=>e.removeEventListener(t,n)});return o.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.fromPromise=function(e){const t=new kt;return e.then((e=>{t.fire(e)}),(()=>{t.fire(void 0)})).finally((()=>{t.dispose()})),t.event},e.runAndSubscribe=function(e,t,i){return t(i),e((e=>t(e)))};class l{constructor(e,t){this._observable=e,this._counter=0,this._hasChanged=!1;const i={onWillAddFirstListener:()=>{e.addObserver(this)},onDidRemoveLastListener:()=>{e.removeObserver(this)}};this.emitter=new kt(i),t&&t.add(this.emitter)}beginUpdate(e){this._counter++}handlePossibleChange(e){}handleChange(e,t){this._hasChanged=!0}endUpdate(e){this._counter--,0===this._counter&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}e.fromObservable=function(e,t){return new l(e,t).emitter.event},e.fromObservableLight=function(e){return(t,i,n)=>{let o=0,s=!1;const r={beginUpdate(){o++},endUpdate(){o--,0===o&&(e.reportChanges(),s&&(s=!1,t.call(i)))},handlePossibleChange(){},handleChange(){s=!0}};e.addObserver(r),e.reportChanges();const a={dispose(){e.removeObserver(r)}};return n instanceof at?n.add(a):Array.isArray(n)&&n.push(a),a}}}(_t||(_t={}));class vt{constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${vt._idPool++}`,vt.all.add(this)}start(e){this._stopWatch=new ft,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}vt.all=new Set,vt._idPool=0;class bt{constructor(e,t,i=Math.random().toString(18).slice(2,5)){this._errorHandler=e,this.threshold=t,this.name=i,this._warnCountdown=0}dispose(){var e;null===(e=this._stacks)||void 0===e||e.clear()}check(e,t){const i=this.threshold;if(i<=0||t{const t=this._stacks.get(e.value)||0;this._stacks.set(e.value,t-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,t=0;for(const[i,n]of this._stacks)(!e||t{var n,o,s,r,a,l,d;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const e=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(e);const t=null!==(n=this._leakageMon.getMostFrequentStack())&&void 0!==n?n:["UNKNOWN stack",-1],i=new yt(`${e}. HINT: Stack shows most frequent listener (${t[1]}-times)`,t[0]);return((null===(o=this._options)||void 0===o?void 0:o.onListenerError)||xe)(i),lt.None}if(this._disposed)return lt.None;t&&(e=e.bind(t));const c=new St(e);let h;this._leakageMon&&this._size>=Math.ceil(.2*this._leakageMon.threshold)&&(c.stack=wt.create(),h=this._leakageMon.check(c.stack,this._size+1)),this._listeners?this._listeners instanceof St?(null!==(d=this._deliveryQueue)&&void 0!==d||(this._deliveryQueue=new xt),this._listeners=[this._listeners,c]):this._listeners.push(c):(null===(r=null===(s=this._options)||void 0===s?void 0:s.onWillAddFirstListener)||void 0===r||r.call(s,this),this._listeners=c,null===(l=null===(a=this._options)||void 0===a?void 0:a.onDidAddFirstListener)||void 0===l||l.call(a,this)),this._size++;const u=rt((()=>{null==h||h(),this._removeListener(c)}));return i instanceof at?i.add(u):Array.isArray(i)&&i.push(u),u}),this._event}_removeListener(e){var t,i,n,o;if(null===(i=null===(t=this._options)||void 0===t?void 0:t.onWillRemoveListener)||void 0===i||i.call(t,this),!this._listeners)return;if(1===this._size)return this._listeners=void 0,null===(o=null===(n=this._options)||void 0===n?void 0:n.onDidRemoveLastListener)||void 0===o||o.call(n,this),void(this._size=0);const s=this._listeners,r=s.indexOf(e);if(-1===r)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,s[r]=void 0;const a=this._deliveryQueue.current===this;if(2*this._size<=s.length){let e=0;for(let t=0;t0}}class xt{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class Lt extends kt{constructor(e){super(e),this._isPaused=0,this._eventQueue=new pt,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){if(this._eventQueue.size>0){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._size&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class Dt extends Lt{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class Et extends kt{constructor(e){super(e),this._queuedEvents=[],this._mergeFn=null==e?void 0:e.merge}fire(e){this.hasListeners()&&(this._queuedEvents.push(e),1===this._queuedEvents.length&&queueMicrotask((()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach((e=>super.fire(e))),this._queuedEvents=[]})))}}class Nt{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new kt({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(e){const t={event:e,listener:null};return this.events.push(t),this.hasListeners&&this.hook(t),rt(Ye((()=>{this.hasListeners&&this.unhook(t);const e=this.events.indexOf(t);this.events.splice(e,1)})))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((e=>this.emitter.fire(e)))}unhook(e){var t;null===(t=e.listener)||void 0===t||t.dispose(),e.listener=null}dispose(){var e;this.emitter.dispose();for(const t of this.events)null===(e=t.listener)||void 0===e||e.dispose();this.events=[]}}class It{constructor(){this.data=[]}wrapEvent(e,t,i){return(n,o,s)=>e((e=>{var s;const r=this.data[this.data.length-1];if(!t)return void(r?r.buffers.push((()=>n.call(o,e))):n.call(o,e));const a=r;a?(null!==(s=a.items)&&void 0!==s||(a.items=[]),a.items.push(e),0===a.buffers.length&&r.buffers.push((()=>{var e;null!==(e=a.reducedResult)&&void 0!==e||(a.reducedResult=i?a.items.reduce(t,i):a.items.reduce(t)),n.call(o,a.reducedResult)}))):n.call(o,t(i,e))}),void 0,s)}bufferEvents(e){const t={buffers:new Array};this.data.push(t);const i=e();return this.data.pop(),t.buffers.forEach((e=>e())),i}}class Tt{constructor(){this.listening=!1,this.inputEvent=_t.None,this.inputEventListener=lt.None,this.emitter=new kt({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const Mt=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var At;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof Rt||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:_t.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Mt})}(At||(At={}));class Rt{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Mt:(this._emitter||(this._emitter=new kt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Pt{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Rt),this._token}cancel(){this._token?this._token instanceof Rt&&this._token.cancel():this._token=At.Cancelled}dispose(e=!1){var t;e&&this.cancel(),null===(t=this._parentListener)||void 0===t||t.dispose(),this._token?this._token instanceof Rt&&this._token.dispose():this._token=At.None}}function Ot(e){const t=new Pt;return e.add({dispose(){t.cancel()}}),t.token}const Ft=Symbol("MicrotaskDelay");function Bt(e){return!!e&&"function"==typeof e.then}function Wt(e){const t=new Pt,i=e(t.token),n=new Promise(((e,n)=>{const o=t.token.onCancellationRequested((()=>{o.dispose(),n(new Ie)}));Promise.resolve(i).then((i=>{o.dispose(),t.dispose(),e(i)}),(e=>{o.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel(),t.dispose()}then(e,t){return n.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return n.finally(e)}}}function Vt(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class Ht{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{if(this.queuedPromise=null,this.isDisposed)return;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}dispose(){this.isDisposed=!0}}class zt{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===Ft?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){var e;this.cancelTimeout(),this.completionPromise&&(null===(e=this.doReject)||void 0===e||e.call(this,new Ie),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class Ut{constructor(e){this.delayer=new zt(e),this.throttler=new Ht}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}function Kt(e,t){return t?new Promise(((i,n)=>{const o=setTimeout((()=>{s.dispose(),i()}),e),s=t.onCancellationRequested((()=>{clearTimeout(o),s.dispose(),n(new Ie)}))})):Wt((t=>Kt(e,t)))}function jt(e,t=0,i){const n=setTimeout((()=>{e(),i&&o.dispose()}),t),o=rt((()=>{clearTimeout(n),null==i||i.deleteAndLeak(o)}));return null==i||i.add(o),o}function qt(e,t=(e=>!!e),i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):s()))};return s()}class $t{constructor(e,t){this._isDisposed=!1,this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Pe("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){if(this._isDisposed)throw new Pe("Calling 'setIfNotSet' on a disposed TimeoutTimer");-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class Gt{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;null===(e=this.disposable)||void 0===e||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new Pe("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();const n=i.setInterval((()=>{e()}),t);this.disposable=rt((()=>{i.clearInterval(n),this.disposable=void 0}))}dispose(){this.cancel(),this.isDisposed=!0}}class Zt{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var e;null===(e=this.runner)||void 0===e||e.call(this)}}let Yt,Qt;Qt="function"!=typeof globalThis.requestIdleCallback||"function"!=typeof globalThis.cancelIdleCallback?(e,t)=>{ee((()=>{if(i)return;const e=Date.now()+15,n={didTimeout:!0,timeRemaining(){return Math.max(0,e-Date.now())}};t(Object.freeze(n))}));let i=!1;return{dispose(){i||(i=!0)}}}:(e,t,i)=>{const n=e.requestIdleCallback(t,"number"==typeof i?{timeout:i}:void 0);let o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},Yt=e=>Qt(globalThis,e);class Xt{constructor(e,t){this._didRun=!1,this._executor=()=>{try{this._value=t()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=Qt(e,(()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class Jt extends Xt{constructor(e){super(globalThis,e)}}class ei{get isRejected(){var e;return 1===(null===(e=this.outcome)||void 0===e?void 0:e.outcome)}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}complete(e){return new Promise((t=>{this.completeCallback(e),this.outcome={outcome:0,value:e},t()}))}error(e){return new Promise((t=>{this.errorCallback(e),this.outcome={outcome:1,value:e},t()}))}cancel(){return this.error(new Ie)}}var ti;!function(e){e.settled=async function(e){let t;const i=await Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i},e.withAsyncBody=function(e){return new Promise((async(t,i)=>{try{await e(t,i)}catch(e){i(e)}}))}}(ti||(ti={}));class ii{static fromArray(e){return new ii((t=>{t.emitMany(e)}))}static fromPromise(e){return new ii((async t=>{t.emitMany(await e)}))}static fromPromises(e){return new ii((async t=>{await Promise.all(e.map((async e=>t.emitOne(await e))))}))}static merge(e){return new ii((async t=>{await Promise.all(e.map((async e=>{for await(const i of e)t.emitOne(i)})))}))}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new kt,queueMicrotask((async()=>{const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))}[Symbol.asyncIterator](){let e=0;return{next:async()=>{for(;;){if(2===this._state)throw this._error;if(e{var e;return null===(e=this._onReturn)||void 0===e||e.call(this),{done:!0,value:void 0}}}}static map(e,t){return new ii((async i=>{for await(const n of e)i.emitOne(t(n))}))}map(e){return ii.map(this,e)}static filter(e,t){return new ii((async i=>{for await(const n of e)t(n)&&i.emitOne(n)}))}filter(e){return ii.filter(this,e)}static coalesce(e){return ii.filter(e,(e=>!!e))}coalesce(){return ii.coalesce(this)}static async toPromise(e){const t=[];for await(const i of e)t.push(i);return t}toPromise(){return ii.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}ii.EMPTY=ii.fromArray([]);class ni extends ii{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}const{entries:oi,setPrototypeOf:si,isFrozen:ri,getPrototypeOf:ai,getOwnPropertyDescriptor:li}=Object;let{freeze:di,seal:ci,create:hi}=Object,{apply:ui,construct:gi}="undefined"!=typeof Reflect&&Reflect;ui||(ui=function(e,t,i){return e.apply(t,i)}),di||(di=function(e){return e}),ci||(ci=function(e){return e}),gi||(gi=function(e,t){return new e(...t)});const pi=Li(Array.prototype.forEach),mi=Li(Array.prototype.pop),fi=Li(Array.prototype.push),_i=Li(String.prototype.toLowerCase),vi=Li(String.prototype.toString),bi=Li(String.prototype.match),wi=Li(String.prototype.replace),Ci=Li(String.prototype.indexOf),yi=Li(String.prototype.trim),Si=Li(RegExp.prototype.test),ki=(xi=TypeError,function(){for(var e=arguments.length,t=new Array(e),i=0;i1?i-1:0),o=1;o/gm),Ui=ci(/\${[\w\W]*}/gm),Ki=ci(/^data-[\-\w.\u00B7-\uFFFF]/),ji=ci(/^aria-[\-\w]+$/),qi=ci(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$i=ci(/^(?:\w+script|data):/i),Gi=ci(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zi=ci(/^html$/i);var Yi=Object.freeze({__proto__:null,MUSTACHE_EXPR:Hi,ERB_EXPR:zi,TMPLIT_EXPR:Ui,DATA_ATTR:Ki,ARIA_ATTR:ji,IS_ALLOWED_URI:qi,IS_SCRIPT_OR_DATA:$i,ATTR_WHITESPACE:Gi,DOCTYPE_NAME:Zi});const Qi=()=>"undefined"==typeof window?null:window;var Xi=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qi();const i=t=>e(t);if(i.version="3.0.5",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;const n=t.document,o=n.currentScript;let{document:s}=t;const{DocumentFragment:r,HTMLTemplateElement:a,Node:l,Element:d,NodeFilter:c,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:g,trustedTypes:p}=t,m=d.prototype,f=Ni(m,"cloneNode"),_=Ni(m,"nextSibling"),v=Ni(m,"childNodes"),b=Ni(m,"parentNode");if("function"==typeof a){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let w,C="";const{implementation:y,createNodeIterator:S,createDocumentFragment:k,getElementsByTagName:x}=s,{importNode:L}=n;let D={};i.isSupported="function"==typeof oi&&"function"==typeof b&&y&&void 0!==y.createHTMLDocument;const{MUSTACHE_EXPR:E,ERB_EXPR:N,TMPLIT_EXPR:I,DATA_ATTR:T,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:R}=Yi;let{IS_ALLOWED_URI:P}=Yi,O=null;const F=Di({},[...Ii,...Ti,...Mi,...Ri,...Oi]);let B=null;const W=Di({},[...Fi,...Bi,...Wi,...Vi]);let V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),H=null,z=null,U=!0,K=!0,j=!1,q=!0,$=!1,G=!1,Z=!1,Y=!1,Q=!1,X=!1,J=!1,ee=!0,te=!1,ie=!0,ne=!1,oe={},se=null;const re=Di({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ae=null;const le=Di({},["audio","video","img","source","image","track"]);let de=null;const ce=Di({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ue="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let pe=ge,me=!1,fe=null;const _e=Di({},[he,ue,ge],vi);let ve;const be=["application/xhtml+xml","text/html"];let we,Ce=null;const ye=s.createElement("form"),Se=function(e){return e instanceof RegExp||e instanceof Function},ke=function(e){if(!Ce||Ce!==e){if(e&&"object"==typeof e||(e={}),e=Ei(e),ve=ve=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,we="application/xhtml+xml"===ve?vi:_i,O="ALLOWED_TAGS"in e?Di({},e.ALLOWED_TAGS,we):F,B="ALLOWED_ATTR"in e?Di({},e.ALLOWED_ATTR,we):W,fe="ALLOWED_NAMESPACES"in e?Di({},e.ALLOWED_NAMESPACES,vi):_e,de="ADD_URI_SAFE_ATTR"in e?Di(Ei(ce),e.ADD_URI_SAFE_ATTR,we):ce,ae="ADD_DATA_URI_TAGS"in e?Di(Ei(le),e.ADD_DATA_URI_TAGS,we):le,se="FORBID_CONTENTS"in e?Di({},e.FORBID_CONTENTS,we):re,H="FORBID_TAGS"in e?Di({},e.FORBID_TAGS,we):{},z="FORBID_ATTR"in e?Di({},e.FORBID_ATTR,we):{},oe="USE_PROFILES"in e&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,j=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,$=e.SAFE_FOR_TEMPLATES||!1,G=e.WHOLE_DOCUMENT||!1,Q=e.RETURN_DOM||!1,X=e.RETURN_DOM_FRAGMENT||!1,J=e.RETURN_TRUSTED_TYPE||!1,Y=e.FORCE_BODY||!1,ee=!1!==e.SANITIZE_DOM,te=e.SANITIZE_NAMED_PROPS||!1,ie=!1!==e.KEEP_CONTENT,ne=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||qi,pe=e.NAMESPACE||ge,V=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Se(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(V.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$&&(K=!1),X&&(Q=!0),oe&&(O=Di({},[...Oi]),B=[],!0===oe.html&&(Di(O,Ii),Di(B,Fi)),!0===oe.svg&&(Di(O,Ti),Di(B,Bi),Di(B,Vi)),!0===oe.svgFilters&&(Di(O,Mi),Di(B,Bi),Di(B,Vi)),!0===oe.mathMl&&(Di(O,Ri),Di(B,Wi),Di(B,Vi))),e.ADD_TAGS&&(O===F&&(O=Ei(O)),Di(O,e.ADD_TAGS,we)),e.ADD_ATTR&&(B===W&&(B=Ei(B)),Di(B,e.ADD_ATTR,we)),e.ADD_URI_SAFE_ATTR&&Di(de,e.ADD_URI_SAFE_ATTR,we),e.FORBID_CONTENTS&&(se===re&&(se=Ei(se)),Di(se,e.FORBID_CONTENTS,we)),ie&&(O["#text"]=!0),G&&Di(O,["html","head","body"]),O.table&&(Di(O,["tbody"]),delete H.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ki('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ki('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=e.TRUSTED_TYPES_POLICY,C=w.createHTML("")}else void 0===w&&(w=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let i=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(i=t.getAttribute(n));const o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML(e){return e},createScriptURL(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,o)),null!==w&&"string"==typeof C&&(C=w.createHTML(""));di&&di(e),Ce=e}},xe=Di({},["mi","mo","mn","ms","mtext"]),Le=Di({},["foreignobject","desc","title","annotation-xml"]),De=Di({},["title","style","font","a","script"]),Ee=Di({},Ti);Di(Ee,Mi),Di(Ee,Ai);const Ne=Di({},Ri);Di(Ne,Pi);const Ie=function(e){fi(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},Te=function(e,t){try{fi(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){fi(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!B[e])if(Q||X)try{Ie(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Me=function(e){let t,i;if(Y)e=""+e;else{const t=bi(e,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===ve&&pe===ge&&(e=''+e+"");const n=w?w.createHTML(e):e;if(pe===ge)try{t=(new g).parseFromString(n,ve)}catch(e){}if(!t||!t.documentElement){t=y.createDocument(pe,"template",null);try{t.documentElement.innerHTML=me?C:n}catch(e){}}const o=t.body||t.documentElement;return e&&i&&o.insertBefore(s.createTextNode(i),o.childNodes[0]||null),pe===ge?x.call(t,G?"html":"body")[0]:G?t.documentElement:o},Ae=function(e){return S.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Re=function(e){return"object"==typeof l?e instanceof l:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Pe=function(e,t,n){D[e]&&pi(D[e],(e=>{e.call(i,t,n,Ce)}))},Oe=function(e){let t;if(Pe("beforeSanitizeElements",e,null),(n=e)instanceof u&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof h)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return Ie(e),!0;var n;const o=we(e.nodeName);if(Pe("uponSanitizeElement",e,{tagName:o,allowedTags:O}),e.hasChildNodes()&&!Re(e.firstElementChild)&&(!Re(e.content)||!Re(e.content.firstElementChild))&&Si(/<[/\w]/g,e.innerHTML)&&Si(/<[/\w]/g,e.textContent))return Ie(e),!0;if(!O[o]||H[o]){if(!H[o]&&Be(o)){if(V.tagNameCheck instanceof RegExp&&Si(V.tagNameCheck,o))return!1;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(o))return!1}if(ie&&!se[o]){const t=b(e)||e.parentNode,i=v(e)||e.childNodes;if(i&&t)for(let n=i.length-1;n>=0;--n)t.insertBefore(f(i[n],!0),_(e))}return Ie(e),!0}return e instanceof d&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});const i=_i(e.tagName),n=_i(t.tagName);return!!fe[e.namespaceURI]&&(e.namespaceURI===ue?t.namespaceURI===ge?"svg"===i:t.namespaceURI===he?"svg"===i&&("annotation-xml"===n||xe[n]):Boolean(Ee[i]):e.namespaceURI===he?t.namespaceURI===ge?"math"===i:t.namespaceURI===ue?"math"===i&&Le[n]:Boolean(Ne[i]):e.namespaceURI===ge?!(t.namespaceURI===ue&&!Le[n])&&!(t.namespaceURI===he&&!xe[n])&&!Ne[i]&&(De[i]||!Ee[i]):!("application/xhtml+xml"!==ve||!fe[e.namespaceURI]))}(e)?(Ie(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!Si(/<\/no(script|embed|frames)/i,e.innerHTML)?($&&3===e.nodeType&&(t=e.textContent,t=wi(t,E," "),t=wi(t,N," "),t=wi(t,I," "),e.textContent!==t&&(fi(i.removed,{element:e.cloneNode()}),e.textContent=t)),Pe("afterSanitizeElements",e,null),!1):(Ie(e),!0)},Fe=function(e,t,i){if(ee&&("id"===t||"name"===t)&&(i in s||i in ye))return!1;if(K&&!z[t]&&Si(T,t));else if(U&&Si(M,t));else if(!B[t]||z[t]){if(!(Be(e)&&(V.tagNameCheck instanceof RegExp&&Si(V.tagNameCheck,e)||V.tagNameCheck instanceof Function&&V.tagNameCheck(e))&&(V.attributeNameCheck instanceof RegExp&&Si(V.attributeNameCheck,t)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(t))||"is"===t&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Si(V.tagNameCheck,i)||V.tagNameCheck instanceof Function&&V.tagNameCheck(i))))return!1}else if(de[t]);else if(Si(P,wi(i,R,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ci(i,"data:")||!ae[e])if(j&&!Si(A,wi(i,R,"")));else if(i)return!1;return!0},Be=function(e){return e.indexOf("-")>0},We=function(e){let t,n,o,s;Pe("beforeSanitizeAttributes",e,null);const{attributes:r}=e;if(!r)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B};for(s=r.length;s--;){t=r[s];const{name:l,namespaceURI:d}=t;if(n="value"===l?t.value:yi(t.value),o=we(l),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,Pe("uponSanitizeAttribute",e,a),n=a.attrValue,a.forceKeepAttr)continue;if(Te(l,e),!a.keepAttr)continue;if(!q&&Si(/\/>/i,n)){Te(l,e);continue}$&&(n=wi(n,E," "),n=wi(n,N," "),n=wi(n,I," "));const c=we(e.nodeName);if(Fe(c,o,n)){if(!te||"id"!==o&&"name"!==o||(Te(l,e),n="user-content-"+n),w&&"object"==typeof p&&"function"==typeof p.getAttributeType)if(d);else switch(p.getAttributeType(c,o)){case"TrustedHTML":n=w.createHTML(n);break;case"TrustedScriptURL":n=w.createScriptURL(n)}try{d?e.setAttributeNS(d,l,n):e.setAttribute(l,n),mi(i.removed)}catch(e){}}}Pe("afterSanitizeAttributes",e,null)},Ve=function e(t){let i;const n=Ae(t);for(Pe("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)Pe("uponSanitizeShadowNode",i,null),Oe(i)||(i.content instanceof r&&e(i.content),We(i));Pe("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e){let t,o,s,a,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(me=!e,me&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Re(e)){if("function"!=typeof e.toString)throw ki("toString is not a function");if("string"!=typeof(e=e.toString()))throw ki("dirty is not a string, aborting")}if(!i.isSupported)return e;if(Z||ke(d),i.removed=[],"string"==typeof e&&(ne=!1),ne){if(e.nodeName){const t=we(e.nodeName);if(!O[t]||H[t])throw ki("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)t=Me("\x3c!----\x3e"),o=t.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?t=o:t.appendChild(o);else{if(!Q&&!$&&!G&&-1===e.indexOf("<"))return w&&J?w.createHTML(e):e;if(t=Me(e),!t)return Q?null:J?C:""}t&&Y&&Ie(t.firstChild);const c=Ae(ne?e:t);for(;s=c.nextNode();)Oe(s)||(s.content instanceof r&&Ve(s.content),We(s));if(ne)return e;if(Q){if(X)for(a=k.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(B.shadowroot||B.shadowrootmode)&&(a=L.call(n,a,!0)),a}let h=G?t.outerHTML:t.innerHTML;return G&&O["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&Si(Zi,t.ownerDocument.doctype.name)&&(h="\n"+h),$&&(h=wi(h,E," "),h=wi(h,N," "),h=wi(h,I," ")),w&&J?w.createHTML(h):h},i.setConfig=function(e){ke(e),Z=!0},i.clearConfig=function(){Ce=null,Z=!1},i.isValidAttribute=function(e,t,i){Ce||ke({});const n=we(e),o=we(t);return Fe(n,o,i)},i.addHook=function(e,t){"function"==typeof t&&(D[e]=D[e]||[],fi(D[e],t))},i.removeHook=function(e){if(D[e])return mi(D[e])},i.removeHooks=function(e){D[e]&&(D[e]=[])},i.removeAllHooks=function(){D={}},i}();Xi.version,Xi.isSupported;const Ji=Xi.sanitize,en=(Xi.setConfig,Xi.clearConfig,Xi.isValidAttribute,Xi.addHook),tn=Xi.removeHook;function nn(e){return e}Xi.removeHooks,Xi.removeAllHooks;class on{get cachedValues(){return this._map}constructor(e,t){this._map=new Map,this._map2=new Map,"function"==typeof e?(this._fn=e,this._computeKey=nn):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);if(this._map2.has(t))return this._map2.get(t);const i=this._fn(e);return this._map.set(e,i),this._map2.set(t,i),i}}class sn{constructor(e){this.executor=e,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var rn;function an(e){return!e||"string"!=typeof e||0===e.trim().length}const ln=/{(\d+)}/g;function dn(e,...t){return 0===t.length?e:e.replace(ln,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function cn(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function hn(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function un(e,t=" "){return pn(gn(e,t),t)}function gn(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function pn(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,s=-1;for(;s=e.lastIndexOf(t,o-1),-1!==s&&s+i===o;){if(0===s)return"";o=s}return e.substring(0,o)}function mn(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=hn(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function fn(e){return e.split(/\r\n|\r|\n/)}function _n(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function wn(e,t){return et?1:0}function Cn(e,t,i=0,n=e.length,o=0,s=t.length){for(;is)return 1}const r=n-i,a=s-o;return ra?1:0}function yn(e,t){return Sn(e,t,0,e.length,0,t.length)}function Sn(e,t,i=0,n=e.length,o=0,s=t.length){for(;i=128||a>=128)return Cn(e.toLowerCase(),t.toLowerCase(),i,n,o,s);xn(r)&&(r-=32),xn(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return ra?1:0}function kn(e){return e>=48&&e<=57}function xn(e){return e>=97&&e<=122}function Ln(e){return e>=65&&e<=90}function Dn(e,t){return e.length===t.length&&0===Sn(e,t)}function En(e,t){const i=t.length;return!(t.length>e.length)&&0===Sn(e,t,0,i)}function Nn(e,t){const i=Math.min(e.length,t.length);let n;for(n=0;n1){const n=e.charCodeAt(t-2);if(Tn(n))return An(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=Rn(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class On{get offset(){return this._iterator.offset}constructor(e,t=0){this._iterator=new Pn(e,t)}nextGraphemeLength(){const e=Qn.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(Yn(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=Qn.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(Yn(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function Fn(e,t){return new On(e,t).nextGraphemeLength()}function Bn(e,t){return new On(e,t).prevGraphemeLength()}let Wn;function Vn(e){return Wn||(Wn=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/),Wn.test(e)}const Hn=/^[\t\n\r\x20-\x7E]*$/;function zn(e){return Hn.test(e)}const Un=/[\u2028\u2029]/;function Kn(e){return Un.test(e)}function jn(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function qn(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const $n=String.fromCharCode(65279);function Gn(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Zn(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function Yn(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class Qn{static getInstance(){return Qn._INSTANCE||(Qn._INSTANCE=new Qn),Qn._INSTANCE}constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function Xn(e){return 127995<=e&&e<=127999}Qn._INSTANCE=null;class Jn{static getInstance(e){return rn.cache.get(Array.from(e))}static getLocales(){return rn._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}rn=Jn,Jn.ambiguousCharacterData=new sn((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))),Jn.cache=new class{constructor(e,t){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof e?(this._fn=e,this._computeKey=nn):(this._fn=t,this._computeKey=e.getCacheKey)}get(e){const t=this._computeKey(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this._fn(e)),this.lastCache}}({getCacheKey:JSON.stringify},(e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in n));0===s.length&&(s=["_default"]);for(const e of s)o=i(o,t(n[e]));const r=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(n._common),o);return new rn(r)})),Jn._locales=new sn((()=>Object.keys(rn.ambiguousCharacterData.value).filter((e=>!e.startsWith("_")))));class eo{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(eo.getRawData())),this._data}static isInvisibleCharacter(e){return eo.getData().has(e)}static get codePoints(){return eo.getData()}}let to;eo._data=void 0;const io=globalThis.vscode;if(void 0!==io&&void 0!==io.process){const e=io.process;to={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else to="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:{get platform(){return U?"win32":K?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const no=to.cwd,oo=to.env,so=to.platform,ro=46,ao=47,lo=92,co=58;class ho extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;s+=". Received type "+typeof i,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function uo(e,t){if("string"!=typeof e)throw new ho(t,"string",e)}const go="win32"===so;function po(e){return e===ao||e===lo}function mo(e){return e===ao}function fo(e){return e>=65&&e<=90||e>=97&&e<=122}function _o(e,t,i,n){let o="",s=0,r=-1,a=0,l=0;for(let d=0;d<=e.length;++d){if(d2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):(o=o.slice(0,e),s=o.length-1-o.lastIndexOf(i)),r=d,a=0;continue}if(0!==o.length){o="",s=0,r=d,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,d)}`:o=e.slice(r+1,d),s=d-r-1;r=d,a=0}else l===ro&&-1!==a?++a:a=-1}return o}function vo(e,t){!function(e,t){if(null===e||"object"!=typeof e)throw new ho("pathObject","Object",e)}(t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const bo={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let s;if(o>=0){if(s=e[o],uo(s,"path"),0===s.length)continue}else 0===t.length?s=no():(s=oo[`=${t}`]||no(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===lo)&&(s=`${t}\\`));const r=s.length;let a=0,l="",d=!1;const c=s.charCodeAt(0);if(1===r)po(c)&&(a=1,d=!0);else if(po(c))if(d=!0,po(s.charCodeAt(1))){let e=2,t=e;for(;e2&&po(s.charCodeAt(2))&&(d=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(i=`${s.slice(a)}\\${i}`,n=d,d&&t.length>0)break}return i=_o(i,!n,"\\",po),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){uo(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return mo(s)?"\\":e;if(po(s))if(o=!0,po(e.charCodeAt(1))){let o=2,s=o;for(;o2&&po(e.charCodeAt(2))&&(o=!0,n=3));let r=n0&&po(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){uo(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return po(i)||t>2&&fo(i)&&e.charCodeAt(1)===co&&po(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&po(i.charCodeAt(0))){++o;const e=i.length;e>1&&po(i.charCodeAt(1))&&(++o,e>2&&(po(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(t=`\\${t.slice(o)}`)}return bo.normalize(t)},relative(e,t){if(uo(e,"from"),uo(t,"to"),e===t)return"";const i=bo.resolve(e),n=bo.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;oo&&e.charCodeAt(s-1)===lo;)s--;const r=s-o;let a=0;for(;aa&&t.charCodeAt(l-1)===lo;)l--;const d=l-a,c=rc){if(t.charCodeAt(a+u)===lo)return n.slice(a+u+1);if(2===u)return n.slice(a+u)}r>c&&(e.charCodeAt(o+u)===lo?h=u:2===u&&(h=3)),-1===h&&(h=0)}let g="";for(u=o+h+1;u<=s;++u)u!==s&&e.charCodeAt(u)!==lo||(g+=0===g.length?"..":"\\..");return a+=h,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===lo&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e||0===e.length)return e;const t=bo.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===lo){if(t.charCodeAt(1)===lo){const e=t.charCodeAt(2);if(63!==e&&e!==ro)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(fo(t.charCodeAt(0))&&t.charCodeAt(1)===co&&t.charCodeAt(2)===lo)return`\\\\?\\${t}`;return e},dirname(e){uo(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return po(o)?e:".";if(po(o)){if(i=n=1,po(e.charCodeAt(1))){let o=2,s=o;for(;o2&&po(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let i=t-1;i>=n;--i)if(po(e.charCodeAt(i))){if(!r){s=i;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&uo(t,"ext"),uo(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&fo(e.charCodeAt(0))&&e.charCodeAt(1)===co&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(po(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(po(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){uo(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&e.charCodeAt(1)===co&&fo(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(po(t)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1),t===ro?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:vo.bind(null,"\\"),parse(e){uo(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return po(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(po(o)){if(n=1,po(e.charCodeAt(1))){let t=2,o=t;for(;t0&&(t.root=e.slice(0,n));let s=-1,r=n,a=-1,l=!0,d=e.length-1,c=0;for(;d>=n;--d)if(o=e.charCodeAt(d),po(o)){if(!l){r=d+1;break}}else-1===a&&(l=!1,a=d+1),o===ro?-1===s?s=d:1!==c&&(c=1):-1!==s&&(c=-1);return-1!==a&&(-1===s||0===c||1===c&&s===a-1&&s===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,s),t.base=e.slice(r,a),t.ext=e.slice(s,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},wo=(()=>{if(go){const e=/\\/g;return()=>{const t=no().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>no()})(),Co={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:wo();uo(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===ao)}return t=_o(t,!i,"/",mo),i?`/${t}`:t.length>0?t:"."},normalize(e){if(uo(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ao,i=e.charCodeAt(e.length-1)===ao;return 0===(e=_o(e,!t,"/",mo)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return uo(e,"path"),e.length>0&&e.charCodeAt(0)===ao},join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":Co.normalize(t)},relative(e,t){if(uo(e,"from"),uo(t,"to"),e===t)return"";if((e=Co.resolve(e))===(t=Co.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,s=ns){if(t.charCodeAt(1+a)===ao)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>s&&(e.charCodeAt(1+a)===ao?r=a:0===a&&(r=0));let l="";for(a=1+r+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==ao||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+r)}`},toNamespacedPath(e){return e},dirname(e){if(uo(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ao;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===ao){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&uo(t,"ext"),uo(e,"path");let i,n=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===ao){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===ao){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){uo(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==ao)-1===n&&(o=!1,n=r+1),a===ro?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:vo.bind(null,"/"),parse(e){uo(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===ao;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,a=!0,l=e.length-1,d=0;for(;l>=n;--l){const t=e.charCodeAt(l);if(t!==ao)-1===r&&(a=!1,r=l+1),t===ro?-1===o?o=l:1!==d&&(d=1):-1!==o&&(d=-1);else if(!a){s=l+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===d||1===d&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Co.win32=bo.win32=bo,Co.posix=bo.posix=Co;const yo=go?bo.normalize:Co.normalize,So=go?bo.resolve:Co.resolve,ko=go?bo.relative:Co.relative,xo=go?bo.dirname:Co.dirname,Lo=go?bo.basename:Co.basename,Do=go?bo.extname:Co.extname,Eo=go?bo.sep:Co.sep,No=/^\w[\w\d+.-]*$/,Io=/^\//,To=/^\/\//,Mo="",Ao="/",Ro=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Po{static isUri(e){return e instanceof Po||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}constructor(e,t,i,n,o,s=!1){"object"==typeof e?(this.scheme=e.scheme||Mo,this.authority=e.authority||Mo,this.path=e.path||Mo,this.query=e.query||Mo,this.fragment=e.fragment||Mo):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||Mo,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Ao&&(t=Ao+t):t=Ao}return t}(this.scheme,i||Mo),this.query=n||Mo,this.fragment=o||Mo,function(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!No.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!Io.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(To.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,s))}get fsPath(){return Ho(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=Mo),void 0===i?i=this.authority:null===i&&(i=Mo),void 0===n?n=this.path:null===n&&(n=Mo),void 0===o?o=this.query:null===o&&(o=Mo),void 0===s?s=this.fragment:null===s&&(s=Mo),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new Fo(t,i,n,o,s)}static parse(e,t=!1){const i=Ro.exec(e);return i?new Fo(i[2]||Mo,jo(i[4]||Mo),jo(i[5]||Mo),jo(i[7]||Mo),jo(i[9]||Mo),t):new Fo(Mo,Mo,Mo,Mo,Mo)}static file(e){let t=Mo;if(U&&(e=e.replace(/\\/g,Ao)),e[0]===Ao&&e[1]===Ao){const i=e.indexOf(Ao,2);-1===i?(t=e.substring(2),e=Ao):(t=e.substring(2,i),e=e.substring(i)||Ao)}return new Fo("file",t,e,Mo,Mo)}static from(e,t){return new Fo(e.scheme,e.authority,e.path,e.query,e.fragment,t)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=U&&"file"===e.scheme?Po.file(bo.join(Ho(e,!0),...t)).path:Co.join(e.path,...t),e.with({path:i})}toString(e=!1){return zo(this,e)}toJSON(){return this}static revive(e){var t,i;if(e){if(e instanceof Po)return e;{const n=new Fo(e);return n._formatted=null!==(t=e.external)&&void 0!==t?t:null,n._fsPath=e._sep===Oo&&null!==(i=e.fsPath)&&void 0!==i?i:null,n}}return e}}const Oo=U?1:void 0;class Fo extends Po{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Ho(this,!1)),this._fsPath}toString(e=!1){return e?zo(this,!0):(this._formatted||(this._formatted=zo(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Oo),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const Bo={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Wo(e,t,i){let n,o=-1;for(let s=0;s=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r||i&&91===r||i&&93===r||i&&58===r)-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),void 0!==n&&(n+=e.charAt(s));else{void 0===n&&(n=e.substr(0,s));const t=Bo[r];void 0!==t?(-1!==o&&(n+=encodeURIComponent(e.substring(o,s)),o=-1),n+=t):-1===o&&(o=s)}}return-1!==o&&(n+=encodeURIComponent(e.substring(o))),void 0!==n?n:e}function Vo(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,U&&(i=i.replace(/\//g,"\\")),i}function zo(e,t){const i=t?Vo:Wo;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=Ao,n+=Ao),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=i(t,!1,!1):(n+=i(t.substr(0,e),!1,!1),n+=":",n+=i(t.substr(e+1),!1,!0)),n+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?n+=i(s,!1,!0):(n+=i(s.substr(0,e),!1,!0),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0,!1)}return a&&(n+="?",n+=i(a,!1,!1)),l&&(n+="#",n+=t?l:Wo(l,!1,!1)),n}function Uo(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Uo(e.substr(3)):e}}const Ko=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function jo(e){return e.match(Ko)?e.replace(Ko,(e=>Uo(e))):e}var qo;function $o(e,t){return Po.isUri(e)?Dn(e.scheme,t):En(e,t+":")}function Go(e,...t){return t.some((t=>$o(e,t)))}!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeCopilotBackingChatCodeBlock="vscode-copilot-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting"}(qo||(qo={}));const Zo=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(e){this._preferredWebSchema=e}get _remoteResourcesPath(){return Co.join(this._serverRootPath,qo.vscodeRemoteResource)}rewrite(e){if(this._delegate)try{return this._delegate(e)}catch(t){return xe(t),e}const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&-1===i.indexOf("[")&&(i=`[${i}]`);const n=this._ports[t],o=this._connectionTokens[t];let s=`path=${encodeURIComponent(e.path)}`;return"string"==typeof o&&(s+=`&tkn=${encodeURIComponent(o)}`),Po.from({scheme:$?this._preferredWebSchema:qo.vscodeRemoteResource,authority:`${i}:${n}`,path:this._remoteResourcesPath,query:s})}};class Yo{uriToBrowserUri(e){return e.scheme===qo.vscodeRemote?Zo.rewrite(e):e.scheme!==qo.file||!q&&G!==`${qo.vscodeFileResource}://${Yo.FALLBACK_AUTHORITY}`?e:e.with({scheme:qo.vscodeFileResource,authority:e.authority||Yo.FALLBACK_AUTHORITY,query:null,fragment:null})}}Yo.FALLBACK_AUTHORITY="vscode-app";const Qo=new Yo;var Xo;function Jo(e){return es(e,0)}function es(e,t){switch(typeof e){case"object":return null===e?ts(349,t):Array.isArray(e)?(i=e,n=ts(104579,n=t),i.reduce(((e,t)=>es(t,e)),n)):function(e,t){return t=ts(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=is(i,t),es(e[i],t))),t)}(e,t);case"string":return is(e,t);case"boolean":return function(e,t){return ts(e?433:863,t)}(e,t);case"number":return ts(e,t);case"undefined":return ts(937,t);default:return ts(617,t)}var i,n}function ts(e,t){return(t<<5)-t+e|0}function is(e,t){t=ts(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function os(e,t=0,i=e.byteLength,n=0){for(let o=0;oe.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}!function(e){const t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));const i="vscode-coi";e.getHeadersFromQuery=function(e){let n;"string"==typeof e?n=new URL(e).searchParams:e instanceof URL?n=e.searchParams:Po.isUri(e)&&(n=new URL(e.toString(!0)).searchParams);const o=null==n?void 0:n.get(i);if(o)return t.get(o)},e.addSearchParam=function(e,t,n){if(!globalThis.crossOriginIsolated)return;const o=t&&n?"3":n?"2":"1";e instanceof URLSearchParams?e.set(i,o):e[i]=o}}(Xo||(Xo={}));class rs{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let n,o,s=this._buffLen,r=this._leftoverHighSurrogate;for(0!==r?(n=r,o=-1,r=0):(n=e.charCodeAt(0),o=0);;){let a=n;if(Tn(n)){if(!(o+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),ss(this._h0)+ss(this._h1)+ss(this._h2)+ss(this._h3)+ss(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,os(this._buff,this._buffLen),this._buffLen>56&&(this._step(),os(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=rs._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,ns(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,a=this._h2,l=this._h3,d=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&l,n=1518500249):t<40?(i=r^a^l,n=1859775393):t<60?(i=r&a|r&l|a&l,n=2400959708):(i=r^a^l,n=3395469782),o=ns(s,5)+i+d+n+e.getUint32(4*t,!1)&4294967295,d=l,l=a,a=ns(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+d&4294967295}}rs._bigBlock32=new DataView(new ArrayBuffer(320));const{registerWindow:as,getWindow:ls,getDocument:ds,getWindows:cs,getWindowsCount:hs,getWindowId:us,getWindowById:gs,hasWindow:ps,onDidRegisterWindow:ms,onWillUnregisterWindow:fs,onDidUnregisterWindow:_s}=function(){const e=new Map;!function(e,t){const i=e;"number"!=typeof i.vscodeWindowId&&Object.defineProperty(i,"vscodeWindowId",{get:()=>1})}(s);const t={window:s,disposables:new at};e.set(s.vscodeWindowId,t);const i=new kt,n=new kt,o=new kt;return{onDidRegisterWindow:i.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(t){if(e.has(t.vscodeWindowId))return lt.None;const s=new at,r={window:t,disposables:s.add(new at)};return e.set(t.vscodeWindowId,r),s.add(rt((()=>{e.delete(t.vscodeWindowId),n.fire(t)}))),s.add(ws(t,ur.BEFORE_UNLOAD,(()=>{o.fire(t)}))),i.fire(r),s},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:function(i,n){const o="number"==typeof i?e.get(i):void 0;return null!=o?o:n?t:void 0},getWindow(e){var t;const i=e;if(null===(t=null==i?void 0:i.ownerDocument)||void 0===t?void 0:t.defaultView)return i.ownerDocument.defaultView.window;const n=e;return(null==n?void 0:n.view)?n.view.window:s},getDocument(e){return ls(e).document}}}();function vs(e){for(;e.firstChild;)e.firstChild.remove()}class bs{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function ws(e,t,i,n){return new bs(e,t,i,n)}function Cs(e,t){return function(i){return t(new Ge(e,i))}}const ys=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t||"contextmenu"===t?o=Cs(ls(e),i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new Ke(t))}}(i)),ws(e,t,o,n)};function Ss(e,t,i){return Qt(e,t,i)}class ks extends Xt{constructor(e,t){super(e,t)}}let xs,Ls;class Ds extends Gt{constructor(e){super(),this.defaultTarget=e&&ls(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,null!=i?i:this.defaultTarget)}}class Es{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){xe(e)}}static sort(e,t){return t.priority-e.priority}}function Ns(e){return ls(e).getComputedStyle(e,null)}function Is(e,t){const i=ls(e),n=i.document;if(e!==n.body)return new Ms(e.clientWidth,e.clientHeight);if(Z&&(null==i?void 0:i.visualViewport))return new Ms(i.visualViewport.width,i.visualViewport.height);if((null==i?void 0:i.innerWidth)&&i.innerHeight)return new Ms(i.innerWidth,i.innerHeight);if(n.body&&n.body.clientWidth&&n.body.clientHeight)return new Ms(n.body.clientWidth,n.body.clientHeight);if(n.documentElement&&n.documentElement.clientWidth&&n.documentElement.clientHeight)return new Ms(n.documentElement.clientWidth,n.documentElement.clientHeight);if(t)return Is(t);throw new Error("Unable to figure out browser width and height")}!function(){const e=new Map,t=new Map,i=new Map,n=new Map;Ls=(o,s,r=0)=>{const a=us(o),l=new Es(s,r);let d=e.get(a);return d||(d=[],e.set(a,d)),d.push(l),i.get(a)||(i.set(a,!0),o.requestAnimationFrame((()=>(o=>{var s;i.set(o,!1);const r=null!==(s=e.get(o))&&void 0!==s?s:[];for(t.set(o,r),e.set(o,[]),n.set(o,!0);r.length>0;)r.sort(Es.sort),r.shift().execute();n.set(o,!1)})(a)))),l},xs=(e,i,o)=>{const s=us(e);if(n.get(s)){const e=new Es(i,o);let n=t.get(s);return n||(n=[],t.set(s,n)),n.push(e),e}return Ls(e,i,o)}}();class Ts{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){const n=Ns(e),o=n?n.getPropertyValue(t):"0";return Ts.convertToPixels(e,o)}static getBorderLeftWidth(e){return Ts.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Ts.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Ts.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Ts.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Ts.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Ts.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Ts.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Ts.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Ts.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Ts.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Ts.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Ts.getDimension(e,"margin-bottom","marginBottom")}}class Ms{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Ms(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof Ms?e:new Ms(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function As(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==e.ownerDocument.body&&e!==e.ownerDocument.documentElement;){i-=e.scrollTop;const o=zs(e)?null:Ns(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=Ts.getBorderLeftWidth(e),i+=Ts.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function Rs(e){const t=e.getBoundingClientRect(),i=ls(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}function Ps(e){let t=e,i=1;do{const e=Ns(t).zoom;null!=e&&"1"!==e&&(i*=e),t=t.parentElement}while(null!==t&&t!==t.ownerDocument.documentElement);return i}function Os(e){const t=Ts.getMarginLeft(e)+Ts.getMarginRight(e);return e.offsetWidth+t}function Fs(e){const t=Ts.getBorderLeftWidth(e)+Ts.getBorderRightWidth(e),i=Ts.getPaddingLeft(e)+Ts.getPaddingRight(e);return e.offsetWidth-t-i}function Bs(e){const t=Ts.getBorderTopWidth(e)+Ts.getBorderBottomWidth(e),i=Ts.getPaddingTop(e)+Ts.getPaddingBottom(e);return e.offsetHeight-t-i}function Ws(e){const t=Ts.getMarginTop(e)+Ts.getMarginBottom(e);return e.offsetHeight+t}function Vs(e,t){return Boolean(null==t?void 0:t.contains(e))}function Hs(e,t,i){return!!function(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}(e,t,i)}function zs(e){return e&&!!e.host&&!!e.mode}function Us(e){return!!Ks(e)}function Ks(e){for(var t;e.parentNode;){if(e===(null===(t=e.ownerDocument)||void 0===t?void 0:t.body))return null;e=e.parentNode}return zs(e)?e:null}function js(){let e=Gs().activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function qs(e){return js()===e}function $s(e){return Vs(js(),e)}function Gs(){var e;return hs()<=1?s.document:null!==(e=Array.from(cs()).map((({window:e})=>e.document)).find((e=>e.hasFocus())))&&void 0!==e?e:s.document}function Zs(){var e,t;return null!==(t=null===(e=Gs().defaultView)||void 0===e?void 0:e.window)&&void 0!==t?t:s}Ms.None=new Ms(0,0);const Ys=new Map;function Qs(){return new Xs}class Xs{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(e){e!==this._currentCssStyle&&(this._currentCssStyle=e,this._styleSheet?this._styleSheet.innerText=e:this._styleSheet=Js(s.document.head,(t=>t.innerText=e)))}dispose(){this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=void 0)}}function Js(e=s.document.head,t,i){const n=document.createElement("style");if(n.type="text/css",n.media="screen",null==t||t(n),e.appendChild(n),i&&i.add(rt((()=>e.removeChild(n)))),e===s.document.head){const e=new Set;Ys.set(n,e);for(const{window:t,disposables:o}of cs()){if(t===s)continue;const r=o.add(er(n,e,t));null==i||i.add(r)}}return n}function er(e,t,i){var n,o;const s=new at,r=e.cloneNode(!0);i.document.head.appendChild(r),s.add(rt((()=>i.document.head.removeChild(r))));for(const t of or(e))null===(n=r.sheet)||void 0===n||n.insertRule(t.cssText,null===(o=r.sheet)||void 0===o?void 0:o.cssRules.length);return s.add(tr.observe(e,s,{childList:!0})((()=>{r.textContent=e.textContent}))),t.add(r),s.add(rt((()=>t.delete(r)))),s}const tr=new class{constructor(){this.mutationObservers=new Map}observe(e,t,i){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));const o=Jo(i);let s=n.get(o);if(s)s.users+=1;else{const r=new kt,a=new MutationObserver((e=>r.fire(e)));a.observe(e,i);const l=s={users:1,observer:a,onDidMutate:r.event};t.add(rt((()=>{l.users-=1,0===l.users&&(r.dispose(),a.disconnect(),null==n||n.delete(o),0===(null==n?void 0:n.size)&&this.mutationObservers.delete(e))}))),n.set(o,s)}return s.onDidMutate}};let ir=null;function nr(){return ir||(ir=Js()),ir}function or(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}function sr(e,t,i=nr()){var n,o;if(i&&t){null===(n=i.sheet)||void 0===n||n.insertRule(`${e} {${t}}`,0);for(const n of null!==(o=Ys.get(i))&&void 0!==o?o:[])sr(e,t,n)}}function rr(e,t=nr()){var i,n;if(!t)return;const o=or(t),s=[];for(let t=0;t=0;e--)null===(i=t.sheet)||void 0===i||i.deleteRule(s[e]);for(const i of null!==(n=Ys.get(t))&&void 0!==n?n:[])rr(e,i)}function ar(e){return"string"==typeof e.selectorText}function lr(e){return e instanceof HTMLElement||e instanceof ls(e).HTMLElement}function dr(e){return e instanceof HTMLAnchorElement||e instanceof ls(e).HTMLAnchorElement}function cr(e){return e instanceof MouseEvent||e instanceof ls(e).MouseEvent}function hr(e){return e instanceof KeyboardEvent||e instanceof ls(e).KeyboardEvent}const ur={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:c?"webkitAnimationStart":"animationstart",ANIMATION_END:c?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:c?"webkitAnimationIteration":"animationiteration"};function gr(e){const t=e;return!(!t||"function"!=typeof t.preventDefault||"function"!=typeof t.stopPropagation)}const pr=(e,t)=>(e.preventDefault(),t&&e.stopPropagation(),e);class mr extends lt{static hasFocusWithin(e){if(lr(e)){const t=Ks(e);return Vs(t?t.activeElement:e.ownerDocument.activeElement,e)}{const t=e;return Vs(t.document.activeElement,t.document)}}constructor(e){super(),this._onDidFocus=this._register(new kt),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new kt),this.onDidBlur=this._onDidBlur.event;let t=mr.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,(lr(e)?ls(e):e).setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{mr.hasFocusWithin(e)!==t&&(t?o():n())},this._register(ws(e,ur.FOCUS,n,!0)),this._register(ws(e,ur.BLUR,o,!0)),lr(e)&&(this._register(ws(e,ur.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(ws(e,ur.FOCUS_OUT,(()=>this._refreshStateHandler()))))}}function fr(e){return new mr(e)}function _r(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function vr(e,t){return e.insertBefore(t,e.firstChild),t}function br(e,...t){e.innerText="",_r(e,...t)}const wr=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Cr;function yr(e,t,i,...n){const o=wr.exec(t);if(!o)throw new Error("Bad use of emmet");const s=o[1]||"div";let r;return r=e!==Cr.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),i&&Object.entries(i).forEach((([e,t])=>{void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function Sr(e,t,...i){return yr(Cr.HTML,e,t,...i)}function kr(...e){for(const t of e)t.style.display="",t.removeAttribute("aria-hidden")}function xr(...e){for(const t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function Lr(e,t){const i=e.devicePixelRatio*t;return Math.max(1,Math.floor(i))/e.devicePixelRatio}function Dr(e){s.open(e,"_blank","noopener")}function Er(e){return e?`url('${Qo.uriToBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Nr(e){return`'${e.replace(/'/g,"%27")}'`}function Ir(e,t){if(void 0!==e){const i=e.match(/^\s*var\((.+)\)$/);if(i){const e=i[1].split(",",2);return 2===e.length&&(t=Ir(e[1].trim(),t)),`var(${e[0]}, ${t})`}return e}return t}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(Cr||(Cr={})),Sr.SVG=function(e,t,...i){return yr(Cr.SVG,e,t,...i)},Zo.setPreferredWebSchema(/^https:/.test(s.location.href)?"https":"http");const Tr=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class Mr extends kt{constructor(){super(),this._subscriptions=new at,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(_t.runAndSubscribe(ms,(({window:e,disposables:t})=>this.registerListeners(e,t)),{window:s,disposables:this._subscriptions}))}registerListeners(e,t){t.add(ws(e,"keydown",(e=>{if(e.defaultPrevented)return;const t=new Ke(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),t.add(ws(e,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),t.add(ws(e.document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(ws(e.document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),t.add(ws(e.document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),t.add(ws(e,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Mr.instance||(Mr.instance=new Mr),Mr.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}class Ar extends lt{constructor(e,t){super(),this.element=e,this.callbacks=t,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(ws(this.element,ur.DRAG_START,(e=>{var t,i;null===(i=(t=this.callbacks).onDragStart)||void 0===i||i.call(t,e)}))),this.callbacks.onDrag&&this._register(ws(this.element,ur.DRAG,(e=>{var t,i;null===(i=(t=this.callbacks).onDrag)||void 0===i||i.call(t,e)}))),this._register(ws(this.element,ur.DRAG_ENTER,(e=>{var t,i;this.counter++,this.dragStartTime=e.timeStamp,null===(i=(t=this.callbacks).onDragEnter)||void 0===i||i.call(t,e)}))),this._register(ws(this.element,ur.DRAG_OVER,(e=>{var t,i;e.preventDefault(),null===(i=(t=this.callbacks).onDragOver)||void 0===i||i.call(t,e,e.timeStamp-this.dragStartTime)}))),this._register(ws(this.element,ur.DRAG_LEAVE,(e=>{var t,i;this.counter--,0===this.counter&&(this.dragStartTime=0,null===(i=(t=this.callbacks).onDragLeave)||void 0===i||i.call(t,e))}))),this._register(ws(this.element,ur.DRAG_END,(e=>{var t,i;this.counter=0,this.dragStartTime=0,null===(i=(t=this.callbacks).onDragEnd)||void 0===i||i.call(t,e)}))),this._register(ws(this.element,ur.DROP,(e=>{var t,i;this.counter=0,this.dragStartTime=0,null===(i=(t=this.callbacks).onDrop)||void 0===i||i.call(t,e)})))}}const Rr=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function Pr(e,...t){let i,n;Array.isArray(t[0])?(i={},n=t[0]):(i=t[0]||{},n=t[1]);const o=Rr.exec(e);if(!o||!o.groups)throw new Error("Bad use of h");const s=o.groups.tag||"div",r=document.createElement(s);o.groups.id&&(r.id=o.groups.id);const a=[];if(o.groups.class)for(const e of o.groups.class.split("."))""!==e&&a.push(e);if(void 0!==i.className)for(const e of i.className.split("."))""!==e&&a.push(e);a.length>0&&(r.className=a.join(" "));const l={};if(o.groups.name&&(l[o.groups.name]=r),n)for(const e of n)lr(e)?r.appendChild(e):"string"==typeof e?r.append(e):"root"in e&&(Object.assign(l,e),r.appendChild(e.root));for(const[e,t]of Object.entries(i))if("className"!==e)if("style"===e)for(const[e,i]of Object.entries(t))r.style.setProperty(Or(e),"number"==typeof i?i+"px":""+i);else"tabIndex"===e?r.tabIndex=t:r.setAttribute(Or(e),t.toString());return l.root=r,l}function Or(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var Fr=i(455),Br=i.n(Fr),Wr=i(6111),Vr=i.n(Wr),Hr=i(5386),zr=i.n(Hr),Ur=i(7295),Kr=i.n(Ur),jr=i(1883),qr=i.n(jr),$r=i(153),Gr=i.n($r),Zr=i(3997),Yr={};Yr.styleTagTransform=Gr(),Yr.setAttributes=Kr(),Yr.insert=zr().bind(null,"head"),Yr.domAPI=Vr(),Yr.insertStyleElement=qr(),Br()(Zr.Z,Yr),Zr.Z&&Zr.Z.locals&&Zr.Z.locals;const Qr=2e4;let Xr,Jr,ea,ta,ia;function na(e){Xr&&(Jr.textContent!==e?(vs(ea),sa(Jr,e)):(vs(Jr),sa(ea,e)))}function oa(e){Xr&&(ta.textContent!==e?(vs(ia),sa(ta,e)):(vs(ta),sa(ia,e)))}function sa(e,t){vs(e),t.length>Qr&&(t=t.substr(0,Qr)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}var ra,aa;class la{constructor(e,t){this.uri=e,this.value=t}}class da{constructor(e,t){if(this[ra]="ResourceMap",e instanceof da)this.map=new Map(e.map),this.toKey=null!=t?t:da.defaultToKey;else if(function(e){return Array.isArray(e)}(e)){this.map=new Map,this.toKey=null!=t?t:da.defaultToKey;for(const[t,i]of e)this.set(t,i)}else this.map=new Map,this.toKey=null!=e?e:da.defaultToKey}set(e,t){return this.map.set(this.toKey(e),new la(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(const[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(const e of this.map.values())yield e.value}*keys(){for(const e of this.map.values())yield e.uri}*entries(){for(const e of this.map.values())yield[e.uri,e.value]}*[(ra=Symbol.toStringTag,Symbol.iterator)](){for(const[,e]of this.map)yield[e.uri,e.value]}}da.defaultToKey=e=>e.toString();class ca{constructor(){this[aa]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(aa=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._tail,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.previous,i--;this._tail=t,this._size=i,t&&(t.next=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class ha extends ca{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class ua extends ha{constructor(e,t=1){super(e,t)}trim(e){this.trimOld(e)}set(e,t){return super.set(e,t),this.checkTrim(),this}}class ga{constructor(e){if(this._m1=new Map,this._m2=new Map,e)for(const[t,i]of e)this.set(t,i)}clear(){this._m1.clear(),this._m2.clear()}set(e,t){this._m1.set(e,t),this._m2.set(t,e)}get(e){return this._m1.get(e)}getKey(e){return this._m2.get(e)}delete(e){const t=this._m1.get(e);return void 0!==t&&(this._m1.delete(e),this._m2.delete(t),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}class pa{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}get(e){return this.map.get(e)||new Set}}let ma=0;const fa=new Uint32Array(10);function _a(e,t,i){var n;e>=i&&e>8&&(fa[ma++]=n>>8&255),n>>16&&(fa[ma++]=n>>16&255)))}const va=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),ba=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),wa=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),Ca=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]);function ya(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}function xa(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function La(e,t){return Da(e.toLowerCase(),t.toLowerCase(),0,0)}function Da(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=Da(e,t,i+1,n+1))?Ba({start:n,end:n+1},o):null}return Da(e,t,i,n+1)}function Ea(e){return 97<=e&&e<=122}function Na(e){return 65<=e&&e<=90}function Ia(e){return 48<=e&&e<=57}function Ta(e){return 32===e||9===e||10===e||13===e}const Ma=new Set;function Aa(e){return Ta(e)||Ma.has(e)}function Ra(e,t){return e===t||Aa(e)&&Aa(t)}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>Ma.add(e.charCodeAt(0))));const Pa=new Map;function Oa(e){if(Pa.has(e))return Pa.get(e);let t;const i=function(e){const t=function(e){if(ma=0,_a(e,va,4352),ma>0)return fa.subarray(0,ma);if(_a(e,ba,4449),ma>0)return fa.subarray(0,ma);if(_a(e,wa,4520),ma>0)return fa.subarray(0,ma);if(_a(e,Ca,12593),ma)return fa.subarray(0,ma);if(e>=44032&&e<=55203){const t=e-44032,i=t%588,n=Math.floor(t/588),o=Math.floor(i/28),s=i%28-1;if(n=0&&(s0)return fa.subarray(0,ma)}}(e);if(t&&t.length>0)return new Uint32Array(t)}(e);return i&&(t=i),Pa.set(e,t),t}function Fa(e){return Ea(e)||Na(e)||Ia(e)}function Ba(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function Wa(e,t){for(let i=t;i0&&!Fa(e.charCodeAt(i-1)))return i}return e.length}function Va(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,s=n+1;for(o=Va(e,t,i+1,n+1);!o&&(s=Wa(t,s))60&&(t=t.substring(0,60));const i=function(e){let t=0,i=0,n=0,o=0,s=0;for(let r=0;r.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o0&&Aa(e.charCodeAt(i-1)))return i;return e.length}const Ka=ya(Sa,Ha,xa),ja=ya(Sa,Ha,La),qa=new ua(1e4);function $a(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=qa.get(e);n||(n=new RegExp(e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*"),"i"),qa.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?ja(e,t):Ka(e,t)}function Ga(e,t){const i=ul(e,e.toLowerCase(),0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return i?Ya(i):null}function Za(e,t,i,n,o,s){const r=Math.min(13,e.length);for(;i1;n--){const o=e[n]+i,s=t[t.length-1];s&&s.end===o?s.end=o+1:t.push({start:o,end:o+1})}return t}const Qa=128;function Xa(){const e=[],t=[];for(let e=0;e<=Qa;e++)t[e]=0;for(let i=0;i<=Qa;i++)e.push(t.slice(0));return e}function Ja(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const el=Ja(2*Qa),tl=Ja(2*Qa),il=Xa(),nl=Xa(),ol=Xa(),sl=!1;function rl(e,t,i,n,o){function s(e,t,i=" "){for(;e.lengths(e,3))).join("|")}\n`;for(let n=0;n<=i;n++)r+=0===n?" |":`${t[n-1]}|`,r+=e[n].slice(0,o+1).map((e=>s(e.toString(),3))).join("|")+"\n";return r}function al(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!qn(i)}}function ll(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function dl(e,t,i){return t[e]!==i[e]}var cl;!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(cl||(cl={}));class hl{constructor(e,t){this.firstMatchCanBeWeak=e,this.boostFullMatch=t}}function ul(e,t,i,n,o,s,r=hl.default){const a=e.length>Qa?Qa:e.length,l=n.length>Qa?Qa:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!function(e,t,i,n,o,s,r=!1){for(;t=i&&a>=n;)o[r]===s[a]&&(tl[r]=a,r--),a--}(a,l,i,s,t,o);let d=1,c=1,h=i,u=s;const g=[!1];for(d=1,h=i;hr,v=_?nl[d][c-1]+(il[d][c-1]>0?-5:0):0,b=u>r+1&&il[d][c-1]>0,w=b?nl[d][c-2]+(il[d][c-2]>0?-5:0):0;if(b&&(!_||w>=v)&&(!m||w>=f))nl[d][c]=w,ol[d][c]=3,il[d][c]=0;else if(_&&(!m||v>=f))nl[d][c]=v,ol[d][c]=2,il[d][c]=0;else{if(!m)throw new Error("not possible");nl[d][c]=f,ol[d][c]=1,il[d][c]=il[d-1][c-1]+1}}}if(sl&&function(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(rl(nl,e,e.length,i,i.length)),console.log(rl(ol,e,e.length,i,i.length)),console.log(rl(il,e,e.length,i,i.length))}(e,i,n,s),!g[0]&&!r.firstMatchCanBeWeak)return;d--,c--;const p=[nl[d][c],s];let m=0,f=0;for(;d>=1;){let e=c;do{const t=ol[d][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+d-1]===o[s+c-1]&&!dl(e+s-1,n,o)&&m+1>il[d][e]&&(e=c),e===c?m++:m=1,f||(f=e),d--,c=e-1,p.push(c)}l-s===a&&r.boostFullMatch&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function gl(e,t,i,n,o,s,r,a,l,d,c){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===i-n?h=e[i]===o[r]?7:5:!dl(r,o,s)||0!==r&&dl(r-1,o,s)?!al(s,r)||0!==r&&al(s,r-1)?(al(s,r-1)||ll(s,r-1))&&(h=5,u=!0):h=5:(h=e[i]===o[r]?7:5,u=!0),h>1&&i===n&&(c[0]=!0),u||(u=dl(r,o,s)||al(s,r-1)||ll(s,r-1)),i===n?r>l&&(h-=u?3:5):h+=d?u?2:0:u?0:1,r+1===a&&(h-=u?3:5),h}function pl(e,t,i,n,o,s,r){return function(e,t,i,n,o,s,r,a){let l=ul(e,t,i,n,o,s,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}(e,t,i,n,o,s,0,r)}function ml(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}function fl(e){return"string"==typeof e}function _l(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function vl(e){const t=Object.getPrototypeOf(Uint8Array);return"object"==typeof e&&e instanceof t}function bl(e){return"number"==typeof e&&!isNaN(e)}function wl(e){return!!e&&"function"==typeof e[Symbol.iterator]}function Cl(e){return!0===e||!1===e}function yl(e){return void 0===e}function Sl(e){return!kl(e)}function kl(e){return yl(e)||null===e}function xl(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function Ll(e){if(kl(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function Dl(e){return"function"==typeof e}function El(e,t){if(fl(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(Dl(t)){try{if(e instanceof t)return}catch(e){}if(!kl(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}hl.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};const Nl=Object.create(null);function Il(e,t){if(fl(t)){const i=Nl[t];if(void 0===i)throw new Error(`${e} references an unknown codicon: ${t}`);t=i}return Nl[e]=t,{id:e}}function Tl(){return Nl}const Ml={add:Il("add",6e4),plus:Il("plus",6e4),gistNew:Il("gist-new",6e4),repoCreate:Il("repo-create",6e4),lightbulb:Il("lightbulb",60001),lightBulb:Il("light-bulb",60001),repo:Il("repo",60002),repoDelete:Il("repo-delete",60002),gistFork:Il("gist-fork",60003),repoForked:Il("repo-forked",60003),gitPullRequest:Il("git-pull-request",60004),gitPullRequestAbandoned:Il("git-pull-request-abandoned",60004),recordKeys:Il("record-keys",60005),keyboard:Il("keyboard",60005),tag:Il("tag",60006),gitPullRequestLabel:Il("git-pull-request-label",60006),tagAdd:Il("tag-add",60006),tagRemove:Il("tag-remove",60006),person:Il("person",60007),personFollow:Il("person-follow",60007),personOutline:Il("person-outline",60007),personFilled:Il("person-filled",60007),gitBranch:Il("git-branch",60008),gitBranchCreate:Il("git-branch-create",60008),gitBranchDelete:Il("git-branch-delete",60008),sourceControl:Il("source-control",60008),mirror:Il("mirror",60009),mirrorPublic:Il("mirror-public",60009),star:Il("star",60010),starAdd:Il("star-add",60010),starDelete:Il("star-delete",60010),starEmpty:Il("star-empty",60010),comment:Il("comment",60011),commentAdd:Il("comment-add",60011),alert:Il("alert",60012),warning:Il("warning",60012),search:Il("search",60013),searchSave:Il("search-save",60013),logOut:Il("log-out",60014),signOut:Il("sign-out",60014),logIn:Il("log-in",60015),signIn:Il("sign-in",60015),eye:Il("eye",60016),eyeUnwatch:Il("eye-unwatch",60016),eyeWatch:Il("eye-watch",60016),circleFilled:Il("circle-filled",60017),primitiveDot:Il("primitive-dot",60017),closeDirty:Il("close-dirty",60017),debugBreakpoint:Il("debug-breakpoint",60017),debugBreakpointDisabled:Il("debug-breakpoint-disabled",60017),debugHint:Il("debug-hint",60017),terminalDecorationSuccess:Il("terminal-decoration-success",60017),primitiveSquare:Il("primitive-square",60018),edit:Il("edit",60019),pencil:Il("pencil",60019),info:Il("info",60020),issueOpened:Il("issue-opened",60020),gistPrivate:Il("gist-private",60021),gitForkPrivate:Il("git-fork-private",60021),lock:Il("lock",60021),mirrorPrivate:Il("mirror-private",60021),close:Il("close",60022),removeClose:Il("remove-close",60022),x:Il("x",60022),repoSync:Il("repo-sync",60023),sync:Il("sync",60023),clone:Il("clone",60024),desktopDownload:Il("desktop-download",60024),beaker:Il("beaker",60025),microscope:Il("microscope",60025),vm:Il("vm",60026),deviceDesktop:Il("device-desktop",60026),file:Il("file",60027),fileText:Il("file-text",60027),more:Il("more",60028),ellipsis:Il("ellipsis",60028),kebabHorizontal:Il("kebab-horizontal",60028),mailReply:Il("mail-reply",60029),reply:Il("reply",60029),organization:Il("organization",60030),organizationFilled:Il("organization-filled",60030),organizationOutline:Il("organization-outline",60030),newFile:Il("new-file",60031),fileAdd:Il("file-add",60031),newFolder:Il("new-folder",60032),fileDirectoryCreate:Il("file-directory-create",60032),trash:Il("trash",60033),trashcan:Il("trashcan",60033),history:Il("history",60034),clock:Il("clock",60034),folder:Il("folder",60035),fileDirectory:Il("file-directory",60035),symbolFolder:Il("symbol-folder",60035),logoGithub:Il("logo-github",60036),markGithub:Il("mark-github",60036),github:Il("github",60036),terminal:Il("terminal",60037),console:Il("console",60037),repl:Il("repl",60037),zap:Il("zap",60038),symbolEvent:Il("symbol-event",60038),error:Il("error",60039),stop:Il("stop",60039),variable:Il("variable",60040),symbolVariable:Il("symbol-variable",60040),array:Il("array",60042),symbolArray:Il("symbol-array",60042),symbolModule:Il("symbol-module",60043),symbolPackage:Il("symbol-package",60043),symbolNamespace:Il("symbol-namespace",60043),symbolObject:Il("symbol-object",60043),symbolMethod:Il("symbol-method",60044),symbolFunction:Il("symbol-function",60044),symbolConstructor:Il("symbol-constructor",60044),symbolBoolean:Il("symbol-boolean",60047),symbolNull:Il("symbol-null",60047),symbolNumeric:Il("symbol-numeric",60048),symbolNumber:Il("symbol-number",60048),symbolStructure:Il("symbol-structure",60049),symbolStruct:Il("symbol-struct",60049),symbolParameter:Il("symbol-parameter",60050),symbolTypeParameter:Il("symbol-type-parameter",60050),symbolKey:Il("symbol-key",60051),symbolText:Il("symbol-text",60051),symbolReference:Il("symbol-reference",60052),goToFile:Il("go-to-file",60052),symbolEnum:Il("symbol-enum",60053),symbolValue:Il("symbol-value",60053),symbolRuler:Il("symbol-ruler",60054),symbolUnit:Il("symbol-unit",60054),activateBreakpoints:Il("activate-breakpoints",60055),archive:Il("archive",60056),arrowBoth:Il("arrow-both",60057),arrowDown:Il("arrow-down",60058),arrowLeft:Il("arrow-left",60059),arrowRight:Il("arrow-right",60060),arrowSmallDown:Il("arrow-small-down",60061),arrowSmallLeft:Il("arrow-small-left",60062),arrowSmallRight:Il("arrow-small-right",60063),arrowSmallUp:Il("arrow-small-up",60064),arrowUp:Il("arrow-up",60065),bell:Il("bell",60066),bold:Il("bold",60067),book:Il("book",60068),bookmark:Il("bookmark",60069),debugBreakpointConditionalUnverified:Il("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:Il("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:Il("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:Il("debug-breakpoint-data-unverified",60072),debugBreakpointData:Il("debug-breakpoint-data",60073),debugBreakpointDataDisabled:Il("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:Il("debug-breakpoint-log-unverified",60074),debugBreakpointLog:Il("debug-breakpoint-log",60075),debugBreakpointLogDisabled:Il("debug-breakpoint-log-disabled",60075),briefcase:Il("briefcase",60076),broadcast:Il("broadcast",60077),browser:Il("browser",60078),bug:Il("bug",60079),calendar:Il("calendar",60080),caseSensitive:Il("case-sensitive",60081),check:Il("check",60082),checklist:Il("checklist",60083),chevronDown:Il("chevron-down",60084),chevronLeft:Il("chevron-left",60085),chevronRight:Il("chevron-right",60086),chevronUp:Il("chevron-up",60087),chromeClose:Il("chrome-close",60088),chromeMaximize:Il("chrome-maximize",60089),chromeMinimize:Il("chrome-minimize",60090),chromeRestore:Il("chrome-restore",60091),circleOutline:Il("circle-outline",60092),circle:Il("circle",60092),debugBreakpointUnverified:Il("debug-breakpoint-unverified",60092),terminalDecorationIncomplete:Il("terminal-decoration-incomplete",60092),circleSlash:Il("circle-slash",60093),circuitBoard:Il("circuit-board",60094),clearAll:Il("clear-all",60095),clippy:Il("clippy",60096),closeAll:Il("close-all",60097),cloudDownload:Il("cloud-download",60098),cloudUpload:Il("cloud-upload",60099),code:Il("code",60100),collapseAll:Il("collapse-all",60101),colorMode:Il("color-mode",60102),commentDiscussion:Il("comment-discussion",60103),creditCard:Il("credit-card",60105),dash:Il("dash",60108),dashboard:Il("dashboard",60109),database:Il("database",60110),debugContinue:Il("debug-continue",60111),debugDisconnect:Il("debug-disconnect",60112),debugPause:Il("debug-pause",60113),debugRestart:Il("debug-restart",60114),debugStart:Il("debug-start",60115),debugStepInto:Il("debug-step-into",60116),debugStepOut:Il("debug-step-out",60117),debugStepOver:Il("debug-step-over",60118),debugStop:Il("debug-stop",60119),debug:Il("debug",60120),deviceCameraVideo:Il("device-camera-video",60121),deviceCamera:Il("device-camera",60122),deviceMobile:Il("device-mobile",60123),diffAdded:Il("diff-added",60124),diffIgnored:Il("diff-ignored",60125),diffModified:Il("diff-modified",60126),diffRemoved:Il("diff-removed",60127),diffRenamed:Il("diff-renamed",60128),diff:Il("diff",60129),diffSidebyside:Il("diff-sidebyside",60129),discard:Il("discard",60130),editorLayout:Il("editor-layout",60131),emptyWindow:Il("empty-window",60132),exclude:Il("exclude",60133),extensions:Il("extensions",60134),eyeClosed:Il("eye-closed",60135),fileBinary:Il("file-binary",60136),fileCode:Il("file-code",60137),fileMedia:Il("file-media",60138),filePdf:Il("file-pdf",60139),fileSubmodule:Il("file-submodule",60140),fileSymlinkDirectory:Il("file-symlink-directory",60141),fileSymlinkFile:Il("file-symlink-file",60142),fileZip:Il("file-zip",60143),files:Il("files",60144),filter:Il("filter",60145),flame:Il("flame",60146),foldDown:Il("fold-down",60147),foldUp:Il("fold-up",60148),fold:Il("fold",60149),folderActive:Il("folder-active",60150),folderOpened:Il("folder-opened",60151),gear:Il("gear",60152),gift:Il("gift",60153),gistSecret:Il("gist-secret",60154),gist:Il("gist",60155),gitCommit:Il("git-commit",60156),gitCompare:Il("git-compare",60157),compareChanges:Il("compare-changes",60157),gitMerge:Il("git-merge",60158),githubAction:Il("github-action",60159),githubAlt:Il("github-alt",60160),globe:Il("globe",60161),grabber:Il("grabber",60162),graph:Il("graph",60163),gripper:Il("gripper",60164),heart:Il("heart",60165),home:Il("home",60166),horizontalRule:Il("horizontal-rule",60167),hubot:Il("hubot",60168),inbox:Il("inbox",60169),issueReopened:Il("issue-reopened",60171),issues:Il("issues",60172),italic:Il("italic",60173),jersey:Il("jersey",60174),json:Il("json",60175),kebabVertical:Il("kebab-vertical",60176),key:Il("key",60177),law:Il("law",60178),lightbulbAutofix:Il("lightbulb-autofix",60179),linkExternal:Il("link-external",60180),link:Il("link",60181),listOrdered:Il("list-ordered",60182),listUnordered:Il("list-unordered",60183),liveShare:Il("live-share",60184),loading:Il("loading",60185),location:Il("location",60186),mailRead:Il("mail-read",60187),mail:Il("mail",60188),markdown:Il("markdown",60189),megaphone:Il("megaphone",60190),mention:Il("mention",60191),milestone:Il("milestone",60192),gitPullRequestMilestone:Il("git-pull-request-milestone",60192),mortarBoard:Il("mortar-board",60193),move:Il("move",60194),multipleWindows:Il("multiple-windows",60195),mute:Il("mute",60196),noNewline:Il("no-newline",60197),note:Il("note",60198),octoface:Il("octoface",60199),openPreview:Il("open-preview",60200),package:Il("package",60201),paintcan:Il("paintcan",60202),pin:Il("pin",60203),play:Il("play",60204),run:Il("run",60204),plug:Il("plug",60205),preserveCase:Il("preserve-case",60206),preview:Il("preview",60207),project:Il("project",60208),pulse:Il("pulse",60209),question:Il("question",60210),quote:Il("quote",60211),radioTower:Il("radio-tower",60212),reactions:Il("reactions",60213),references:Il("references",60214),refresh:Il("refresh",60215),regex:Il("regex",60216),remoteExplorer:Il("remote-explorer",60217),remote:Il("remote",60218),remove:Il("remove",60219),replaceAll:Il("replace-all",60220),replace:Il("replace",60221),repoClone:Il("repo-clone",60222),repoForcePush:Il("repo-force-push",60223),repoPull:Il("repo-pull",60224),repoPush:Il("repo-push",60225),report:Il("report",60226),requestChanges:Il("request-changes",60227),rocket:Il("rocket",60228),rootFolderOpened:Il("root-folder-opened",60229),rootFolder:Il("root-folder",60230),rss:Il("rss",60231),ruby:Il("ruby",60232),saveAll:Il("save-all",60233),saveAs:Il("save-as",60234),save:Il("save",60235),screenFull:Il("screen-full",60236),screenNormal:Il("screen-normal",60237),searchStop:Il("search-stop",60238),server:Il("server",60240),settingsGear:Il("settings-gear",60241),settings:Il("settings",60242),shield:Il("shield",60243),smiley:Il("smiley",60244),sortPrecedence:Il("sort-precedence",60245),splitHorizontal:Il("split-horizontal",60246),splitVertical:Il("split-vertical",60247),squirrel:Il("squirrel",60248),starFull:Il("star-full",60249),starHalf:Il("star-half",60250),symbolClass:Il("symbol-class",60251),symbolColor:Il("symbol-color",60252),symbolConstant:Il("symbol-constant",60253),symbolEnumMember:Il("symbol-enum-member",60254),symbolField:Il("symbol-field",60255),symbolFile:Il("symbol-file",60256),symbolInterface:Il("symbol-interface",60257),symbolKeyword:Il("symbol-keyword",60258),symbolMisc:Il("symbol-misc",60259),symbolOperator:Il("symbol-operator",60260),symbolProperty:Il("symbol-property",60261),wrench:Il("wrench",60261),wrenchSubaction:Il("wrench-subaction",60261),symbolSnippet:Il("symbol-snippet",60262),tasklist:Il("tasklist",60263),telescope:Il("telescope",60264),textSize:Il("text-size",60265),threeBars:Il("three-bars",60266),thumbsdown:Il("thumbsdown",60267),thumbsup:Il("thumbsup",60268),tools:Il("tools",60269),triangleDown:Il("triangle-down",60270),triangleLeft:Il("triangle-left",60271),triangleRight:Il("triangle-right",60272),triangleUp:Il("triangle-up",60273),twitter:Il("twitter",60274),unfold:Il("unfold",60275),unlock:Il("unlock",60276),unmute:Il("unmute",60277),unverified:Il("unverified",60278),verified:Il("verified",60279),versions:Il("versions",60280),vmActive:Il("vm-active",60281),vmOutline:Il("vm-outline",60282),vmRunning:Il("vm-running",60283),watch:Il("watch",60284),whitespace:Il("whitespace",60285),wholeWord:Il("whole-word",60286),window:Il("window",60287),wordWrap:Il("word-wrap",60288),zoomIn:Il("zoom-in",60289),zoomOut:Il("zoom-out",60290),listFilter:Il("list-filter",60291),listFlat:Il("list-flat",60292),listSelection:Il("list-selection",60293),selection:Il("selection",60293),listTree:Il("list-tree",60294),debugBreakpointFunctionUnverified:Il("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:Il("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:Il("debug-breakpoint-function-disabled",60296),debugStackframeActive:Il("debug-stackframe-active",60297),circleSmallFilled:Il("circle-small-filled",60298),debugStackframeDot:Il("debug-stackframe-dot",60298),terminalDecorationMark:Il("terminal-decoration-mark",60298),debugStackframe:Il("debug-stackframe",60299),debugStackframeFocused:Il("debug-stackframe-focused",60299),debugBreakpointUnsupported:Il("debug-breakpoint-unsupported",60300),symbolString:Il("symbol-string",60301),debugReverseContinue:Il("debug-reverse-continue",60302),debugStepBack:Il("debug-step-back",60303),debugRestartFrame:Il("debug-restart-frame",60304),debugAlt:Il("debug-alt",60305),callIncoming:Il("call-incoming",60306),callOutgoing:Il("call-outgoing",60307),menu:Il("menu",60308),expandAll:Il("expand-all",60309),feedback:Il("feedback",60310),gitPullRequestReviewer:Il("git-pull-request-reviewer",60310),groupByRefType:Il("group-by-ref-type",60311),ungroupByRefType:Il("ungroup-by-ref-type",60312),account:Il("account",60313),gitPullRequestAssignee:Il("git-pull-request-assignee",60313),bellDot:Il("bell-dot",60314),debugConsole:Il("debug-console",60315),library:Il("library",60316),output:Il("output",60317),runAll:Il("run-all",60318),syncIgnored:Il("sync-ignored",60319),pinned:Il("pinned",60320),githubInverted:Il("github-inverted",60321),serverProcess:Il("server-process",60322),serverEnvironment:Il("server-environment",60323),pass:Il("pass",60324),issueClosed:Il("issue-closed",60324),stopCircle:Il("stop-circle",60325),playCircle:Il("play-circle",60326),record:Il("record",60327),debugAltSmall:Il("debug-alt-small",60328),vmConnect:Il("vm-connect",60329),cloud:Il("cloud",60330),merge:Il("merge",60331),export:Il("export",60332),graphLeft:Il("graph-left",60333),magnet:Il("magnet",60334),notebook:Il("notebook",60335),redo:Il("redo",60336),checkAll:Il("check-all",60337),pinnedDirty:Il("pinned-dirty",60338),passFilled:Il("pass-filled",60339),circleLargeFilled:Il("circle-large-filled",60340),circleLarge:Il("circle-large",60341),circleLargeOutline:Il("circle-large-outline",60341),combine:Il("combine",60342),gather:Il("gather",60342),table:Il("table",60343),variableGroup:Il("variable-group",60344),typeHierarchy:Il("type-hierarchy",60345),typeHierarchySub:Il("type-hierarchy-sub",60346),typeHierarchySuper:Il("type-hierarchy-super",60347),gitPullRequestCreate:Il("git-pull-request-create",60348),runAbove:Il("run-above",60349),runBelow:Il("run-below",60350),notebookTemplate:Il("notebook-template",60351),debugRerun:Il("debug-rerun",60352),workspaceTrusted:Il("workspace-trusted",60353),workspaceUntrusted:Il("workspace-untrusted",60354),workspaceUnknown:Il("workspace-unknown",60355),terminalCmd:Il("terminal-cmd",60356),terminalDebian:Il("terminal-debian",60357),terminalLinux:Il("terminal-linux",60358),terminalPowershell:Il("terminal-powershell",60359),terminalTmux:Il("terminal-tmux",60360),terminalUbuntu:Il("terminal-ubuntu",60361),terminalBash:Il("terminal-bash",60362),arrowSwap:Il("arrow-swap",60363),copy:Il("copy",60364),personAdd:Il("person-add",60365),filterFilled:Il("filter-filled",60366),wand:Il("wand",60367),debugLineByLine:Il("debug-line-by-line",60368),inspect:Il("inspect",60369),layers:Il("layers",60370),layersDot:Il("layers-dot",60371),layersActive:Il("layers-active",60372),compass:Il("compass",60373),compassDot:Il("compass-dot",60374),compassActive:Il("compass-active",60375),azure:Il("azure",60376),issueDraft:Il("issue-draft",60377),gitPullRequestClosed:Il("git-pull-request-closed",60378),gitPullRequestDraft:Il("git-pull-request-draft",60379),debugAll:Il("debug-all",60380),debugCoverage:Il("debug-coverage",60381),runErrors:Il("run-errors",60382),folderLibrary:Il("folder-library",60383),debugContinueSmall:Il("debug-continue-small",60384),beakerStop:Il("beaker-stop",60385),graphLine:Il("graph-line",60386),graphScatter:Il("graph-scatter",60387),pieChart:Il("pie-chart",60388),bracket:Il("bracket",60175),bracketDot:Il("bracket-dot",60389),bracketError:Il("bracket-error",60390),lockSmall:Il("lock-small",60391),azureDevops:Il("azure-devops",60392),verifiedFilled:Il("verified-filled",60393),newline:Il("newline",60394),layout:Il("layout",60395),layoutActivitybarLeft:Il("layout-activitybar-left",60396),layoutActivitybarRight:Il("layout-activitybar-right",60397),layoutPanelLeft:Il("layout-panel-left",60398),layoutPanelCenter:Il("layout-panel-center",60399),layoutPanelJustify:Il("layout-panel-justify",60400),layoutPanelRight:Il("layout-panel-right",60401),layoutPanel:Il("layout-panel",60402),layoutSidebarLeft:Il("layout-sidebar-left",60403),layoutSidebarRight:Il("layout-sidebar-right",60404),layoutStatusbar:Il("layout-statusbar",60405),layoutMenubar:Il("layout-menubar",60406),layoutCentered:Il("layout-centered",60407),target:Il("target",60408),indent:Il("indent",60409),recordSmall:Il("record-small",60410),errorSmall:Il("error-small",60411),terminalDecorationError:Il("terminal-decoration-error",60411),arrowCircleDown:Il("arrow-circle-down",60412),arrowCircleLeft:Il("arrow-circle-left",60413),arrowCircleRight:Il("arrow-circle-right",60414),arrowCircleUp:Il("arrow-circle-up",60415),layoutSidebarRightOff:Il("layout-sidebar-right-off",60416),layoutPanelOff:Il("layout-panel-off",60417),layoutSidebarLeftOff:Il("layout-sidebar-left-off",60418),blank:Il("blank",60419),heartFilled:Il("heart-filled",60420),map:Il("map",60421),mapHorizontal:Il("map-horizontal",60421),foldHorizontal:Il("fold-horizontal",60421),mapFilled:Il("map-filled",60422),mapHorizontalFilled:Il("map-horizontal-filled",60422),foldHorizontalFilled:Il("fold-horizontal-filled",60422),circleSmall:Il("circle-small",60423),bellSlash:Il("bell-slash",60424),bellSlashDot:Il("bell-slash-dot",60425),commentUnresolved:Il("comment-unresolved",60426),gitPullRequestGoToChanges:Il("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:Il("git-pull-request-new-changes",60428),searchFuzzy:Il("search-fuzzy",60429),commentDraft:Il("comment-draft",60430),send:Il("send",60431),sparkle:Il("sparkle",60432),insert:Il("insert",60433),mic:Il("mic",60434),thumbsdownFilled:Il("thumbsdown-filled",60435),thumbsupFilled:Il("thumbsup-filled",60436),coffee:Il("coffee",60437),snake:Il("snake",60438),game:Il("game",60439),vr:Il("vr",60440),chip:Il("chip",60441),piano:Il("piano",60442),music:Il("music",60443),micFilled:Il("mic-filled",60444),repoFetch:Il("repo-fetch",60445),copilot:Il("copilot",60446),lightbulbSparkle:Il("lightbulb-sparkle",60447),robot:Il("robot",60448),sparkleFilled:Il("sparkle-filled",60449),diffSingle:Il("diff-single",60450),diffMultiple:Il("diff-multiple",60451),surroundWith:Il("surround-with",60452),share:Il("share",60453),gitStash:Il("git-stash",60454),gitStashApply:Il("git-stash-apply",60455),gitStashPop:Il("git-stash-pop",60456),vscode:Il("vscode",60457),vscodeInsiders:Il("vscode-insiders",60458),codeOss:Il("code-oss",60459),runCoverage:Il("run-coverage",60460),runAllCoverage:Il("run-all-coverage",60461),coverage:Il("coverage",60462),githubProject:Il("github-project",60463),mapVertical:Il("map-vertical",60464),foldVertical:Il("fold-vertical",60464),mapVerticalFilled:Il("map-vertical-filled",60465),foldVerticalFilled:Il("fold-vertical-filled",60465),goToSearch:Il("go-to-search",60466),percentage:Il("percentage",60467),sortPercentage:Il("sort-percentage",60467),attach:Il("attach",60468),dialogError:Il("dialog-error","error"),dialogWarning:Il("dialog-warning","warning"),dialogInfo:Il("dialog-info","info"),dialogClose:Il("dialog-close","close"),treeItemExpanded:Il("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:Il("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:Il("tree-filter-on-type-off","list-selection"),treeFilterClear:Il("tree-filter-clear","close"),treeItemLoading:Il("tree-item-loading","loading"),menuSelection:Il("menu-selection","check"),menuSubmenu:Il("menu-submenu","chevron-right"),menuBarMore:Il("menubar-more","more"),scrollbarButtonLeft:Il("scrollbar-button-left","triangle-left"),scrollbarButtonRight:Il("scrollbar-button-right","triangle-right"),scrollbarButtonUp:Il("scrollbar-button-up","triangle-up"),scrollbarButtonDown:Il("scrollbar-button-down","triangle-down"),toolBarMore:Il("toolbar-more","more"),quickInputBack:Il("quick-input-back","arrow-left"),dropDownButton:Il("drop-down-button",60084),symbolCustomColor:Il("symbol-customcolor",60252),exportIcon:Il("export",60332),workspaceUnspecified:Il("workspace-unspecified",60355),newLine:Il("newline",60394),thumbsDownFilled:Il("thumbsdown-filled",60435),thumbsUpFilled:Il("thumbsup-filled",60436),gitFetch:Il("git-fetch",60445),lightbulbSparkleAutofix:Il("lightbulb-sparkle-autofix",60447),debugBreakpointPending:Il("debug-breakpoint-pending",60377)};var Al,Rl;!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(Al||(Al={})),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){const n=t.exec(e.id);if(!n)return i(Ml.error);const[,o,s]=n,r=["codicon","codicon-"+o];return s&&r.push("codicon-modifier-"+s.substring(1)),r}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")},e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||Al.isThemeColor(e.color))};const n=new RegExp(`^\\$\\((${e.iconNameExpression}(?:${e.iconModifierExpression})?)\\)$`);e.fromString=function(e){const t=n.exec(e);if(!t)return;const[,i]=t;return{id:i}},e.fromId=function(e){return{id:e}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.getModifier=function(e){const t=e.id.lastIndexOf("~");if(-1!==t)return e.id.substring(t+1)},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)}}(Rl||(Rl={}));const Pl=new RegExp(`\\$\\(${Rl.iconNameExpression}(?:${Rl.iconModifierExpression})?\\)`,"g"),Ol=new RegExp(`(\\\\)?${Pl.source}`,"g"),Fl=new RegExp(`\\\\${Pl.source}`,"g"),Bl=new RegExp(`(\\s)?(\\\\)?${Pl.source}(\\s)?`,"g");function Wl(e){return-1===e.indexOf("$(")?e:e.replace(Bl,((e,t,i,n)=>i?e:t||n||""))}const Vl=new RegExp(`\\$\\(${Rl.iconNameCharacter}+\\)`,"g");function Hl(e){Vl.lastIndex=0;let t="";const i=[];let n=0;for(;;){const o=Vl.lastIndex,s=Vl.exec(e),r=e.substring(o,null==s?void 0:s.index);if(r.length>0){t+=r;for(let e=0;ee.length)return!1;if(i){if(!En(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,e.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function $l(e){return e>=65&&e<=90||e>=97&&e<=122}function Gl(e){return Ho(e,!0)}class Zl{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:wn(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===qo.file)return ql(Gl(e),Gl(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(rd(e.authority,t.authority))return ql(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return Po.joinPath(e,...t)}basenameOrAuthority(e){return Jl(e)||e.authority}basename(e){return Co.basename(e.path)}extname(e){return Co.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===qo.file?t=Po.file(xo(Gl(e))).path:(t=Co.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===qo.file?Po.file(yo(Gl(e))).path:Co.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!rd(e.authority,t.authority))return;if(e.scheme===qo.file){const i=ko(Gl(e),Gl(t));return U?Kl(i):i}let i=e.path||"/";const n=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,n.length);ejl(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=Eo){return ad(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=Eo){let i=!1;if(e.scheme===qo.file){const n=Gl(e);i=void 0!==n&&n.length===jl(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||ad(e,t)?e:e.with({path:e.path+"/"})}}const Yl=new Zl((()=>!1)),Ql=(new Zl((e=>e.scheme!==qo.file||!j)),new Zl((e=>!0)),Yl.isEqual.bind(Yl)),Xl=(Yl.isEqualOrParent.bind(Yl),Yl.getComparisonKey.bind(Yl),Yl.basenameOrAuthority.bind(Yl)),Jl=Yl.basename.bind(Yl),ed=Yl.extname.bind(Yl),td=Yl.dirname.bind(Yl),id=Yl.joinPath.bind(Yl),nd=Yl.normalizePath.bind(Yl),od=Yl.relativePath.bind(Yl),sd=Yl.resolvePath.bind(Yl),rd=(Yl.isAbsolutePath.bind(Yl),Yl.isEqualAuthority.bind(Yl)),ad=Yl.hasTrailingPathSeparator.bind(Yl);var ld;Yl.removeTrailingPathSeparator.bind(Yl),Yl.addTrailingPathSeparator.bind(Yl),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(ld||(ld={}));class dd{constructor(e="",t=!1){var i,n,o;if(this.value=e,"string"!=typeof this.value)throw Te("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n,this.supportHtml=null!==(o=t.supportHtml)&&void 0!==o&&o)}appendText(e,t=0){var i;return this.value+=function(e){return e.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}(this.supportThemeIcons?(i=e,i.replace(Ol,((e,t)=>t?e:`\\${e}`))):e).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+=`\n${function(e,t){var i,n;const o=null!==(n=null===(i=e.match(/^`+/gm))||void 0===i?void 0:i.reduce(((e,t)=>e.length>t.length?e:t)).length)&&void 0!==n?n:0,s=o>=3?o+1:3;return[`${"`".repeat(s)}${t}`,e,`${"`".repeat(s)}`].join("\n")}(t,e)}\n`,this}appendLink(e,t,i){return this.value+="[",this.value+=this._escape(t,"]"),this.value+="](",this.value+=this._escape(String(e),")"),i&&(this.value+=` "${this._escape(this._escape(i,'"'),")")}"`),this.value+=")",this}_escape(e,t){const i=new RegExp(hn(t),"g");return e.replace(i,((t,i)=>"\\"!==e.charAt(i-1)?`\\${t}`:t))}}function cd(e){return hd(e)?!e.value:!Array.isArray(e)||e.every(cd)}function hd(e){return e instanceof dd||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&"object"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function ud(e){return e.replace(/"/g,""")}function gd(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):e}var pd,md=i(7018),fd={};fd.styleTagTransform=Gr(),fd.setAttributes=Kr(),fd.insert=zr().bind(null,"head"),fd.domAPI=Vr(),fd.insertStyleElement=qr(),Br()(md.Z,fd),md.Z&&md.Z.locals&&md.Z.locals,function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(pd||(pd={}));const _d=vd("instantiationService");function vd(e){if(pd.serviceIds.has(e))return pd.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[pd.DI_TARGET]===t?t[pd.DI_DEPENDENCIES].push({id:e,index:i}):(t[pd.DI_DEPENDENCIES]=[{id:e,index:i}],t[pd.DI_TARGET]=t)}(t,e,n)};return t.toString=()=>e,pd.serviceIds.set(e,t),t}const bd=vd("codeEditorService");class wd{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new wd(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return wd.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return wd.isBefore(this,e)}static isBefore(e,t){return e.lineNumbere.run(...t)}}Dd.ID="vs.actions.empty";const Nd=vd("commandService"),Id=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new kt,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.metadata&&Array.isArray(e.metadata.args)){const t=[];for(const i of e.metadata.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return function(e,t){const i=Math.min(e.length,t.length);for(let n=0;n{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),s}registerCommandAlias(e,t){return Id.registerCommand(e,((e,...i)=>e.get(Nd).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return Qe.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};function Td(...e){switch(e.length){case 1:return v(0,"Did you mean {0}?",e[0]);case 2:return v(0,"Did you mean {0} or {1}?",e[0],e[1]);case 3:return v(0,"Did you mean {0}, {1} or {2}?",e[0],e[1],e[2]);default:return}}Id.registerCommand("noop",(()=>{}));const Md=v(0,"Did you forget to open or close the quote?"),Ad=v(0,"Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'.");class Rd{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(e){switch(e.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return e.isTripleEq?"===":"==";case 4:return e.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:case 8:return">=";case 9:return"=~";case 10:case 17:case 18:case 19:return e.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 20:return"EOF";default:throw Me(`unhandled token type: ${JSON.stringify(e)}; have you forgotten to add a case?`)}}reset(e){return this._input=e,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const e=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:e})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const e=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:e})}else this._match(126)?this._addToken(9):this._error(Td("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(Td("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(Td("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(e){return!this._isAtEnd()&&this._input.charCodeAt(this._current)===e&&(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(e){this._tokens.push({type:e,offset:this._start})}_error(e){const t=this._start,i=this._input.substring(this._start,this._current),n={type:19,offset:this._start,lexeme:i};this._errors.push({offset:t,lexeme:i,additionalInfo:e}),this._tokens.push(n)}_string(){this.stringRe.lastIndex=this._start;const e=this.stringRe.exec(this._input);if(e){this._current=this._start+e[0].length;const t=this._input.substring(this._start,this._current),i=Rd._keywords.get(t);i?this._addToken(i):this._tokens.push({type:17,lexeme:t,offset:this._start})}}_quotedString(){for(;39!==this._peek()&&!this._isAtEnd();)this._advance();this._isAtEnd()?this._error(Md):(this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1}))}_regex(){let e=this._current,t=!1,i=!1;for(;;){if(e>=this._input.length)return this._current=e,void this._error(Ad);const n=this._input.charCodeAt(e);if(t)t=!1;else{if(47===n&&!i){e++;break}91===n?i=!0:92===n?t=!0:93===n&&(i=!1)}e++}for(;e=this._input.length}}Rd._regexFlags=new Set(["i","g","s","m","y","u"].map((e=>e.charCodeAt(0)))),Rd._keywords=new Map([["not",14],["in",13],["false",12],["true",11]]);const Pd=new Map;Pd.set("false",!1),Pd.set("true",!0),Pd.set("isMac",K),Pd.set("isLinux",j),Pd.set("isWindows",U),Pd.set("isWeb",$),Pd.set("isMacNative",K&&!$),Pd.set("isEdge",le),Pd.set("isFirefox",re),Pd.set("isChrome",se),Pd.set("isSafari",ae);const Od=Object.prototype.hasOwnProperty,Fd={regexParsingWithErrorRecovery:!0},Bd=v(0,"Empty context key expression"),Wd=v(0,"Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively."),Vd=v(0,"'in' after 'not'."),Hd=v(0,"closing parenthesis ')'"),zd=v(0,"Unexpected token"),Ud=v(0,"Did you forget to put && or || before the token?"),Kd=v(0,"Unexpected end of expression"),jd=v(0,"Did you forget to put a context key?");class qd{constructor(e=Fd){this._config=e,this._scanner=new Rd,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(e){if(""!==e){this._tokens=this._scanner.reset(e).scan(),this._current=0,this._parsingErrors=[];try{const e=this._expr();if(!this._isAtEnd()){const e=this._peek(),t=17===e.type?Ud:void 0;throw this._parsingErrors.push({message:zd,offset:e.offset,lexeme:Rd.getLexeme(e),additionalInfo:t}),qd._parseError}return e}catch(e){if(e!==qd._parseError)throw e;return}}else this._parsingErrors.push({message:Bd,offset:0,lexeme:"",additionalInfo:Wd})}_expr(){return this._or()}_or(){const e=[this._and()];for(;this._matchOne(16);){const t=this._and();e.push(t)}return 1===e.length?e[0]:$d.or(...e)}_and(){const e=[this._term()];for(;this._matchOne(15);){const t=this._term();e.push(t)}return 1===e.length?e[0]:$d.and(...e)}_term(){if(this._matchOne(2)){const e=this._peek();switch(e.type){case 11:return this._advance(),Zd.INSTANCE;case 12:return this._advance(),Yd.INSTANCE;case 0:{this._advance();const e=this._expr();return this._consume(1,Hd),null==e?void 0:e.negate()}case 17:return this._advance(),ic.create(e.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",e)}}return this._primary()}_primary(){const e=this._peek();switch(e.type){case 11:return this._advance(),$d.true();case 12:return this._advance(),$d.false();case 0:{this._advance();const e=this._expr();return this._consume(1,Hd),e}case 17:{const t=e.lexeme;if(this._advance(),this._matchOne(9)){const e=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),10!==e.type)throw this._errExpectedButGot("REGEX",e);const i=e.lexeme,n=i.lastIndexOf("/"),o=n===i.length-1?void 0:this._removeFlagsGY(i.substring(n+1));let s;try{s=new RegExp(i.substring(1,n),o)}catch(t){throw this._errExpectedButGot("REGEX",e)}return lc.create(t,s)}switch(e.type){case 10:case 19:{const i=[e.lexeme];this._advance();let n=this._peek(),o=0;for(let t=0;t=0){const s=i.slice(t+1,o),r="i"===i[o+1]?"i":"";try{n=new RegExp(s,r)}catch(t){throw this._errExpectedButGot("REGEX",e)}}}if(null===n)throw this._errExpectedButGot("REGEX",e);return lc.create(t,n)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,Vd);const e=this._value();return $d.notIn(t,e)}switch(this._peek().type){case 3:{this._advance();const e=this._value();if(18===this._previous().type)return $d.equals(t,e);switch(e){case"true":return $d.has(t);case"false":return $d.not(t);default:return $d.equals(t,e)}}case 4:{this._advance();const e=this._value();if(18===this._previous().type)return $d.notEquals(t,e);switch(e){case"true":return $d.not(t);case"false":return $d.has(t);default:return $d.notEquals(t,e)}}case 5:return this._advance(),rc.create(t,this._value());case 6:return this._advance(),ac.create(t,this._value());case 7:return this._advance(),oc.create(t,this._value());case 8:return this._advance(),sc.create(t,this._value());case 13:return this._advance(),$d.in(t,this._value());default:return $d.has(t)}}case 20:throw this._parsingErrors.push({message:Kd,offset:e.offset,lexeme:"",additionalInfo:jd}),qd._parseError;default:throw this._errExpectedButGot("true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value",this._peek())}}_value(){const e=this._peek();switch(e.type){case 17:case 18:return this._advance(),e.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(e){return e.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(e){return!!this._check(e)&&(this._advance(),!0)}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(e,t){if(this._check(e))return this._advance();throw this._errExpectedButGot(t,this._peek())}_errExpectedButGot(e,t,i){const n=v(0,"Expected: {0}\nReceived: '{1}'.",e,Rd.getLexeme(t)),o=t.offset,s=Rd.getLexeme(t);return this._parsingErrors.push({message:n,offset:o,lexeme:s,additionalInfo:i}),qd._parseError}_check(e){return this._peek().type===e}_peek(){return this._tokens[this._current]}_isAtEnd(){return 20===this._peek().type}}qd._parseError=new Error;class $d{static false(){return Zd.INSTANCE}static true(){return Yd.INSTANCE}static has(e){return Qd.create(e)}static equals(e,t){return Xd.create(e,t)}static notEquals(e,t){return tc.create(e,t)}static regex(e,t){return lc.create(e,t)}static in(e,t){return Jd.create(e,t)}static notIn(e,t){return ec.create(e,t)}static not(e){return ic.create(e)}static and(...e){return hc.create(e,null,!0)}static or(...e){return uc.create(e,null,!0)}static deserialize(e){if(null!=e)return this._parser.parse(e)}}function Gd(e,t){return e.cmp(t)}$d._parser=new qd({regexParsingWithErrorRecovery:!1});class Zd{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return Yd.INSTANCE}}Zd.INSTANCE=new Zd;class Yd{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return Zd.INSTANCE}}Yd.INSTANCE=new Yd;class Qd{static create(e,t=null){const i=Pd.get(e);return"boolean"==typeof i?i?Yd.INSTANCE:Zd.INSTANCE:new Qd(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=2}cmp(e){return e.type!==this.type?this.type-e.type:mc(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=Pd.get(this.key);return"boolean"==typeof e?e?Yd.INSTANCE:Zd.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=ic.create(this.key,this)),this.negated}}class Xd{static create(e,t,i=null){if("boolean"==typeof t)return t?Qd.create(e,i):ic.create(e,i);const n=Pd.get(e);return"boolean"==typeof n?t===(n?"true":"false")?Yd.INSTANCE:Zd.INSTANCE:new Xd(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}cmp(e){return e.type!==this.type?this.type-e.type:fc(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=Pd.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?Yd.INSTANCE:Zd.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=tc.create(this.key,this.value,this)),this.negated}}class Jd{static create(e,t){return new Jd(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}cmp(e){return e.type!==this.type?this.type-e.type:fc(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.includes(i):"string"==typeof i&&"object"==typeof t&&null!==t&&Od.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=ec.create(this.key,this.valueKey)),this.negated}}class ec{static create(e,t){return new ec(e,t)}constructor(e,t){this.key=e,this.valueKey=t,this.type=11,this._negated=Jd.create(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:this._negated.cmp(e._negated)}equals(e){return e.type===this.type&&this._negated.equals(e._negated)}substituteConstants(){return this}evaluate(e){return!this._negated.evaluate(e)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}class tc{static create(e,t,i=null){if("boolean"==typeof t)return t?ic.create(e,i):Qd.create(e,i);const n=Pd.get(e);return"boolean"==typeof n?t===(n?"true":"false")?Zd.INSTANCE:Yd.INSTANCE:new tc(e,t,i)}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}cmp(e){return e.type!==this.type?this.type-e.type:fc(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){const e=Pd.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?Zd.INSTANCE:Yd.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Xd.create(this.key,this.value,this)),this.negated}}class ic{static create(e,t=null){const i=Pd.get(e);return"boolean"==typeof i?i?Zd.INSTANCE:Yd.INSTANCE:new ic(e,t)}constructor(e,t){this.key=e,this.negated=t,this.type=3}cmp(e){return e.type!==this.type?this.type-e.type:mc(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=Pd.get(this.key);return"boolean"==typeof e?e?Zd.INSTANCE:Yd.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Qd.create(this.key,this)),this.negated}}function nc(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):Zd.INSTANCE}class oc{static create(e,t,i=null){return nc(t,(t=>new oc(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}cmp(e){return e.type!==this.type?this.type-e.type:fc(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ac.create(this.key,this.value,this)),this.negated}}class sc{static create(e,t,i=null){return nc(t,(t=>new sc(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}cmp(e){return e.type!==this.type?this.type-e.type:fc(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=rc.create(this.key,this.value,this)),this.negated}}class rc{static create(e,t,i=null){return nc(t,(t=>new rc(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}cmp(e){return e.type!==this.type?this.type-e.type:fc(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new ac(e,t,i)))}constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}cmp(e){return e.type!==this.type?this.type-e.type:fc(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=oc.create(this.key,this.value,this)),this.negated}}class lc{static create(e,t){return new lc(e,t)}constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=dc.create(this)),this.negated}}class dc{static create(e){return new dc(e)}constructor(e){this._actual=e,this.type=8}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}function cc(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=n[n.length-1];if(9!==e.type)break;n.pop();const t=n.pop(),o=0===n.length,s=uc.create(e.expr.map((e=>hc.create([e,t],null,i))),null,o);s&&(n.push(s),n.sort(Gd))}if(1===n.length)return n[0];if(i){for(let e=0;ee.serialize())).join(" && ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());this.negated=uc.create(e,this,!0)}return this.negated}}class uc{static create(e,t,i){return uc._normalizeArr(e,t,i)}constructor(e,t){this.expr=e,this.negated=t,this.type=9}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(const t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(const t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of bc(t))for(const t of bc(i))n.push(hc.create([e,t],null,!1));e.unshift(uc.create(n,null,!1))}this.negated=uc.create(e,this,!0)}return this.negated}}class gc extends Qd{static all(){return gc._info.values()}constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?gc._info.push({...i,key:e}):!0!==i&&gc._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return Xd.create(this.key,e)}}gc._info=[];const pc=vd("contextKeyService");function mc(e,t){return et?1:0}function fc(e,t,i,n){return ei?1:tn?1:0}function _c(e,t){if(0===e.type||1===t.type)return!0;if(9===e.type)return 9===t.type&&vc(e.expr,t.expr);if(9===t.type){for(const i of t.expr)if(_c(e,i))return!0;return!1}if(6===e.type){if(6===t.type)return vc(t.expr,e.expr);for(const i of e.expr)if(_c(i,t))return!0;return!1}return e.equals(t)}function vc(e,t){let i=0,n=0;for(;i{r(),this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(Ec)),this._cachedMergedKeybindings.slice(0)}}const Dc=new Lc;function Ec(e,t){if(e.weight1!==t.weight1)return e.weight1-t.weight1;if(e.command&&t.command){if(e.commandt.command)return 1}return e.weight2-t.weight2}xc.add("platform.keybindingsRegistry",Dc);var Nc,Ic=function(e,t){return function(i,n){t(i,n,e)}};function Tc(e){return void 0!==e.command}class Mc{constructor(e){if(Mc._instances.has(e))throw new TypeError(`MenuId with identifier '${e}' already exists. Use MenuId.for(ident) or a unique identifier`);Mc._instances.set(e,this),this.id=e}}Mc._instances=new Map,Mc.CommandPalette=new Mc("CommandPalette"),Mc.DebugBreakpointsContext=new Mc("DebugBreakpointsContext"),Mc.DebugCallStackContext=new Mc("DebugCallStackContext"),Mc.DebugConsoleContext=new Mc("DebugConsoleContext"),Mc.DebugVariablesContext=new Mc("DebugVariablesContext"),Mc.NotebookVariablesContext=new Mc("NotebookVariablesContext"),Mc.DebugHoverContext=new Mc("DebugHoverContext"),Mc.DebugWatchContext=new Mc("DebugWatchContext"),Mc.DebugToolBar=new Mc("DebugToolBar"),Mc.DebugToolBarStop=new Mc("DebugToolBarStop"),Mc.EditorContext=new Mc("EditorContext"),Mc.SimpleEditorContext=new Mc("SimpleEditorContext"),Mc.EditorContent=new Mc("EditorContent"),Mc.EditorLineNumberContext=new Mc("EditorLineNumberContext"),Mc.EditorContextCopy=new Mc("EditorContextCopy"),Mc.EditorContextPeek=new Mc("EditorContextPeek"),Mc.EditorContextShare=new Mc("EditorContextShare"),Mc.EditorTitle=new Mc("EditorTitle"),Mc.EditorTitleRun=new Mc("EditorTitleRun"),Mc.EditorTitleContext=new Mc("EditorTitleContext"),Mc.EditorTitleContextShare=new Mc("EditorTitleContextShare"),Mc.EmptyEditorGroup=new Mc("EmptyEditorGroup"),Mc.EmptyEditorGroupContext=new Mc("EmptyEditorGroupContext"),Mc.EditorTabsBarContext=new Mc("EditorTabsBarContext"),Mc.EditorTabsBarShowTabsSubmenu=new Mc("EditorTabsBarShowTabsSubmenu"),Mc.EditorTabsBarShowTabsZenModeSubmenu=new Mc("EditorTabsBarShowTabsZenModeSubmenu"),Mc.EditorActionsPositionSubmenu=new Mc("EditorActionsPositionSubmenu"),Mc.ExplorerContext=new Mc("ExplorerContext"),Mc.ExplorerContextShare=new Mc("ExplorerContextShare"),Mc.ExtensionContext=new Mc("ExtensionContext"),Mc.GlobalActivity=new Mc("GlobalActivity"),Mc.CommandCenter=new Mc("CommandCenter"),Mc.CommandCenterCenter=new Mc("CommandCenterCenter"),Mc.LayoutControlMenuSubmenu=new Mc("LayoutControlMenuSubmenu"),Mc.LayoutControlMenu=new Mc("LayoutControlMenu"),Mc.MenubarMainMenu=new Mc("MenubarMainMenu"),Mc.MenubarAppearanceMenu=new Mc("MenubarAppearanceMenu"),Mc.MenubarDebugMenu=new Mc("MenubarDebugMenu"),Mc.MenubarEditMenu=new Mc("MenubarEditMenu"),Mc.MenubarCopy=new Mc("MenubarCopy"),Mc.MenubarFileMenu=new Mc("MenubarFileMenu"),Mc.MenubarGoMenu=new Mc("MenubarGoMenu"),Mc.MenubarHelpMenu=new Mc("MenubarHelpMenu"),Mc.MenubarLayoutMenu=new Mc("MenubarLayoutMenu"),Mc.MenubarNewBreakpointMenu=new Mc("MenubarNewBreakpointMenu"),Mc.PanelAlignmentMenu=new Mc("PanelAlignmentMenu"),Mc.PanelPositionMenu=new Mc("PanelPositionMenu"),Mc.ActivityBarPositionMenu=new Mc("ActivityBarPositionMenu"),Mc.MenubarPreferencesMenu=new Mc("MenubarPreferencesMenu"),Mc.MenubarRecentMenu=new Mc("MenubarRecentMenu"),Mc.MenubarSelectionMenu=new Mc("MenubarSelectionMenu"),Mc.MenubarShare=new Mc("MenubarShare"),Mc.MenubarSwitchEditorMenu=new Mc("MenubarSwitchEditorMenu"),Mc.MenubarSwitchGroupMenu=new Mc("MenubarSwitchGroupMenu"),Mc.MenubarTerminalMenu=new Mc("MenubarTerminalMenu"),Mc.MenubarViewMenu=new Mc("MenubarViewMenu"),Mc.MenubarHomeMenu=new Mc("MenubarHomeMenu"),Mc.OpenEditorsContext=new Mc("OpenEditorsContext"),Mc.OpenEditorsContextShare=new Mc("OpenEditorsContextShare"),Mc.ProblemsPanelContext=new Mc("ProblemsPanelContext"),Mc.SCMInputBox=new Mc("SCMInputBox"),Mc.SCMChangesSeparator=new Mc("SCMChangesSeparator"),Mc.SCMIncomingChanges=new Mc("SCMIncomingChanges"),Mc.SCMIncomingChangesContext=new Mc("SCMIncomingChangesContext"),Mc.SCMIncomingChangesSetting=new Mc("SCMIncomingChangesSetting"),Mc.SCMOutgoingChanges=new Mc("SCMOutgoingChanges"),Mc.SCMOutgoingChangesContext=new Mc("SCMOutgoingChangesContext"),Mc.SCMOutgoingChangesSetting=new Mc("SCMOutgoingChangesSetting"),Mc.SCMIncomingChangesAllChangesContext=new Mc("SCMIncomingChangesAllChangesContext"),Mc.SCMIncomingChangesHistoryItemContext=new Mc("SCMIncomingChangesHistoryItemContext"),Mc.SCMOutgoingChangesAllChangesContext=new Mc("SCMOutgoingChangesAllChangesContext"),Mc.SCMOutgoingChangesHistoryItemContext=new Mc("SCMOutgoingChangesHistoryItemContext"),Mc.SCMChangeContext=new Mc("SCMChangeContext"),Mc.SCMResourceContext=new Mc("SCMResourceContext"),Mc.SCMResourceContextShare=new Mc("SCMResourceContextShare"),Mc.SCMResourceFolderContext=new Mc("SCMResourceFolderContext"),Mc.SCMResourceGroupContext=new Mc("SCMResourceGroupContext"),Mc.SCMSourceControl=new Mc("SCMSourceControl"),Mc.SCMSourceControlInline=new Mc("SCMSourceControlInline"),Mc.SCMSourceControlTitle=new Mc("SCMSourceControlTitle"),Mc.SCMTitle=new Mc("SCMTitle"),Mc.SearchContext=new Mc("SearchContext"),Mc.SearchActionMenu=new Mc("SearchActionContext"),Mc.StatusBarWindowIndicatorMenu=new Mc("StatusBarWindowIndicatorMenu"),Mc.StatusBarRemoteIndicatorMenu=new Mc("StatusBarRemoteIndicatorMenu"),Mc.StickyScrollContext=new Mc("StickyScrollContext"),Mc.TestItem=new Mc("TestItem"),Mc.TestItemGutter=new Mc("TestItemGutter"),Mc.TestMessageContext=new Mc("TestMessageContext"),Mc.TestMessageContent=new Mc("TestMessageContent"),Mc.TestPeekElement=new Mc("TestPeekElement"),Mc.TestPeekTitle=new Mc("TestPeekTitle"),Mc.TouchBarContext=new Mc("TouchBarContext"),Mc.TitleBarContext=new Mc("TitleBarContext"),Mc.TitleBarTitleContext=new Mc("TitleBarTitleContext"),Mc.TunnelContext=new Mc("TunnelContext"),Mc.TunnelPrivacy=new Mc("TunnelPrivacy"),Mc.TunnelProtocol=new Mc("TunnelProtocol"),Mc.TunnelPortInline=new Mc("TunnelInline"),Mc.TunnelTitle=new Mc("TunnelTitle"),Mc.TunnelLocalAddressInline=new Mc("TunnelLocalAddressInline"),Mc.TunnelOriginInline=new Mc("TunnelOriginInline"),Mc.ViewItemContext=new Mc("ViewItemContext"),Mc.ViewContainerTitle=new Mc("ViewContainerTitle"),Mc.ViewContainerTitleContext=new Mc("ViewContainerTitleContext"),Mc.ViewTitle=new Mc("ViewTitle"),Mc.ViewTitleContext=new Mc("ViewTitleContext"),Mc.CommentEditorActions=new Mc("CommentEditorActions"),Mc.CommentThreadTitle=new Mc("CommentThreadTitle"),Mc.CommentThreadActions=new Mc("CommentThreadActions"),Mc.CommentThreadAdditionalActions=new Mc("CommentThreadAdditionalActions"),Mc.CommentThreadTitleContext=new Mc("CommentThreadTitleContext"),Mc.CommentThreadCommentContext=new Mc("CommentThreadCommentContext"),Mc.CommentTitle=new Mc("CommentTitle"),Mc.CommentActions=new Mc("CommentActions"),Mc.CommentsViewThreadActions=new Mc("CommentsViewThreadActions"),Mc.InteractiveToolbar=new Mc("InteractiveToolbar"),Mc.InteractiveCellTitle=new Mc("InteractiveCellTitle"),Mc.InteractiveCellDelete=new Mc("InteractiveCellDelete"),Mc.InteractiveCellExecute=new Mc("InteractiveCellExecute"),Mc.InteractiveInputExecute=new Mc("InteractiveInputExecute"),Mc.IssueReporter=new Mc("IssueReporter"),Mc.NotebookToolbar=new Mc("NotebookToolbar"),Mc.NotebookStickyScrollContext=new Mc("NotebookStickyScrollContext"),Mc.NotebookCellTitle=new Mc("NotebookCellTitle"),Mc.NotebookCellDelete=new Mc("NotebookCellDelete"),Mc.NotebookCellInsert=new Mc("NotebookCellInsert"),Mc.NotebookCellBetween=new Mc("NotebookCellBetween"),Mc.NotebookCellListTop=new Mc("NotebookCellTop"),Mc.NotebookCellExecute=new Mc("NotebookCellExecute"),Mc.NotebookCellExecuteGoTo=new Mc("NotebookCellExecuteGoTo"),Mc.NotebookCellExecutePrimary=new Mc("NotebookCellExecutePrimary"),Mc.NotebookDiffCellInputTitle=new Mc("NotebookDiffCellInputTitle"),Mc.NotebookDiffCellMetadataTitle=new Mc("NotebookDiffCellMetadataTitle"),Mc.NotebookDiffCellOutputsTitle=new Mc("NotebookDiffCellOutputsTitle"),Mc.NotebookOutputToolbar=new Mc("NotebookOutputToolbar"),Mc.NotebookOutlineFilter=new Mc("NotebookOutlineFilter"),Mc.NotebookOutlineActionMenu=new Mc("NotebookOutlineActionMenu"),Mc.NotebookEditorLayoutConfigure=new Mc("NotebookEditorLayoutConfigure"),Mc.NotebookKernelSource=new Mc("NotebookKernelSource"),Mc.BulkEditTitle=new Mc("BulkEditTitle"),Mc.BulkEditContext=new Mc("BulkEditContext"),Mc.TimelineItemContext=new Mc("TimelineItemContext"),Mc.TimelineTitle=new Mc("TimelineTitle"),Mc.TimelineTitleContext=new Mc("TimelineTitleContext"),Mc.TimelineFilterSubMenu=new Mc("TimelineFilterSubMenu"),Mc.AccountsContext=new Mc("AccountsContext"),Mc.SidebarTitle=new Mc("SidebarTitle"),Mc.PanelTitle=new Mc("PanelTitle"),Mc.AuxiliaryBarTitle=new Mc("AuxiliaryBarTitle"),Mc.AuxiliaryBarHeader=new Mc("AuxiliaryBarHeader"),Mc.TerminalInstanceContext=new Mc("TerminalInstanceContext"),Mc.TerminalEditorInstanceContext=new Mc("TerminalEditorInstanceContext"),Mc.TerminalNewDropdownContext=new Mc("TerminalNewDropdownContext"),Mc.TerminalTabContext=new Mc("TerminalTabContext"),Mc.TerminalTabEmptyAreaContext=new Mc("TerminalTabEmptyAreaContext"),Mc.TerminalStickyScrollContext=new Mc("TerminalStickyScrollContext"),Mc.WebviewContext=new Mc("WebviewContext"),Mc.InlineCompletionsActions=new Mc("InlineCompletionsActions"),Mc.InlineEditActions=new Mc("InlineEditActions"),Mc.NewFile=new Mc("NewFile"),Mc.MergeInput1Toolbar=new Mc("MergeToolbar1Toolbar"),Mc.MergeInput2Toolbar=new Mc("MergeToolbar2Toolbar"),Mc.MergeBaseToolbar=new Mc("MergeBaseToolbar"),Mc.MergeInputResultToolbar=new Mc("MergeToolbarResultToolbar"),Mc.InlineSuggestionToolbar=new Mc("InlineSuggestionToolbar"),Mc.InlineEditToolbar=new Mc("InlineEditToolbar"),Mc.ChatContext=new Mc("ChatContext"),Mc.ChatCodeBlock=new Mc("ChatCodeblock"),Mc.ChatCompareBlock=new Mc("ChatCompareBlock"),Mc.ChatMessageTitle=new Mc("ChatMessageTitle"),Mc.ChatExecute=new Mc("ChatExecute"),Mc.ChatExecuteSecondary=new Mc("ChatExecuteSecondary"),Mc.ChatInputSide=new Mc("ChatInputSide"),Mc.AccessibleView=new Mc("AccessibleView"),Mc.MultiDiffEditorFileToolbar=new Mc("MultiDiffEditorFileToolbar"),Mc.DiffEditorHunkToolbar=new Mc("DiffEditorHunkToolbar"),Mc.DiffEditorSelectionToolbar=new Mc("DiffEditorSelectionToolbar");const Ac=vd("menuService");class Rc{static for(e){let t=this._all.get(e);return t||(t=new Rc(e),this._all.set(e,t)),t}static merge(e){const t=new Set;for(const i of e)i instanceof Rc&&t.add(i.id);return t}constructor(e){this.id=e,this.has=t=>t===e}}Rc._all=new Map;const Pc=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Et({merge:Rc.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(e){return this._commands.set(e.id,e),this._onDidChangeMenu.fire(Rc.for(Mc.CommandPalette)),rt((()=>{this._commands.delete(e.id)&&this._onDidChangeMenu.fire(Rc.for(Mc.CommandPalette))}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){let i=this._menuItems.get(e);i||(i=new pt,this._menuItems.set(e,i));const n=i.push(t);return this._onDidChangeMenu.fire(Rc.for(e)),rt((()=>{n(),this._onDidChangeMenu.fire(Rc.for(e))}))}appendMenuItems(e){const t=new at;for(const{id:i,item:n}of e)t.add(this.appendMenuItem(i,n));return t}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===Mc.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)Tc(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class Oc extends Ld{constructor(e,t,i){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,i,"submenu"),this.item=e,this.hideActions=t}}let Fc=Nc=class{static label(e,t){return(null==t?void 0:t.renderShortTitle)&&e.shortTitle?"string"==typeof e.shortTitle?e.shortTitle:e.shortTitle.value:"string"==typeof e.title?e.title:e.title.value}constructor(e,t,i,n,o,s,r){var a,l;let d;if(this.hideActions=n,this.menuKeybinding=o,this._commandService=r,this.id=e.id,this.label=Nc.label(e,i),this.tooltip=null!==(l="string"==typeof e.tooltip?e.tooltip:null===(a=e.tooltip)||void 0===a?void 0:a.value)&&void 0!==l?l:"",this.enabled=!e.precondition||s.contextMatchesRules(e.precondition),this.checked=void 0,e.toggled){const t=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=s.contextMatchesRules(t.condition),this.checked&&t.tooltip&&(this.tooltip="string"==typeof t.tooltip?t.tooltip:t.tooltip.value),this.checked&&Rl.isThemeIcon(t.icon)&&(d=t.icon),this.checked&&t.title&&(this.label="string"==typeof t.title?t.title:t.title.value)}d||(d=Rl.isThemeIcon(e.icon)?e.icon:void 0),this.item=e,this.alt=t?new Nc(t,void 0,i,n,void 0,s,r):void 0,this._options=i,this.class=d&&Rl.asClassName(d)}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};Fc=Nc=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Ic(5,pc),Ic(6,Nd)],Fc);class Bc{constructor(e){this.desc=e}}function Wc(e){const t=[],i=new e,{f1:n,menu:o,keybinding:s,...r}=i.desc;if(Id.getCommand(r.id))throw new Error(`Cannot register two commands with the same id: ${r.id}`);if(t.push(Id.registerCommand({id:r.id,handler:(e,...t)=>i.run(e,...t),metadata:r.metadata})),Array.isArray(o))for(const e of o)t.push(Pc.appendMenuItem(e.id,{command:{...r,precondition:null===e.precondition?void 0:r.precondition},...e}));else o&&t.push(Pc.appendMenuItem(o.id,{command:{...r,precondition:null===o.precondition?void 0:r.precondition},...o}));if(n&&(t.push(Pc.appendMenuItem(Mc.CommandPalette,{command:r,when:r.precondition})),t.push(Pc.addCommand(r))),Array.isArray(s))for(const e of s)t.push(Dc.registerKeybindingRule({...e,id:r.id,when:r.precondition?$d.and(r.precondition,e.when):e.when}));else s&&t.push(Dc.registerKeybindingRule({...s,id:r.id,when:r.precondition?$d.and(r.precondition,s.when):s.when}));return{dispose(){ot(t)}}}const Vc=vd("telemetryService"),Hc=vd("logService");var zc;!function(e){e[e.Off=0]="Off",e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warning=4]="Warning",e[e.Error=5]="Error"}(zc||(zc={}));const Uc=zc.Info;class Kc extends lt{constructor(){super(...arguments),this.level=Uc,this._onDidChangeLogLevel=this._register(new kt),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(e){return this.level!==zc.Off&&this.level<=e}}class jc extends Kc{constructor(e=Uc,t=!0){super(),this.useColors=t,this.setLevel(e)}trace(e,...t){this.checkLogLevel(zc.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",e,...t):console.log(e,...t))}debug(e,...t){this.checkLogLevel(zc.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",e,...t):console.log(e,...t))}info(e,...t){this.checkLogLevel(zc.Info)&&(this.useColors?console.log("%c INFO","color: #33f",e,...t):console.log(e,...t))}warn(e,...t){this.checkLogLevel(zc.Warning)&&(this.useColors?console.log("%c WARN","color: #993",e,...t):console.log(e,...t))}error(e,...t){this.checkLogLevel(zc.Error)&&(this.useColors?console.log("%c ERR","color: #f33",e,...t):console.error(e,...t))}}class qc extends Kc{constructor(e){super(),this.loggers=e,e.length&&this.setLevel(e[0].getLevel())}setLevel(e){for(const t of this.loggers)t.setLevel(e);super.setLevel(e)}trace(e,...t){for(const i of this.loggers)i.trace(e,...t)}debug(e,...t){for(const i of this.loggers)i.debug(e,...t)}info(e,...t){for(const i of this.loggers)i.info(e,...t)}warn(e,...t){for(const i of this.loggers)i.warn(e,...t)}error(e,...t){for(const i of this.loggers)i.error(e,...t)}dispose(){for(const e of this.loggers)e.dispose();super.dispose()}}new gc("logLevel",function(e){switch(e){case zc.Trace:return"trace";case zc.Debug:return"debug";case zc.Info:return"info";case zc.Warning:return"warn";case zc.Error:return"error";case zc.Off:return"off"}}(zc.Info));class $c{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this.metadata=e.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?$d.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Dc.registerKeybindingRule(i)}}Id.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),metadata:this.metadata})}_registerMenuItem(e){Pc.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class Gc extends $c{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i,n){return this._implementations.push({priority:e,name:t,implementation:i,when:n}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(pc).contextMatchesRules(null!=i?i:void 0))return n(e,s,t)}))}runCommand(e,t){return Yc.runEditorCommand(e,t,this.precondition,((e,t,i)=>this.runEditorCommand(e,t,i)))}}class Qc extends Yc{static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=Mc.EditorContext),t.title||(t.title=e.label),t.when=$d.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}constructor(e){super(Qc.convertOptions(e)),this.label=e.label,this.alias=e.alias}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(Vc).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class Xc extends Qc{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;e{var i,o;const s=e.get(pc),r=e.get(Hc);if(s.contextMatchesRules(null!==(i=this.desc.precondition)&&void 0!==i?i:void 0))return this.runEditorCommand(e,n,...t);r.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,null===(o=this.desc.precondition)||void 0===o?void 0:o.serialize())}))}}function eh(e,t){Id.registerCommand(e,(function(e,...i){const n=e.get(_d),[o,s]=i;xl(Po.isUri(o)),xl(wd.isIPosition(s));const r=e.get(Cd).getModel(o);if(r){const e=wd.lift(s);return n.invokeFunction(t,r,e,...i.slice(2))}return e.get(yd).createModelReference(o).then((e=>new Promise(((o,r)=>{try{o(n.invokeFunction(t,e.object.textEditorModel,wd.lift(s),i.slice(2)))}catch(e){r(e)}})).finally((()=>{e.dispose()}))))}))}function th(e){return rh.INSTANCE.registerEditorCommand(e),e}function ih(e){const t=new e;return rh.INSTANCE.registerEditorAction(t),t}function nh(e){return rh.INSTANCE.registerEditorAction(e),e}function oh(e,t,i){rh.INSTANCE.registerEditorContribution(e,t,i)}var sh;!function(e){e.getEditorCommand=function(e){return rh.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return rh.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return rh.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return rh.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return rh.INSTANCE.getDiffEditorContributions()}}(sh||(sh={}));class rh{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t,i){this.editorContributions.push({id:e,ctor:t,instantiation:i})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function ah(e){return e.register(),e}rh.INSTANCE=new rh,xc.add("editor.contributions",rh.INSTANCE);const lh=ah(new Gc({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Mc.MenubarEditMenu,group:"1_do",title:v(0,"&&Undo"),order:1},{menuId:Mc.CommandPalette,group:"",title:v(0,"Undo"),order:1}]}));ah(new Zc(lh,{id:"default:undo",precondition:void 0}));const dh=ah(new Gc({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Mc.MenubarEditMenu,group:"1_do",title:v(0,"&&Redo"),order:2},{menuId:Mc.CommandPalette,group:"",title:v(0,"Redo"),order:1}]}));ah(new Zc(dh,{id:"default:redo",precondition:void 0}));const ch=ah(new Gc({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Mc.MenubarSelectionMenu,group:"1_basic",title:v(0,"&&Select All"),order:1},{menuId:Mc.CommandPalette,group:"",title:v(0,"Select All"),order:1}]}));class hh{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return hh.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return hh.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return hh.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return hh.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return hh.plusRange(this,e)}static plusRange(e,t){let i,n,o,s;return t.startLineNumbere.endLineNumber?(o=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,s=e.endColumn),new hh(i,n,o,s)}intersectRanges(e){return hh.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;const r=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,d=t.endColumn;return il?(o=l,s=d):o===l&&(s=Math.min(s,d)),i>o||i===o&&n>s?null:new hh(i,n,o,s)}equalsRange(e){return hh.equalsRange(this,e)}static equalsRange(e,t){return!e&&!t||!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return hh.getEndPosition(this)}static getEndPosition(e){return new wd(e.endLineNumber,e.endColumn)}getStartPosition(){return hh.getStartPosition(this)}static getStartPosition(e){return new wd(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new hh(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new hh(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return hh.collapseToStart(this)}static collapseToStart(e){return new hh(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return hh.collapseToEnd(this)}static collapseToEnd(e){return new hh(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new hh(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}static fromPositions(e,t=e){return new hh(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new hh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}class uh extends hh{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return uh.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new uh(this.startLineNumber,this.startColumn,e,t):new uh(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new wd(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new wd(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new uh(e,t,this.endLineNumber,this.endColumn):new uh(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new uh(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new uh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new uh(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new uh(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;ithis.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(uh.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:(new dd).appendText(v(0,"Selection Anchor")),className:"selection-anchor"})})),this.selectionAnchorSetContextKey.set(!!this.decorationId),na(v(0,"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(uh.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()}};var _h,vh;fh.ID="editor.contrib.selectionAnchorController",fh=ph=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([(_h=1,vh=pc,function(e,t){vh(e,t,_h)})],fh),oh(fh.ID,fh,4),ih(class extends Qc{constructor(){super({id:"editor.action.setSelectionAnchor",label:v(0,"Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2080),weight:100}})}async run(e,t){var i;null===(i=fh.get(t))||void 0===i||i.setSelectionAnchor()}}),ih(class extends Qc{constructor(){super({id:"editor.action.goToSelectionAnchor",label:v(0,"Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:mh})}async run(e,t){var i;null===(i=fh.get(t))||void 0===i||i.goToSelectionAnchor()}}),ih(class extends Qc{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:v(0,"Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:mh,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2089),weight:100}})}async run(e,t){var i;null===(i=fh.get(t))||void 0===i||i.selectFromAnchorToCursor()}}),ih(class extends Qc{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:v(0,"Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:mh,kbOpts:{kbExpr:gh.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;null===(i=fh.get(t))||void 0===i||i.cancelSelectionAnchor()}});var bh=i(1710),wh={};function Ch(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.entries(e).forEach((([e,i])=>{t[e]=i&&"object"==typeof i?Ch(i):i})),t}wh.styleTagTransform=Gr(),wh.setAttributes=Kr(),wh.insert=zr().bind(null,"head"),wh.domAPI=Vr(),wh.insertStyleElement=qr(),Br()(bh.Z,wh),bh.Z&&bh.Z.locals&&bh.Z.locals;const yh=Object.prototype.hasOwnProperty;function Sh(e,t){return kh(e,t,new Set)}function kh(e,t,i){if(kl(e))return e;const n=t(e);if(void 0!==n)return n;if(Array.isArray(e)){const n=[];for(const o of e)n.push(kh(o,t,i));return n}if(_l(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(const o in e)yh.call(e,o)&&(n[o]=kh(e[o],t,i));return i.delete(e),n}return e}function xh(e,t,i=!0){return _l(e)?(_l(t)&&Object.keys(t).forEach((n=>{n in e?i&&(_l(e[n])&&_l(t[n])?xh(e[n],t[n],i):e[n]=t[n]):e[n]=t[n]})),e):t}function Lh(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ie===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n0))return n;r=n-1}}return-(s+1)}(e.length)}function Hh(e,t,i){if((e|=0)>=t.length)throw new TypeError("invalid index");const n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(const e of t){const t=i(e,n);t<0?o.push(e):t>0?s.push(e):r.push(e)}return e!!e))}function qh(e){let t=0;for(let i=0;i0}function Zh(e,t=(e=>e)){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function Yh(e,t){return e.length>0?e[0]:t}function Qh(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function Xh(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function Jh(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function eu(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function tu(e,t){for(const i of t)e.push(i)}function iu(e){return Array.isArray(e)?e:[e]}function nu(e,t,i,n){const o=ou(e,t);let s=e.splice(o,i);return void 0===s&&(s=[]),function(e,t,i){const n=ou(e,t),o=e.length,s=i.length;e.length=o+s;for(let t=o-1;t>=n;t--)e[t+s]=e[t];for(let t=0;tt(e(i),e(n))}!function(e){e.isLessThan=function(e){return e<0},e.isLessThanOrEqual=function(e){return e<=0},e.isGreaterThan=function(e){return e>0},e.isNeitherLessOrGreaterThan=function(e){return 0===e},e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0}(Th||(Th={}));const ru=(e,t)=>e-t,au=(e,t)=>ru(e?1:0,t?1:0);function lu(e){return(t,i)=>-e(t,i)}class du{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(0!==this.length)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class cu{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate((t=>(e.push(t),!0))),e}filter(e){return new cu((t=>this.iterate((i=>!e(i)||t(i)))))}map(e){return new cu((t=>this.iterate((i=>t(e(i))))))}findLast(e){let t;return this.iterate((i=>(e(i)&&(t=i),!0))),t}findLastMaxBy(e){let t,i=!0;return this.iterate((n=>((i||Th.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0))),t}}cu.empty=new cu((e=>{}));class hu{constructor(e){this._indexMap=e}static createSortPermutation(e,t){const i=Array.from(e.keys()).sort(((i,n)=>t(e[i],e[n])));return new hu(i)}apply(e){return e.map(((t,i)=>e[this._indexMap[i]]))}inverse(){const e=this._indexMap.slice();for(let t=0;t0){switch(l=Math.min(d<=.5?c/(2*d):c/(2-2*d),1),s){case t:a=(i-n)/c+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:o}=e;let s,r,a;if(0===i)s=r=a=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;s=pu._hue2rgb(o,e,t+1/3),r=pu._hue2rgb(o,e,t),a=pu._hue2rgb(o,e,t-1/3)}return new gu(Math.round(255*s),Math.round(255*r),Math.round(255*a),o)}}class mu{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=uu(Math.max(Math.min(1,t),0),3),this.v=uu(Math.max(Math.min(1,i),0),3),this.a=uu(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),s=o-Math.min(t,i,n),r=0===o?0:s/o;let a;return a=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new mu(Math.round(60*a),r,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,s=n*i,r=s*(1-Math.abs(t/60%2-1)),a=n-s;let[l,d,c]=[0,0,0];return t<60?(l=s,d=r):t<120?(l=r,d=s):t<180?(d=s,c=r):t<240?(d=r,c=s):t<300?(l=r,c=s):t<=360&&(l=s,c=r),l=Math.round(255*(l+a)),d=Math.round(255*(d+a)),c=Math.round(255*(c+a)),new gu(l,d,c,o)}}class fu{static fromHex(e){return fu.Format.CSS.parseHex(e)||fu.red}static equals(e,t){return!e&&!t||!(!e||!t)&&e.equals(t)}get hsla(){return this._hsla?this._hsla:pu.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:mu.fromRGBA(this.rgba)}constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof gu)this.rgba=e;else if(e instanceof pu)this._hsla=e,this.rgba=pu.toRGBA(e);else{if(!(e instanceof mu))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=mu.toRGBA(e)}}equals(e){return!!e&&gu.equals(this.rgba,e.rgba)&&pu.equals(this.hsla,e.hsla)&&mu.equals(this.hsva,e.hsva)}getRelativeLuminance(){return uu(.2126*fu._relativeLuminanceForComponent(this.rgba.r)+.7152*fu._relativeLuminanceForComponent(this.rgba.g)+.0722*fu._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()=t)return l-tt))return new wu(e,t)}static ofLength(e){return new wu(0,e)}static ofStartAndLength(e,t){return new wu(e,e+t)}constructor(e,t){if(this.start=e,this.endExclusive=t,e>t)throw new Pe(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new wu(this.start+e,this.endExclusive+e)}deltaStart(e){return new wu(this.start+e,this.endExclusive)}deltaEnd(e){return new wu(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new Pe(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new Pe(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let t=this.start;te.toString())).join(", ")}intersectsStrict(e){let t=0;for(;te+t.length),0)}}function yu(e,t){const i=function(e,t,i=e.length-1){for(let n=i;n>=0;n--)if(t(e[n]))return n;return-1}(e,t);if(-1!==i)return e[i]}function Su(e,t){const i=ku(e,t);return-1===i?void 0:e[i]}function ku(e,t,i=0,n=e.length){let o=i,s=n;for(;o0&&(i=o)}return i}function Eu(e,t){if(0===e.length)return-1;let i=0;for(let n=1;n0&&(i=n);return i}Lu.assertInvariants=!1;class Nu{static fromRangeInclusive(e){return new Nu(e.startLineNumber,e.endLineNumber+1)}static joinMany(e){if(0===e.length)return[];let t=new Iu(e[0].slice());for(let i=1;it)throw new Pe(`startLineNumber ${e} cannot be after endLineNumberExclusive ${t}`);this.startLineNumber=e,this.endLineNumberExclusive=t}contains(e){return this.startLineNumber<=e&&et.endLineNumberExclusive>=e.startLineNumber)),i=ku(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)this._normalizedRanges.splice(t,0,e);else if(t===i-1){const i=this._normalizedRanges[t];this._normalizedRanges[t]=i.join(e)}else{const n=this._normalizedRanges[t].join(this._normalizedRanges[i-1]).join(e);this._normalizedRanges.splice(t,i-t,n)}}contains(e){const t=Su(this._normalizedRanges,(t=>t.startLineNumber<=e));return!!t&&t.endLineNumberExclusive>e}intersects(e){const t=Su(this._normalizedRanges,(t=>t.startLineNumbere.startLineNumber}getUnion(e){if(0===this._normalizedRanges.length)return e;if(0===e._normalizedRanges.length)return this;const t=[];let i=0,n=0,o=null;for(;i=s.startLineNumber?o=new Nu(o.startLineNumber,Math.max(o.endLineNumberExclusive,s.endLineNumberExclusive)):(t.push(o),o=s)}return null!==o&&t.push(o),new Iu(t)}subtractFrom(e){const t=xu(this._normalizedRanges,(t=>t.endLineNumberExclusive>=e.startLineNumber)),i=ku(this._normalizedRanges,(t=>t.startLineNumber<=e.endLineNumberExclusive))+1;if(t===i)return new Iu([e]);const n=[];let o=e.startLineNumber;for(let e=t;eo&&n.push(new Nu(o,t.startLineNumber)),o=t.endLineNumberExclusive}return oe.toString())).join(", ")}getIntersection(e){const t=[];let i=0,n=0;for(;it.delta(e))))}}const Tu={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}},Mu=vd("languageService"),Au="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",Ru=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of Au)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function Pu(e){let t=Ru;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const Ou=new pt;function Fu(e,t,i,n,o){if(t=Pu(t),o||(o=Qe.first(Ou)),i.length>o.maxLen){let s=e-o.maxLen/2;return s<0?s=0:n+=s,Fu(e,t,i=i.substring(s,e+o.maxLen/2),n,o)}const s=Date.now(),r=e-1-n;let a=-1,l=null;for(let e=1;!(Date.now()-s>=o.timeBudget);e++){const n=r-o.windowSize*e;t.lastIndex=Math.max(0,n);const s=Bu(t,i,r,a);if(!s&&l)break;if(l=s,n<=0)break;a=n}if(l){const e={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function Bu(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}var Wu;Ou.unshift({maxLen:1e3,windowSize:15,timeBudget:150}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(Wu||(Wu={}));class Vu{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;tnew Vu(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new Vu({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new Vu({open:t.open,close:t.close||""}))}this._autoCloseBeforeForQuotes="string"==typeof e.autoCloseBefore?e.autoCloseBefore:Uu.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets="string"==typeof e.autoCloseBefore?e.autoCloseBefore:Uu.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(e){return e?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}function Ku(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n);let s=n;for(;s+10&&e.getLanguageId(r-1)===o;)r--;return new ju(e,o,r,s+1,e.getStartOffset(r),e.getEndOffset(s))}Uu.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t",Uu.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t";class ju{constructor(e,t,i,n,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s,this.languageIdCodec=e.languageIdCodec}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getLineLength(){return this._lastCharOffset-this.firstCharOffset}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}toIViewLineTokens(){return this._actual.sliceAndInflate(this.firstCharOffset,this._lastCharOffset,0)}}function qu(e){return 0!=(3&e)}const $u="undefined"!=typeof Buffer;let Gu,Zu,Yu,Qu;new sn((()=>new Uint8Array(256)));class Xu{static wrap(e){return $u&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Xu(e)}constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}toString(){return $u?this.buffer.toString():(Gu||(Gu=new TextDecoder),Gu.decode(this.buffer))}}function Ju(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function eg(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function tg(e,t){return e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3]}function ig(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function ng(e,t){return e[t]}function og(e,t,i){e[i]=t}function sg(){return Zu||(Zu=new TextDecoder("UTF-16LE")),Zu}function rg(){return Qu||(Qu=oe()?sg():(Yu||(Yu=new TextDecoder("UTF-16BE")),Yu)),Qu}class ag{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return rg().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}appendCharCode(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||Tn(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIICharCode(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let e=0;e0&&s.push({open:o,close:r})}return s}(t);this.brackets=i.map(((t,n)=>new lg(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function hg(e,t){return e.length-t.length}function ug(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function gg(e){const t=/^[\w ]+$/.test(e);return e=hn(e),t?`\\b${e}\\b`:e}function pg(e,t){return mn(`(${e.map(gg).join(")|(")})`,!0,t)}const mg=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return rg().decode(t)}(e)),t}}();class fg{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const s=i.length-(o.index||0),r=o[0].length,a=n+s;return new hh(t,a-r+1,t,a+1)}static findPrevBracketInRange(e,t,i,n,o){const s=mg(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const s=o.index||0,r=o[0].length;if(0===r)return null;const a=n+s;return new hh(t,a+1,t,a+1+r)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}class _g{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return Zh(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(qu(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=fg.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function vg(e){return e.global&&(e.lastIndex=0),!0}class bg{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&vg(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&vg(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&vg(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&vg(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class wg{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=wg._createOpenBracketRegExp(e[0]),i=wg._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};xc.add(Mg,Ag);const Rg="base.contributions.configuration",Pg={properties:{},patternProperties:{}},Og={properties:{},patternProperties:{}},Fg={properties:{},patternProperties:{}},Bg={properties:{},patternProperties:{}},Wg={properties:{},patternProperties:{}},Vg={properties:{},patternProperties:{}},Hg="vscode://schemas/settings/resourceLanguage",zg=xc.as(Mg),Ug="\\[([^\\]]+)\\]",Kg=new RegExp(Ug,"g"),jg=`^(${Ug})+$`,qg=new RegExp(jg);function $g(e){const t=[];if(qg.test(e)){let i=Kg.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=Kg.exec(e)}}return Zh(t)}const Gg=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new kt,this._onDidUpdateConfiguration=new kt,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:v(0,"Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},zg.registerSchema(Hg,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=new Set;this.doRegisterConfigurations(e,t,i),zg.registerSchema(Hg,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(e){const t=new Set;this.doRegisterDefaultConfigurations(e,t),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:t,defaultsOverrides:!0})}doRegisterDefaultConfigurations(e,t){var i;const n=[];for(const{overrides:o,source:s}of e)for(const e in o)if(t.add(e),qg.test(e)){const t=this.configurationDefaultsOverrides.get(e),r=null!==(i=null==t?void 0:t.valuesSources)&&void 0!==i?i:new Map;if(s)for(const t of Object.keys(o[e]))r.set(t,s);const a={...(null==t?void 0:t.value)||{},...o[e]};this.configurationDefaultsOverrides.set(e,{source:s,value:a,valuesSources:r});const l={type:"object",default:a,description:v(0,"Configure settings to be overridden for the {0} language.",e.replace(/[\[\]]/g,"")),$ref:Hg,defaultDefaultValue:a,source:fl(s)?void 0:s,defaultValueSource:s};n.push(...$g(e)),this.configurationProperties[e]=l,this.defaultLanguageConfigurationOverridesNode.properties[e]=l}else{this.configurationDefaultsOverrides.set(e,{value:o[e],source:s});const t=this.configurationProperties[e];t&&(this.updatePropertyDefaultValue(e,t),this.updateSchema(e,t))}this.doRegisterOverrideIdentifiers(n)}registerOverrideIdentifiers(e){this.doRegisterOverrideIdentifiers(e),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t,i){e.forEach((e=>{this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties,void 0,i),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}))}validateAndRegisterProperties(e,t=!0,i,n,o=3,s){var r;o=kl(e.scope)?o:e.scope;const a=e.properties;if(a)for(const e in a){const l=a[e];t&&Zg(e,l)?delete a[e]:(l.source=i,l.defaultDefaultValue=a[e].default,this.updatePropertyDefaultValue(e,l),qg.test(e)?l.scope=void 0:(l.scope=kl(l.scope)?o:l.scope,l.restricted=kl(l.restricted)?!!(null==n?void 0:n.includes(e)):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],(null===(r=a[e].policy)||void 0===r?void 0:r.name)&&this.policyConfigurations.set(a[e].policy.name,e),!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),s.add(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e]))}const l=e.allOf;if(l)for(const e of l)this.validateAndRegisterProperties(e,t,i,n,o,s)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(e){const t=e=>{const i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);const n=e.allOf;null==n||n.forEach(t)};t(e)}updateSchema(e,t){switch(Pg.properties[e]=t,t.scope){case 1:Og.properties[e]=t;break;case 2:Fg.properties[e]=t;break;case 6:Bg.properties[e]=t;break;case 3:Wg.properties[e]=t;break;case 4:Vg.properties[e]=t;break;case 5:Vg.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:v(0,"Configure editor settings to be overridden for a language."),errorMessage:v(0,"This setting does not support per-language configuration."),$ref:Hg};this.updatePropertyDefaultValue(t,i),Pg.properties[t]=i,Og.properties[t]=i,Fg.properties[t]=i,Bg.properties[t]=i,Wg.properties[t]=i,Vg.properties[t]=i}}registerOverridePropertyPatternKey(){const e={type:"object",description:v(0,"Configure editor settings to be overridden for a language."),errorMessage:v(0,"This setting does not support per-language configuration."),$ref:Hg};Pg.patternProperties[jg]=e,Og.patternProperties[jg]=e,Fg.patternProperties[jg]=e,Bg.patternProperties[jg]=e,Wg.patternProperties[jg]=e,Vg.patternProperties[jg]=e,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=null==i?void 0:i.value,o=null==i?void 0:i.source;yl(n)&&(n=t.defaultDefaultValue,o=void 0),yl(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=o}};function Zg(e,t){var i,n,o,s;return e.trim()?qg.test(e)?v(0,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==Gg.getConfigurationProperties()[e]?v(0,"Cannot register '{0}'. This property is already registered.",e):(null===(i=t.policy)||void 0===i?void 0:i.name)&&void 0!==Gg.getPolicyConfigurations().get(null===(n=t.policy)||void 0===n?void 0:n.name)?v(0,"Cannot register '{0}'. The associated policy {1} is already registered with {2}.",e,null===(o=t.policy)||void 0===o?void 0:o.name,Gg.getPolicyConfigurations().get(null===(s=t.policy)||void 0===s?void 0:s.name)):null:v(0,"Cannot register an empty property")}xc.add(Rg,Gg);const Yg=new class{constructor(){this._onDidChangeLanguages=new kt,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t{const t=new Set;return{info:new tp(this,e,t),closing:t}})),o=new on((e=>{const t=new Set,i=new Set;return{info:new ip(this,e,t,i),opening:t,openingColorized:i}}));for(const[e,t]of i){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.opening.add(i.info)}const s=t.colorizedBracketPairs?Jg(t.colorizedBracketPairs):i.filter((e=>!("<"===e[0]&&">"===e[1])));for(const[e,t]of s){const i=n.get(e),s=o.get(t);i.closing.add(s.info),s.openingColorized.add(i.info),s.opening.add(i.info)}this._openingBrackets=new Map([...n.cachedValues].map((([e,t])=>[e,t.info]))),this._closingBrackets=new Map([...o.cachedValues].map((([e,t])=>[e,t.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(e){return this._openingBrackets.get(e)}getClosingBracketInfo(e){return this._closingBrackets.get(e)}getBracketInfo(e){return this.getOpeningBracketInfo(e)||this.getClosingBracketInfo(e)}getBracketRegExp(e){return pg(Array.from([...this._openingBrackets.keys(),...this._closingBrackets.keys()]),e)}}function Jg(e){return e.filter((([e,t])=>""!==e&&""!==t))}class ep{constructor(e,t){this.config=e,this.bracketText=t}get languageId(){return this.config.languageId}}class tp extends ep{constructor(e,t,i){super(e,t),this.openedBrackets=i,this.isOpeningBracket=!0}}class ip extends ep{constructor(e,t,i,n){super(e,t),this.openingBrackets=i,this.openingColorizedBrackets=n,this.isOpeningBracket=!1}closes(e){return e.config===this.config&&this.openingBrackets.has(e)}closesColorized(e){return e.config===this.config&&this.openingColorizedBrackets.has(e)}getOpeningBrackets(){return[...this.openingBrackets]}}var np=function(e,t){return function(i,n){t(i,n,e)}};class op{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const sp=vd("languageConfigurationService");let rp=class extends lt{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this._registry=this._register(new pp),this.onDidChangeEmitter=this._register(new kt),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(ap));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new op(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new op(e)))}))),this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new op(e.languageId))})))}register(e,t,i){return this._registry.register(e,t,i)}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i,n){let o=t.getLanguageConfiguration(e);if(!o){if(!n.isRegisteredLanguageId(e))return new mp(e,{});o=new mp(e,{})}const s=function(e,t){const i=t.getValue(ap.brackets,{overrideIdentifier:e}),n=t.getValue(ap.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:lp(i),colorizedBracketPairs:lp(n)}}(o.languageId,i),r=hp([o.underlyingConfig,s]);return new mp(o.languageId,r)}(e,this._registry,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};rp=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([np(0,Cg),np(1,Mu)],rp);const ap={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function lp(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}function dp(e,t,i){let n=vn(e.getLineContent(t));return n.length>i-1&&(n=n.substring(0,i-1)),n}class cp{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new up(e,t,++this._order);return this._entries.push(i),this._resolved=null,rt((()=>{for(let e=0;ee.configuration))))}}function hp(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class up{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class gp{constructor(e){this.languageId=e}}class pp extends lt{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new kt),this.onDidChange=this._onDidChange.event,this._register(this.register(Qg,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(e,t,i=0){let n=this._entries.get(e);n||(n=new cp(e),this._entries.set(e,n));const o=n.register(t,i);return this._onDidChange.fire(new gp(e)),rt((()=>{o.dispose(),this._onDidChange.fire(new gp(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}}class mp{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new wg(this.underlyingConfig):null,this.comments=mp._handleComments(this.underlyingConfig),this.characterPair=new Uu(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||Ru,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new bg(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new Xg(e,this.underlyingConfig)}getWordDefinition(){return Pu(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new dg(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new _g(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new Hu(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(e){return this.characterPair.getAutoCloseBeforeSet(e)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}Ng(sp,rp,1);class fp{constructor(e,t,i,n){this.range=e,this.nestingLevel=t,this.nestingLevelOfEqualBracketType=i,this.isInvalid=n}}class _p{constructor(e,t,i,n,o,s){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n,this.nestingLevelOfEqualBracketType=o,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}class vp extends _p{constructor(e,t,i,n,o,s,r){super(e,t,i,n,o,s),this.minVisibleColumnIndentation=r}}class bp{static betweenPositions(e,t){return e.lineNumber===t.lineNumber?new bp(0,t.column-e.column):new bp(t.lineNumber-e.lineNumber,t.column-1)}static ofRange(e){return bp.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let t=0,i=0;for(const n of e)"\n"===n?(t++,i=0):i++;return new bp(t,i)}constructor(e,t){this.lineCount=e,this.columnCount=t}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}createRange(e){return 0===this.lineCount?new hh(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new hh(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(e){return 0===this.lineCount?new wd(e.lineNumber,e.column+this.columnCount):new wd(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}bp.zero=new bp(0,0);const wp=0;function Cp(e){return 0===e}const yp=2**26;function Sp(e,t){return e*yp+t}function kp(e){const t=e,i=Math.floor(t/yp);return new bp(i,t-i*yp)}function xp(e,t){let i=e+t;return t>=yp&&(i-=e%yp),i}function Lp(e,t){return e.reduce(((e,i)=>xp(e,t(i))),wp)}function Dp(e,t){return e===t}function Ep(e,t){const i=e,n=t;if(n-i<=0)return wp;const o=Math.floor(i/yp),s=Math.floor(n/yp),r=n-s*yp;return o===s?Sp(0,r-(i-o*yp)):Sp(s-o,r)}function Np(e,t){return e=t}function Mp(e){return Sp(e.lineNumber-1,e.column-1)}function Ap(e,t){const i=e,n=Math.floor(i/yp),o=i-n*yp,s=t,r=Math.floor(s/yp);return new hh(n+1,o+1,r+1,s-r*yp+1)}class Rp{static fromModelContentChanges(e){const t=e.map((e=>{const t=hh.lift(e.range);return new Rp(Mp(t.getStartPosition()),Mp(t.getEndPosition()),function(e){const t=fn(e);return Sp(t.length-1,t[t.length-1].length)}(e.text))})).reverse();return t}constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}toString(){return`[${kp(this.startOffset)}...${kp(this.endOffset)}) -> ${kp(this.newLength)}`}}class Pp{constructor(e){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Op.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):null;return null===i?null:Ep(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Sp(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Sp(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=kp(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Sp(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Sp(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(0===n){const e=1<>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return 0!=(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let s="";return 4&n&&(s+=" underline"),8&n&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}class em{constructor(e,t,i,n,o){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=o}}class tm{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new im(this.textModel,this.bracketTokens),this._offset=wp,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return Sp(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=xp(this._offset,e);const t=kp(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=xp(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class im{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,null!==this.line&&(this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=e.length,e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,o=n.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(o=e,s=t,r=this.lineIdx,a=this.lineCharOffset,o!==r?Sp(r-o,a):Sp(0,a-s));var o,s,r,a;return new em(n,0,-1,Bp.getEmpty(),new Yp(n))}}class nm{constructor(e,t){this.text=e,this._offset=wp,this.idx=0;const i=t.getRegExpStr(),n=i?new RegExp(i+"|\n","gi"):null,o=[];let s,r=0,a=0,l=0,d=0;const c=[];for(let e=0;e<60;e++)c.push(new em(Sp(0,e),0,-1,Bp.getEmpty(),new Yp(Sp(0,e))));const h=[];for(let e=0;e<60;e++)h.push(new em(Sp(1,e),0,-1,Bp.getEmpty(),new Yp(Sp(1,e))));if(n)for(n.lastIndex=0;null!==(s=n.exec(e));){const e=s.index,i=s[0];if("\n"===i)r++,a=e+1;else{if(l!==e){let t;if(d===r){const i=e-l;if(ifunction(e){let t=hn(e);return/^[\w ]+/.test(e)&&(t=`\\b${t}`),/[\w ]+$/.test(e)&&(t=`${t}\\b`),t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e.toLowerCase())}findClosingTokenText(e){for(const[t,i]of this.map)if(2===i.kind&&i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class sm{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){return this.languageIdToBracketTokens.has(e)}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=om.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function rm(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const n=i>>1;for(let o=0;o=3?e[2]:null,t)}function am(e,t){return Math.abs(e.listHeight-t.listHeight)}function lm(e,t){return e.listHeight===t.listHeight?Up.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const n=[];let o;for(;;){if(t.listHeight===i.listHeight){o=t;break}if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=Up.create23(t.unappendChild(),o,null,!1):(t.appendChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?Up.create23(e,o,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const n=[];for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=Up.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?Up.create23(o,e,null,!1):e}(t,e)}class dm{constructor(e){this.lastOffset=wp,this.nextNodes=[e],this.offsets=[wp],this.idxs=[]}readLongestNodeAt(e,t){if(Np(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=hm(this.nextNodes);if(!i)return;const n=hm(this.offsets);if(Np(e,n))return;if(Np(n,e))if(xp(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=cm(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=cm(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=hm(this.offsets),t=hm(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=hm(this.nextNodes),n=cm(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push(xp(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function cm(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function hm(e){return e.length>0?e[e.length-1]:void 0}function um(e,t,i,n){return new gm(e,t,i,n).parseDocument()}class gm{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new dm(i):void 0,this.positionMapper=new Pp(t)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Bp.getEmpty(),0);return e||(e=Up.getEmpty()),e}parseList(e,t){const i=[];for(;;){let n=this.tryReadChildFromCache(e);if(!n){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;n=this.parseChild(e,t+1)}4===n.kind&&0===n.childrenLength||i.push(n)}const n=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t=2?rm(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())am(n,o)<=am(o,e)?(n=lm(n,o),o=e):o=lm(o,e);return lm(n,o)}(i):rm(i,this.createImmutableLists);return n}tryReadChildFromCache(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(null===t||!Cp(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!(null!==t&&!Np(i.length,t))&&i.canBeReused(e)));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}}parseChild(e,t){this._itemsConstructed++;const i=this.tokenizer.read();switch(i.kind){case 2:return new Xp(i.bracketIds,i.length);case 0:return i.astNode;case 1:{if(t>300)return new Yp(i.length);const n=e.merge(i.bracketIds),o=this.parseList(n,t+1),s=this.tokenizer.peek();return s&&2===s.kind&&(s.bracketId===i.bracketId||s.bracketIds.intersects(i.bracketIds))?(this.tokenizer.read(),zp.create(i.astNode,o,s.astNode)):zp.create(i.astNode,o,null)}default:throw new Error("unexpected")}}}function pm(e,t){if(0===e.length)return t;if(0===t.length)return e;const i=new du(fm(e)),n=fm(t);n.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let o=i.dequeue();function s(e){if(void 0===e){const e=i.takeWhile((e=>!0))||[];return o&&e.unshift(o),e}const t=[];for(;o&&!Cp(e);){const[n,s]=o.splitAt(e);t.push(n),e=Ep(n.lengthAfter,e),o=null!=s?s:i.dequeue()}return Cp(e)||t.push(new mm(!1,e,e)),t}const r=[];function a(e,t,i){if(r.length>0&&Dp(r[r.length-1].endOffset,e)){const e=r[r.length-1];r[r.length-1]=new Rp(e.startOffset,t,xp(e.newLength,i))}else r.push({startOffset:e,endOffset:t,newLength:i})}let l=wp;for(const e of n){const t=s(e.lengthBefore);if(e.modified){const i=xp(l,Lp(t,(e=>e.lengthBefore)));a(l,i,e.lengthAfter),l=i}else for(const e of t){const t=l;l=xp(l,e.lengthBefore),e.modified&&a(t,l,e.lengthAfter)}}return r}class mm{constructor(e,t,i){this.modified=e,this.lengthBefore=t,this.lengthAfter=i}splitAt(e){const t=Ep(e,this.lengthAfter);return Dp(t,wp)?[this,void 0]:this.modified?[new mm(this.modified,this.lengthBefore,e),new mm(this.modified,wp,t)]:[new mm(this.modified,e,e),new mm(this.modified,t,t)]}toString(){return`${this.modified?"M":"U"}:${kp(this.lengthBefore)} -> ${kp(this.lengthAfter)}`}}function fm(e){const t=[];let i=wp;for(const n of e){const e=Ep(i,n.startOffset);Cp(e)||t.push(new mm(!1,e,e));const o=Ep(n.startOffset,n.endOffset);t.push(new mm(!0,o,n.newLength)),i=n.endOffset}return t}class _m extends lt{didLanguageChange(e){return this.brackets.didLanguageChange(e)}constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new kt,this.denseKeyProvider=new Vp,this.brackets=new sm(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],e.tokenization.hasTokens)2===e.tokenization.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new nm(this.textModel.getValue(),e);this.initialAstWithoutTokens=um(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.tokenization.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new Rp(Sp(e.fromLineNumber-1,0),Sp(e.toLineNumber,0),Sp(e.toLineNumber-e.fromLineNumber+1,0))));this.handleEdits(t,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=Rp.fromModelContentChanges(e.changes);this.handleEdits(t,!1)}handleEdits(e,t){const i=pm(this.queuedTextEdits,e);this.queuedTextEdits=i,this.initialAstWithoutTokens&&!t&&(this.queuedTextEditsForInitialAstWithoutTokens=pm(this.queuedTextEditsForInitialAstWithoutTokens,e))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(e,t,i){const n=t;return um(new tm(this.textModel,this.brackets),e,n,i)}getBracketsInRange(e,t){this.flushQueue();const i=Sp(e.startLineNumber-1,e.startColumn-1),n=Sp(e.endLineNumber-1,e.endColumn-1);return new cu((e=>{const o=this.initialAstWithoutTokens||this.astWithTokens;wm(o,wp,o.length,i,n,e,0,0,new Map,t)}))}getBracketPairsInRange(e,t){this.flushQueue();const i=Mp(e.getStartPosition()),n=Mp(e.getEndPosition());return new cu((e=>{const o=this.initialAstWithoutTokens||this.astWithTokens,s=new Cm(e,t,this.textModel);ym(o,wp,o.length,i,n,s,0,new Map)}))}getFirstBracketAfter(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return bm(t,wp,t.length,Mp(e))}getFirstBracketBefore(e){this.flushQueue();const t=this.initialAstWithoutTokens||this.astWithTokens;return vm(t,wp,t.length,Mp(e))}}function vm(e,t,i,n){if(4===e.kind||2===e.kind){const o=[];for(const n of e.children)i=xp(t,n.length),o.push({nodeOffsetStart:t,nodeOffsetEnd:i}),t=i;for(let t=o.length-1;t>=0;t--){const{nodeOffsetStart:i,nodeOffsetEnd:s}=o[t];if(Np(i,n)){const o=vm(e.children[t],i,s,n);if(o)return o}}return null}if(3===e.kind)return null;if(1===e.kind){const n=Ap(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function bm(e,t,i,n){if(4===e.kind||2===e.kind){for(const o of e.children){if(Np(n,i=xp(t,o.length))){const e=bm(o,t,i,n);if(e)return e}t=i}return null}if(3===e.kind)return null;if(1===e.kind){const n=Ap(t,i);return{bracketInfo:e.bracketInfo,range:n}}return null}function wm(e,t,i,n,o,s,r,a,l,d,c=!1){if(r>200)return!0;e:for(;;)switch(e.kind){case 4:{const a=e.childrenLength;for(let c=0;c200)return!0;let d=!0;if(2===e.kind){let c=0;if(a){let t=a.get(e.openingBracket.text);void 0===t&&(t=0),c=t,t++,a.set(e.openingBracket.text,t)}const h=xp(t,e.openingBracket.length);let u=-1;if(s.includeMinIndentation&&(u=e.computeMinIndentation(t,s.textModel)),d=s.push(new vp(Ap(t,i),Ap(t,h),e.closingBracket?Ap(xp(h,(null===(l=e.child)||void 0===l?void 0:l.length)||wp),i):void 0,r,c,e,u)),t=h,d&&e.child){const l=e.child;if(i=xp(t,l.length),Ip(t,o)&&Tp(i,n)&&(d=ym(l,t,i,n,o,s,r+1,a),!d))return!1}null==a||a.set(e.openingBracket.text,c)}else{let i=t;for(const t of e.children){const e=i;if(i=xp(i,t.length),Ip(e,o)&&Ip(n,i)&&(d=ym(t,e,i,n,o,s,r,a),!d))return!1}}return d}class Sm extends lt{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new dt),this.onDidChangeEmitter=new kt,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())})))}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const i=new at;this.bracketPairsTree.value=(e=i.add(new _m(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||cu.empty}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||cu.empty}getBracketsInRange(e,t=!1){var i;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(i=this.bracketPairsTree.value)||void 0===i?void 0:i.object.getBracketsInRange(e,t))||cu.empty}findMatchingBracketUp(e,t,i){const n=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column);if(this.canBuildAST){const i=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew.getClosingBracketInfo(e);if(!i)return null;const n=this.getBracketPairsInRange(hh.fromPositions(t,t)).findLast((e=>i.closes(e.openingBracketInfo)));return n?n.openingBracketRange:null}{const t=e.toLowerCase(),s=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!s)return null;const r=s.textIsBracket[t];return r?Lm(this._findMatchingBracketUp(r,n,km(i))):null}}matchBracket(e,t){if(this.canBuildAST){const t=this.getBracketPairsInRange(hh.fromPositions(e,e)).filter((t=>void 0!==t.closingBracketRange&&(t.openingBracketRange.containsPosition(e)||t.closingBracketRange.containsPosition(e)))).findLastMaxBy(su((t=>t.openingBracketRange.containsPosition(e)?t.openingBracketRange:t.closingBracketRange),hh.compareRangesUsingStarts));return t?[t.openingBracketRange,t.closingBracketRange]:null}{const i=km(t);return this._matchBracket(this.textModel.validatePosition(e),i)}}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),s=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if(qu(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if(qu(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.tokenization.getLineTokens(i),o=this.textModel.getLineContent(i),s=n.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const r=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(r&&!qu(n.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,r,s),d=null;for(;;){const n=fg.findNextBracketInRange(r.forwardRegex,i,o,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=o.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,r.textIsBracket[e],r.textIsOpenBracket[e],t);if(i){if(i instanceof xm)return null;d=i}}a=n.endColumn-1}if(d)return d}if(s>0&&n.getStartOffset(s)===e.column-1){const r=s-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(r)).brackets;if(a&&!qu(n.getStandardTokenType(r))){const{searchStartOffset:s,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,r),d=fg.findPrevBracketInRange(a.reversedRegex,i,o,s,l);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn){const e=o.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),i=this._matchFoundBracket(d,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof xm?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof xm?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return xm.INSTANCE;const d=fg.findPrevBracketInRange(o,t,n,a,l);if(!d)break;const c=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return d;l=d.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=o-1,l=s.length,d=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let c=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!qu(i.getStandardTokenType(r));if(t)c?l=i.getStartOffset(r):(l=i.getStartOffset(r),d=i.getEndOffset(r));else if(c&&l!==d){const t=a(e,s,l,d);if(t)return t}c=t}if(c&&l!==d){const t=a(e,s,l,d);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return xm.INSTANCE;const d=fg.findNextBracketInRange(o,t,n,a,l);if(!d)break;const c=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase();if(e.isOpen(c)?s++:e.isClose(c)&&s--,0===s)return d;a=d.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.tokenization.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=0,l=0,d=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,d=t.column-1);let c=!0;for(;r=1;e--){const t=this.textModel.tokenization.getLineTokens(e),r=t.getCount(),a=this.textModel.getLineContent(e);let l=r-1,d=a.length,c=a.length;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),d=i.column-1,c=i.column-1;const e=t.getLanguageId(l);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew)}let h=!0;for(;l>=0;l--){const i=t.getLanguageId(l);if(n!==i){if(o&&s&&h&&d!==c){const t=fg.findPrevBracketInRange(o.reversedRegex,e,a,d,c);if(t)return this._toFoundBracket(s,t);h=!1}n=i,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets,s=this.languageConfigurationService.getLanguageConfiguration(n).bracketsNew}const r=!!o&&!qu(t.getStandardTokenType(l));if(r)h?d=t.getStartOffset(l):(d=t.getStartOffset(l),c=t.getEndOffset(l));else if(s&&o&&h&&d!==c){const t=fg.findPrevBracketInRange(o.reversedRegex,e,a,d,c);if(t)return this._toFoundBracket(s,t)}h=r}if(s&&o&&h&&d!==c){const t=fg.findPrevBracketInRange(o.reversedRegex,e,a,d,c);if(t)return this._toFoundBracket(s,t)}}return null}findNextBracket(e){var t;const i=this.textModel.validatePosition(e);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getFirstBracketAfter(i))||null;const n=this.textModel.getLineCount();let o=null,s=null,r=null;for(let e=i.lineNumber;e<=n;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),a=this.textModel.getLineContent(e);let l=0,d=0,c=0;if(e===i.lineNumber){l=t.findTokenIndexAtOffset(i.column-1),d=i.column-1,c=i.column-1;const e=t.getLanguageId(l);o!==e&&(o=e,s=this.languageConfigurationService.getLanguageConfiguration(o).brackets,r=this.languageConfigurationService.getLanguageConfiguration(o).bracketsNew)}let h=!0;for(;lvoid 0!==t.closingBracketRange&&t.range.strictContainsRange(e)));return t?[t.openingBracketRange,t.closingBracketRange]:null}const n=km(t),o=this.textModel.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(n&&++l%100==0&&!n())return xm.INSTANCE;const a=fg.findNextBracketInRange(e.forwardRegex,t,i,o,s);if(!a)break;const d=i.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),c=e.textIsBracket[d];if(c&&(c.isOpen(d)?r[c.index]++:c.isClose(d)&&r[c.index]--,-1===r[c.index]))return this._matchFoundBracket(a,c,!1,n);o=a.endColumn-1}return null};let c=null,h=null;for(let e=i.lineNumber;e<=o;e++){const t=this.textModel.tokenization.getLineTokens(e),n=t.getCount(),o=this.textModel.getLineContent(e);let s=0,r=0,l=0;if(e===i.lineNumber){s=t.findTokenIndexAtOffset(i.column-1),r=i.column-1,l=i.column-1;const e=t.getLanguageId(s);c!==e&&(c=e,h=this.languageConfigurationService.getLanguageConfiguration(c).brackets,a(c,h))}let u=!0;for(;s!0;{const t=Date.now();return()=>Date.now()-t<=e}}class xm{constructor(){this._searchCanceledBrand=void 0}}function Lm(e){return e instanceof xm?null:e}function Dm(e){return`--vscode-${e.replace(/\./g,"-")}`}function Em(e){return`var(${Dm(e)})`}xm.INSTANCE=new xm;const Nm="base.contributions.colors",Im=new class{constructor(){this._onDidChangeSchema=new kt,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){const s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;const r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),n&&(r.pattern="^#(?:(?[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",r.patternErrorMessage="This color must be transparent or it will obscure content"),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults)return Fm(i.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{const i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function Tm(e,t,i,n,o){return Im.registerColor(e,t,i,n,o)}function Mm(e,t){return{op:0,value:e,factor:t}}function Am(e,t){return{op:1,value:e,factor:t}}function Rm(e,t){return{op:2,value:e,factor:t}}function Pm(...e){return{op:4,values:e}}function Om(e,t,i,n){return{op:5,value:e,background:t,factor:i,transparency:n}}function Fm(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?fu.fromHex(e):t.getColor(e):e instanceof fu?e:"object"==typeof e?function(e,t){var i,n,o,s;switch(e.op){case 0:return null===(i=Fm(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=Fm(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(o=Fm(e.value,t))||void 0===o?void 0:o.transparent(e.factor);case 3:{const i=Fm(e.background,t);return i?null===(s=Fm(e.value,t))||void 0===s?void 0:s.makeOpaque(i):Fm(e.value,t)}case 4:for(const i of e.values){const e=Fm(i,t);if(e)return e}return;case 6:return Fm(t.defines(e.if)?e.then:e.else,t);case 5:{const i=Fm(e.value,t);if(!i)return;const n=Fm(e.background,t);return n?i.isDarkerThan(n)?fu.getLighterColor(i,n,e.factor).transparent(e.transparency):fu.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw Cc()}}(e,t):void 0}xc.add(Nm,Im);const Bm="vscode://schemas/workbench-colors",Wm=xc.as(Mg);Wm.registerSchema(Bm,Im.getColorSchema());const Vm=new Zt((()=>Wm.notifySchemaChanged(Bm)),200);Im.onDidChangeSchema((()=>{Vm.isScheduled()||Vm.schedule()}));const Hm=Tm("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},v(0,"Overall foreground color. This color is only used if not overridden by a component.")),zm=(Tm("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},v(0,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),Tm("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},v(0,"Overall foreground color for error messages. This color is only used if not overridden by a component.")),Tm("descriptionForeground",{light:"#717171",dark:Rm(Hm,.7),hcDark:Rm(Hm,.7),hcLight:Rm(Hm,.7)},v(0,"Foreground color for description text providing additional information, for example for a label.")),Tm("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},v(0,"The default color for icons in the workbench."))),Um=Tm("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},v(0,"Overall border color for focused elements. This color is only used if not overridden by a component.")),Km=Tm("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},v(0,"An extra border around elements to separate them from others for greater contrast.")),jm=Tm("contrastActiveBorder",{light:null,dark:null,hcDark:Um,hcLight:Um},v(0,"An extra border around active elements to separate them from others for greater contrast.")),qm=(Tm("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},v(0,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),Tm("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},v(0,"Foreground color for links in text."))),$m=(Tm("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},v(0,"Foreground color for links in text when clicked on and on mouse hover.")),Tm("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:fu.black,hcLight:"#292929"},v(0,"Color for text separators.")),Tm("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},v(0,"Foreground color for preformatted text segments.")),Tm("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},v(0,"Background color for preformatted text segments.")),Tm("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},v(0,"Background color for block quotes in text.")),Tm("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:fu.white,hcLight:"#292929"},v(0,"Border color for block quotes in text.")),Tm("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:fu.black,hcLight:"#F2F2F2"},v(0,"Background color for code blocks in text.")),Tm("sash.hoverBorder",{dark:Um,light:Um,hcDark:Um,hcLight:Um},v(0,"Border color of active sashes.")),Tm("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:fu.black,hcLight:"#0F4A85"},v(0,"Badge background color. Badges are small information labels, e.g. for search results count."))),Gm=Tm("badge.foreground",{dark:fu.white,light:"#333",hcDark:fu.white,hcLight:fu.white},v(0,"Badge foreground color. Badges are small information labels, e.g. for search results count.")),Zm=Tm("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},v(0,"Scrollbar shadow to indicate that the view is scrolled.")),Ym=Tm("scrollbarSlider.background",{dark:fu.fromHex("#797979").transparent(.4),light:fu.fromHex("#646464").transparent(.4),hcDark:Rm(Km,.6),hcLight:Rm(Km,.4)},v(0,"Scrollbar slider background color.")),Qm=Tm("scrollbarSlider.hoverBackground",{dark:fu.fromHex("#646464").transparent(.7),light:fu.fromHex("#646464").transparent(.7),hcDark:Rm(Km,.8),hcLight:Rm(Km,.8)},v(0,"Scrollbar slider background color when hovering.")),Xm=Tm("scrollbarSlider.activeBackground",{dark:fu.fromHex("#BFBFBF").transparent(.4),light:fu.fromHex("#000000").transparent(.6),hcDark:Km,hcLight:Km},v(0,"Scrollbar slider background color when clicked on.")),Jm=Tm("progressBar.background",{dark:fu.fromHex("#0E70C0"),light:fu.fromHex("#0E70C0"),hcDark:Km,hcLight:Km},v(0,"Background color of the progress bar that can show for long running operations.")),ef=Tm("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:fu.black,hcLight:fu.white},v(0,"Editor background color.")),tf=Tm("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:fu.white,hcLight:Hm},v(0,"Editor default foreground color.")),nf=(Tm("editorStickyScroll.background",{light:ef,dark:ef,hcDark:ef,hcLight:ef},v(0,"Background color of sticky scroll in the editor")),Tm("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:fu.fromHex("#0F4A85").transparent(.1)},v(0,"Background color of sticky scroll on hover in the editor")),Tm("editorStickyScroll.border",{dark:null,light:null,hcDark:Km,hcLight:Km},v(0,"Border color of sticky scroll in the editor")),Tm("editorStickyScroll.shadow",{dark:Zm,light:Zm,hcDark:Zm,hcLight:Zm},v(0," Shadow color of sticky scroll in the editor")),Tm("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:fu.white},v(0,"Background color of editor widgets, such as find/replace."))),of=Tm("editorWidget.foreground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"Foreground color of editor widgets, such as find/replace.")),sf=Tm("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:Km,hcLight:Km},v(0,"Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),rf=(Tm("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},v(0,"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),Tm("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},v(0,"Foreground color of error squigglies in the editor."))),af=Tm("editorError.border",{dark:null,light:null,hcDark:fu.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},v(0,"If set, color of double underlines for errors in the editor.")),lf=Tm("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),df=Tm("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},v(0,"Foreground color of warning squigglies in the editor.")),cf=Tm("editorWarning.border",{dark:null,light:null,hcDark:fu.fromHex("#FFCC00").transparent(.8),hcLight:fu.fromHex("#FFCC00").transparent(.8)},v(0,"If set, color of double underlines for warnings in the editor.")),hf=(Tm("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},v(0,"Foreground color of info squigglies in the editor."))),uf=Tm("editorInfo.border",{dark:null,light:null,hcDark:fu.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},v(0,"If set, color of double underlines for infos in the editor.")),gf=Tm("editorHint.foreground",{dark:fu.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},v(0,"Foreground color of hint squigglies in the editor.")),pf=(Tm("editorHint.border",{dark:null,light:null,hcDark:fu.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},v(0,"If set, color of double underlines for hints in the editor.")),Tm("editorLink.activeForeground",{dark:"#4E94CE",light:fu.blue,hcDark:fu.cyan,hcLight:"#292929"},v(0,"Color of active links."))),mf=Tm("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},v(0,"Color of the editor selection.")),ff=Tm("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:fu.white},v(0,"Color of the selected text for high contrast.")),_f=Tm("editor.inactiveSelectionBackground",{light:Rm(mf,.5),dark:Rm(mf,.5),hcDark:Rm(mf,.7),hcLight:Rm(mf,.5)},v(0,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),vf=Tm("editor.selectionHighlightBackground",{light:Om(mf,ef,.3,.6),dark:Om(mf,ef,.3,.6),hcDark:null,hcLight:null},v(0,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),bf=(Tm("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:jm,hcLight:jm},v(0,"Border color for regions with the same content as the selection.")),Tm("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},v(0,"Color of the current search match.")),Tm("editor.findMatchForeground",{light:null,dark:null,hcDark:null,hcLight:null},v(0,"Text color of the current search match."))),wf=Tm("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},v(0,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Cf=Tm("editor.findMatchHighlightForeground",{light:null,dark:null,hcDark:null,hcLight:null},v(0,"Foreground color of the other search matches."),!0),yf=(Tm("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},v(0,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("editor.findMatchBorder",{light:null,dark:null,hcDark:jm,hcLight:jm},v(0,"Border color of the current search match.")),Tm("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:jm,hcLight:jm},v(0,"Border color of the other search matches."))),Sf=Tm("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:Rm(jm,.4),hcLight:Rm(jm,.4)},v(0,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),kf=(Tm("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},v(0,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("editorHoverWidget.background",{light:nf,dark:nf,hcDark:nf,hcLight:nf},v(0,"Background color of the editor hover."))),xf=(Tm("editorHoverWidget.foreground",{light:of,dark:of,hcDark:of,hcLight:of},v(0,"Foreground color of the editor hover.")),Tm("editorHoverWidget.border",{light:sf,dark:sf,hcDark:sf,hcLight:sf},v(0,"Border color of the editor hover."))),Lf=(Tm("editorHoverWidget.statusBarBackground",{dark:Am(kf,.2),light:Mm(kf,.05),hcDark:nf,hcLight:nf},v(0,"Background color of the editor hover status bar.")),Tm("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:fu.white,hcLight:fu.black},v(0,"Foreground color of inline hints"))),Df=Tm("editorInlayHint.background",{dark:Rm($m,.1),light:Rm($m,.1),hcDark:Rm(fu.white,.1),hcLight:Rm($m,.1)},v(0,"Background color of inline hints")),Ef=Tm("editorInlayHint.typeForeground",{dark:Lf,light:Lf,hcDark:Lf,hcLight:Lf},v(0,"Foreground color of inline hints for types")),Nf=Tm("editorInlayHint.typeBackground",{dark:Df,light:Df,hcDark:Df,hcLight:Df},v(0,"Background color of inline hints for types")),If=Tm("editorInlayHint.parameterForeground",{dark:Lf,light:Lf,hcDark:Lf,hcLight:Lf},v(0,"Foreground color of inline hints for parameters")),Tf=Tm("editorInlayHint.parameterBackground",{dark:Df,light:Df,hcDark:Df,hcLight:Df},v(0,"Background color of inline hints for parameters")),Mf=Tm("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},v(0,"The color used for the lightbulb actions icon.")),Af=(Tm("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v(0,"The color used for the lightbulb auto fix actions icon.")),Tm("editorLightBulbAi.foreground",{dark:Mf,light:Mf,hcDark:Mf,hcLight:Mf},v(0,"The color used for the lightbulb AI icon.")),Tm("editor.snippetTabstopHighlightBackground",{dark:new fu(new gu(124,124,124,.3)),light:new fu(new gu(10,50,100,.2)),hcDark:new fu(new gu(124,124,124,.3)),hcLight:new fu(new gu(10,50,100,.2))},v(0,"Highlight background color of a snippet tabstop.")),Tm("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Highlight border color of a snippet tabstop.")),Tm("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Highlight background color of the final tabstop of a snippet.")),Tm("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new fu(new gu(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},v(0,"Highlight border color of the final tabstop of a snippet.")),new fu(new gu(155,185,85,.2))),Rf=new fu(new gu(255,0,0,.2)),Pf=Tm("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},v(0,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Of=Tm("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},v(0,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Ff=(Tm("diffEditor.insertedLineBackground",{dark:Af,light:Af,hcDark:null,hcLight:null},v(0,"Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("diffEditor.removedLineBackground",{dark:Rf,light:Rf,hcDark:null,hcLight:null},v(0,"Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Background color for the margin where lines got inserted.")),Tm("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Background color for the margin where lines got removed.")),Tm("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Diff overview ruler foreground for inserted content."))),Bf=Tm("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Diff overview ruler foreground for removed content.")),Wf=(Tm("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},v(0,"Outline color for the text that got inserted.")),Tm("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},v(0,"Outline color for text that got removed.")),Tm("diffEditor.border",{dark:null,light:null,hcDark:Km,hcLight:Km},v(0,"Border color between the two text editors.")),Tm("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},v(0,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Tm("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},v(0,"The background color of unchanged blocks in the diff editor.")),Tm("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},v(0,"The foreground color of unchanged blocks in the diff editor.")),Tm("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},v(0,"The background color of unchanged code in the diff editor.")),Tm("widget.shadow",{dark:Rm(fu.black,.36),light:Rm(fu.black,.16),hcDark:null,hcLight:null},v(0,"Shadow color of widgets such as find/replace inside the editor."))),Vf=Tm("widget.border",{dark:null,light:null,hcDark:Km,hcLight:Km},v(0,"Border color of widgets such as find/replace inside the editor.")),Hf=Tm("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},v(0,"Toolbar background when hovering over actions using the mouse")),zf=(Tm("toolbar.hoverOutline",{dark:null,light:null,hcDark:jm,hcLight:jm},v(0,"Toolbar outline when hovering over actions using the mouse")),Tm("toolbar.activeBackground",{dark:Am(Hf,.1),light:Mm(Hf,.1),hcDark:null,hcLight:null},v(0,"Toolbar background when holding the mouse over actions")),Tm("breadcrumb.foreground",{light:Rm(Hm,.8),dark:Rm(Hm,.8),hcDark:Rm(Hm,.8),hcLight:Rm(Hm,.8)},v(0,"Color of focused breadcrumb items."))),Uf=Tm("breadcrumb.background",{light:ef,dark:ef,hcDark:ef,hcLight:ef},v(0,"Background color of breadcrumb items.")),Kf=Tm("breadcrumb.focusForeground",{light:Mm(Hm,.2),dark:Am(Hm,.1),hcDark:Am(Hm,.1),hcLight:Am(Hm,.1)},v(0,"Color of focused breadcrumb items.")),jf=Tm("breadcrumb.activeSelectionForeground",{light:Mm(Hm,.2),dark:Am(Hm,.1),hcDark:Am(Hm,.1),hcLight:Am(Hm,.1)},v(0,"Color of selected breadcrumb items.")),qf=(Tm("breadcrumbPicker.background",{light:nf,dark:nf,hcDark:nf,hcLight:nf},v(0,"Background color of breadcrumb item picker.")),fu.fromHex("#40C8AE").transparent(.5)),$f=fu.fromHex("#40A6FF").transparent(.5),Gf=fu.fromHex("#606060").transparent(.4),Zf=.4,Yf=Tm("merge.currentHeaderBackground",{dark:qf,light:qf,hcDark:null,hcLight:null},v(0,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Qf=(Tm("merge.currentContentBackground",{dark:Rm(Yf,Zf),light:Rm(Yf,Zf),hcDark:Rm(Yf,Zf),hcLight:Rm(Yf,Zf)},v(0,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("merge.incomingHeaderBackground",{dark:$f,light:$f,hcDark:null,hcLight:null},v(0,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),Xf=(Tm("merge.incomingContentBackground",{dark:Rm(Qf,Zf),light:Rm(Qf,Zf),hcDark:Rm(Qf,Zf),hcLight:Rm(Qf,Zf)},v(0,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("merge.commonHeaderBackground",{dark:Gf,light:Gf,hcDark:null,hcLight:null},v(0,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0)),Jf=(Tm("merge.commonContentBackground",{dark:Rm(Xf,Zf),light:Rm(Xf,Zf),hcDark:Rm(Xf,Zf),hcLight:Rm(Xf,Zf)},v(0,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},v(0,"Border color on headers and the splitter in inline merge-conflicts."))),e_=(Tm("editorOverviewRuler.currentContentForeground",{dark:Rm(Yf,1),light:Rm(Yf,1),hcDark:Jf,hcLight:Jf},v(0,"Current overview ruler foreground for inline merge-conflicts.")),Tm("editorOverviewRuler.incomingContentForeground",{dark:Rm(Qf,1),light:Rm(Qf,1),hcDark:Jf,hcLight:Jf},v(0,"Incoming overview ruler foreground for inline merge-conflicts.")),Tm("editorOverviewRuler.commonContentForeground",{dark:Rm(Xf,1),light:Rm(Xf,1),hcDark:Jf,hcLight:Jf},v(0,"Common ancestor overview ruler foreground for inline merge-conflicts.")),Tm("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},v(0,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0)),t_=Tm("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v(0,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),i_=Tm("problemsErrorIcon.foreground",{dark:rf,light:rf,hcDark:rf,hcLight:rf},v(0,"The color used for the problems error icon.")),n_=Tm("problemsWarningIcon.foreground",{dark:df,light:df,hcDark:df,hcLight:df},v(0,"The color used for the problems warning icon.")),o_=Tm("problemsInfoIcon.foreground",{dark:hf,light:hf,hcDark:hf,hcLight:hf},v(0,"The color used for the problems info icon.")),s_=Tm("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},v(0,"Minimap marker color for find matches."),!0),r_=Tm("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},v(0,"Minimap marker color for repeating editor selections."),!0),a_=Tm("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},v(0,"Minimap marker color for the editor selection."),!0),l_=Tm("minimap.infoHighlight",{dark:hf,light:hf,hcDark:uf,hcLight:uf},v(0,"Minimap marker color for infos.")),d_=Tm("minimap.warningHighlight",{dark:df,light:df,hcDark:cf,hcLight:cf},v(0,"Minimap marker color for warnings.")),c_=Tm("minimap.errorHighlight",{dark:new fu(new gu(255,18,18,.7)),light:new fu(new gu(255,18,18,.7)),hcDark:new fu(new gu(255,50,50,1)),hcLight:"#B5200D"},v(0,"Minimap marker color for errors.")),h_=Tm("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Minimap background color.")),u_=Tm("minimap.foregroundOpacity",{dark:fu.fromHex("#000f"),light:fu.fromHex("#000f"),hcDark:fu.fromHex("#000f"),hcLight:fu.fromHex("#000f")},v(0,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),g_=(Tm("minimapSlider.background",{light:Rm(Ym,.5),dark:Rm(Ym,.5),hcDark:Rm(Ym,.5),hcLight:Rm(Ym,.5)},v(0,"Minimap slider background color.")),Tm("minimapSlider.hoverBackground",{light:Rm(Qm,.5),dark:Rm(Qm,.5),hcDark:Rm(Qm,.5),hcLight:Rm(Qm,.5)},v(0,"Minimap slider background color when hovering.")),Tm("minimapSlider.activeBackground",{light:Rm(Xm,.5),dark:Rm(Xm,.5),hcDark:Rm(Xm,.5),hcLight:Rm(Xm,.5)},v(0,"Minimap slider background color when clicked on.")),Tm("charts.foreground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color used in charts.")),Tm("charts.lines",{dark:Rm(Hm,.5),light:Rm(Hm,.5),hcDark:Rm(Hm,.5),hcLight:Rm(Hm,.5)},v(0,"The color used for horizontal lines in charts.")),Tm("charts.red",{dark:rf,light:rf,hcDark:rf,hcLight:rf},v(0,"The red color used in chart visualizations.")),Tm("charts.blue",{dark:hf,light:hf,hcDark:hf,hcLight:hf},v(0,"The blue color used in chart visualizations.")),Tm("charts.yellow",{dark:df,light:df,hcDark:df,hcLight:df},v(0,"The yellow color used in chart visualizations.")),Tm("charts.orange",{dark:s_,light:s_,hcDark:s_,hcLight:s_},v(0,"The orange color used in chart visualizations.")),Tm("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},v(0,"The green color used in chart visualizations.")),Tm("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v(0,"The purple color used in chart visualizations.")),Tm("input.background",{dark:"#3C3C3C",light:fu.white,hcDark:fu.black,hcLight:fu.white},v(0,"Input box background."))),p_=Tm("input.foreground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"Input box foreground.")),m_=Tm("input.border",{dark:null,light:null,hcDark:Km,hcLight:Km},v(0,"Input box border.")),f_=Tm("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:Km,hcLight:Km},v(0,"Border color of activated options in input fields.")),__=(Tm("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},v(0,"Background color of activated options in input fields.")),Tm("inputOption.activeBackground",{dark:Rm(Um,.4),light:Rm(Um,.2),hcDark:fu.transparent,hcLight:fu.transparent},v(0,"Background hover color of options in input fields."))),v_=Tm("inputOption.activeForeground",{dark:fu.white,light:fu.black,hcDark:Hm,hcLight:Hm},v(0,"Foreground color of activated options in input fields.")),b_=(Tm("input.placeholderForeground",{light:Rm(Hm,.5),dark:Rm(Hm,.5),hcDark:Rm(Hm,.7),hcLight:Rm(Hm,.7)},v(0,"Input box foreground color for placeholder text.")),Tm("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:fu.black,hcLight:fu.white},v(0,"Input validation background color for information severity."))),w_=Tm("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:Hm},v(0,"Input validation foreground color for information severity.")),C_=Tm("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:Km,hcLight:Km},v(0,"Input validation border color for information severity.")),y_=Tm("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:fu.black,hcLight:fu.white},v(0,"Input validation background color for warning severity.")),S_=Tm("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:Hm},v(0,"Input validation foreground color for warning severity.")),k_=Tm("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:Km,hcLight:Km},v(0,"Input validation border color for warning severity.")),x_=Tm("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:fu.black,hcLight:fu.white},v(0,"Input validation background color for error severity.")),L_=Tm("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:Hm},v(0,"Input validation foreground color for error severity.")),D_=Tm("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:Km,hcLight:Km},v(0,"Input validation border color for error severity.")),E_=Tm("dropdown.background",{dark:"#3C3C3C",light:fu.white,hcDark:fu.black,hcLight:fu.white},v(0,"Dropdown background.")),N_=Tm("dropdown.listBackground",{dark:null,light:null,hcDark:fu.black,hcLight:fu.white},v(0,"Dropdown list background.")),I_=Tm("dropdown.foreground",{dark:"#F0F0F0",light:Hm,hcDark:fu.white,hcLight:Hm},v(0,"Dropdown foreground.")),T_=Tm("dropdown.border",{dark:E_,light:"#CECECE",hcDark:Km,hcLight:Km},v(0,"Dropdown border.")),M_=Tm("button.foreground",{dark:fu.white,light:fu.white,hcDark:fu.white,hcLight:fu.white},v(0,"Button foreground color.")),A_=Tm("button.separator",{dark:Rm(M_,.4),light:Rm(M_,.4),hcDark:Rm(M_,.4),hcLight:Rm(M_,.4)},v(0,"Button separator color.")),R_=Tm("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},v(0,"Button background color.")),P_=Tm("button.hoverBackground",{dark:Am(R_,.2),light:Mm(R_,.2),hcDark:R_,hcLight:R_},v(0,"Button background color when hovering.")),O_=Tm("button.border",{dark:Km,light:Km,hcDark:Km,hcLight:Km},v(0,"Button border color.")),F_=Tm("button.secondaryForeground",{dark:fu.white,light:fu.white,hcDark:fu.white,hcLight:Hm},v(0,"Secondary button foreground color.")),B_=Tm("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:fu.white},v(0,"Secondary button background color.")),W_=Tm("button.secondaryHoverBackground",{dark:Am(B_,.2),light:Mm(B_,.2),hcDark:null,hcLight:null},v(0,"Secondary button background color when hovering.")),V_=Tm("checkbox.background",{dark:E_,light:E_,hcDark:E_,hcLight:E_},v(0,"Background color of checkbox widget.")),H_=(Tm("checkbox.selectBackground",{dark:nf,light:nf,hcDark:nf,hcLight:nf},v(0,"Background color of checkbox widget when the element it's in is selected.")),Tm("checkbox.foreground",{dark:I_,light:I_,hcDark:I_,hcLight:I_},v(0,"Foreground color of checkbox widget."))),z_=Tm("checkbox.border",{dark:T_,light:T_,hcDark:T_,hcLight:T_},v(0,"Border color of checkbox widget.")),U_=(Tm("checkbox.selectBorder",{dark:zm,light:zm,hcDark:zm,hcLight:zm},v(0,"Border color of checkbox widget when the element it's in is selected.")),Tm("keybindingLabel.background",{dark:new fu(new gu(128,128,128,.17)),light:new fu(new gu(221,221,221,.4)),hcDark:fu.transparent,hcLight:fu.transparent},v(0,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut."))),K_=Tm("keybindingLabel.foreground",{dark:fu.fromHex("#CCCCCC"),light:fu.fromHex("#555555"),hcDark:fu.white,hcLight:Hm},v(0,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),j_=Tm("keybindingLabel.border",{dark:new fu(new gu(51,51,51,.6)),light:new fu(new gu(204,204,204,.4)),hcDark:new fu(new gu(111,195,223)),hcLight:Km},v(0,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),q_=Tm("keybindingLabel.bottomBorder",{dark:new fu(new gu(68,68,68,.6)),light:new fu(new gu(187,187,187,.4)),hcDark:new fu(new gu(111,195,223)),hcLight:Hm},v(0,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),$_=Tm("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),G_=Tm("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Z_=Tm("list.focusOutline",{dark:Um,light:Um,hcDark:jm,hcLight:jm},v(0,"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Y_=Tm("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),Q_=Tm("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:fu.fromHex("#0F4A85").transparent(.1)},v(0,"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),X_=Tm("list.activeSelectionForeground",{dark:fu.white,light:fu.white,hcDark:null,hcLight:null},v(0,"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),J_=Tm("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),ev=Tm("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:fu.fromHex("#0F4A85").transparent(.1)},v(0,"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),tv=Tm("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),iv=Tm("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),nv=Tm("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ov=Tm("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),sv=Tm("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:fu.white.transparent(.1),hcLight:fu.fromHex("#0F4A85").transparent(.1)},v(0,"List/Tree background when hovering over items using the mouse.")),rv=Tm("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"List/Tree foreground when hovering over items using the mouse.")),av=Tm("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},v(0,"List/Tree drag and drop background when moving items over other items when using the mouse.")),lv=Tm("list.dropBetweenBackground",{dark:zm,light:zm,hcDark:null,hcLight:null},v(0,"List/Tree drag and drop border color when moving items between items when using the mouse.")),dv=Tm("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:Um,hcLight:Um},v(0,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),cv=Tm("list.focusHighlightForeground",{dark:dv,light:(hv=Q_,uv=dv,"#BBE7FF",{op:6,if:hv,then:uv,else:"#BBE7FF"}),hcDark:dv,hcLight:dv},v(0,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var hv,uv;Tm("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},v(0,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),Tm("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},v(0,"Foreground color of list items containing errors.")),Tm("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},v(0,"Foreground color of list items containing warnings."));const gv=Tm("listFilterWidget.background",{light:Mm(nf,0),dark:Am(nf,0),hcDark:nf,hcLight:nf},v(0,"Background color of the type filter widget in lists and trees.")),pv=Tm("listFilterWidget.outline",{dark:fu.transparent,light:fu.transparent,hcDark:"#f38518",hcLight:"#007ACC"},v(0,"Outline color of the type filter widget in lists and trees.")),mv=Tm("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:Km,hcLight:Km},v(0,"Outline color of the type filter widget in lists and trees, when there are no matches.")),fv=Tm("listFilterWidget.shadow",{dark:Wf,light:Wf,hcDark:Wf,hcLight:Wf},v(0,"Shadow color of the type filter widget in lists and trees.")),_v=(Tm("list.filterMatchBackground",{dark:wf,light:wf,hcDark:null,hcLight:null},v(0,"Background color of the filtered match.")),Tm("list.filterMatchBorder",{dark:yf,light:yf,hcDark:Km,hcLight:jm},v(0,"Border color of the filtered match.")),Tm("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},v(0,"List/Tree foreground color for items that are deemphasized.")),Tm("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},v(0,"Tree stroke color for the indentation guides."))),vv=Tm("tree.inactiveIndentGuidesStroke",{dark:Rm(_v,.4),light:Rm(_v,.4),hcDark:Rm(_v,.4),hcLight:Rm(_v,.4)},v(0,"Tree stroke color for the indentation guides that are not active.")),bv=Tm("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},v(0,"Table border color between columns.")),wv=Tm("tree.tableOddRowsBackground",{dark:Rm(Hm,.04),light:Rm(Hm,.04),hcDark:null,hcLight:null},v(0,"Background color for odd table rows.")),Cv=Tm("menu.border",{dark:null,light:null,hcDark:Km,hcLight:Km},v(0,"Border color of menus.")),yv=Tm("menu.foreground",{dark:I_,light:I_,hcDark:I_,hcLight:I_},v(0,"Foreground color of menu items.")),Sv=Tm("menu.background",{dark:E_,light:E_,hcDark:E_,hcLight:E_},v(0,"Background color of menu items.")),kv=Tm("menu.selectionForeground",{dark:X_,light:X_,hcDark:X_,hcLight:X_},v(0,"Foreground color of the selected menu item in menus.")),xv=Tm("menu.selectionBackground",{dark:Q_,light:Q_,hcDark:Q_,hcLight:Q_},v(0,"Background color of the selected menu item in menus.")),Lv=Tm("menu.selectionBorder",{dark:null,light:null,hcDark:jm,hcLight:jm},v(0,"Border color of the selected menu item in menus.")),Dv=Tm("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:Km,hcLight:Km},v(0,"Color of a separator menu item in menus.")),Ev=Tm("quickInput.background",{dark:nf,light:nf,hcDark:nf,hcLight:nf},v(0,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),Nv=Tm("quickInput.foreground",{dark:of,light:of,hcDark:of,hcLight:of},v(0,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),Iv=Tm("quickInputTitle.background",{dark:new fu(new gu(255,255,255,.105)),light:new fu(new gu(0,0,0,.06)),hcDark:"#000000",hcLight:fu.white},v(0,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),Tv=Tm("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:fu.white,hcLight:"#0F4A85"},v(0,"Quick picker color for grouping labels.")),Mv=Tm("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:fu.white,hcLight:"#0F4A85"},v(0,"Quick picker color for grouping borders.")),Av=Tm("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,v(0,"Please use quickInputList.focusBackground instead")),Rv=Tm("quickInputList.focusForeground",{dark:X_,light:X_,hcDark:X_,hcLight:X_},v(0,"Quick picker foreground color for the focused item.")),Pv=Tm("quickInputList.focusIconForeground",{dark:J_,light:J_,hcDark:J_,hcLight:J_},v(0,"Quick picker icon foreground color for the focused item.")),Ov=Tm("quickInputList.focusBackground",{dark:Pm(Av,Q_),light:Pm(Av,Q_),hcDark:null,hcLight:null},v(0,"Quick picker background color for the focused item."));var Fv;function Bv(e){return e===Fv.HIGH_CONTRAST_DARK||e===Fv.HIGH_CONTRAST_LIGHT}function Wv(e){return e===Fv.DARK||e===Fv.HIGH_CONTRAST_DARK}Tm("search.resultsInfoForeground",{light:Hm,dark:Rm(Hm,.65),hcDark:Hm,hcLight:Hm},v(0,"Color of the text in the search viewlet's completion message.")),Tm("searchEditor.findMatchBackground",{light:Rm(wf,.66),dark:Rm(wf,.66),hcDark:wf,hcLight:wf},v(0,"Color of the Search Editor query matches.")),Tm("searchEditor.findMatchBorder",{light:Rm(yf,.66),dark:Rm(yf,.66),hcDark:yf,hcLight:yf},v(0,"Border color of the Search Editor query matches.")),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST_DARK="hcDark",e.HIGH_CONTRAST_LIGHT="hcLight"}(Fv||(Fv={}));const Vv=vd("themeService");function Hv(e){return{id:e}}function zv(e){switch(e){case Fv.DARK:return"vs-dark";case Fv.HIGH_CONTRAST_DARK:return"hc-black";case Fv.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}const Uv="base.contributions.theming",Kv=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new kt}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),rt((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function jv(e){return Kv.onColorThemeChange(e)}xc.add(Uv,Kv);class qv extends lt{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}const $v=Tm("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Background color for the highlight of line at the cursor position.")),Gv=Tm("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:Km},v(0,"Background color for the border around the line at the cursor position.")),Zv=(Tm("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},v(0,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:jm,hcLight:jm},v(0,"Background color of the border around highlighted ranges.")),Tm("editor.symbolHighlightBackground",{dark:wf,light:wf,hcDark:null,hcLight:null},v(0,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:jm,hcLight:jm},v(0,"Background color of the border around highlighted symbols.")),Tm("editorCursor.foreground",{dark:"#AEAFAD",light:fu.black,hcDark:fu.white,hcLight:"#0F4A85"},v(0,"Color of the editor cursor."))),Yv=Tm("editorCursor.background",null,v(0,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Qv=Tm("editorMultiCursor.primary.foreground",{dark:Zv,light:Zv,hcDark:Zv,hcLight:Zv},v(0,"Color of the primary editor cursor when multiple cursors are present.")),Xv=Tm("editorMultiCursor.primary.background",{dark:Yv,light:Yv,hcDark:Yv,hcLight:Yv},v(0,"The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),Jv=Tm("editorMultiCursor.secondary.foreground",{dark:Zv,light:Zv,hcDark:Zv,hcLight:Zv},v(0,"Color of secondary editor cursors when multiple cursors are present.")),eb=Tm("editorMultiCursor.secondary.background",{dark:Yv,light:Yv,hcDark:Yv,hcLight:Yv},v(0,"The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),tb=Tm("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},v(0,"Color of whitespace characters in the editor.")),ib=Tm("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:fu.white,hcLight:"#292929"},v(0,"Color of editor line numbers.")),nb=Tm("editorIndentGuide.background",{dark:tb,light:tb,hcDark:tb,hcLight:tb},v(0,"Color of the editor indentation guides."),!1,v(0,"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),ob=Tm("editorIndentGuide.activeBackground",{dark:tb,light:tb,hcDark:tb,hcLight:tb},v(0,"Color of the active editor indentation guides."),!1,v(0,"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),sb=Tm("editorIndentGuide.background1",{dark:nb,light:nb,hcDark:nb,hcLight:nb},v(0,"Color of the editor indentation guides (1).")),rb=Tm("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the editor indentation guides (2).")),ab=Tm("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the editor indentation guides (3).")),lb=Tm("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the editor indentation guides (4).")),db=Tm("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the editor indentation guides (5).")),cb=Tm("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the editor indentation guides (6).")),hb=Tm("editorIndentGuide.activeBackground1",{dark:ob,light:ob,hcDark:ob,hcLight:ob},v(0,"Color of the active editor indentation guides (1).")),ub=Tm("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the active editor indentation guides (2).")),gb=Tm("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the active editor indentation guides (3).")),pb=Tm("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the active editor indentation guides (4).")),mb=Tm("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the active editor indentation guides (5).")),fb=Tm("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Color of the active editor indentation guides (6).")),_b=Tm("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:jm,hcLight:jm},v(0,"Color of editor active line number"),!1,v(0,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),vb=(Tm("editorLineNumber.activeForeground",{dark:_b,light:_b,hcDark:_b,hcLight:_b},v(0,"Color of editor active line number")),Tm("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Color of the final editor line when editor.renderFinalNewline is set to dimmed."))),bb=(Tm("editorRuler.foreground",{dark:"#5A5A5A",light:fu.lightgrey,hcDark:fu.white,hcLight:"#292929"},v(0,"Color of the editor rulers.")),Tm("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},v(0,"Foreground color of editor CodeLens")),Tm("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},v(0,"Background color behind matching brackets")),Tm("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:Km,hcLight:Km},v(0,"Color for matching brackets boxes")),Tm("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},v(0,"Color of the overview ruler border."))),wb=Tm("editorOverviewRuler.background",null,v(0,"Background color of the editor overview ruler.")),Cb=(Tm("editorGutter.background",{dark:ef,light:ef,hcDark:ef,hcLight:ef},v(0,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Tm("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:fu.fromHex("#fff").transparent(.8),hcLight:Km},v(0,"Border color of unnecessary (unused) source code in the editor.")),Tm("editorUnnecessaryCode.opacity",{dark:fu.fromHex("#000a"),light:fu.fromHex("#0007"),hcDark:null,hcLight:null},v(0,"Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."))),yb=(Tm("editorGhostText.border",{dark:null,light:null,hcDark:fu.fromHex("#fff").transparent(.8),hcLight:fu.fromHex("#292929").transparent(.8)},v(0,"Border color of ghost text in the editor.")),Tm("editorGhostText.foreground",{dark:fu.fromHex("#ffffff56"),light:fu.fromHex("#0007"),hcDark:null,hcLight:null},v(0,"Foreground color of the ghost text in the editor.")),Tm("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},v(0,"Background color of the ghost text in the editor.")),new fu(new gu(0,122,204,.6))),Sb=Tm("editorOverviewRuler.rangeHighlightForeground",{dark:yb,light:yb,hcDark:yb,hcLight:yb},v(0,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),kb=Tm("editorOverviewRuler.errorForeground",{dark:new fu(new gu(255,18,18,.7)),light:new fu(new gu(255,18,18,.7)),hcDark:new fu(new gu(255,50,50,1)),hcLight:"#B5200D"},v(0,"Overview ruler marker color for errors.")),xb=Tm("editorOverviewRuler.warningForeground",{dark:df,light:df,hcDark:cf,hcLight:cf},v(0,"Overview ruler marker color for warnings.")),Lb=Tm("editorOverviewRuler.infoForeground",{dark:hf,light:hf,hcDark:uf,hcLight:uf},v(0,"Overview ruler marker color for infos.")),Db=Tm("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},v(0,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),Eb=Tm("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},v(0,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),Nb=Tm("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},v(0,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),Ib=Tm("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Tb=Tm("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),Mb=Tm("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),Ab=Tm("editorBracketHighlight.unexpectedBracket.foreground",{dark:new fu(new gu(255,18,18,.8)),light:new fu(new gu(255,18,18,.8)),hcDark:new fu(new gu(255,50,50,1)),hcLight:""},v(0,"Foreground color of unexpected brackets.")),Rb=Tm("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Pb=Tm("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Ob=Tm("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),Fb=Tm("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),Bb=Tm("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Wb=Tm("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Vb=Tm("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Hb=Tm("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),zb=Tm("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),Ub=Tm("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Kb=Tm("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),jb=Tm("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},v(0,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));Tm("editorUnicodeHighlight.border",{dark:df,light:df,hcDark:df,hcLight:df},v(0,"Border color used to highlight unicode characters.")),Tm("editorUnicodeHighlight.background",{dark:lf,light:lf,hcDark:lf,hcLight:lf},v(0,"Background color used to highlight unicode characters.")),jv(((e,t)=>{const i=e.getColor(ef),n=e.getColor($v),o=n&&!n.isTransparent()?n:i;o&&t.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${o}; }`)}));class qb extends lt{constructor(e){super(),this.textModel=e,this.colorProvider=new $b,this.onDidChangeEmitter=new kt,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i,n){return n||void 0===t?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(e,!0).map((e=>({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:e.range}))).toArray():[]}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new hh(1,1,this.textModel.getLineCount(),1),e,t):[]}}class $b{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e,t){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(t?e.nestingLevelOfEqualBracketType:e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}function Gb(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}jv(((e,t)=>{const i=[Db,Eb,Nb,Ib,Tb,Mb],n=new $b;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(Ab)}; }`);const o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));class Zb{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${Gb(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${Gb(this.oldText)}")`:`(replace@${this.oldPosition} "${Gb(this.oldText)}" with "${Gb(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;ig(e,n,i),i+=4;for(let o=0;o0&&(65279===n[0]||65534===n[0])?function(e,t,i){const n=[];let o=0;for(let s=0;s0&&(this.changes=(r=t,null===(s=this.changes)||0===s.length?r:new Yb(s,r).compress())),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(ig(e,t?t.length:0,i),i+=4,t)for(const n of t)ig(e,n.selectionStartLineNumber,i),i+=4,ig(e,n.selectionStartColumn,i),i+=4,ig(e,n.positionLineNumber,i),i+=4,ig(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=tg(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){return(Po.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof Xb}append(e,t,i,n,o){this._data instanceof Xb&&this._data.append(e,t,i,n,o)}close(){this._data instanceof Xb&&(this._data=this._data.serialize())}open(){this._data instanceof Xb||(this._data=Xb.deserialize(this._data))}undo(){if(Po.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Xb&&(this._data=this._data.serialize());const e=Xb.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Po.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Xb&&(this._data=this._data.serialize());const e=Xb.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Xb&&(this._data=this._data.serialize()),this._data.byteLength+168}}class ew{get resources(){return this._editStackElementsArr.map((e=>e.resource))}constructor(e,t,i){this.label=e,this.code=t,this.type=1,this._isOpen=!0,this._editStackElementsArr=i.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=Qb(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=Qb(e);return this._editStackElementsMap.has(t)}setModel(e){const t=Qb(Po.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=Qb(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const s=Qb(e.uri);this._editStackElementsMap.get(s).append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=Qb(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){const e=[];for(const t of this._editStackElementsArr)e.push(`${Jl(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function tw(e){return"\n"===e.getEOL()?0:1}function iw(e){return!!e&&(e instanceof Jb||e instanceof ew)}class nw{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);iw(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);iw(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e,t){const i=this._undoRedoService.getLastElement(this._model.uri);if(iw(i)&&i.canAppend(this._model))return i;const n=new Jb(v(0,"Typing"),"undoredo.textBufferEdit",this._model,e);return this._undoRedoService.pushElement(n,t),n}pushEOL(e){const t=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(e),t.append(this._model,[],tw(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i,n){const o=this._getOrCreateEditStackElement(e,n),s=this._model.applyEdits(t,!0),r=nw._computeCursorState(i,s),a=s.map(((e,t)=>({index:t,textChange:e.textChange})));return a.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),o.append(this._model,a.map((e=>e.textChange)),tw(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return xe(e),null}}}class ow extends lt{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function sw(e,t){let i=0,n=0;const o=e.length;for(;nn)throw new Pe("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,d=-1;const c=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,d=-1;for(let t=e;t=0){l=t,d=e;break}}}};let h=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===h){h=-1,u=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){h=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}};let f=0,_=!0,v=0,b=!0,w=0,C=0;for(let o=0;_||b;o++){const r=e-o,g=e+o;o>1&&(r<1||r1&&(g>n||g>i)&&(b=!1),o>5e4&&(_=!1,b=!1);let y=-1;if(_&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,d=e,y=Math.ceil(e/this.textModel.getOptions().indentSize)):(c(r),y=this._getIndentLevelForWhitespaceLine(s,a,d))}let S=-1;if(b&&g<=n){const e=this._computeIndentLevel(g-1);e>=0?(h=g-1,u=e,S=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(g),S=this._getIndentLevelForWhitespaceLine(s,u,p))}if(0!==o){if(1===o){if(g<=n&&S>=0&&C+1===S){_=!1,f=g,v=g,w=S;continue}if(r>=1&&y>=0&&y-1===C){b=!1,f=r,v=r,w=y;continue}if(f=e,v=e,w=C,0===w)return{startLineNumber:f,endLineNumber:v,indent:w}}_&&(y>=w?f=r:_=!1),b&&(S>=w?v=g:b=!1)}else C=y}return{startLineNumber:f,endLineNumber:v,indent:w}}getLinesBracketGuides(e,t,i,n){var o;const s=[];for(let i=e;i<=t;i++)s.push([]);const r=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new hh(e,1,t,this.textModel.getLineMaxColumn(t))).toArray();let a;i&&r.length>0&&(a=null===(o=yu((e<=i.lineNumber&&i.lineNumber<=t?r:this.textModel.bracketPairs.getBracketPairsInRange(hh.fromPositions(i)).toArray()).filter((e=>hh.strictContainsPosition(e.range,i))),(e=>!0)))||void 0===o?void 0:o.range);const l=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,d=new cw;for(const i of r){if(!i.closingBracketRange)continue;const o=a&&i.range.equalsRange(a);if(!o&&!n.includeInactive)continue;const r=d.getInlineClassName(i.nestingLevel,i.nestingLevelOfEqualBracketType,l)+(n.highlightActive&&o?" "+d.activeClassName:""),c=i.openingBracketRange.getStartPosition(),h=i.closingBracketRange.getStartPosition(),u=n.horizontalGuides===rw.Enabled||n.horizontalGuides===rw.EnabledForActive&&o;if(i.range.startLineNumber===i.range.endLineNumber){u&&s[i.range.startLineNumber-e].push(new aw(-1,i.openingBracketRange.getEndPosition().column,r,new lw(!1,h.column),-1,-1));continue}const g=this.getVisibleColumnFromPosition(h),p=this.getVisibleColumnFromPosition(i.openingBracketRange.getStartPosition()),m=Math.min(p,g,i.minVisibleColumnIndentation+1);let f=!1;_n(this.textModel.getLineContent(i.closingBracketRange.startLineNumber))=e&&p>m&&s[c.lineNumber-e].push(new aw(m,-1,r,new lw(!1,c.column),-1,-1)),h.lineNumber<=t&&g>m&&s[h.lineNumber-e].push(new aw(m,-1,r,new lw(!f,h.column),-1,-1)))}for(const e of s)e.sort(((e,t)=>e.visibleColumn-t.visibleColumn));return s}getVisibleColumnFromPosition(e){return vu.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide),r=new Array(t-e+1);let a=-2,l=-1,d=-2,c=-1;for(let o=e;o<=t;o++){const t=o-e,h=this._computeIndentLevel(o-1);if(h>=0)a=o-1,l=h,r[t]=Math.ceil(h/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==d&&(-2===d||d=0){d=e,c=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,c)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t0&&a>0)return;if(l>0&&d>0)return;const c=Math.abs(a-d),h=Math.abs(r-l);if(0===c)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&s++,uw(r,a,h,p,c),c.looksLikeAlignment&&(!i||t!==c.spacesDiff))continue;const _=c.spacesDiff;_<=8&&d[_]++,r=h,a=p}let h=i;o!==s&&(h=o{const i=d[t];i>e&&(e=i,u=t)})),4===u&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function pw(e){return(1&e.metadata)>>>0}function mw(e,t){e.metadata=254&e.metadata|t<<0}function fw(e){return(2&e.metadata)>>>1==1}function _w(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function vw(e){return(4&e.metadata)>>>2==1}function bw(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function ww(e){return(64&e.metadata)>>>6==1}function Cw(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function yw(e,t){e.metadata=231&e.metadata|t<<3}function Sw(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class kw{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,mw(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,bw(this,!1),Cw(this,!1),yw(this,1),Sw(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,_w(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;bw(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),Cw(this,null!==this.options.glyphMarginClassName),yw(this,this.options.stickiness),Sw(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const xw=new kw(null,0,0);xw.parent=xw,xw.left=xw,xw.right=xw,mw(xw,0);class Lw{constructor(){this.root=xw,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o,s){return this.root===xw?[]:function(e,t,i,n,o,s,r){let a=e.root,l=0,d=0,c=0,h=0;const u=[];let g=0;for(;a!==xw;)if(fw(a))_w(a.left,!1),_w(a.right,!1),a===a.parent.right&&(l-=a.parent.delta),a=a.parent;else{if(!fw(a.left)){if(d=l+a.maxEnd,di)_w(a,!0);else{if(h=l+a.end,h>=t){a.setCachedOffsets(c,h,s);let e=!0;n&&a.ownerId&&a.ownerId!==n&&(e=!1),o&&vw(a)&&(e=!1),r&&!ww(a)&&(e=!1),e&&(u[g++]=a)}_w(a,!0),a.right===xw||fw(a.right)||(l+=a.delta,a=a.right)}}return _w(e.root,!1),u}(this,e,t,i,n,o,s)}search(e,t,i,n){return this.root===xw?[]:function(e,t,i,n,o){let s=e.root,r=0,a=0,l=0;const d=[];let c=0;for(;s!==xw;){if(fw(s)){_w(s.left,!1),_w(s.right,!1),s===s.parent.right&&(r-=s.parent.delta),s=s.parent;continue}if(s.left!==xw&&!fw(s.left)){s=s.left;continue}a=r+s.start,l=r+s.end,s.setCachedOffsets(a,l,n);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),i&&vw(s)&&(e=!1),o&&!ww(s)&&(e=!1),e&&(d[c++]=s),_w(s,!0),s.right===xw||fw(s.right)||(r+=s.delta,s=s.right)}return _w(e.root,!1),d}(this,e,t,i,n)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let o=0;for(;i!==xw;)fw(i)?(_w(i.left,!1),_w(i.right,!1),i=i.parent):i.left===xw||fw(i.left)?(i.ownerId===t&&(n[o++]=i),_w(i,!0),i.right===xw||fw(i.right)||(i=i.right)):i=i.left;return _w(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==xw;)fw(t)?(_w(t.left,!1),_w(t.right,!1),t=t.parent):t.left===xw||fw(t.left)?t.right===xw||fw(t.right)?(i[n++]=t,_w(t,!0)):t=t.right:t=t.left;return _w(e.root,!1),i}(this)}insert(e){Nw(this,e),this._normalizeDeltaIfNecessary()}delete(e){Iw(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,s=0,r=0,a=0;const l=[];let d=0;for(;n!==xw;)if(fw(n))_w(n.left,!1),_w(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!fw(n.left)){if(s=o+n.maxEnd,si?_w(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[d++]=n),_w(n,!0),n.right===xw||fw(n.right)||(o+=n.delta,n=n.right))}return _w(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;ei?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),_w(o,!0)):(_w(o,!0),o.right===xw||fw(o.right)||(s+=o.delta,o=o.right))}_w(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let s=0,r=o.length;si)&&1!==n&&(2===n||t)}function Ew(e,t,i,n,o){const s=function(e){return(24&e.metadata)>>>3}(e),r=0===s||2===s,a=1===s||2===s,l=i-t,d=n,c=Math.min(l,d),h=e.start;let u=!1;const g=e.end;let p=!1;t<=h&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!u&&Dw(h,r,t,e)&&(u=!0),!p&&Dw(g,a,t,e)&&(p=!0)}if(c>0&&!o){const e=l>d?2:0;!u&&Dw(h,r,t+c,e)&&(u=!0),!p&&Dw(g,a,t+c,e)&&(p=!0)}{const n=o?1:0;!u&&Dw(h,r,i,n)&&(e.start=t+d,u=!0),!p&&Dw(g,a,i,n)&&(e.end=t+d,p=!0)}const m=d-l;u||(e.start=Math.max(0,h+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function Nw(e,t){if(e.root===xw)return t.parent=xw,t.left=xw,t.right=xw,mw(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,s=t.end;for(;;)if(r=o,a=s,l=n.start+i,d=n.end+i,(r===l?a-d:r-l)<0){if(n.left===xw){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===xw){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var r,a,l,d;t.parent=n,t.left=xw,t.right=xw,mw(t,1)}(e,t),Ow(t.parent);let i=t;for(;i!==e.root&&1===pw(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===pw(t)?(mw(i.parent,0),mw(t,0),mw(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,Mw(e,i)),mw(i.parent,0),mw(i.parent.parent,1),Aw(e,i.parent.parent))}else{const t=i.parent.parent.left;1===pw(t)?(mw(i.parent,0),mw(t,0),mw(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,Aw(e,i)),mw(i.parent,0),mw(i.parent.parent,1),Mw(e,i.parent.parent))}return mw(e.root,0),t}function Iw(e,t){let i,n;if(t.left===xw?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===xw?(i=t.left,n=t):(n=function(e){for(;e.left!==xw;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,mw(i,0),t.detach(),Tw(),Pw(i),void(e.root.parent=xw);const o=1===pw(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,mw(n,pw(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==xw&&(n.left.parent=n),n.right!==xw&&(n.right.parent=n)),t.detach(),o)return Ow(i.parent),n!==t&&(Ow(n),Ow(n.parent)),void Tw();let s;for(Ow(i),Ow(i.parent),n!==t&&(Ow(n),Ow(n.parent));i!==e.root&&0===pw(i);)i===i.parent.left?(s=i.parent.right,1===pw(s)&&(mw(s,0),mw(i.parent,1),Mw(e,i.parent),s=i.parent.right),0===pw(s.left)&&0===pw(s.right)?(mw(s,1),i=i.parent):(0===pw(s.right)&&(mw(s.left,0),mw(s,1),Aw(e,s),s=i.parent.right),mw(s,pw(i.parent)),mw(i.parent,0),mw(s.right,0),Mw(e,i.parent),i=e.root)):(s=i.parent.left,1===pw(s)&&(mw(s,0),mw(i.parent,1),Aw(e,i.parent),s=i.parent.left),0===pw(s.left)&&0===pw(s.right)?(mw(s,1),i=i.parent):(0===pw(s.left)&&(mw(s.right,0),mw(s,1),Mw(e,s),s=i.parent.left),mw(s,pw(i.parent)),mw(i.parent,0),mw(s.left,0),Aw(e,i.parent),i=e.root));mw(i,0),Tw()}function Tw(){xw.parent=xw,xw.delta=0,xw.start=0,xw.end=0}function Mw(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==xw&&(i.left.parent=t),i.parent=t.parent,t.parent===xw?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,Pw(t),Pw(i)}function Aw(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==xw&&(i.right.parent=t),i.parent=t.parent,t.parent===xw?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,Pw(t),Pw(i)}function Rw(e){let t=e.end;if(e.left!==xw){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==xw){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function Pw(e){e.maxEnd=Rw(e)}function Ow(e){for(;e!==xw;){const t=Rw(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class Fw{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==Bw)return Ww(this.right);let e=this;for(;e.parent!==Bw&&e.parent.left!==e;)e=e.parent;return e.parent===Bw?Bw:e.parent}prev(){if(this.left!==Bw)return Vw(this.left);let e=this;for(;e.parent!==Bw&&e.parent.right!==e;)e=e.parent;return e.parent===Bw?Bw:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Bw=new Fw(null,0);function Ww(e){for(;e.left!==Bw;)e=e.left;return e}function Vw(e){for(;e.right!==Bw;)e=e.right;return e}function Hw(e){return e===Bw?0:e.size_left+e.piece.length+Hw(e.right)}function zw(e){return e===Bw?0:e.lf_left+e.piece.lineFeedCnt+zw(e.right)}function Uw(){Bw.parent=Bw}function Kw(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==Bw&&(i.left.parent=t),i.parent=t.parent,t.parent===Bw?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function jw(e,t){const i=t.left;t.left=i.right,i.right!==Bw&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===Bw?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function qw(e,t){let i,n;if(t.left===Bw?(n=t,i=n.right):t.right===Bw?(n=t,i=n.left):(n=Ww(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),Uw(),void(e.root.parent=Bw);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Zw(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Zw(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==Bw&&(n.left.parent=n),n.right!==Bw&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Zw(e,n)),t.detach(),i.parent.left===i){const t=Hw(i),n=zw(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const o=t-i.parent.size_left,s=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,Gw(e,i.parent,o,s)}}if(Zw(e,i.parent),o)return void Uw();let s;for(;i!==e.root&&0===i.color;)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,Kw(e,i.parent),s=i.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.right.color&&(s.left.color=0,s.color=1,jw(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,Kw(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,jw(e,i.parent),s=i.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.left.color&&(s.right.color=0,s.color=1,Kw(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,jw(e,i.parent),i=e.root));i.color=0,Uw()}function $w(e,t){for(Zw(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Kw(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,jw(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&jw(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Kw(e,t.parent.parent))}e.root.color=0}function Gw(e,t,i,n){for(;t!==e.root&&t!==Bw;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Zw(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=Hw((t=t.parent).left)-t.size_left,n=zw(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}function Yw(e){return e<0?0:e>255?255:0|e}function Qw(e){return e<0?0:e>4294967295?4294967295:0|e}Bw.parent=Bw,Bw.left=Bw,Bw.right=Bw,Bw.color=0;class Xw{constructor(e){const t=Yw(e);this._defaultValue=t,this._asciiMap=Xw._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);return t.fill(e),t}set(e,t){const i=Yw(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class Jw{constructor(){this._actual=new Xw(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}clear(){return this._actual.clear()}}class eC extends Xw{constructor(e,t){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=t,this.intlSegmenterLocales.length>0?this._segmenter=new Intl.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let t=0,i=e.length;tt)break;i=n}return i}findNextIntlWordAtOrAfterOffset(e,t){for(const i of this._getIntlSegmenterWordsOnLine(e))if(!(i.index=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=mn(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new Ph(t,this.wordSeparators?iC(this.wordSeparators,[]):null,i?this.searchString:null)}}function oC(e,t,i){if(!i)return new Ah(e,null);const n=[];for(let e=0,i=t.length;e>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class rC{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new lC(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let r,a,l=0;if(n?(l=n.findLineFeedCountBeforeOffset(o),r=t+o+l):r=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+s.length)-l;a=r+s.length+e}else a=r+s.length;const d=e.getPositionAt(r),c=e.getPositionAt(a);return new hh(d.lineNumber,d.column,c.lineNumber,c.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new sC(r):null,l=[];let d,c=0;for(i.reset(0);d=i.next(r);)if(l[c++]=oC(this._getMultilineMatchRange(e,s,r,a,d.index,d[0]),d,n),c>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let a=t.startLineNumber+1;a=a))return o;return o}const d=new lC(e.wordSeparators,e.regex);let c;d.reset(0);do{if(c=d.next(t),c&&(s[o++]=oC(new hh(i,c.index+1+n,i,c.index+1+c[0].length+n),c,r),o>=a))return o}while(c);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new lC(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new wd(t.lineNumber,1),s=e.getOffsetAt(o),r=e.getLineCount(),a=e.getValueInRange(new hh(o.lineNumber,o.column,r,e.getLineMaxColumn(r)),1),l="\r\n"===e.getEOL()?new sC(a):null;i.reset(t.column-1);const d=i.next(a);return d?oC(this._getMultilineMatchRange(e,s,a,l,d.index,d[0]),d,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new wd(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const r=(s+t-1)%o,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const s=e.next(t);return s?oC(new hh(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new lC(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new hh(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new wd(s,e.getLineMaxColumn(s)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let t=1;t<=o;t++){const r=(o+s-t-1)%o,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,s=null;for(e.reset(0);o=e.next(t);)s=oC(new hh(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function aC(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class lC{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const n=i.index,o=i[0].length;if(n===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){Rn(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=o,!this._wordSeparators||aC(this._wordSeparators,e,t,n,o))return i}while(i);return null}}const dC=65535;function cC(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class hC{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function uC(e,t=!0){const i=[0];let n=1;for(let t=0,o=e.length;t(e!==Bw&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class fC{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class _C{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new pC("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Bw,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=uC(e[t].buffer));const i=new gC(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new fC(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",o=0;const s=[];if(this.iterate(this.root,(r=>{const a=this.getNodeContent(r),l=a.length;if(o<=t||o+l0){const t=n.replace(/\r\n|\r|\n/g,e);s.push(new pC(t,uC(t)))}this.create(s,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new mC(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==Bw;)if(n.left!==Bw&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==Bw;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){const e=this.getOffsetAt(i+1,1);return new wd(i+1,n-e+1)}return new wd(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Bw){const t=this.getOffsetAt(i+1,1);return new wd(i+1,n-e-t+1)}t=t.right}return new wd(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let s=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==Bw;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){s+=e.substring(n,n+t.remainder);break}s+=e.substr(n,i.piece.length),i=i.next()}return s}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===Bw)return!0;const s=o.piece;let r=s.length;if(0===r)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,d=s.start.line,c=s.end.line;let h=l[d]+s.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(d===c)return this._EOLNormalized||13!==a.charCodeAt(h+r-1)?i+=a.substr(h,r):(n=!0,i+=a.substr(h,r-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[d+1]-this._EOLLength)):a.substring(h,l[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=d+1;ne+g,t.reset(0)):(_=h.buffer,v=e=>e,t.reset(g));do{if(m=t.next(_),m){if(v(m.index)>=p)return d;this.positionInBuffer(e,v(m.index)-u,f);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,f),s=f.line===o.line?f.column-o.column+n:f.column+1,r=s+m[0].length;if(c[d++]=oC(new hh(i+t,s,i+t,r),m,a),v(m.index)+m[0].length>=p)return d;if(d>=l)return d}}while(m);return d}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new lC(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let d=this.positionInBuffer(a.node,a.remainder);const c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,d,c,t,i,n,s,o),o;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,d,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,c=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[d.line+l],p=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,r,h,p,d,this.positionInBuffer(u,g-c),t,i,n,s,o),s>=n)return o;h+=l}const c=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(c,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,c,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(h).substr(c),h,c,s,o,i,n),s>=n)return o;h++,a=this.nodeAt2(h,1),u=a.node,d=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){const a=h===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(h).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}const g=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,h,g,d,c,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const d=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,c=i.length;let h=-a;for(;-1!==(h=i.indexOf(t,h+a));)if((!d||aC(d,i,c,h,a))&&(r[s++]=new Ah(new hh(n,h+1+o,n,h+1+a+o),null),s>=l))return s;return s}let c;t.reset(0);do{if(c=t.next(i),c&&(r[s++]=oC(new hh(n,c.index+1+o,n,c.index+1+c[0].length+o),c,a),s>=l))return s}while(c);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Bw){const{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),s=i.piece,r=s.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&o+s.length===e&&t.lengthe){const e=[];let o=new gC(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(r,s.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){const e={line:o.start.line+1,column:0};o=new gC(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){const o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let d=i;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let e=1;e=c))break;a=d+1}return i?(i.line=d,i.column=r-h,null):{line:d,column:r-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;const r=s-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tdC){const t=[];for(;e.length>dC;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,dC),e=e.substring(dC));const o=uC(n);t.push(new gC(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new pC(n,o))}const i=uC(e);return t.push(new gC(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new pC(e,i)),t}let t=this._buffers[0].buffer.length;const i=uC(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:s-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==Bw;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==Bw;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,r=this.offsetInBuffer(i.bufferIndex,s),a=this.getLineFeedCnt(i.bufferIndex,i.start,s),l=a-n,d=r-o,c=i.length+d;e.piece=new gC(i.bufferIndex,i.start,s,a,c),Gw(this,e,d,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,r=this.getLineFeedCnt(i.bufferIndex,s,i.end),a=r-n,l=o-this.offsetInBuffer(i.bufferIndex,s),d=i.length+l;e.piece=new gC(i.bufferIndex,s,i.end,r,d),Gw(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,l),c=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new gC(n.bufferIndex,n.start,l,d,c),Gw(this,e,c-r,d-a);const h=new gC(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=uC(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==Bw;)if(i.left!==Bw&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Bw;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===Bw||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n!==i.length-1&&(!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==Bw&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let o;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new gC(e.piece.bufferIndex,e.piece.start,o,r,s),Gw(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new gC(t.piece.bufferIndex,a,t.piece.end,d,l),Gw(this,t,-1,-1),0===t.piece.length&&i.push(t);const c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const u=this._doApplyEdits(a);let g=null;if(t&&c.length>0){c.sort(((e,t)=>t.lineNumber-e.lineNumber)),g=[];for(let e=0,t=c.length;e0&&c[e-1].lineNumber===t)continue;const i=c[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===_n(n)&&g.push(t)}}return this._onDidChangeContent.fire(),new Oh(h,u,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new hh(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let s=i.startLineNumber,r=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),s=o.endLineNumber,r=o.endColumn}const l=a.join(""),[d,c,h]=_u(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:d,firstLineLength:c,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(vC._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;d=1===e?new hh(a,l,a,l+r.firstLineLength):new hh(a,l,a+e-1,r.lastLineLength+1)}else d=new hh(a,l,a,l);i=d.endLineNumber,n=d.endColumn,t.push(d),o=r}return t}static _sortOpsAscending(e,t){const i=hh.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=hh.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class bC{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,s=0,r=!0;for(let a=0,l=t.length;a126)&&(r=!1)}const a=new hC(cC(e),n,o,s,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new pC(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,t.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=Vn(e)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=Kn(e)))}finish(e=!0){return this._finish(),new bC(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=uC(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class CC extends lt{get isResolved(){return this._isResolved}constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}class yC{constructor(e,t,i){this.offset=e,this.type=t,this.language=i,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class SC{constructor(e,t){this.tokens=e,this.endState=t,this._tokenizationResultBrand=void 0}}class kC{constructor(e,t){this.tokens=e,this.endState=t,this._encodedTokenizationResultBrand=void 0}}var xC,LC,DC,EC,NC,IC,TC;(TC=xC||(xC={}))[TC.Increase=0]="Increase",TC[TC.Decrease=1]="Decrease",function(e){const t=new Map;t.set(0,Ml.symbolMethod),t.set(1,Ml.symbolFunction),t.set(2,Ml.symbolConstructor),t.set(3,Ml.symbolField),t.set(4,Ml.symbolVariable),t.set(5,Ml.symbolClass),t.set(6,Ml.symbolStruct),t.set(7,Ml.symbolInterface),t.set(8,Ml.symbolModule),t.set(9,Ml.symbolProperty),t.set(10,Ml.symbolEvent),t.set(11,Ml.symbolOperator),t.set(12,Ml.symbolUnit),t.set(13,Ml.symbolValue),t.set(15,Ml.symbolEnum),t.set(14,Ml.symbolConstant),t.set(15,Ml.symbolEnum),t.set(16,Ml.symbolEnumMember),t.set(17,Ml.symbolKeyword),t.set(27,Ml.symbolSnippet),t.set(18,Ml.symbolText),t.set(19,Ml.symbolColor),t.set(20,Ml.symbolFile),t.set(21,Ml.symbolReference),t.set(22,Ml.symbolCustomColor),t.set(23,Ml.symbolFolder),t.set(24,Ml.symbolTypeParameter),t.set(25,Ml.account),t.set(26,Ml.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=Ml.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(LC||(LC={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(DC||(DC={}));class MC{constructor(e,t,i,n){this.range=e,this.text=t,this.completionKind=i,this.isSnippetText=n}equals(e){return hh.lift(this.range).equalsRange(e.range)&&this.text===e.text&&this.completionKind===e.completionKind&&this.isSnippetText===e.isSnippetText}}!function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"}(EC||(EC={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(NC||(NC={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(IC||(IC={}));const AC={17:v(0,"array"),16:v(0,"boolean"),4:v(0,"class"),13:v(0,"constant"),8:v(0,"constructor"),9:v(0,"enumeration"),21:v(0,"enumeration member"),23:v(0,"event"),7:v(0,"field"),0:v(0,"file"),11:v(0,"function"),10:v(0,"interface"),19:v(0,"key"),5:v(0,"method"),1:v(0,"module"),2:v(0,"namespace"),20:v(0,"null"),15:v(0,"number"),18:v(0,"object"),24:v(0,"operator"),3:v(0,"package"),6:v(0,"property"),14:v(0,"string"),22:v(0,"struct"),25:v(0,"type parameter"),12:v(0,"variable")};var RC,PC,OC,FC,BC;!function(e){const t=new Map;t.set(0,Ml.symbolFile),t.set(1,Ml.symbolModule),t.set(2,Ml.symbolNamespace),t.set(3,Ml.symbolPackage),t.set(4,Ml.symbolClass),t.set(5,Ml.symbolMethod),t.set(6,Ml.symbolProperty),t.set(7,Ml.symbolField),t.set(8,Ml.symbolConstructor),t.set(9,Ml.symbolEnum),t.set(10,Ml.symbolInterface),t.set(11,Ml.symbolFunction),t.set(12,Ml.symbolVariable),t.set(13,Ml.symbolConstant),t.set(14,Ml.symbolString),t.set(15,Ml.symbolNumber),t.set(16,Ml.symbolBoolean),t.set(17,Ml.symbolArray),t.set(18,Ml.symbolObject),t.set(19,Ml.symbolKey),t.set(20,Ml.symbolNull),t.set(21,Ml.symbolEnumMember),t.set(22,Ml.symbolStruct),t.set(23,Ml.symbolEvent),t.set(24,Ml.symbolOperator),t.set(25,Ml.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=Ml.symbolProperty),i}}(RC||(RC={}));class WC{static fromValue(e){switch(e){case"comment":return WC.Comment;case"imports":return WC.Imports;case"region":return WC.Region}return new WC(e)}constructor(e){this.value=e}}WC.Comment=new WC("comment"),WC.Imports=new WC("imports"),WC.Region=new WC("region"),function(e){e[e.AIGenerated=1]="AIGenerated"}(PC||(PC={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(OC||(OC={})),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(FC||(FC={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(BC||(BC={}));class VC{constructor(e){this.createSupport=e,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then((e=>{e&&e.dispose()}))}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}const HC=new class{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new kt,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._tokenizationSupports.set(e,t),this.handleChange([e]),rt((()=>{this._tokenizationSupports.get(e)===t&&(this._tokenizationSupports.delete(e),this.handleChange([e]))}))}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new CC(this,e,t);return this._factories.set(e,n),rt((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}async getOrCreate(e){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(await i.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};var zC;!function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(zC||(zC={}));const UC=new class{clone(){return this}equals(e){return this===e}};function KC(e,t){return new SC([new yC(0,"",e)],t)}function jC(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(32768|e<<0|2<<24)>>>0,new kC(i,null===t?UC:t)}class qC{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}replace(e,t,i){if(e>=this._store.length)return;if(0===t)return void this.insert(e,i);if(0===i)return void this.delete(e,t);const n=this._store.slice(0,e),o=this._store.slice(e+t),s=function(e,t){const i=[];for(let n=0;n=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new $C(e,[t]))}finalize(){return this._tokens}}class ZC{static createEmpty(e,t){const i=ZC.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new ZC(n,e,t)}static createFromTextAndMetadata(e,t){let i=0,n="";const o=new Array;for(const{text:t,metadata:s}of e)o.push(i+t.length,s),i+=t.length,n+=t;return new ZC(new Uint32Array(o),n,t)}constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this.languageIdCodec=i}equals(e){return e instanceof ZC&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=Jp.getLanguageId(t);return this.languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return Jp.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return Jp.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return Jp.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return Jp.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return Jp.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return ZC.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new YC(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const o=new Array;let s=0;for(;;){const r=ts){n+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];o.push(n.length,e),s=a.offset}n+=a.text,o.push(n.length,a.tokenMetadata),i++}}return new ZC(new Uint32Array(o),n,this.languageIdCodec)}getTokenText(e){const t=this.getStartOffset(e),i=this.getEndOffset(e);return this._text.substring(t,i)}forEach(e){const t=this.getCount();for(let i=0;i=i);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof YC&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getStandardTokenType(e){return this._source.getStandardTokenType(this._firstTokenIndex+e)}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(e){const t=this._firstTokenIndex+e,i=this._source.getStartOffset(t),n=this._source.getEndOffset(t);let o=this._source.getTokenText(t);return ithis._endOffset&&(o=o.substring(0,o.length-(n-this._endOffset))),o}forEach(e){for(let t=0;tt)break;const o=this._textModel.getLineContent(n.lineNumber),s=iy(this._languageIdCodec,i,this.tokenizationSupport,o,!0,n.startState);e.add(n.lineNumber,s.tokens),this.store.setEndState(n.lineNumber,s.endState)}}getTokenTypeIfInsertingCharacter(e,t){const i=this.getStartState(e.lineNumber);if(!i)return 0;const n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+t+o.substring(e.column-1),r=iy(this._languageIdCodec,n,this.tokenizationSupport,s,!0,i),a=new ZC(r.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,o=e.column,s=this.getStartState(n);if(!s)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,o-1)+i+r.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),d=iy(this._languageIdCodec,l,this.tokenizationSupport,a,!0,s);return new ZC(d.tokens,a,this._languageIdCodec)}hasAccurateTokensForLine(e){return e1&&o>=1;o--){const e=this._textModel.getLineFirstNonWhitespaceColumn(o);if(0!==e&&e0&&i>0&&(i--,t--),this._lineEndStates.replace(e.startLineNumber,i,t)}}class ty{constructor(){this._ranges=[]}get min(){return 0===this._ranges.length?null:this._ranges[0].start}delete(e){const t=this._ranges.findIndex((t=>t.contains(e)));if(-1!==t){const i=this._ranges[t];i.start===e?i.endExclusive===e+1?this._ranges.splice(t,1):this._ranges[t]=new wu(e+1,i.endExclusive):i.endExclusive===e+1?this._ranges[t]=new wu(i.start,e):this._ranges.splice(t,1,new wu(i.start,e),new wu(e+1,i.endExclusive))}}addRange(e){wu.addRange(e,this._ranges)}addRangeAndResize(e,t){let i=0;for(;!(i>=this._ranges.length||e.start<=this._ranges[i].endExclusive);)i++;let n=i;for(;!(n>=this._ranges.length||e.endExclusivee.toString())).join(" + ")}}function iy(e,t,i,n,o,s){let r=null;if(i)try{r=i.tokenizeEncoded(n,o,s.clone())}catch(e){xe(e)}return r||(r=jC(e.encodeLanguageId(t),s)),ZC.convertToEndOffset(r.tokens,n.length),r}class ny{constructor(e,t){this._tokenizerWithStateStore=e,this._backgroundTokenStore=t,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,Yt((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._tokenizerWithStateStore._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(t.finalize()),this.checkFinished()}_hasLinesToTokenize(){return!!this._tokenizerWithStateStore&&!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(e){var t;const i=null===(t=this._tokenizerWithStateStore)||void 0===t?void 0:t.getFirstInvalidLine();return i?(this._tokenizerWithStateStore.updateTokensUntilLine(e,i.lineNumber),i.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(e,t){this._tokenizerWithStateStore.store.invalidateEndStateRange(new Nu(e,t))}}const oy=new Uint32Array(0).buffer;class sy{static deleteBeginning(e,t){return null===e||e===oy?e:sy.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===oy)return e;const i=ry(e),n=i[i.length-2];return sy.delete(e,t,n)}static delete(e,t,i){if(null===e||e===oy||t===i)return e;const n=ry(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return oy;const s=ZC.findIndexInTokensArray(n,t),r=s>0?n[s-1<<1]:0;if(il&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const c=new Uint32Array(a);return c.set(n.subarray(0,a),0),c.buffer}static append(e,t){if(t===oy)return e;if(e===oy)return t;if(null===e)return e;if(null===t)return null;const i=ry(e),n=ry(t),o=n.length>>>1,s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e>>1;let s=ZC.findIndexInTokensArray(n,t);s>0&&n[s-1<<1]===t&&s--;for(let e=s;e0}getTokens(e,t,i){let n=null;if(t1&&(t=Jp.getLanguageId(n[1])!==e),!t)return oy}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=ly(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=sy.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=sy.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=sy.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=sy.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=sy.insert(this._lineTokens[n],e.column-1,i))}setMultilineTokens(e,t){if(0===e.length)return{changes:[]};const i=[];for(let n=0,o=e.length;n>>0}class dy{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let n=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){n=n||{index:e};break}if(o.removeTokens(i),o.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(o.endLineNumberi.endLineNumber){n=n||{index:e};continue}const[s,r]=o.split(i);s.isEmpty()?n=n||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,n=n||{index:e})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=Xh(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){if(0===t.getLineContent().length)return t;const i=this._pieces;if(0===i.length)return t;const n=i[dy._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const o=t.getCount(),s=n.getCount();let r=0;const a=[];let l=0,d=0;const c=(e,t)=>{e!==d&&(d=e,a[l++]=e,a[l++]=t)};for(let e=0;e>>0,d=~l>>>0;for(;rt)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}class cy extends ow{constructor(e,t,i,n,o,s){super(),this._languageService=e,this._languageConfigurationService=t,this._textModel=i,this._bracketPairsTextModelPart=n,this._languageId=o,this._attachedViews=s,this._semanticTokens=new dy(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new kt),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new kt),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new kt),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new hy(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews)),this._register(this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}))),this._register(this.grammarTokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)}))),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})))}handleDidChangeContent(e){if(e.isFlush)this._semanticTokens.flush();else if(!e.isEolChange)for(const t of e.changes){const[e,i,n]=_u(t.text);this._semanticTokens.acceptEdit(t.range,e,i,n,t.text.length>0?t.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(e){this.validateLineNumber(e);const t=this.grammarTokens.getLineTokens(e);return this._semanticTokens.addSparseTokens(e,t)}_emitModelTokensChangedEvent(e){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}validateLineNumber(e){if(e<1||e>this._textModel.getLineCount())throw new Pe("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(e){this.validateLineNumber(e),this.grammarTokens.forceTokenization(e)}hasAccurateTokensForLine(e){return this.validateLineNumber(e),this.grammarTokens.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return this.validateLineNumber(e),this.grammarTokens.isCheapToTokenize(e)}tokenizeIfCheap(e){this.validateLineNumber(e),this.grammarTokens.tokenizeIfCheap(e)}getTokenTypeIfInsertingCharacter(e,t,i){return this.grammarTokens.getTokenTypeIfInsertingCharacter(e,t,i)}tokenizeLineWithEdit(e,t,i){return this.grammarTokens.tokenizeLineWithEdit(e,t,i)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._textModel.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}getWordAtPosition(e){this.assertNotDisposed();const t=this._textModel.validatePosition(e),i=this._textModel.getLineContent(t.lineNumber),n=this.getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[s,r]=cy._findLanguageBoundaries(n,o),a=Fu(t.column,this.getLanguageConfiguration(n.getLanguageId(o)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&s===t.column-1){const[s,r]=cy._findLanguageBoundaries(n,o-1),a=Fu(t.column,this.getLanguageConfiguration(n.getLanguageId(o-1)).getWordDefinition(),i.substring(s,r),s);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,s=e.getCount();n{const t=this.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&this.resetTokenization()}))),this.resetTokenization(),this._register(n.onDidChangeVisibleRanges((({view:e,state:t})=>{if(t){let i=this._attachedViewStates.get(e);i||(i=new uy((()=>this.refreshRanges(i.lineRanges))),this._attachedViewStates.set(e,i)),i.handleStateChange(t)}else this._attachedViewStates.deleteAndDispose(e)})))}resetTokenization(e=!0){var t;this._tokens.flush(),null===(t=this._debugBackgroundTokens)||void 0===t||t.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new JC(this._textModel.getLineCount())),e&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const[i,n]=(()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const e=HC.get(this.getLanguageId());if(!e)return[null,null];let t;try{t=e.getInitialState()}catch(e){return xe(e),[null,null]}return[e,t]})();if(this._tokenizer=i&&n?new XC(this._textModel.getLineCount(),i,this._textModel,this._languageIdCodec):null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const e={setTokens:e=>{this.setTokens(e)},backgroundTokenizationFinished:()=>{2!==this._backgroundTokenizationState&&(this._backgroundTokenizationState=2,this._onDidChangeBackgroundTokenizationState.fire())},setEndState:(e,t)=>{var i;if(!this._tokenizer)return;const n=this._tokenizer.store.getFirstInvalidEndStateLineNumber();null!==n&&e>=n&&(null===(i=this._tokenizer)||void 0===i||i.store.setEndState(e,t))}};i&&i.createBackgroundTokenizer&&!i.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,e)),this._backgroundTokenizer.value||this._textModel.isTooLargeForTokenization()||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new ny(this._tokenizer,e),this._defaultBackgroundTokenizer.handleChanges()),(null==i?void 0:i.backgroundTokenizerShouldOnlyVerifyTokens)&&i.createBackgroundTokenizer?(this._debugBackgroundTokens=new ay(this._languageIdCodec),this._debugBackgroundStates=new JC(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=i.createBackgroundTokenizer(this._textModel,{setTokens:e=>{var t;null===(t=this._debugBackgroundTokens)||void 0===t||t.setMultilineTokens(e,this._textModel)},backgroundTokenizationFinished(){},setEndState:(e,t)=>{var i;null===(i=this._debugBackgroundStates)||void 0===i||i.setEndState(e,t)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var e;null===(e=this._defaultBackgroundTokenizer)||void 0===e||e.handleChanges()}handleDidChangeContent(e){var t,i,n;if(e.isFlush)this.resetTokenization(!1);else if(!e.isEolChange){for(const i of e.changes){const[e,n]=_u(i.text);this._tokens.acceptEdit(i.range,e,n),null===(t=this._debugBackgroundTokens)||void 0===t||t.acceptEdit(i.range,e,n)}null===(i=this._debugBackgroundStates)||void 0===i||i.acceptChanges(e.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(e.changes),null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.handleChanges()}}setTokens(e){const{changes:t}=this._tokens.setMultilineTokens(e,this._textModel);return t.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:t}),{changes:t}}refreshAllVisibleLineTokens(){const e=Nu.joinMany([...this._attachedViewStates].map((([e,t])=>t.lineRanges)));this.refreshRanges(e)}refreshRanges(e){for(const t of e)this.refreshRange(t.startLineNumber,t.endLineNumberExclusive-1)}refreshRange(e,t){var i,n;if(!this._tokenizer)return;e=Math.max(1,Math.min(this._textModel.getLineCount(),e)),t=Math.min(this._textModel.getLineCount(),t);const o=new GC,{heuristicTokens:s}=this._tokenizer.tokenizeHeuristically(o,e,t),r=this.setTokens(o.finalize());if(s)for(const e of r.changes)null===(i=this._backgroundTokenizer.value)||void 0===i||i.requestTokens(e.fromLineNumber,e.toLineNumber+1);null===(n=this._defaultBackgroundTokenizer)||void 0===n||n.checkFinished()}forceTokenization(e){var t,i;const n=new GC;null===(t=this._tokenizer)||void 0===t||t.updateTokensUntilLine(n,e),this.setTokens(n.finalize()),null===(i=this._defaultBackgroundTokenizer)||void 0===i||i.checkFinished()}hasAccurateTokensForLine(e){return!this._tokenizer||this._tokenizer.hasAccurateTokensForLine(e)}isCheapToTokenize(e){return!this._tokenizer||this._tokenizer.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){var t;const i=this._textModel.getLineContent(e),n=this._tokens.getTokens(this._textModel.getLanguageId(),e-1,i);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>e&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>e){const o=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),e-1,i);!n.equals(o)&&(null===(t=this._debugBackgroundTokenizer.value)||void 0===t?void 0:t.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(e)}return n}getTokenTypeIfInsertingCharacter(e,t,i){if(!this._tokenizer)return 0;const n=this._textModel.validatePosition(new wd(e,t));return this.forceTokenization(n.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){if(!this._tokenizer)return null;const n=this._textModel.validatePosition(e);return this.forceTokenization(n.lineNumber),this._tokenizer.tokenizeLineWithEdit(n,t,i)}get hasTokens(){return this._tokens.hasTokens}}class uy extends lt{get lineRanges(){return this._lineRanges}constructor(e){super(),this._refreshTokens=e,this.runner=this._register(new Zt((()=>this.update()),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){Wh(this._computedLineRanges,this._lineRanges,((e,t)=>e.equals(t)))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(e){this._lineRanges=e.visibleLineRanges,e.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}class gy{constructor(){this.changeType=1}}class py{static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new py(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new py(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}}class my{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class fy{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class _y{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class vy{constructor(){this.changeType=5}}class by{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Ty=()=>{throw new Error("Invalid change accessor")};let My=Ly=class extends lt{static resolveOptions(e,t){if(t.detectIndentation){const i=gw(e,t.tabSize,t.insertSpaces);return new Mh({tabSize:i.tabSize,indentSize:"tabSize",insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Mh(t)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return st(this._eventEmitter.fastEvent((t=>e(t))),this._onDidChangeInjectedText.event((t=>e(t))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(e,t,i,n=null,o,s,r){super(),this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=r,this._onWillDispose=this._register(new kt),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new jy((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new kt),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new kt),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new kt),this._eventEmitter=this._register(new qy),this._languageSelectionListener=this._register(new dt),this._deltaDecorationCallCnt=0,this._attachedViews=new $y,Ny++,this.id="$model"+Ny,this.isForSimpleWidget=i.isForSimpleWidget,this._associatedResource=null==n?Po.parse("inmemory://model/"+Ny):n,this._attachedEditorCount=0;const{textBuffer:a,disposable:l}=Ey(e,i.defaultEOL);this._buffer=a,this._bufferDisposable=l,this._options=Ly.resolveOptions(this._buffer,i);const d="string"==typeof t?t:t.languageId;"string"!=typeof t&&(this._languageSelectionListener.value=t.onDidChange((()=>this._setLanguage(t.languageId)))),this._bracketPairs=this._register(new Sm(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new dw(this,this._languageConfigurationService)),this._decorationProvider=this._register(new qb(this)),this._tokenizationTextModelPart=new cy(this._languageService,this._languageConfigurationService,this,this._bracketPairs,d,this._attachedViews);const c=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new hh(1,1,c,this._buffer.getLineLength(c)+1),0);i.largeFileOptimizations?(this._isTooLargeForTokenization=h>Ly.LARGE_FILE_SIZE_THRESHOLD||c>Ly.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=h>Ly.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=h>Ly._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=Zn(Ny),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Py,this._commandManager=new nw(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))),this._languageService.requestRichLanguageFeatures(d)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const e=new vC([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=lt.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(t),this._bracketPairs.handleDidChangeContent(t),this._eventEmitter.fire(new Cy(e,t)))}setValue(e){if(this._assertNotDisposed(),null==e)throw Te();const{textBuffer:t,disposable:i}=Ey(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),isEolChange:a,versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new Py,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new by([new gy],this._versionId,!1,!1),this._createContentChanged2(new hh(1,1,o,s),0,n,this.getValue(),!1,!1,!0,!1))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new by([new vy],this._versionId,!1,!1),this._createContentChanged2(new hh(1,1,o,s),0,n,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.originalIndentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new Mh({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._bracketPairs.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=gw(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),bu(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(Un.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Pe("Operation would exceed heap memory limits");const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Iy(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Pe("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Pe("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new Pe("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Pe("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Pe("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Pe("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!=typeof i||isNaN(i)?1:i),s=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(o);s>=e&&(s=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),d=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,d=1;else if(l>t)l=t,d=this.getLineMaxColumn(l);else if(d<=1)d=1;else{const e=this.getLineMaxColumn(l);d>=e&&(d=e)}return i===o&&n===s&&r===l&&a===d&&e instanceof hh&&!(e instanceof uh)?e:new hh(o,s,l,d)}_isValidPosition(e,t,i){return"number"==typeof e&&"number"==typeof t&&(!isNaN(e)&&!isNaN(t)&&(!(e<1||t<1)&&((0|e)===e&&(0|t)===t&&(!(e>this._buffer.getLineCount())&&(1===t||!(t>this.getLineMaxColumn(e))&&(1!==i||!Tn(this._buffer.getLineCharCode(e,t-2))))))))}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(n<1)return new wd(1,1);if(n>s)return new wd(s,this.getLineMaxColumn(s));if(o<=1)return new wd(n,1);const r=this.getLineMaxColumn(n);return o>=r?new wd(n,r):1===i&&Tn(this._buffer.getLineCharCode(n,o-2))?new wd(n,o-1):new wd(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof wd&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,s,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,r=Tn(e),a=Tn(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof hh&&!(e instanceof uh)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,s=i.lineNumber,r=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,i=Tn(e),a=Tn(t);return i||a?n===s&&o===r?new hh(n,o-1,s,r-1):i&&a?new hh(n,o-1,s,r+1):i?new hh(n,o-1,s,r):new hh(n,o,s,r+1):new hh(n,o,s,r)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new hh(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>hh.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let d;if(l.push(a.reduce(((e,t)=>hh.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new nC(e,i,n,o).parseSearchRequest();if(!t)return[];d=e=>this.findMatchesLineByLine(e,t,s,r)}else d=t=>rC.findMatches(this,new nC(e,i,n,o),t,s,r);return l.map(d).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new nC(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new hh(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),d=this.findMatchesLineByLine(l,t,s,1);return rC.findNextMatch(this,new nC(e,i,n,o),r,s),d.length>0?d[0]:(l=new hh(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),d=this.findMatchesLineByLine(l,t,s,1),d.length>0?d[0]:null)}return rC.findNextMatch(this,new nC(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return rC.findPreviousMatch(this,new nC(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof Rh?e:new Rh(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){s=!1;break}}if(s){const e=new hh(n,1,n,o);t.push(new Rh(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i,n)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new hh(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new hh(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),s=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e=0;t--){const i=a+t,n=g+t;v.takeFromEndWhile((e=>e.lineNumber>n));const o=v.takeFromEndWhile((e=>e.lineNumber===n));e.push(new my(i,this.getLineContent(n),o))}if(he.lineNumbere.lineNumber===t))}e.push(new _y(n+1,a+c,d,l))}t+=u}this._emitContentChangedEvent(new by(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=Array.from(e).map((e=>new my(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new wy(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Ky(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){xe(e)}return i.addDecoration=Ty,i.changeDecoration=Ty,i.changeDecorationOptions=Ty,i.removeDecoration=Ty,i.deltaDecorations=Ty,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),xe(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Uy[i]}],!0)[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(Uy[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1,o=!1){const s=this.getLineCount(),r=Math.min(s,Math.max(1,e)),a=Math.min(s,Math.max(1,t)),l=this.getLineMaxColumn(a),d=new hh(r,1,a,l),c=this._getDecorationsInRange(d,i,n,o);return tu(c,this._decorationProvider.getDecorationsInRange(d,i,n)),c}getDecorationsInRange(e,t=0,i=!1,n=!1,o=!1){const s=this.validateRange(e),r=this._getDecorationsInRange(s,t,i,o);return tu(r,this._decorationProvider.getDecorationsInRange(s,t,i,n)),r}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0,!1)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return py.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}getAllMarginDecorations(e=0){return this._decorationsTree.getAll(this,e,!1,!1,!0)}_getDecorationsInRange(e,t,i,n){const o=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,o,s,t,i,n)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),s=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}const s=n!==o,r=function(e){return!!e.after||!!e.before}(t)!==Ry(i);s||r?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i,n=!1){const o=this.getVersionId(),s=t.length;let r=0;const a=i.length;let l=0;this._onDidChangeDecorations.beginDeferredEmit();try{const d=new Array(a);for(;rthis._setLanguage(e.languageId,t))),this._setLanguage(e.languageId,t))}_setLanguage(e,t){this.tokenization.setLanguageId(e,t),this._languageService.requestRichLanguageFeatures(e)}getLanguageIdAtPosition(e,t){return this.tokenization.getLanguageIdAtPosition(e,t)}getWordAtPosition(e){return this._tokenizationTextModelPart.getWordAtPosition(e)}getWordUntilPosition(e){return this._tokenizationTextModelPart.getWordUntilPosition(e)}normalizePosition(e,t){return e}getLineIndentColumn(e){return function(e){let t=0;for(const i of e){if(" "!==i&&"\t"!==i)break;t++}return t}(this.getLineContent(e))+1}};function Ay(e){return!(!e.options.overviewRuler||!e.options.overviewRuler.color)}function Ry(e){return!!e.options.after||!!e.options.before}My._MODEL_SYNC_LIMIT=52428800,My.LARGE_FILE_SIZE_THRESHOLD=20971520,My.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,My.LARGE_FILE_HEAP_OPERATION_THRESHOLD=268435456,My.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Tu.tabSize,indentSize:Tu.indentSize,insertSpaces:Tu.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Tu.trimAutoWhitespace,largeFileOptimizations:Tu.largeFileOptimizations,bracketPairColorizationOptions:Tu.bracketPairColorizationOptions},My=Ly=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Dy(4,yy),Dy(5,Mu),Dy(6,sp)],My);class Py{constructor(){this._decorationsTree0=new Lw,this._decorationsTree1=new Lw,this._injectedTextDecorationsTree=new Lw}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,o,s){const r=e.getVersionId(),a=this._intervalSearch(t,i,n,o,r,s);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,o,s){const r=this._decorationsTree0.intervalSearch(e,t,i,n,o,s),a=this._decorationsTree1.intervalSearch(e,t,i,n,o,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,o,s);return r.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const o=e.getVersionId(),s=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,o,!1);return this._ensureNodesHaveRanges(e,s).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i,!1);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n,o){const s=e.getVersionId(),r=this._search(t,i,n,s,o);return this._ensureNodesHaveRanges(e,r)}_search(e,t,i,n,o){if(i)return this._decorationsTree1.search(e,t,n,o);{const i=this._decorationsTree0.search(e,t,n,o),s=this._decorationsTree1.search(e,t,n,o),r=this._injectedTextDecorationsTree.search(e,t,n,o);return i.concat(s).concat(r)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){Ry(e)?this._injectedTextDecorationsTree.insert(e):Ay(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Ry(e)?this._injectedTextDecorationsTree.delete(e):Ay(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Ry(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Ay(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function Oy(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Fy{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class By extends Fy{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:Eh.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class Wy{constructor(e){var t;this.position=null!==(t=null==e?void 0:e.position)&&void 0!==t?t:Nh.Center,this.persistLane=null==e?void 0:e.persistLane}}class Vy extends Fy{constructor(e){var t,i;super(e),this.position=e.position,this.sectionHeaderStyle=null!==(t=e.sectionHeaderStyle)&&void 0!==t?t:null,this.sectionHeaderText=null!==(i=e.sectionHeaderText)&&void 0!==i?i:null}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?fu.fromHex(e):t.getColor(e.id)}}class Hy{static from(e){return e instanceof Hy?e:new Hy(e)}constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}}class zy{static register(e){return new zy(e)}static createDynamic(e){return new zy(e)}constructor(e){var t,i,n,o,s,r;this.description=e.description,this.blockClassName=e.blockClassName?Oy(e.blockClassName):null,this.blockDoesNotCollapse=null!==(t=e.blockDoesNotCollapse)&&void 0!==t?t:null,this.blockIsAfterEnd=null!==(i=e.blockIsAfterEnd)&&void 0!==i?i:null,this.blockPadding=null!==(n=e.blockPadding)&&void 0!==n?n:null,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Oy(e.className):null,this.shouldFillLineOnLineBreak=null!==(o=e.shouldFillLineOnLineBreak)&&void 0!==o?o:null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=e.lineNumberHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new By(e.overviewRuler):null,this.minimap=e.minimap?new Vy(e.minimap):null,this.glyphMargin=e.glyphMarginClassName?new Wy(e.glyphMargin):null,this.glyphMarginClassName=e.glyphMarginClassName?Oy(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Oy(e.linesDecorationsClassName):null,this.lineNumberClassName=e.lineNumberClassName?Oy(e.lineNumberClassName):null,this.linesDecorationsTooltip=e.linesDecorationsTooltip?e.linesDecorationsTooltip.replace(/[<>"'&]/g,(e=>{switch(e){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return e})):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Oy(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Oy(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Oy(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Oy(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Oy(e.afterContentClassName):null,this.after=e.after?Hy.from(e.after):null,this.before=e.before?Hy.from(e.before):null,this.hideInCommentTokens=null!==(s=e.hideInCommentTokens)&&void 0!==s&&s,this.hideInStringTokens=null!==(r=e.hideInStringTokens)&&void 0!==r&&r}}zy.EMPTY=zy.register({description:"empty"});const Uy=[zy.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),zy.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),zy.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),zy.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Ky(e){return e instanceof zy?e:zy.createDynamic(e)}class jy extends lt{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new kt),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;this._deferredCnt--,0===this._deferredCnt&&(this._shouldFireDeferred&&this.doFire(),null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){var t,i;this._affectsMinimap||(this._affectsMinimap=!!(null===(t=e.minimap)||void 0===t?void 0:t.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(null===(i=e.overviewRuler)||void 0===i?void 0:i.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!e.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!e.lineNumberClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){0===this._deferredCnt?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(e)}}class qy extends lt{constructor(){super(),this._fastEmitter=this._register(new kt),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new kt),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}class $y{constructor(){this._onDidChangeVisibleRanges=new kt,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const e=new Gy((t=>{this._onDidChangeVisibleRanges.fire({view:e,state:t})}));return this._views.add(e),e}detachView(e){this._views.delete(e),this._onDidChangeVisibleRanges.fire({view:e,state:void 0})}}class Gy{constructor(e){this.handleStateChange=e}setVisibleLines(e,t){const i=e.map((e=>new Nu(e.startLineNumber,e.endLineNumber+1)));this.handleStateChange({visibleLineRanges:i,stabilized:t})}}const Zy=Tm("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},v(0,"Overview ruler marker color for matching brackets."));class Yy{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Qy extends lt{static get(e){return e.getContribution(Qy.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Zt((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(72),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(72)&&(this._matchBrackets=this._editor.getOption(72),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((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)&&!n[1].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[1].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new uh(o.lineNumber,o.column,o.lineNumber,o.column):new uh(i.lineNumber,i.column,i.lineNumber,i.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((n=>{const o=n.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const e=t.bracketPairs.findNextBracket(o);e&&e.range&&(s=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,a=null;if(s){s.sort(hh.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=a,a=e}}r&&a&&i.push(new uh(r.lineNumber,r.column,a.lineNumber,a.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 n=i.getPosition();let o=t.bracketPairs.matchBracket(n);o||(o=t.bracketPairs.findEnclosingBrackets(n)),o&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:o[0],text:""},{range:o[1],text:""}]),this._editor.pushUndoStop())}))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations.set(e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const o=[];let s=0;for(let t=0,i=e.length;t1&&o.sort(wd.compare);const r=[];let a=0,l=0;const d=n.length;for(let e=0,i=o.length;e!0,Jy=()=>!1,eS=e=>" "===e||"\t"===e;class tS{static shouldRecreate(e){return e.hasChanged(145)||e.hasChanged(131)||e.hasChanged(37)||e.hasChanged(77)||e.hasChanged(79)||e.hasChanged(80)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(9)||e.hasChanged(10)||e.hasChanged(14)||e.hasChanged(128)||e.hasChanged(50)||e.hasChanged(91)||e.hasChanged(130)}constructor(e,t,i,n){var o;this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const s=i.options,r=s.get(145),a=s.get(50);this.readOnly=s.get(91),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=s.get(116),this.lineHeight=a.lineHeight,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(r.height/this.lineHeight)-2),this.useTabStops=s.get(128),this.wordSeparators=s.get(131),this.emptySelectionClipboard=s.get(37),this.copyWithSyntaxHighlighting=s.get(25),this.multiCursorMergeOverlapping=s.get(77),this.multiCursorPaste=s.get(79),this.multiCursorLimit=s.get(80),this.autoClosingBrackets=s.get(6),this.autoClosingComments=s.get(7),this.autoClosingQuotes=s.get(11),this.autoClosingDelete=s.get(9),this.autoClosingOvertype=s.get(10),this.autoSurround=s.get(14),this.autoIndent=s.get(12),this.wordSegmenterLocales=s.get(130),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(e,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const l=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(l)for(const e of l)this.surroundingPairs[e.open]=e.close;const d=this.languageConfigurationService.getLanguageConfiguration(e).comments;this.blockCommentStartToken=null!==(o=null==d?void 0:d.blockCommentStartToken)&&void 0!==o?o:null}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=Ku(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return bu(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t,i){switch(t){case"beforeWhitespace":return eS;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e,i);case"always":return Xy;case"never":return Jy}}_getLanguageDefinedShouldAutoClose(e,t){const i=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet(t);return e=>-1!==i.indexOf(e)}visibleColumnFromColumn(e,t){return vu.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=vu.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(ns?s:n}}class iS{static fromModelState(e){return new nS(e)}static fromViewState(e){return new oS(e)}static fromModelSelection(e){const t=uh.liftSelection(e),i=new sS(hh.fromPositions(t.getSelectionStart()),0,0,t.getPosition(),0);return iS.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;io,l=n>s,d=ns)continue;if(pn)continue;if(g0&&n--,lS.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=s;i++){const o=t.getLineMaxColumn(i),s=e.visibleColumnFromColumn(t,new wd(i,o));n=Math.max(n,s)}let r=i.toViewVisualColumn;return re.getLineMinColumn(t.lineNumber))return t.delta(void 0,-Bn(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new wd(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),s=pS.atomicPosition(o,t.column-1,i,0);if(-1!==s&&s+1>=n)return new wd(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?fS.leftPositionAtomicSoftTabs(t,i,e.tabSize):fS.leftPosition(t,i);return new mS(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(fS.clipPositionColumn(n,t),0),l=fS.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new wd(e.lineNumber,fS.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return id?(i=d,n=r?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,l),o=u?0:l-vu.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==a){const e=new wd(i,n),s=t.normalizePosition(e,a);o+=n-s.column,i=s.lineNumber,n=s.column}return new mS(i,n,o)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,4)}static moveDown(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.endLineNumber,r=i.selection.endColumn):(s=i.position.lineNumber,r=i.position.column);let a,l=0;do{if(a=fS.down(e,t,s+l,r,i.leftoverVisibleColumns,o,!0),t.normalizePosition(new wd(a.lineNumber,a.column),2).lineNumber>s)break}while(l++<10&&s+l1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let s=i.position.lineNumber;for(;s=c.length+1)return!1;const h=c.charAt(d.column-2),u=n.get(h);if(!u)return!1;if(aS(h)){if("never"===i)return!1}else if("never"===t)return!1;const g=c.charAt(d.column-1);let p=!1;for(const e of u)e.open===h&&e.close===g&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=r.length;t1){const e=t.getLineContent(n.lineNumber),o=_n(e),s=-1===o?e.length+1:o+1;if(n.column<=s){const e=i.visibleColumnFromColumn(t,n),o=vu.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,n.lineNumber,o);return new hh(n.lineNumber,s,n.lineNumber,n.column)}}return hh.fromPositions(_S.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=function(e,t){if(0===e)return 0;const i=function(e,t){const i=new Pn(t,e);let n=i.prevCodePoint();for(;Xn(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!qn(n))return;let o=i.offset;return o>0&&8205===i.prevCodePoint()&&(o=i.offset),o}(e,t);if(void 0!==i)return i;const n=new Pn(t,e);return n.prevCodePoint(),n.offset}(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new wd(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let o=null;i.sort(((e,t)=>wd.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,r=i.length;s1&&(null==o?void 0:o.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,a=t.getLineMaxColumn(e.lineNumber-1),l=e.lineNumber,d=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,a=1,l=e.lineNumber,d=t.getLineMaxColumn(e.lineNumber));const c=new hh(i,a,l,d);o=c,c.isEmpty()?n[s]=null:n[s]=new dS(c,"")}else n[s]=null;else n[s]=new dS(r,"")}return new rS(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class vS{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _createIntlWord(e,t){return{start:e.index,end:e.index+e.segment.length,wordType:1,nextCharClass:t}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;const o=t.findPrevIntlWordBeforeOrAtOffset(e,i.column-2);for(let s=i.column-2;s>=0;s--){const i=e.charCodeAt(s),r=t.get(i);if(o&&s===o.index)return this._createIntlWord(o,r);if(0===r){if(2===n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,s+1,this._findEndOfWord(e,t,n,s+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const o=t.findNextIntlWordAtOrAfterOffset(e,n),s=e.length;for(let r=n;r=0;s--){const n=e.charCodeAt(s),r=t.get(n);if(o&&s===o.index)return s;if(1===r)return s+1;if(1===i&&2===r)return s+1;if(2===i&&0===r)return s+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,s=i.column;1===s&&o>1&&(o-=1,s=t.getLineMaxColumn(o));let r=vS._findPreviousWordOnLine(e,t,new wd(o,s));if(0===n)return new wd(o,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=vS._findPreviousWordOnLine(e,t,new wd(o,r.start+1))),new wd(o,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=vS._findPreviousWordOnLine(e,t,new wd(o,r.start+1));return new wd(o,r?r.start+1:1)}return r&&s<=r.end+1&&(r=vS._findPreviousWordOnLine(e,t,new wd(o,r.start+1))),new wd(o,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new wd(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=o.charCodeAt(e-2),s=o.charCodeAt(e-1);if(95===t&&95!==s)return new wd(i,e);if(45===t&&45!==s)return new wd(i,e);if((xn(t)||kn(t))&&Ln(s))return new wd(i,e);if(Ln(t)&&Ln(s)&&e+1=a.start+1&&(a=vS._findNextWordOnLine(e,t,new wd(o,a.end+1))),s=a?a.start+1:t.getLineMaxColumn(o);return new wd(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?l=1:(a--,l=n.getLineMaxColumn(a)):(d&&l<=d.end+1&&(d=vS._findPreviousWordOnLine(i,n,new wd(a,d.start+1))),d?l=d.end+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a))),new hh(a,l,r.lineNumber,r.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new wd(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,s))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;s+11?new hh(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new hh(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},l=vS._findPreviousWordOnLine(e,t,i);if(l&&s(l))return a(l);const d=vS._findNextWordOnLine(e,t,i);return d&&s(d)?a(d):l&&d?r(l.end+1,d.start+1):l?r(l.start+1,l.end+1):d?r(d.start+1,d.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=vS._moveWordPartLeft(e,i);return new hh(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=h.start+1&&(h=vS._findNextWordOnLine(i,n,new wd(a,h.end+1))),h?l=h.start+1:lBoolean(e)))}class CS{static addCursorDown(e,t,i){const n=[];let o=0;for(let s=0,r=t.length;st&&(i=t,n=e.model.getLineMaxColumn(i)),iS.fromModelState(new sS(new hh(s.lineNumber,1,i,n),2,0,new wd(i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumbera){const i=e.getLineCount();let n=r.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),iS.fromViewState(t.viewState.move(!0,n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return iS.fromModelState(t.modelState.move(!0,e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return iS.fromModelState(vS.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new iS(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return iS.fromViewState(new sS(new hh(i,n,i,n),0,0,new wd(i,n),0))}static moveTo(e,t,i,n,o){if(i){if(1===t.modelState.selectionStartKind)return this.word(e,t,i,n);if(2===t.modelState.selectionStartKind)return this.line(e,t,i,n,o)}const s=e.model.validatePosition(n),r=o?e.coordinatesConverter.validateViewPosition(new wd(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return iS.fromViewState(t.viewState.move(i,r.lineNumber,r.column,0))}static simpleMove(e,t,i,n,o,s){switch(i){case 0:return 4===s?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===s?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===s?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===s?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===s?t.map((t=>iS.fromViewState(fS.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>iS.fromModelState(fS.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===s?t.map((t=>iS.fromViewState(fS.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>iS.fromModelState(fS.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{const i=[];for(let o=0,r=t.length;oi.endLineNumber-1?i.endLineNumber-1:oiS.fromViewState(fS.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,s=t.length;oiS.fromViewState(fS.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,s=t.length;o(this.model.tokenization.forceTokenization(e),Ku(this.model.tokenization.getLineTokens(e),this.model.getLineMaxColumn(e)-1)))(n);if(t.languageId!==o.languageId)return i;const s=o.toIViewLineTokens();return this.indentationLineProcessor.getProcessedTokens(s)}}class xS{constructor(e,t){this.model=e,this.languageConfigurationService=t}getProcessedLine(e,t){var i,n;null===(n=(i=this.model.tokenization).forceTokenization)||void 0===n||n.call(i,e);const o=this.model.tokenization.getLineTokens(e);let s=this.getProcessedTokens(o).getLineContent();return void 0!==t&&(s=((e,t)=>{const i=vn(e);return t+e.substring(i.length)})(s,t)),s}getProcessedTokens(e){const t=e.getLanguageId(0),i=this.languageConfigurationService.getLanguageConfiguration(t).bracketsNew.getBracketRegExp({global:!0}),n=[];return e.forEach((t=>{const o=e.getStandardTokenType(t);let s=e.getTokenText(t);(e=>2===e||3===e||1===e)(o)&&(s=s.replace(i,""));const r=e.getMetadata(t);n.push({text:s,metadata:r})})),ZC.createFromTextAndMetadata(n,e.languageIdCodec)}}function LS(e,t){e.tokenization.forceTokenization(t.lineNumber);const i=e.tokenization.getLineTokens(t.lineNumber),n=Ku(i,t.column-1),o=0===n.firstCharOffset,s=i.getLanguageId(0)===n.languageId;return!o&&!s}function DS(e,t,i,n){t.tokenization.forceTokenization(i.startLineNumber);const o=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),s=n.getLanguageConfiguration(o);if(!s)return null;const r=new kS(t,n).getProcessedTokenContextAroundRange(i),a=r.previousLineProcessedTokens.getLineContent(),l=r.beforeRangeProcessedTokens.getLineContent(),d=r.afterRangeProcessedTokens.getLineContent(),c=s.onEnter(e,a,l,d);if(!c)return null;const h=c.indentAction;let u=c.appendText;const g=c.removeText||0;u?h===Wu.Indent&&(u="\t"+u):u=h===Wu.Indent||h===Wu.IndentOutdent?"\t":"";let p=dp(t,i.startLineNumber,i.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:h,appendText:u,removeText:g,indentation:p}}var ES;const NS=Object.create(null);function IS(e,t){if(t<=0)return"";NS[e]||(NS[e]=["",e]);const i=NS[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}let TS=ES=class{static unshiftIndent(e,t,i,n,o){const s=vu.visibleColumnFromColumn(e,t,i);if(o){const e=IS(" ",n);return IS(e,vu.prevIndentTabStop(s,n)/n)}return IS("\t",vu.prevRenderTabStop(s,i)/i)}static shiftIndent(e,t,i,n,o){const s=vu.visibleColumnFromColumn(e,t,i);if(o){const e=IS(" ",n);return IS(e,vu.nextIndentTabStop(s,n)/n)}return IS("\t",vu.nextRenderTabStop(s,i)/i)}constructor(e,t,i){this._languageConfigurationService=i,this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);const{tabSize:o,indentSize:s,insertSpaces:r}=this._opts,a=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,d=0;for(let c=i;c<=n;c++,l=d){d=0;const n=e.getLineContent(c);let h,u=_n(n);if((!this._opts.isUnshift||0!==n.length&&0!==u)&&(a||this._opts.isUnshift||0!==n.length)){if(-1===u&&(u=n.length),c>1&&vu.visibleColumnFromColumn(n,u+1,o)%s!=0&&e.tokenization.isCheapToTokenize(c-1)){const t=DS(this._opts.autoIndent,e,new hh(c-1,e.getLineMaxColumn(c-1),c-1,e.getLineMaxColumn(c-1)),this._languageConfigurationService);if(t){if(d=l,t.appendText)for(let e=0,i=t.appendText.length;e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,sp)],TS);class MS{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new hh(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new hh(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new uh(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}class AS{constructor(e,t,i){this._position=e,this._text=t,this._charAfter=i}getEditOperations(e,t){t.addTrackedEditOperation(new hh(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new uh(i.endLineNumber,i.startColumn,i.endLineNumber,i.endColumn-this._charAfter.length)}}function RS(e,t,i,n=!0,o){if(e<4)return null;const s=o.getLanguageConfiguration(t.tokenization.getLanguageId()).indentRulesSupport;if(!s)return null;const r=new SS(t,s,o);if(i<=1)return{indentation:"",action:null};for(let e=i-1;e>0&&""===t.getLineContent(e);e--)if(1===e)return{indentation:"",action:null};const a=function(e,t,i){const n=e.tokenization.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.tokenization.getLanguageIdAtPosition(o,0)!==n)return s;const t=e.getLineContent(o);if(!i.shouldIgnore(o)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}(t,i,r);if(a<0)return null;if(a<1)return{indentation:"",action:null};if(r.shouldIncrease(a)||r.shouldIndentNextLine(a))return{indentation:vn(t.getLineContent(a)),action:Wu.Indent,line:a};if(r.shouldDecrease(a))return{indentation:vn(t.getLineContent(a)),action:null,line:a};{if(1===a)return{indentation:vn(t.getLineContent(a)),action:null,line:a};const e=a-1,i=s.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let t=e-1;t>0;t--)if(!r.shouldIndentNextLine(t)){i=t;break}return{indentation:vn(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:vn(t.getLineContent(a)),action:null,line:a};for(let e=a;e>0;e--){if(r.shouldIncrease(e))return{indentation:vn(t.getLineContent(e)),action:Wu.Indent,line:e};if(r.shouldIndentNextLine(e)){let i=0;for(let t=e-1;t>0;t--)if(!r.shouldIndentNextLine(e)){i=t;break}return{indentation:vn(t.getLineContent(i+1)),action:null,line:i+1}}if(r.shouldDecrease(e))return{indentation:vn(t.getLineContent(e)),action:null,line:e}}return{indentation:vn(t.getLineContent(1)),action:null,line:1}}}function PS(e,t,i,n,o,s){if(e<4)return null;const r=s.getLanguageConfiguration(i);if(!r)return null;const a=s.getLanguageConfiguration(i).indentRulesSupport;if(!a)return null;const l=new SS(t,a,s),d=RS(e,t,n,void 0,s);if(d){const i=d.line;if(void 0!==i){let s=!0;for(let e=i;ee.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}class FS{static indent(e,t,i){if(null===t||null===i)return[];const n=[];for(let t=0,o=i.length;t1){let n;for(n=i-1;n>=1&&!(bn(t.getLineContent(n))>=0);n--);if(n<1)return null;const s=t.getLineMaxColumn(n),r=DS(e.autoIndent,t,new hh(n,s,n,s),e.languageConfigurationService);r&&(o=r.indentation+r.appendText)}return n&&(n===Wu.Indent&&(o=FS.shiftIndent(e,o)),n===Wu.Outdent&&(o=FS.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const s=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,s),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,o,s,r,a)));return new rS(4,l,{shouldPushStackElementBefore:HS(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,s){if(!t.isEmpty())return null;const r=t.getPosition(),a=Math.max(1,r.column-n),l=Math.min(e.getLineMaxColumn(r.lineNumber),r.column+o),d=new hh(r.lineNumber,a,r.lineNumber,l);return e.getValueInRange(d)===i&&0===s?null:new uS(d,i,0,s)}static _typeCommand(e,t,i){return i?new hS(e,t,!0):new dS(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return FS._typeCommand(n,"\n",i);if(!t.tokenization.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const o=vn(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);return FS._typeCommand(n,"\n"+e.normalizeIndentation(o),i)}const o=DS(e.autoIndent,t,n,e.languageConfigurationService);if(o){if(o.indentAction===Wu.None)return FS._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===Wu.Indent)return FS._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===Wu.IndentOutdent){const t=e.normalizeIndentation(o.indentation),s=e.normalizeIndentation(o.indentation+o.appendText),r="\n"+s+"\n"+t;return i?new hS(n,r,!0):new uS(n,r,-1,s.length-t.length,!0)}if(o.indentAction===Wu.Outdent){const t=FS.unshiftIndent(e,o.indentation);return FS._typeCommand(n,"\n"+e.normalizeIndentation(t+o.appendText),i)}}const s=vn(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);if(e.autoIndent>=4){const o=function(e,t,i,n,o){if(e<4)return null;const s=t.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),r=o.getLanguageConfiguration(s).indentRulesSupport;if(!r)return null;t.tokenization.forceTokenization(i.startLineNumber);const a=new kS(t,o).getProcessedTokenContextAroundRange(i),l=a.afterRangeProcessedTokens,d=a.beforeRangeProcessedTokens,c=vn(d.getLineContent()),h=function(e,t,i){return{tokenization:{getLineTokens:n=>n===t?i:e.tokenization.getLineTokens(n),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i)},getLineContent:n=>n===t?i.getLineContent():e.getLineContent(n)}}(t,i.startLineNumber,d),u=LS(t,i.getStartPosition()),g=vn(t.getLineContent(i.startLineNumber)),p=RS(e,h,i.startLineNumber+1,void 0,o);if(!p){const e=u?g:c;return{beforeEnter:e,afterEnter:e}}let m=u?g:p.indentation;return p.action===Wu.Indent&&(m=n.shiftIndent(m)),r.shouldDecrease(l.getLineContent())&&(m=n.unshiftIndent(m)),{beforeEnter:u?g:c,afterEnter:m}}(e.autoIndent,t,n,{unshiftIndent:t=>FS.unshiftIndent(e,t),shiftIndent:t=>FS.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)},e.languageConfigurationService);if(o){let s=e.visibleColumnFromColumn(t,n.getEndPosition());const r=n.endColumn,a=_n(t.getLineContent(n.endLineNumber));if(n=a>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,a+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new hS(n,"\n"+e.normalizeIndentation(o.afterEnter),!0);{let t=0;return r<=a+1&&(e.insertSpaces||(s=Math.ceil(s/e.indentSize)),t=Math.min(s+1-e.normalizeIndentation(o.afterEnter).length-1,0)),new uS(n,"\n"+e.normalizeIndentation(o.afterEnter),0,t,!0)}}}return FS._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;eFS.shiftIndent(e,t),unshiftIndent:t=>FS.unshiftIndent(e,t)},e.languageConfigurationService);if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?FS._typeCommand(new hh(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):FS._typeCommand(new hh(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let s=0,r=i.length;s2?l.charCodeAt(a.column-2):0)&&d)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let s=null;for(const e of o)if(null===s||e.open.length>s.open.length){let o=!0;for(const s of i)if(t.getValueInRange(new hh(s.lineNumber,s.column-e.open.length+1,s.lineNumber,s.column))+n!==e.open){o=!1;break}o&&(s=e)}return s}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _getAutoClosingPairClose(e,t,i,n,o){for(const e of i)if(!e.isEmpty())return null;const s=i.map((e=>{const t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),r=this._findAutoClosingPairOpen(e,t,s.map((e=>new wd(e.lineNumber,e.beforeColumn))),n);if(!r)return null;let a,l;if(aS(n)?(a=e.autoClosingQuotes,l=e.shouldAutoCloseBefore.quote):e.blockCommentStartToken&&r.open.includes(e.blockCommentStartToken)?(a=e.autoClosingComments,l=e.shouldAutoCloseBefore.comment):(a=e.autoClosingBrackets,l=e.shouldAutoCloseBefore.bracket),"never"===a)return null;const d=this._findContainedAutoClosingPair(e,r),c=d?d.close:"";let h=!0;for(const i of s){const{lineNumber:o,beforeColumn:s,afterColumn:d}=i,u=t.getLineContent(o),g=u.substring(0,s-1),p=u.substring(d-1);if(p.startsWith(c)||(h=!1),p.length>0){const t=p.charAt(0);if(!FS._isBeforeClosingBrace(e,p)&&!l(t))return null}if(1===r.open.length&&("'"===n||'"'===n)&&"always"!==a){const t=iC(e.wordSeparators,[]);if(g.length>0){const e=g.charCodeAt(g.length-1);if(0===t.get(e))return null}}if(!t.tokenization.isCheapToTokenize(o))return null;t.tokenization.forceTokenization(o);const m=Ku(t.tokenization.getLineTokens(o),s-1);if(!r.shouldAutoClose(m,s-m.firstCharOffset))return null;const f=r.findNeutralCharacter();if(f){const e=t.tokenization.getTokenTypeIfInsertingCharacter(o,s,f);if(!r.isOK(e))return null}}return h?r.close.substring(0,r.close.length-c.length):r.close}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){const a=[];for(let e=0,t=n.length;enew dS(new hh(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new rS(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const d=this._getAutoClosingPairClose(t,i,o,a,!0);return null!==d?this._runAutoClosingOpenCharType(e,t,i,o,a,!0,d):null}static typeWithInterceptors(e,t,i,n,o,s,r){if(!e&&"\n"===r){const e=[];for(let t=0,s=o.length;t{const i=e.get(bd).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=js();return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(i),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(bd).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends KS{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){t.position&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[CS.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&2!==t.revealType&&e.revealAllCursors(t.source,!0,!0))}}e.MoveTo=th(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=th(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends KS{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);null!==i&&(e.setCursorStates(t.source,3,i.viewStates.map((e=>iS.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source))}}e.ColumnSelect=th(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){if(void 0===n.position||void 0===n.viewPosition||void 0===n.mouseColumn)return null;const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new wd(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return lS.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=th(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return lS.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=th(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return lS.columnSelectRight(e.cursorConfig,e,i)}});class n extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return lS.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=th(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=th(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:3595,linux:{primary:0}}}));class o extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return lS.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=th(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=th(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends KS{constructor(){super({id:"cursorMove",precondition:void 0,metadata:yS.metadata})}runCoreEditorCommand(e,t){const i=yS.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,s._move(e,e.getCursorStates(),i)),e.revealAllCursors(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return CS.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return CS.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=s,e.CursorMove=th(new s);class r extends KS{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,CS.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealAllCursors(t.source,!0)}}e.CursorLeft=th(new r({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=th(new r({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:1039}})),e.CursorRight=th(new r({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=th(new r({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:1041}})),e.CursorUp=th(new r({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=th(new r({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=th(new r({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:11}})),e.CursorPageUpSelect=th(new r({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:1035}})),e.CursorDown=th(new r({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=th(new r({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=th(new r({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:12}})),e.CursorPageDownSelect=th(new r({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:1036}})),e.CreateCursor=th(new class extends KS{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){if(!t.position)return;let i;i=t.wholeLine?CS.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):CS.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;is&&(o=s);const r=new hh(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case qS.RawAtArgument.Top:a=3;break;case qS.RawAtArgument.Center:a=1;break;case qS.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends GS{constructor(){super(ch)}runDOMCommand(e){d&&(e.focus(),e.select()),e.ownerDocument.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[CS.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=th(new class extends KS{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){t.selection&&(e.model.pushStackElement(),e.setCursorStates(t.source,3,[iS.fromModelSelection(t.selection)]))}})}($S||($S={}));const ZS=$d.and(gh.textInputFocus,gh.columnSelection);function YS(e,t){Dc.registerKeybindingRule({id:e,primary:t,when:ZS,weight:1})}function QS(e){return e.register(),e}var XS,JS;YS($S.CursorColumnSelectLeft.id,1039),YS($S.CursorColumnSelectRight.id,1041),YS($S.CursorColumnSelectUp.id,1040),YS($S.CursorColumnSelectPageUp.id,1035),YS($S.CursorColumnSelectDown.id,1042),YS($S.CursorColumnSelectPageDown.id,1036),function(e){class t extends Yc{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=th(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:gh.writable,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,FS.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=th(new class extends t{constructor(){super({id:"outdent",precondition:gh.writable,kbOpts:{weight:0,kbExpr:$d.and(gh.editorTextFocus,gh.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,FS.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=th(new class extends t{constructor(){super({id:"tab",precondition:gh.writable,kbOpts:{weight:0,kbExpr:$d.and(gh.editorTextFocus,gh.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,FS.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=th(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=_S.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=th(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:gh.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=_S.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends GS{constructor(){super(lh)}runDOMCommand(e){e.ownerDocument.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(91))return t.getModel().undo()}},e.Redo=new class extends GS{constructor(){super(dh)}runDOMCommand(e){e.ownerDocument.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(91))return t.getModel().redo()}}}(XS||(XS={}));class ek extends $c{constructor(e,t,i){super({id:e,precondition:void 0,metadata:i}),this._handlerId=t}runCommand(e,t){const i=e.get(bd).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function tk(e,t){QS(new ek("default:"+e,e)),QS(new ek(e,e,t))}tk("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),tk("replacePreviousChar"),tk("compositionType"),tk("compositionStart"),tk("compositionEnd"),tk("paste"),tk("cut");class ik{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const s=new hh(i,n-1,i,n),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new hh(i,o,i,o),r)}else{const s=new hh(i,o,i,o+1),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new hh(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new uh(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new uh(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class nk extends Qc{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const e of n)i.push(new ik(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}ih(class extends nk{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:v(0,"Move Selected Text Left"),alias:"Move Selected Text Left",precondition:gh.writable})}}),ih(class extends nk{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:v(0,"Move Selected Text Right"),alias:"Move Selected Text Right",precondition:gh.writable})}}),ih(class extends Qc{constructor(){super({id:"editor.action.transposeLetters",label:v(0,"Transpose Letters"),alias:"Transpose Letters",precondition:gh.writable,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],o=t.getSelections();for(const e of o){if(!e.isEmpty())continue;const t=e.startLineNumber,o=e.startColumn,s=i.getLineMaxColumn(t);if(1===t&&(1===o||2===o&&2===s))continue;const r=o===s?e.getPosition():fS.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),a=fS.leftPosition(i,r),l=fS.leftPosition(i,a),d=i.getValueInRange(hh.fromPositions(l,a)),c=i.getValueInRange(hh.fromPositions(a,r)),h=hh.fromPositions(l,r);n.push(new dS(h,c+d))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}});class ok{get event(){return this.emitter.event}constructor(e,t,i){const n=e=>this.emitter.fire(e);this.emitter=new kt({onWillAddFirstListener:()=>e.addEventListener(t,n,i),onDidRemoveLastListener:()=>e.removeEventListener(t,n,i)})}dispose(){this.emitter.dispose()}}!function(e){const t={total:0,min:Number.MAX_VALUE,max:0},i={...t},n={...t},o={...t};let s=0;const r={keydown:0,input:0,render:0};function a(){1===r.keydown&&(performance.mark("keydown/end"),r.keydown=2)}function l(){performance.mark("input/start"),r.input=1,h()}function d(){1===r.input&&(performance.mark("input/end"),r.input=2)}function c(){1===r.render&&(performance.mark("render/end"),r.render=2)}function h(){setTimeout(u)}function u(){2===r.keydown&&2===r.input&&2===r.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),g("keydown",t),g("input",i),g("render",n),g("inputlatency",o),s++,performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),r.keydown=0,r.input=0,r.render=0)}function g(e,t){const i=performance.getEntriesByName(e)[0].duration;t.total+=i,t.min=Math.min(t.min,i),t.max=Math.max(t.max,i)}function p(e){return{average:e.total/s,max:e.max,min:e.min}}function m(e){e.total=0,e.min=Number.MAX_VALUE,e.max=0}e.onKeyDown=function(){u(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),r.keydown=1,queueMicrotask(a)},e.onBeforeInput=l,e.onInput=function(){0===r.input&&l(),queueMicrotask(d)},e.onKeyUp=function(){u()},e.onSelectionChange=function(){u()},e.onRenderStart=function(){2===r.keydown&&2===r.input&&0===r.render&&(performance.mark("render/start"),r.render=1,queueMicrotask(c),h())},e.getAndClearMeasurements=function(){if(0===s)return;const e={keydown:p(t),input:p(i),render:p(n),total:p(o),sampleCount:s};return m(t),m(i),m(n),m(o),s=0,e}}(JS||(JS={}));class sk{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selection=n,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e,t){const i=e.getValue(),n=e.getSelectionStart(),o=e.getSelectionEnd();let s;return t&&i.substring(0,n)===t.value.substring(0,t.selectionStart)&&(s=t.newlineCountBeforeSelection),new sk(i,n,o,null,s)}collapseSelection(){return this.selectionStart===this.value.length?this:new sk(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){var t,i,n,o,s,r,a,l;if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(null!==(i=null===(t=this.selection)||void 0===t?void 0:t.getStartPosition())&&void 0!==i?i:null,n,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(null!==(o=null===(n=this.selection)||void 0===n?void 0:n.getEndPosition())&&void 0!==o?o:null,t,1)}const d=this.value.substring(this.selectionStart,e);if(-1===d.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(null!==(r=null===(s=this.selection)||void 0===s?void 0:s.getStartPosition())&&void 0!==r?r:null,d,1);const c=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(null!==(l=null===(a=this.selection)||void 0===a?void 0:a.getEndPosition())&&void 0!==l?l:null,c,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min(Nn(e.value,t.value),e.selectionStart,t.selectionStart),o=Math.min(In(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),s=(e.value.substring(n,e.value.length-o),t.value.substring(n,t.value.length-o)),r=e.selectionStart-n,a=e.selectionEnd-n;if(t.selectionStart-n===t.selectionEnd-n){return{text:s,replacePrevCharCnt:e.selectionStart-n,replaceNextCharCnt:0,positionDelta:0}}return{text:s,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(Nn(e.value,t.value),e.selectionEnd),n=Math.min(In(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(i,e.value.length-n),s=t.value.substring(i,t.value.length-n),r=(e.selectionStart,e.selectionEnd-i),a=(t.selectionStart,t.selectionEnd-i);return{text:s,replacePrevCharCnt:r,replaceNextCharCnt:o.length-r,positionDelta:a-s.length}}}sk.EMPTY=new sk("",0,0,null,void 0);class rk{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t;return new hh(i+1,1,i+t+1,1)}static fromEditorSelection(e,t,i,n){const o=500,s=rk._getPageOfLine(t.startLineNumber,i),r=rk._getRangeForPage(s,i),a=rk._getPageOfLine(t.endLineNumber,i),l=rk._getRangeForPage(a,i);let d=r.intersectRanges(new hh(1,1,t.startLineNumber,t.startColumn));if(n&&e.getValueLengthInRange(d,1)>o){const t=e.modifyPosition(d.getEndPosition(),-500);d=hh.fromPositions(t,d.getEndPosition())}const c=e.getValueInRange(d,1),h=e.getLineCount(),u=e.getLineMaxColumn(h);let g=l.intersectRanges(new hh(t.endLineNumber,t.endColumn,h,u));if(n&&e.getValueLengthInRange(g,1)>o){const t=e.modifyPosition(g.getStartPosition(),o);g=hh.fromPositions(g.getStartPosition(),t)}const p=e.getValueInRange(g,1);let m;if(s===a||s+1===a)m=e.getValueInRange(t,1);else{const i=r.intersectRanges(t),n=l.intersectRanges(t);m=e.getValueInRange(i,1)+String.fromCharCode(8230)+e.getValueInRange(n,1)}return n&&m.length>1e3&&(m=m.substring(0,o)+String.fromCharCode(8230)+m.substring(m.length-o,m.length)),new sk(c+m+p,c.length,c.length+m.length,t,d.endLineNumber-d.startLineNumber)}}const ak=vd("accessibilityService"),lk=new gc("accessibilityModeEnabled",!1);var dk,ck=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(dk||(dk={}));const hk={forceCopyWithSyntaxHighlighting:!1};class uk{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}uk.INSTANCE=new uk;class gk{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}let pk=class extends lt{get textAreaState(){return this._textAreaState}constructor(e,t,i,n,o,s){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._accessibilityService=o,this._logService=s,this._onFocus=this._register(new kt),this.onFocus=this._onFocus.event,this._onBlur=this._register(new kt),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new kt),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new kt),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new kt),this.onCut=this._onCut.event,this._onPaste=this._register(new kt),this.onPaste=this._onPaste.event,this._onType=this._register(new kt),this.onType=this._onType.event,this._onCompositionStart=this._register(new kt),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new kt),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new kt),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new kt),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new dt),this._asyncTriggerCut=this._register(new Zt((()=>this._onCut.fire()),0)),this._textAreaState=sk.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(_t.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new Zt((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)):this._asyncFocusGainWriteScreenReaderContent.clear()}))),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown((e=>{const t=new Ke(e);(114===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new Ke(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{const t=new gk;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&r&&r.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code))return t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=sk.readFromTextArea(this._textArea,this._textAreaState),i=sk.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=sk.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=sk.readFromTextArea(this._textArea,this._textAreaState),t=sk.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=sk.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=sk.readFromTextArea(this._textArea,this._textAreaState),i=sk.deduceInput(this._textAreaState,t,2===this._OS);(0!==i.replacePrevCharCnt||1!==i.text.length||!Tn(i.text.charCodeAt(0))&&127!==i.text.charCodeAt(0))&&(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=mk.getTextData(e.clipboardData);t&&(i=i||uk.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!e&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new Zt((()=>this.writeNativeTextAreaContent("asyncFocusGain")),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return ws(this._textArea.ownerDocument,"selectionchange",(t=>{if(JS.onSelectionChange(),!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selection)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(r),d=this._host.deduceModelPosition(l[0],l[1],l[2]),c=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(c[0],c[1],c[2]),u=new uh(d.lineNumber,d.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(u)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeNativeTextAreaContent(e){!this._accessibilityService.isScreenReaderOptimized()&&"render"===e||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${e})`),this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};uk.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&mk.setTextData(e.clipboardData,t.text,t.html,i)}};pk=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ck(4,ak),ck(5,Hc)],pk);const mk={getTextData(e){const t=e.getData(Tg.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return 0===t.length&&null===i&&e.files.length>0?[Array.prototype.slice.call(e.files,0).map((e=>e.name)).join("\n"),null]:[t,i]},setTextData(e,t,i,n){e.setData(Tg.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}};class fk extends lt{get ownerDocument(){return this._actual.ownerDocument}constructor(e){super(),this._actual=e,this.onKeyDown=this._register(new ok(this._actual,"keydown")).event,this.onKeyUp=this._register(new ok(this._actual,"keyup")).event,this.onCompositionStart=this._register(new ok(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new ok(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new ok(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new ok(this._actual,"beforeinput")).event,this.onInput=this._register(new ok(this._actual,"input")).event,this.onCut=this._register(new ok(this._actual,"cut")).event,this.onCopy=this._register(new ok(this._actual,"copy")).event,this.onPaste=this._register(new ok(this._actual,"paste")).event,this.onFocus=this._register(new ok(this._actual,"focus")).event,this.onBlur=this._register(new ok(this._actual,"blur")).event,this._onSyntheticTap=this._register(new kt),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown((()=>JS.onKeyDown()))),this._register(this.onBeforeInput((()=>JS.onBeforeInput()))),this._register(this.onInput((()=>JS.onInput()))),this._register(this.onKeyUp((()=>JS.onKeyUp()))),this._register(ws(this._actual,dk.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=Ks(this._actual);return e?e.activeElement===this._actual:!!this._actual.isConnected&&js()===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let o=null;const s=Ks(n);o=s?s.activeElement:js();const r=ls(o),a=o===n,l=n.selectionStart,c=n.selectionEnd;if(a&&l===t&&c===i)d&&r.parent!==r&&n.focus();else{if(a)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(d&&r.parent!==r&&n.focus());try{const e=function(e){const t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),function(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}(n,e)}catch(e){}}}}const _k=function(){if("object"==typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let e;e="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;te,asFile:()=>{},value:"string"==typeof e?e:void 0}}class bk{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 Qe.some(this,(([e,t])=>t.asFile()))&&t.push("files"),yk(wk(e),t)}get(e){var t;return null===(t=this._entries.get(this.toKey(e)))||void 0===t?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 wk(e)}}function wk(e){return e.toLowerCase()}function Ck(e,t){return yk(wk(e),t.map(wk))}function yk(e,t){if("*/*"===e)return t.length>0;if(t.includes(e))return!0;const i=e.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!i)return!1;const[n,o,s]=i;return"*"===s&&t.some((e=>e.startsWith(o+"/")))}const Sk=Object.freeze({create:e=>Zh(e.map((e=>e.toString()))).join("\r\n"),split:e=>e.split("\r\n"),parse:e=>Sk.split(e).filter((e=>!e.startsWith("#")))});class kk{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+kk.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(...e){return new kk((this.value?[this.value,...e]:e).join(kk.sep))}}kk.sep=".",kk.None=new kk("@@none@@"),kk.Empty=new kk("");const xk={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Tg.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"};xc.add("workbench.contributions.dragAndDrop",new class{});class Lk{constructor(){}static getInstance(){return Lk.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}function Dk(e){const t=new bk;for(const i of e.items){const e=i.type;if("string"===i.kind){const n=new Promise((e=>i.getAsString(e)));t.append(e,vk(n))}else if("file"===i.kind){const n=i.getAsFile();n&&t.append(e,Ek(n))}}return t}function Ek(e){const t=e.path?Po.parse(e.path):void 0;return function(e,t,i){const n={id:_k(),name:e,uri:t,data:i};return{asString:async()=>"",asFile:()=>n,value:void 0}}(e.name,t,(async()=>new Uint8Array(await e.arrayBuffer())))}Lk.INSTANCE=new Lk;const Nk=Object.freeze(["CodeEditors","CodeFiles",xk.RESOURCES,xk.INTERNAL_URI_LIST]);function Ik(e,t=!1){const i=Dk(e),n=i.get(xk.INTERNAL_URI_LIST);if(n)i.replace(Tg.uriList,n);else if(t||!i.has(Tg.uriList)){const t=[];for(const i of e.items){const e=i.getAsFile();if(e){const i=e.path;try{i?t.push(Po.file(i).toString()):t.push(Po.parse(e.name,!0).toString())}catch(e){}}}t.length&&i.replace(Tg.uriList,vk(Sk.create(t)))}for(const e of Nk)i.delete(e);return i}const Tk=vd("IWorkspaceEditService");class Mk{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(Ak.is(e))return Ak.lift(e);if(Rk.is(e))return Rk.lift(e);throw new Error("Unsupported edit")}))}}class Ak extends Mk{static is(e){return e instanceof Ak||_l(e)&&Po.isUri(e.resource)&&_l(e.textEdit)}static lift(e){return e instanceof Ak?e:new Ak(e.resource,e.textEdit,e.versionId,e.metadata)}constructor(e,t,i=void 0,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class Rk extends Mk{static is(e){return e instanceof Rk||_l(e)&&(Boolean(e.newResource)||Boolean(e.oldResource))}static lift(e){return e instanceof Rk?e:new Rk(e.oldResource,e.newResource,e.options,e.metadata)}constructor(e,t,i={},n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const Pk=vd("ILanguageFeaturesService");class Ok{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1),t=(()=>!1)){return new Hk(new Wk(e,t))}static forStrings(){return new Hk(new Ok)}static forConfigKeys(){return new Hk(new Fk)}constructor(e){this._iter=e}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new Vk,this._root.segment=i.value());const o=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new Vk,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new Vk,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new Vk,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const s=n.value;n.value=t,n.key=e;for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=o[e][0],n=o[e+1][0];if(1===i&&1===n)o[e][1]=t.rotateLeft();else if(-1===i&&-1===n)o[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=o[e+1][1]=o[e+1][1].rotateRight(),o[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=o[e+1][1]=o[e+1][1].rotateLeft(),o[e][1]=t.rotateRight()}if(e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}return s}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),o=[];let s=this._root;for(;s;){const e=n.cmp(s.segment);if(e>0)o.push([-1,s]),s=s.left;else if(e<0)o.push([1,s]),s=s.right;else{if(!n.hasNext())break;n.next(),o.push([0,s]),s=s.mid}}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const e=this._min(s.right);if(e.key){const{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}}else{const e=null!==(i=s.left)&&void 0!==i?i:s.right;if(o.length>0){const[t,i]=o[o.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),o[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),o[e][1]=t.rotateRight()),e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){return this._findSuperstrOrElement(e,!1)}_findSuperstrOrElement(e,t){const i=this._iter.reset(e);let n=this._root;for(;n;){const e=i.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!i.hasNext())return n.mid?this._entries(n.mid):t?n.value:void 0;i.next(),n=n.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(e){const t=[];return this._dfsEntries(e,t),t[Symbol.iterator]()}_dfsEntries(e,t){e&&(e.left&&this._dfsEntries(e.left,t),e.value&&t.push([e.key,e.value]),e.mid&&this._dfsEntries(e.mid,t),e.right&&this._dfsEntries(e.right,t))}}const zk=vd("contextService");function Uk(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&Po.isUri(t.uri)}const Kk={id:"empty-window"};class jk{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}const qk=(v(0,"Code Workspace"),"4064f6ec-cb38-4ad0-af64-ee6467e63c82");var $k=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Gk=function(e,t){return function(i,n){t(i,n,e)}};class Zk{async provideDocumentPasteEdits(e,t,i,n,o){const s=await this.getEdit(i,o);if(s)return{dispose(){},edits:[{insertText:s.insertText,title:s.title,kind:s.kind,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}]}}async provideDocumentDropEdits(e,t,i,n){const o=await this.getEdit(i,n);return o?[{insertText:o.insertText,title:o.title,kind:o.kind,handledMimeType:o.handledMimeType,yieldTo:o.yieldTo}]:void 0}}class Yk extends Zk{constructor(){super(...arguments),this.kind=Yk.kind,this.dropMimeTypes=[Tg.text],this.pasteMimeTypes=[Tg.text]}async getEdit(e,t){const i=e.get(Tg.text);if(!i)return;if(e.has(Tg.uriList))return;const n=await i.asString();return{handledMimeType:Tg.text,title:v(0,"Insert Plain Text"),insertText:n,kind:this.kind}}}Yk.id="text",Yk.kind=new kk("text.plain");class Qk extends Zk{constructor(){super(...arguments),this.kind=new kk("uri.absolute"),this.dropMimeTypes=[Tg.uriList],this.pasteMimeTypes=[Tg.uriList]}async getEdit(e,t){const i=await ex(e);if(!i.length||t.isCancellationRequested)return;let n=0;const o=i.map((({uri:e,originalText:t})=>e.scheme===qo.file?e.fsPath:(n++,t))).join(" ");let s;return s=n>0?i.length>1?v(0,"Insert Uris"):v(0,"Insert Uri"):i.length>1?v(0,"Insert Paths"):v(0,"Insert Path"),{handledMimeType:Tg.uriList,insertText:o,title:s,kind:this.kind}}}let Xk=class extends Zk{constructor(e){super(),this._workspaceContextService=e,this.kind=new kk("uri.relative"),this.dropMimeTypes=[Tg.uriList],this.pasteMimeTypes=[Tg.uriList]}async getEdit(e,t){const i=await ex(e);if(!i.length||t.isCancellationRequested)return;const n=jh(i.map((({uri:e})=>{const t=this._workspaceContextService.getWorkspaceFolder(e);return t?od(t.uri,e):void 0})));return n.length?{handledMimeType:Tg.uriList,insertText:n.join(" "),title:i.length>1?v(0,"Insert Relative Paths"):v(0,"Insert Relative Path"),kind:this.kind}:void 0}};Xk=$k([Gk(0,zk)],Xk);class Jk{constructor(){this.kind=new kk("html"),this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:Tg.text}]}async provideDocumentPasteEdits(e,t,i,n,o){var s;if(n.triggerKind!==EC.PasteAs&&!(null===(s=n.only)||void 0===s?void 0:s.contains(this.kind)))return;const r=i.get("text/html"),a=await(null==r?void 0:r.asString());return a&&!o.isCancellationRequested?{dispose(){},edits:[{insertText:a,yieldTo:this._yieldTo,title:v(0,"Insert HTML"),kind:this.kind}]}:void 0}}async function ex(e){const t=e.get(Tg.uriList);if(!t)return[];const i=await t.asString(),n=[];for(const e of Sk.parse(i))try{n.push({uri:Po.parse(e),originalText:e})}catch(e){}return n}let tx=class extends lt{constructor(e,t){super(),this._register(e.documentDropEditProvider.register("*",new Yk)),this._register(e.documentDropEditProvider.register("*",new Qk)),this._register(e.documentDropEditProvider.register("*",new Xk(t)))}};tx=$k([Gk(0,Pk),Gk(1,zk)],tx);let ix=class extends lt{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new Yk)),this._register(e.documentPasteEditProvider.register("*",new Qk)),this._register(e.documentPasteEditProvider.register("*",new Xk(t))),this._register(e.documentPasteEditProvider.register("*",new Jk))}};ix=$k([Gk(0,Pk),Gk(1,zk)],ix);class nx{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||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,i=0,n=this.value.charCodeAt(e);if(t=nx._table[n],"number"==typeof t)return this.pos+=1,{type:t,pos:e,len:1};if(nx.isDigitCharacter(n)){t=8;do{i+=1,n=this.value.charCodeAt(e+i)}while(nx.isDigitCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}if(nx.isVariableCharacter(n)){t=9;do{n=this.value.charCodeAt(e+ ++i)}while(nx.isVariableCharacter(n)||nx.isDigitCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}t=10;do{i+=1,n=this.value.charCodeAt(e+i)}while(!isNaN(n)&&void 0===nx._table[n]&&!nx.isDigitCharacter(n)&&!nx.isVariableCharacter(n));return this.pos+=i,{type:t,pos:e,len:i}}}nx._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class ox{constructor(){this._children=[]}appendChild(e){return e instanceof sx&&this._children[this._children.length-1]instanceof sx?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(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 gx)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class sx extends ox{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new sx(this.value)}}class rx extends ox{}class ax extends rx{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 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof lx?this._children[0]:void 0}clone(){const e=new ax(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class lx extends ox{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof sx&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new lx;return this.options.forEach(e.appendChild,e),e}}class dx extends ox{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof cx&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof cx){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new dx;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class cx extends ox{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":"camelcase"===this.shorthandName?e?this._toCamelCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(((e,t)=>0===t?e.charAt(0).toLowerCase()+e.substr(1):e.charAt(0).toUpperCase()+e.substr(1))).join(""):e}clone(){return new cx(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class hx extends rx{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new sx(t)],!0)}clone(){const e=new hx(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function ux(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class gx extends ox{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk((function(i){return i instanceof ax&&(e.push(i),t=!t||t.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return ux([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof ax&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof hx&&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 gx;return this._children=this.children.map((e=>e.clone())),e}walk(e){ux(this.children,e)}}class px{constructor(){this._scanner=new nx,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 n=new gx;return this.parseFragment(e,n),this.ensureFinalTabstop(n,null!=i&&i,null!=t&&t),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,o=[];t.walk((e=>(e instanceof ax&&(e.isFinalTabstop?n.set(0,void 0):!n.has(e.index)&&e.children.length>0?n.set(e.index,e.children):o.push(e)),!0)));const s=(e,i)=>{const o=n.get(e.index);if(!o)return;const r=new ax(e.index);r.transform=e.transform;for(const e of o){const t=e.clone();r.appendChild(t),t instanceof ax&&n.has(t.index)&&!i.has(t.index)&&(i.add(t.index),s(t,i),i.delete(t.index))}t.replace(e,[r])},r=new Set;for(const e of o)s(e,r);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find((e=>0===e.index))||e.appendChild(new ax(0)))}_accept(e,t){if(void 0===e||this._token.type===e){const e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}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(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)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 sx(t)),!0)}_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 ax(Number(t)):new hx(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 n=new ax(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new sx("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new lx;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new sx(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 n=new hx(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new sx("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){const t=new dx;let i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new sx(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){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 n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new cx(Number(n))),!0;if(this._accept(4))return e.appendChild(new cx(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){const i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new cx(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){const t=this._until(4);if(t)return e.appendChild(new cx(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){const t=this._until(4);if(t)return e.appendChild(new cx(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){const t=this._until(1);if(t){const i=this._until(4);if(i)return e.appendChild(new cx(Number(n),void 0,t,i)),!0}}else{const t=this._until(4);if(t)return e.appendChild(new cx(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new sx(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}function mx(e,t,i){var n,o,s,r;return("string"==typeof i.insertText?""===i.insertText:""===i.insertText.snippet)?{edits:null!==(o=null===(n=i.additionalEdit)||void 0===n?void 0:n.edits)&&void 0!==o?o:[]}:{edits:[...t.map((t=>new Ak(e,{range:t,text:"string"==typeof i.insertText?px.escape(i.insertText)+"$0":i.insertText.snippet,insertAsSnippet:!0}))),...null!==(r=null===(s=i.additionalEdit)||void 0===s?void 0:s.edits)&&void 0!==r?r:[]]}}function fx(e){var t;function i(e,t){return"mimeType"in e?e.mimeType===t.handledMimeType:!!t.kind&&e.kind.contains(t.kind)}const n=new Map;for(const o of e)for(const s of null!==(t=o.yieldTo)&&void 0!==t?t:[])for(const t of e)if(t!==o&&i(s,t)){let e=n.get(o);e||(e=[],n.set(o,e)),e.push(t)}if(!n.size)return Array.from(e);const o=new Set,s=[];return function e(t){if(!t.length)return[];const i=t[0];if(s.includes(i))return console.warn("Yield to cycle detected",i),t;if(o.has(i))return e(t.slice(1));let r=[];const a=n.get(i);return a&&(s.push(i),r=e(a),s.pop()),o.add(i),[...r,i,...e(t.slice(1))]}(Array.from(e))}const _x=vd("IEditorCancelService"),vx=new gc("cancellableOperation",!1,v(0,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Ng(_x,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:vx.bindTo(e.get(pc)),tokens:new pt}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},1);class bx extends Pt{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(_x).add(e,this)))}dispose(){this._unregister(),super.dispose()}}th(new class extends Yc{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:vx})}runEditorCommand(e,t){e.get(_x).cancel(t)}});class wx{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?dn("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof wx))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new wx(e,this.flags))}}class Cx extends bx{constructor(e,t,i,n){super(e,n),this._listener=new at,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&hh.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&hh.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class yx extends Pt{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}var Sx=i(5577),kx={};kx.styleTagTransform=Gr(),kx.setAttributes=Kr(),kx.insert=zr().bind(null,"head"),kx.domAPI=Vr(),kx.insertStyleElement=qr(),Br()(Sx.Z,kx),Sx.Z&&Sx.Z.locals&&Sx.Z.locals;const xx=zy.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:" ",inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class Lx extends lt{constructor(e,t,i,n,o){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=o,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=Sr(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=Sr("span.icon");this.domNode.append(t),t.classList.add(...Rl.asClassNameArray(Ml.loading),"codicon-modifier-spin");const i=()=>{const e=this.editor.getOption(67);this.domNode.style.height=`${e}px`,this.domNode.style.width=`${Math.ceil(.8*e)}px`};i(),this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(52)||e.hasChanged(67))&&i()}))),this._register(ws(this.domNode,ur.CLICK,(e=>{this.delegate.cancel()})))}getId(){return Lx.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)}}Lx.baseId="editor.widget.inlineProgressWidget";let Dx=class extends lt{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new dt),this._currentWidget=new dt,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}async showWhile(e,t,i){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=jt((()=>{const n=hh.fromPositions(e);this._currentDecorations.set([{range:n,options:xx}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(Lx,this.id,this._editor,n,t,i))}),this._showDelay);try{return await i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};function Ex(e,t={}){const i=Nx(t);return Tx(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new Ix(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==Mx(r.peek(),t);if(i&&(e=r.next()),i||0===Mx(e,t)||e!==r.peek())if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e;else{r.advance(),2===o.type&&(o=s.pop());const i=Mx(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}}return 2===o.type&&(o=s.pop()),s.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function Nx(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}Dx=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,_d)],Dx);class Ix{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function Tx(e,t,i,n){let o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(7===t.type&&n)o=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(ys(e,"click",(e=>{i.callback(String(t.index),e)}))),o=e}else 8===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach((e=>{Tx(o,e,i,n)}))}function Mx(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}const Ax=new RegExp(`(\\\\)?\\$\\((${Rl.iconNameExpression}(?:${Rl.iconModifierExpression})?)\\)`,"g");function Rx(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=Ax.exec(e));){o=i.index||0,ne.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var s=/[&<>"']/,r=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,d={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return d[e]};function h(e,t){if(t){if(s.test(e))return e.replace(r,c)}else if(a.test(e))return e.replace(l,c);return e}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function g(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g;function m(e,t){e="string"==typeof e?e:e.source,t=t||"";var i={replace:function(t,n){return n=(n=n.source||n).replace(p,"$1"),e=e.replace(t,n),i},getRegex:function(){return new RegExp(e,t)}};return i}var f=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function v(e,t,i){if(e){var n;try{n=decodeURIComponent(g(i)).replace(f,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!_.test(i)&&(i=function(e,t){b[" "+e]||(w.test(e)?b[" "+e]=e+"/":b[" "+e]=L(e,"/",!0));var i=-1===(e=b[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(C,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(y,"$1")+t:e+t}(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(e){return null}return i}var b={},w=/^[^:]+:\/*[^/]*$/,C=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/,S={exec:function(){}};function k(e){for(var t,i,n=1;n=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>t)i.splice(t);else for(;i.length1;)1&t&&(i+=e),t>>=1,e+=e;return i+e}function N(e,t,i,n){var o=t.href,s=t.title?h(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var a={type:"link",raw:i,href:o,title:s,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,a}return{type:"image",raw:i,href:o,title:s,text:h(r)}}var I=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},i.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:L(i,"\n")}}},i.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},i.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=L(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:this.lexer.inline(i)}}},i.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},i.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var i=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}},i.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,o,s,r,a,l,d,c,h,u,g,p,m=t[1].trim(),f=m.length>1,_={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?"\\d{1,9}\\"+m.slice(-1):"\\"+m,this.options.pedantic&&(m=f?m:"[*+-]");for(var v=new RegExp("^( {0,3}"+m+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=v.exec(e))&&!this.rules.block.hr.test(e);){if(i=t[0],e=e.substring(i.length),c=t[2].split("\n",1)[0],h=e.split("\n",1)[0],this.options.pedantic?(r=2,g=c.trimLeft()):(r=(r=t[2].search(/[^ ]/))>4?1:r,g=c.slice(r),r+=t[1].length),l=!1,!c&&/^ *$/.test(h)&&(i+=h+"\n",e=e.substring(h.length+1),p=!0),!p)for(var b=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),w=new RegExp("^ {0,"+Math.min(3,r-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),C=new RegExp("^ {0,"+Math.min(3,r-1)+"}(?:```|~~~)"),y=new RegExp("^ {0,"+Math.min(3,r-1)+"}#");e&&(c=u=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!C.test(c))&&!y.test(c)&&!b.test(c)&&!w.test(e);){if(c.search(/[^ ]/)>=r||!c.trim())g+="\n"+c.slice(r);else{if(l)break;g+="\n"+c}l||c.trim()||(l=!0),i+=u+"\n",e=e.substring(u.length+1)}_.loose||(d?_.loose=!0:/\n *\n *$/.test(i)&&(d=!0)),this.options.gfm&&(o=/^\[[ xX]\] /.exec(g))&&(s="[ ] "!==o[0],g=g.replace(/^\[[ xX]\] +/,"")),_.items.push({type:"list_item",raw:i,task:!!o,checked:s,loose:!1,text:g}),_.raw+=i}_.items[_.items.length-1].raw=i.trimRight(),_.items[_.items.length-1].text=g.trimRight(),_.raw=_.raw.trimRight();var S=_.items.length;for(a=0;a1)return!0;return!1}));!_.loose&&k.length&&x&&(_.loose=!0,_.items[a].loose=!0)}return _}},i.html=function(e){var t=this.rules.block.html.exec(e);if(t){var i={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var n=this.options.sanitizer?this.options.sanitizer(t[0]):h(t[0]);i.type="paragraph",i.text=n,i.tokens=this.lexer.inline(n)}return i}},i.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},i.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:x(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o,s,r,a=i.align.length;for(n=0;n/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):h(t[0]):t[0]}},i.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var n=L(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=e.length,n=0,o=0;o-1){var s=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,s).trim(),t[3]=""}}var r=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);l&&(r=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^$/.test(i)?r.slice(1):r.slice(1,-1)),N(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0],this.lexer)}},i.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return N(i,n,i[0],this.lexer)}},i.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var s,r,a=n[0].length-1,l=a,d=0,c="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=c.exec(t));)if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(r=s.length,n[3]||n[4])l+=r;else if(!((n[5]||n[6])&&a%3)||(a+r)%3){if(!((l-=r)>0)){if(r=Math.min(r,r+l+d),Math.min(a,r)%2){var h=e.slice(1,a+n.index+r);return{type:"em",raw:e.slice(0,a+n.index+r+1),text:h,tokens:this.lexer.inlineTokens(h)}}var u=e.slice(2,a+n.index+r-1);return{type:"strong",raw:e.slice(0,a+n.index+r+1),text:u,tokens:this.lexer.inlineTokens(u)}}}else d+=r}}},i.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=h(i,!0),{type:"codespan",raw:t[0],text:i}}},i.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},i.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}},i.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=h(this.options.mangle?t(o[1]):o[1])):i=h(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},i.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=h(this.options.mangle?t(i[0]):i[0]));else{var s;do{s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(s!==i[0]);n=h(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},i.inlineText=function(e,t){var i,n=this.rules.inline.text.exec(e);if(n)return i=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):h(n[0]):n[0]:h(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:i}},t}(),T={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:S,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};T.def=m(T.def).replace("label",T._label).replace("title",T._title).getRegex(),T.bullet=/(?:[*+-]|\d{1,9}[.)])/,T.listItemStart=m(/^( *)(bull) */).replace("bull",T.bullet).getRegex(),T.list=m(T.list).replace(/bull/g,T.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+T.def.source+")").getRegex(),T._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",T._comment=/|$)/,T.html=m(T.html,"i").replace("comment",T._comment).replace("tag",T._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),T.paragraph=m(T._paragraph).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex(),T.blockquote=m(T.blockquote).replace("paragraph",T.paragraph).getRegex(),T.normal=k({},T),T.gfm=k({},T.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),T.gfm.table=m(T.gfm.table).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex(),T.gfm.paragraph=m(T._paragraph).replace("hr",T.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",T.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",T._tag).getRegex(),T.pedantic=k({},T.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",T._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:S,paragraph:m(T.normal._paragraph).replace("hr",T.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",T.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var M={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:S,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:S,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}M._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",M.punctuation=m(M.punctuation).replace(/punctuation/g,M._punctuation).getRegex(),M.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,M.escapedEmSt=/\\\*|\\_/g,M._comment=m(T._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),M.emStrong.lDelim=m(M.emStrong.lDelim).replace(/punct/g,M._punctuation).getRegex(),M.emStrong.rDelimAst=m(M.emStrong.rDelimAst,"g").replace(/punct/g,M._punctuation).getRegex(),M.emStrong.rDelimUnd=m(M.emStrong.rDelimUnd,"g").replace(/punct/g,M._punctuation).getRegex(),M._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,M._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,M._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,M.autolink=m(M.autolink).replace("scheme",M._scheme).replace("email",M._email).getRegex(),M._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,M.tag=m(M.tag).replace("comment",M._comment).replace("attribute",M._attribute).getRegex(),M._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,M._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,M._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,M.link=m(M.link).replace("label",M._label).replace("href",M._href).replace("title",M._title).getRegex(),M.reflink=m(M.reflink).replace("label",M._label).replace("ref",T._label).getRegex(),M.nolink=m(M.nolink).replace("ref",T._label).getRegex(),M.reflinkSearch=m(M.reflinkSearch,"g").replace("reflink",M.reflink).replace("nolink",M.nolink).getRegex(),M.normal=k({},M),M.pedantic=k({},M.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",M._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",M._label).getRegex()}),M.gfm=k({},M.normal,{escape:m(M.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\0?t[t.length-1].raw+="\n":t.push(i);else if(i=this.tokenizer.code(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.heading(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.hr(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.blockquote(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.list(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.html(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.def(e))e=e.substring(i.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.lheading(e))e=e.substring(i.raw.length),t.push(i);else if(o=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,i=e.slice(1),n=void 0;r.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),this.state.top&&(i=this.tokenizer.paragraph(o)))n=t[t.length-1],s&&"paragraph"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);else if(i=this.tokenizer.text(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return this.state.top=!0,t},s.inline=function(e,t){return void 0===t&&(t=[]),this.inlineQueue.push({src:e,tokens:t}),t},s.inlineTokens=function(e,t){var i,n,o,s=this;void 0===t&&(t=[]);var r,a,l,d=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(d));)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(d=d.slice(0,r.index)+"["+E("a",r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(d));)d=d.slice(0,r.index)+"["+E("a",r[0].length-2)+"]"+d.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(d));)d=d.slice(0,r.index)+"++"+d.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(i=n.call({lexer:s},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0)}))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),(n=t[t.length-1])&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,d,l))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e,R))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e,R))){if(o=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,i=e.slice(1),n=void 0;s.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},i))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}(),i=this.tokenizer.inlineText(o,A))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(l=i.raw.slice(-1)),a=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){var h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}throw new Error(h)}}else e=e.substring(i.raw.length),t.push(i);return t},n=i,o=[{key:"rules",get:function(){return{block:T,inline:M}}}],null&&t(n.prototype,null),o&&t(n,o),Object.defineProperty(n,"prototype",{writable:!1}),i}(),O=function(){function t(t){this.options=t||e.defaults}var i=t.prototype;return i.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'
'+(i?e:h(e,!0))+"
\n":"
"+(i?e:h(e,!0))+"
\n"},i.blockquote=function(e){return"
\n"+e+"
\n"},i.html=function(e){return e},i.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},i.hr=function(){return this.options.xhtml?"
\n":"
\n"},i.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},i.listitem=function(e){return"
  • "+e+"
  • \n"},i.checkbox=function(e){return" "},i.paragraph=function(e){return"

    "+e+"

    \n"},i.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},i.tablerow=function(e){return"\n"+e+"\n"},i.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},i.strong=function(e){return""+e+""},i.em=function(e){return""+e+""},i.codespan=function(e){return""+e+""},i.br=function(){return this.options.xhtml?"
    ":"
    "},i.del=function(e){return""+e+""},i.link=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"+i+""},i.image=function(e,t,i){if(null===(e=v(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">")},i.text=function(e){return e},t}(),F=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),B=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),W=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new O,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new F,this.slugger=new B}t.parse=function(e,i){return new t(i).parse(e)},t.parseInline=function(e,i){return new t(i).parseInline(e)};var i=t.prototype;return i.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,s,r,a,l,d,c,h,u,p,m,f,_,v,b,w,C,y="",S=e.length;for(i=0;i0&&"paragraph"===_.tokens[0].type?(_.tokens[0].text=w+" "+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&"text"===_.tokens[0].tokens[0].type&&(_.tokens[0].tokens[0].text=w+" "+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:"text",text:w}):f+=w),f+=this.parse(_.tokens,m),c+=this.renderer.listitem(f,b,v);y+=this.renderer.list(c,u,p);continue;case"html":y+=this.renderer.html(h.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(c=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

    "+h(e.message+"",!0)+"
    ";throw e}try{var l=P.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(V.walkTokens(l,t.walkTokens)).then((function(){return W.parse(l,t)})).catch(a);V.walkTokens(l,t.walkTokens)}return W.parse(l,t)}catch(e){a(e)}}V.options=V.setOptions=function(t){var i;return k(V.defaults,t),i=V.defaults,e.defaults=i,V},V.getDefaults=o,V.defaults=e.defaults,V.use=function(){for(var e=arguments.length,t=new Array(e),i=0;iAn error occurred:

    "+h(e.message+"",!0)+"
    ";throw e}},V.Parser=W,V.parser=W.parse,V.Renderer=O,V.TextRenderer=F,V.Lexer=P,V.lexer=P.lex,V.Tokenizer=I,V.Slugger=B,V.parse=V;var H=V.options,z=V.setOptions,U=V.use,K=V.walkTokens,j=V.parseInline,q=V,$=W.parse,G=P.lex;e.Lexer=P,e.Parser=W,e.Renderer=O,e.Slugger=B,e.TextRenderer=F,e.Tokenizer=I,e.getDefaults=o,e.lexer=G,e.marked=V,e.options=H,e.parse=q,e.parseInline=j,e.parser=$,e.setOptions=z,e.use=U,e.walkTokens=K,Object.defineProperty(e,"__esModule",{value:!0})},e.amd?e(0,i):"object"==typeof exports?i(exports):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}(),Bx.Lexer||exports.Lexer,Bx.Parser||exports.Parser,Bx.Renderer||exports.Renderer,Bx.Slugger||exports.Slugger,Bx.TextRenderer||exports.TextRenderer,Bx.Tokenizer||exports.Tokenizer,Bx.getDefaults||exports.getDefaults,Bx.lexer||exports.lexer;var Wx=Bx.marked||exports.marked;function Vx(e){let t=JSON.parse(e);return t=zx(t),t}function Hx(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:t.flags}:t}function zx(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return Po.revive(e);case 2:return new RegExp(e.source,e.flags);case 17:return new Date(e.source)}if(e instanceof Xu||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{let n=[],o=[];return e&&(({href:e,dimensions:n}=function(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",s=i?i[1]:"",r=isFinite(parseInt(s)),a=isFinite(parseInt(o));r&&t.push(`width="${s}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}(e)),o.push(`src="${ud(e)}"`)),i&&o.push(`alt="${ud(i)}"`),t&&o.push(`title="${ud(t)}"`),n.length&&(o=o.concat(n)),""},paragraph:e=>`

    ${e}

    `,link:(e,t,i)=>"string"!=typeof e?"":(e===i&&(i=gd(i)),t="string"==typeof t?ud(gd(t)):"",`/g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${t||e}" draggable="false">${i}`)});function Kx(e,t={},i={}){var n,o;const s=new at;let r=!1;const a=Nx(t),l=function(t){let i;try{i=Vx(decodeURIComponent(t))}catch(e){}return i?(i=Sh(i,(t=>e.uris&&e.uris[t]?Po.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},d=function(t,i){const n=e.uris&&e.uris[t];let o=Po.revive(n);return i?t.startsWith(qo.data+":")?t:(o||(o=Po.parse(t)),Qo.uriToBrowserUri(o).toString(!0)):o?Po.parse(t).toString()===o.toString()?t:(o.query&&(o=o.with({query:l(o.query)})),o.toString()):t},c=new Wx.Renderer;c.image=Ux.image,c.link=Ux.link,c.paragraph=Ux.paragraph;const h=[],u=[];if(t.codeBlockRendererSync?c.code=(e,i)=>{const n=Fx.nextId(),o=t.codeBlockRendererSync(jx(i),e);return u.push([n,o]),`
    ${cn(e)}
    `}:t.codeBlockRenderer&&(c.code=(e,i)=>{const n=Fx.nextId(),o=t.codeBlockRenderer(jx(i),e);return h.push(o.then((e=>[n,e]))),`
    ${cn(e)}
    `}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let o=n.dataset.href;o&&(e.baseUri&&(o=qx(Po.from(e.baseUri),o)),t.actionHandler.callback(o,i))}catch(e){xe(e)}finally{i.preventDefault()}},n=t.actionHandler.disposables.add(new ok(a,"click")),o=t.actionHandler.disposables.add(new ok(a,"auxclick"));t.actionHandler.disposables.add(_t.any(n.event,o.event)((e=>{const t=new Ge(ls(a),e);(t.leftButton||t.middleButton)&&i(t)}))),t.actionHandler.disposables.add(ws(a,"keydown",(e=>{const t=new Ke(e);(t.equals(10)||t.equals(3))&&i(t)})))}e.supportHtml||(i.sanitizer=i=>{var n;return(null===(n=t.sanitizerOptions)||void 0===n?void 0:n.replaceWithPlaintext)?cn(i):(e.isTrusted?i.match(/^(]+>)|(<\/\s*span>)$/):void 0)?i:""},i.sanitize=!0,i.silent=!0),i.renderer=c;let g,p=null!==(n=e.value)&&void 0!==n?n:"";if(p.length>1e5&&(p=`${p.substr(0,1e5)}…`),e.supportThemeIcons&&(p=p.replace(Fl,(e=>`\\${e}`))),t.fillInIncompleteTokens){const e={...Wx.defaults,...i},t=function(e){for(let t=0;t"string"==typeof e?e:e.outerHTML)).join(""));const m=(new DOMParser).parseFromString(Gx({isTrusted:e.isTrusted,...t.sanitizerOptions},g),"text/html");if(m.body.querySelectorAll("img, audio, video, source").forEach((i=>{const n=i.getAttribute("src");if(n){let o=n;try{e.baseUri&&(o=qx(Po.from(e.baseUri),o))}catch(e){}if(i.setAttribute("src",d(o,!0)),t.remoteImageIsAllowed){const e=Po.parse(o);e.scheme===qo.file||e.scheme===qo.data||t.remoteImageIsAllowed(e)||i.replaceWith(Sr("",void 0,i.outerHTML))}}})),m.body.querySelectorAll("a").forEach((t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=d(i,!1);e.baseUri&&(n=qx(Po.from(e.baseUri),i)),t.dataset.href=n}})),a.innerHTML=Gx({isTrusted:e.isTrusted,...t.sanitizerOptions},m.body.innerHTML),h.length>0)Promise.all(h).then((e=>{var i,n;if(r)return;const o=new Map(e),s=a.querySelectorAll("div[data-code]");for(const e of s){const t=o.get(null!==(i=e.dataset.code)&&void 0!==i?i:"");t&&br(e,t)}null===(n=t.asyncRenderCallback)||void 0===n||n.call(t)}));else if(u.length>0){const e=new Map(u),t=a.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(null!==(o=i.dataset.code)&&void 0!==o?o:"");t&&br(i,t)}}if(t.asyncRenderCallback)for(const e of a.getElementsByTagName("img")){const i=s.add(ws(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()})))}return{element:a,dispose:()=>{r=!0,s.dispose()}}}function jx(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function qx(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?sd(e,t).toString():sd(td(e),t).toString()}const $x=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function Gx(e,t){const{config:i,allowedSchemes:n}=function(e){var t;const i=[qo.http,qo.https,qo.mailto,qo.data,qo.file,qo.vscodeFileResource,qo.vscodeRemote,qo.vscodeRemoteResource];return e.isTrusted&&i.push(qo.command),{config:{ALLOWED_TAGS:null!==(t=e.allowedTags)&&void 0!==t?t:[...Tr],ALLOWED_ATTR:Zx,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:i}}(e),o=new at;o.add(gL("uponSanitizeAttribute",((e,t)=>{var i;if("style"!==t.attrName&&"class"!==t.attrName){if("INPUT"===e.tagName&&"checkbox"===(null===(i=e.attributes.getNamedItem("type"))||void 0===i?void 0:i.value)){if("type"===t.attrName&&"checkbox"===t.attrValue||"disabled"===t.attrName||"checked"===t.attrName)return void(t.keepAttr=!0);t.keepAttr=!1}}else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}}))),o.add(gL("uponSanitizeElement",((t,i)=>{var n,o;if("input"===i.tagName&&("checkbox"===(null===(n=t.attributes.getNamedItem("type"))||void 0===n?void 0:n.value)?t.setAttribute("disabled",""):e.replaceWithPlaintext||null===(o=t.parentElement)||void 0===o||o.removeChild(t)),e.replaceWithPlaintext&&!i.allowedTags[i.tagName]&&"body"!==i.tagName&&t.parentElement){let e,n;if("#comment"===i.tagName)e=`\x3c!--${t.textContent}--\x3e`;else{const o=$x.includes(i.tagName),s=t.attributes.length?" "+Array.from(t.attributes).map((e=>`${e.name}="${e.value}"`)).join(" "):"";e=`<${i.tagName}${s}>`,o||(n=``)}const o=document.createDocumentFragment(),s=t.parentElement.ownerDocument.createTextNode(e);o.appendChild(s);const r=n?t.parentElement.ownerDocument.createTextNode(n):void 0;for(;t.firstChild;)o.appendChild(t.firstChild);r&&o.appendChild(r),t.parentElement.replaceChild(o,t)}}))),o.add(function(e,t=!1){const i=document.createElement("a");return en("afterSanitizeAttributes",(n=>{for(const o of["href","src"])if(n.hasAttribute(o)){const s=n.getAttribute(o);if("href"===o&&s.startsWith("#"))continue;if(i.href=s,!e.includes(i.protocol.replace(/:$/,""))){if(t&&"src"===o&&i.href.startsWith("data:"))continue;n.removeAttribute(o)}}})),rt((()=>{tn("afterSanitizeAttributes")}))}(n));try{return Ji(t,{...i,RETURN_TRUSTED_TYPE:!0})}finally{o.dispose()}}const Zx=["align","autoplay","alt","checked","class","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","type","width","start"];const Yx=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function Qx(){const e=new Wx.Renderer;return e.code=e=>e,e.blockquote=e=>e,e.html=e=>"",e.heading=(e,t,i)=>e+"\n",e.hr=()=>"",e.list=(e,t)=>e,e.listitem=e=>e+"\n",e.paragraph=e=>e+"\n",e.table=(e,t)=>e+t+"\n",e.tablerow=e=>e,e.tablecell=(e,t)=>e+" ",e.strong=e=>e,e.em=e=>e,e.codespan=e=>e,e.br=()=>"\n",e.del=e=>e,e.image=(e,t,i)=>"",e.text=e=>e,e.link=(e,t,i)=>i,e}const Xx=new sn((e=>Qx()));new sn((()=>{const e=Qx();return e.code=e=>"\n```"+e+"```\n",e}));function Jx(e){let t="";return e.forEach((e=>{t+=e.raw})),t}function eL(e){var t,i;if(e.tokens)for(let n=e.tokens.length-1;n>=0;n--){const o=e.tokens[n];if("text"===o.type){const s=o.raw.split("\n"),r=s[s.length-1];if(r.includes("`"))return sL(e);if(r.includes("**"))return hL(e,"**");if(r.match(/\*\w/))return hL(e,"*");if(r.match(/(^|\s)__\w/))return cL(e);if(r.match(/(^|\s)_\w/))return rL(e);if(r.match(/(^|\s)\[.*\]\(\w*/)||r.match(/^[^\[]*\]\([^\)]*$/)&&e.tokens.slice(0,n).some((e=>"text"===e.type&&e.raw.match(/\[[^\]]*$/)))){const o=e.tokens.slice(n+1);return"link"===(null===(t=o[0])||void 0===t?void 0:t.type)&&"text"===(null===(i=o[1])||void 0===i?void 0:i.type)&&o[1].raw.match(/^ *"[^"]*$/)||r.match(/^[^"]* +"[^"]*$/)?lL(e):aL(e)}if(r.match(/(^|\s)\[\w*/))return dL(e)}}}function tL(e){var t;const i=e.items[e.items.length-1],n=i.tokens?i.tokens[i.tokens.length-1]:void 0;let o;if("text"!==(null==n?void 0:n.type)||"inRawBlock"in i||(o=eL(n)),!o||"paragraph"!==o.type)return;const s=Jx(e.items.slice(0,-1)),r=null===(t=i.raw.match(/^(\s*(-|\d+\.) +)/))||void 0===t?void 0:t[0];if(!r)return;const a=r+Jx(i.tokens.slice(0,-1))+o.raw,l=Wx.lexer(s+a)[0];return"list"===l.type?l:void 0}const iL=3;function nL(e){let t,i;for(t=0;t0){const e=o?i.slice(0,-1).join("\n"):t,s=!!e.match(/\|\s*$/),r=e+(s?"":"|")+`\n|${" --- |".repeat(n)}`;return Wx.lexer(r)}}function gL(e,t){return en(e,t),rt((()=>tn(e)))}var pL=i(4513),mL={};function fL(e,t){var i;const n=globalThis.MonacoEnvironment;if(null==n?void 0:n.createTrustedTypesPolicy)try{return n.createTrustedTypesPolicy(e,t)}catch(e){return void xe(e)}try{return null===(i=s.trustedTypes)||void 0===i?void 0:i.createPolicy(e,t)}catch(e){return void xe(e)}}mL.styleTagTransform=Gr(),mL.setAttributes=Kr(),mL.insert=zr().bind(null,"head"),mL.domAPI=Vr(),mL.insertStyleElement=qr(),Br()(pL.Z,mL),pL.Z&&pL.Z.locals&&pL.Z.locals;var _L=i(889),vL={};vL.styleTagTransform=Gr(),vL.setAttributes=Kr(),vL.insert=zr().bind(null,"head"),vL.domAPI=Vr(),vL.insertStyleElement=qr(),Br()(_L.Z,vL),_L.Z&&_L.Z.locals&&_L.Z.locals;class bL{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){const t=wL(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){const t=wL(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){const t=wL(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){const t=wL(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){const t=wL(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){const t=wL(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){const t=wL(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingLeft(e){const t=wL(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){const t=wL(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){const t=wL(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){const t=wL(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function wL(e){return"number"==typeof e?`${e}px`:e}function CL(e){return new bL(e)}function yL(e,t){e instanceof bL?(e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setFontVariationSettings(t.fontVariationSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.fontVariationSettings=t.fontVariationSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}const SL={getInitialState:()=>UC,tokenizeEncoded:(e,t,i)=>jC(0,i)};function kL(e,t,i,n,o,s,r){let a="
    ",l=n,d=0,c=!0;for(let h=0,u=t.getCount();h0;)r&&c?(g+=" ",c=!1):(g+=" ",c=!0),e--;break}case 60:g+="<",c=!1;break;case 62:g+=">",c=!1;break;case 38:g+="&",c=!1;break;case 0:g+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",c=!1;break;case 13:g+="​",c=!1;break;case 32:r&&c?(g+=" ",c=!1):(g+=" ",c=!0);break;default:g+=String.fromCharCode(t),c=!1}}if(a+=`${g}`,u>o||l>=o)break}return a+="
    ",a}function xL(e,t,i){let n='
    ';const o=fn(e);let s=i.getInitialState();for(let e=0,r=o.length;e0&&(n+="
    ");const a=i.tokenizeEncoded(r,!0,s);ZC.convertToEndOffset(a.tokens,r.length);const l=new ZC(a.tokens,r,t).inflate();let d=0;for(let e=0,t=l.getCount();e${cn(r.substring(d,i))}`,d=i}s=a.endState}return n+="
    ",n}const LL=vd("openerService");var DL,EL=function(e,t){return function(i,n){t(i,n,e)}};let NL=DL=class{constructor(e,t,i){this._options=e,this._languageService=t,this._openerService=i,this._onDidRenderAsync=new kt,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new at,o=n.add(Kx(e,{...this._getRenderOptions(e,n),...t},i));return o.element.classList.add("rendered-markdown"),{element:o.element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{codeBlockRenderer:async(e,t)=>{var i,n,o;let s;e?s=this._languageService.getLanguageIdByLanguageName(e):this._options.editor&&(s=null===(i=this._options.editor.getModel())||void 0===i?void 0:i.getLanguageId()),s||(s=Qg);const r=await async function(e,t,i){if(!i)return xL(t,e.languageIdCodec,SL);const n=await HC.getOrCreate(i);return xL(t,e.languageIdCodec,n||SL)}(this._languageService,t,s),a=document.createElement("span");return a.innerHTML=null!==(o=null===(n=DL._ttpTokenizer)||void 0===n?void 0:n.createHTML(r))&&void 0!==o?o:r,this._options.editor?yL(a,this._options.editor.getOption(50)):this._options.codeBlockFontFamily&&(a.style.fontFamily=this._options.codeBlockFontFamily),void 0!==this._options.codeBlockFontSize&&(a.style.fontSize=this._options.codeBlockFontSize),a},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:t=>IL(this._openerService,t,e.isTrusted),disposables:t}}}};async function IL(e,t,i){try{return await e.open(t,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:TL(i)})}catch(e){return xe(e),!1}}function TL(e){return!0===e||!(!e||!Array.isArray(e.enabledCommands))&&e.enabledCommands}NL._ttpTokenizer=fL("tokenizeToString",{createHTML(e){return e}}),NL=DL=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([EL(1,Mu),EL(2,LL)],NL);var ML,AL=function(e,t){return function(i,n){t(i,n,e)}};let RL=ML=class{static get(e){return e.getContribution(ML.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new dt,this._messageListeners=new at,this._mouseOverMessage=!1,this._editor=e,this._visible=ML.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;null===(e=this._message)||void 0===e||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;na(hd(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=hd(e)?Kx(e,{actionHandler:{callback:t=>{this.closeMessage(),IL(this._openerService,t,hd(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new PL(this._editor,t,"string"==typeof e?e:this._message.element),this._messageListeners.add(_t.debounce(this._editor.onDidBlurEditorText,((e,t)=>t),0)((()=>{this._mouseOverMessage||this._messageWidget.value&&Vs(js(),this._messageWidget.value.getDomNode())||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(ws(this._messageWidget.value.getDomNode(),ur.MOUSE_ENTER,(()=>this._mouseOverMessage=!0),!0)),this._messageListeners.add(ws(this._messageWidget.value.getDomNode(),ur.MOUSE_LEAVE,(()=>this._mouseOverMessage=!1),!0)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new hh(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(PL.fadeOut(this._messageWidget.value))}};RL.ID="editor.contrib.messageController",RL.MESSAGE_VISIBLE=new gc("messageVisible",!1,v(0,"Whether the editor is currently showing an inline message")),RL=ML=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([AL(1,pc),AL(2,LL)],RL),th(new(Yc.bindToContribution(RL.get))({id:"leaveEditorMessage",precondition:RL.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class PL{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},n){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");"string"==typeof n?(s.classList.add("message"),s.textContent=n):(n.classList.add("message"),s.appendChild(n)),this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),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",2===e)}}oh(RL.ID,RL,4);const OL=vd("clipboardService"),FL=vd("progressService");Object.freeze({total(){},worked(){},done(){}});class BL{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}BL.None=Object.freeze({report(){}});const WL=vd("editorProgressService"),VL={ctrlCmd:!1,alt:!1};var HL,zL,UL;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(HL||(HL={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(zL||(zL={})),function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage",e[e.NextSeparator=8]="NextSeparator",e[e.PreviousSeparator=9]="PreviousSeparator"}(UL||(UL={})),new class{constructor(e){this.options=e}};const KL=vd("quickInputService");function jL(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[s]}}var qL;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(qL||(qL={}));class $L extends lt{constructor(){super(),this.dispatched=!1,this.targets=new pt,this.ignoreTargets=new pt,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(_t.runAndSubscribe(ms,(({window:e,disposables:t})=>{t.add(ws(e.document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),t.add(ws(e.document,"touchend",(t=>this.onTouchEnd(e,t)))),t.add(ws(e.document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}),{window:s,disposables:this._store}))}static addTarget(e){return $L.isTouchDevice()?($L.INSTANCE||($L.INSTANCE=it(new $L)),rt($L.INSTANCE.targets.push(e))):lt.None}static ignoreTarget(e){return $L.isTouchDevice()?($L.INSTANCE||($L.INSTANCE=it(new $L)),rt($L.INSTANCE.ignoreTargets.push(e))):lt.None}static isTouchDevice(){return"ontouchstart"in s||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=$L.HOLD_DELAY&&Math.abs(r.initialPageX-Bh(r.rollingPageX))<30&&Math.abs(r.initialPageY-Bh(r.rollingPageY))<30){const e=this.newGestureEvent(qL.Contextmenu,r.initialTarget);e.pageX=Bh(r.rollingPageX),e.pageY=Bh(r.rollingPageY),this.dispatchEvent(e)}else if(1===n){const t=Bh(r.rollingPageX),n=Bh(r.rollingPageY),o=Bh(r.rollingTimestamps)-r.rollingTimestamps[0],s=t-r.rollingPageX[0],a=n-r.rollingPageY[0],l=[...this.targets].filter((e=>r.initialTarget instanceof Node&&e.contains(r.initialTarget)));this.inertia(e,l,i,Math.abs(s)/o,s>0?1:-1,t,Math.abs(a)/o,a>0?1:-1,n)}this.dispatchEvent(this.newGestureEvent(qL.End,r.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){const i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===qL.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>$L.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==qL.Change&&e.type!==qL.Contextmenu||(this._lastSetTapCountTime=0);if(e.initialTarget instanceof Node){for(const t of this.ignoreTargets)if(t.contains(e.initialTarget))return;const t=[];for(const i of this.targets)if(i.contains(e.initialTarget)){let n=0,o=e.initialTarget;for(;o&&o!==i;)n++,o=o.parentElement;t.push([n,i])}t.sort(((e,t)=>e[0]-t[0]));for(const[i,n]of t)n.dispatchEvent(e),this.dispatched=!0}}inertia(e,t,i,n,o,s,r,a,l){this.handle=Ls(e,(()=>{const d=Date.now(),c=d-i;let h=0,u=0,g=!0;n+=$L.SCROLL_FRICTION*c,r+=$L.SCROLL_FRICTION*c,n>0&&(g=!1,h=o*n*c),r>0&&(g=!1,u=a*r*c);const p=this.newGestureEvent(qL.Change);p.translationX=h,p.translationY=u,t.forEach((e=>e.dispatchEvent(p))),g||this.inertia(e,t,d,n,o,s+h,r,a,l+u)}))}onTouchMove(e){const t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(n.pageX),o.rollingPageY.push(n.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}$L.SCROLL_FRICTION=-.005,$L.HOLD_DELAY=700,$L.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([jL],$L,"isTouchDevice",null);let GL=()=>({get delay(){return-1},dispose:()=>{},showHover:()=>{}});const ZL=new sn((()=>GL("mouse",!1))),YL=new sn((()=>GL("element",!1)));function QL(e){return"element"===e?YL.value:ZL.value}function XL(){return GL("element",!0)}var JL=i(2512),eD={};eD.styleTagTransform=Gr(),eD.setAttributes=Kr(),eD.insert=zr().bind(null,"head"),eD.domAPI=Vr(),eD.insertStyleElement=qr(),Br()(JL.Z,eD),JL.Z&&JL.Z.locals&&JL.Z.locals;let tD={showHover:()=>{},hideHover:()=>{},showAndFocusLastHover:()=>{},setupUpdatableHover:()=>null,triggerUpdatableHover:()=>{}};function iD(){return tD}fu.white.toString(),fu.white.toString();class nD extends lt{get onDidClick(){return this._onDidClick.event}constructor(e,t){super(),this._label="",this._onDidClick=this._register(new kt),this._onDidEscape=this._register(new kt),this.options=t,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!t.secondary);const i=t.secondary?t.buttonSecondaryBackground:t.buttonBackground,n=t.secondary?t.buttonSecondaryForeground:t.buttonForeground;this._element.style.color=n||"",this._element.style.backgroundColor=i||"",t.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"==typeof t.title&&this.setTitle(t.title),"string"==typeof t.ariaLabel&&this._element.setAttribute("aria-label",t.ariaLabel),e.appendChild(this._element),this._register($L.addTarget(this._element)),[ur.CLICK,qL.Tap].forEach((e=>{this._register(ws(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):pr(e)})))})),this._register(ws(this._element,ur.KEY_DOWN,(e=>{const t=new Ke(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._onDidEscape.fire(e),this._element.blur(),i=!0),i&&pr(t,!0)}))),this._register(ws(this._element,ur.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.updateBackground(!0)}))),this._register(ws(this._element,ur.MOUSE_OUT,(e=>{this.updateBackground(!1)}))),this.focusTracker=this._register(fr(this._element)),this._register(this.focusTracker.onDidFocus((()=>{this.enabled&&this.updateBackground(!0)}))),this._register(this.focusTracker.onDidBlur((()=>{this.enabled&&this.updateBackground(!1)})))}dispose(){super.dispose(),this._element.remove()}getContentElements(e){const t=[];for(let i of Rx(e))if("string"==typeof i){if(i=i.trim(),""===i)continue;const e=document.createElement("span");e.textContent=i,t.push(e)}else t.push(i);return t}updateBackground(e){let t;t=this.options.secondary?e?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:e?this.options.buttonHoverBackground:this.options.buttonBackground,t&&(this._element.style.backgroundColor=t)}get element(){return this._element}set label(e){var t,i,n;if(this._label===e)return;if(hd(this._label)&&hd(e)&&((i=this._label)===(n=e)||i&&n&&i.value===n.value&&i.isTrusted===n.isTrusted&&i.supportThemeIcons===n.supportThemeIcons&&i.supportHtml===n.supportHtml&&(i.baseUri===n.baseUri||i.baseUri&&n.baseUri&&Ql(Po.from(i.baseUri),Po.from(n.baseUri)))))return;this._element.classList.add("monaco-text-button");const o=this.options.supportShortLabel?this._labelElement:this._element;if(hd(e)){const i=Kx(e,{inline:!0});i.dispose();const n=null===(t=i.element.querySelector("p"))||void 0===t?void 0:t.innerHTML;if(n){const e=Ji(n,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});o.innerHTML=e}else br(o)}else this.options.supportIcons?br(o,...this.getContentElements(e)):o.textContent=e;let s="";"string"==typeof this.options.title?s=this.options.title:this.options.title&&(s=function(e){return"string"==typeof e?e:function(e,t){var i;let n=null!==(i=e.value)&&void 0!==i?i:"";n.length>1e5&&(n=`${n.substr(0,1e5)}…`);const o=Wx.parse(n,{renderer:Xx.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(e=>{var t;return null!==(t=Yx.get(e))&&void 0!==t?t:e}));return Gx({isTrusted:!1},o).toString()}(e)}(e)),this.setTitle(s),"string"==typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",s),this._label=e}get label(){return this._label}set icon(e){this._element.classList.add(...Rl.asClassNameArray(e))}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}setTitle(e){var t;this._hover||""===e?this._hover&&this._hover.update(e):this._hover=this._register(iD().setupUpdatableHover(null!==(t=this.options.hoverDelegate)&&void 0!==t?t:QL("mouse"),this._element,e))}}function oD(e,t){return t&&(e.stack||e.stacktrace)?v(0,"{0}: {1}",rD(e),sD(e.stack)||sD(e.stacktrace)):rD(e)}function sD(e){return Array.isArray(e)?e.join("\n"):e}function rD(e){return"ERR_UNC_HOST_NOT_ALLOWED"===e.code?`${e.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?v(0,"A system error occurred ({0})",e.message):e.message||v(0,"An unknown error occurred. Please consult the log for more details.")}function aD(e=null,t=!1){if(!e)return v(0,"An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=jh(e),n=aD(i[0],t);return i.length>1?v(0,"{0} ({1} errors in total)",n,i.length):n}if(fl(e))return e;if(e.detail){const i=e.detail;if(i.error)return oD(i.error,t);if(i.exception)return oD(i.exception,t)}return e.stack?oD(e,t):e.message?e.message:v(0,"An unknown error occurred. Please consult the log for more details.")}var lD=i(7094),dD={};dD.styleTagTransform=Gr(),dD.setAttributes=Kr(),dD.insert=zr().bind(null,"head"),dD.domAPI=Vr(),dD.insertStyleElement=qr(),Br()(lD.Z,dD),lD.Z&&lD.Z.locals&&lD.Z.locals;const cD=vd("contextViewService"),hD=vd("contextMenuService"),uD=vd("keybindingService");var gD;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(gD||(gD={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(o){return o?Dn(t,o)?e.Error:Dn(i,o)||Dn("warn",o)?e.Warning:Dn(n,o)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(gD||(gD={}));var pD=gD,mD=pD;const fD=vd("notificationService");var _D,vD=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},bD=function(e,t){return function(i,n){t(i,n,e)}};let wD=_D=class extends lt{constructor(e,t,i,n,o,s,r,a,l,d){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=o,this.edits=s,this.onSelectNewEdit=r,this._contextMenuService=a,this._keybindingService=d,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(l),this.visibleContext.set(!0),this._register(rt((()=>this.visibleContext.reset()))),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(rt((()=>this.editor.removeContentWidget(this)))),this._register(this.editor.onDidChangeCursorPosition((e=>{o.containsPosition(e.position)||this.dispose()}))),this._register(_t.runAndSubscribe(d.onDidUpdateKeybindings,(()=>{this._updateButtonTitle()})))}_updateButtonTitle(){var e;const t=null===(e=this._keybindingService.lookupKeybinding(this.showCommand.id))||void 0===e?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=Sr(".post-edit-widget"),this.button=this._register(new nD(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(ws(this.domNode,ur.CLICK,(()=>this.showSelector())))}getId(){return _D.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Rs(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map(((e,t)=>Ed({id:"",label:e.title,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}})))})}};wD.baseId="editor.widget.postEditWidget",wD=_D=vD([bD(7,hD),bD(8,pc),bD(9,uD)],wD);let CD=class extends lt{constructor(e,t,i,n,o,s,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=o,this._bulkEditService=s,this._notificationService=r,this._currentWidget=this._register(new dt),this._register(_t.any(t.onDidChangeModel,t.onDidChangeModelContent)((()=>this.clear())))}async applyEditAndShowIfNeeded(e,t,i,n,o){const s=this._editor.getModel();if(!s||!e.length)return;const r=t.allEdits.at(t.activeEditIndex);if(!r)return;const a=async s=>{const r=this._editor.getModel();r&&(await r.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:s,allEdits:t.allEdits},i,n,o))},l=(n,o)=>{Ne(n)||(this._notificationService.error(o),i&&this.show(e[0],t,a))};let d;try{d=await n(r,o)}catch(e){return l(e,v(0,"Error resolving edit '{0}':\n{1}",r.title,aD(e)))}if(o.isCancellationRequested)return;const c=mx(s.uri,e,d),h=e[0],u=s.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let g,p;this._editor.focus();try{g=await this._bulkEditService.apply(c,{editor:this._editor,token:o}),p=s.getDecorationRange(u[0])}catch(e){return l(e,v(0,"Error applying edit '{0}':\n{1}",r.title,aD(e)))}finally{s.deltaDecorations(u,[])}o.isCancellationRequested||i&&g.isApplied&&t.allEdits.length>1&&this.show(null!=p?p:h,t,a)}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(wD,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;null===(e=this._currentWidget.value)||void 0===e||e.showSelector()}};CD=vD([bD(4,_d),bD(5,Tk),bD(6,fD)],CD);var yD,SD=function(e,t){return function(i,n){t(i,n,e)}};const kD="editor.changePasteType",xD=new gc("pasteWidgetVisible",!1,v(0,"Whether the paste widget is showing")),LD="application/vnd.code.copyMetadata";let DD=yD=class extends lt{static get(e){return e.getContribution(yD.ID)}constructor(e,t,i,n,o,s,r){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=o,this._quickInputService=s,this._progressService=r,this._editor=e;const a=e.getContainerDomNode();this._register(ws(a,"copy",(e=>this.handleCopy(e)))),this._register(ws(a,"cut",(e=>this.handleCopy(e)))),this._register(ws(a,"paste",(e=>this.handlePaste(e)),!0)),this._pasteProgressManager=this._register(new Dx("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(CD,"pasteIntoEditor",e,xD,{id:kD,label:v(0,"Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferred:e},Gs().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}clearWidgets(){this._postPasteWidgetManager.clear()}isPasteAsEnabled(){return this._editor.getOption(85).enabled&&!this._editor.getOption(91)}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){var t,i;if(!this._editor.hasTextFocus())return;if($&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled())return;const n=this._editor.getModel(),o=this._editor.getSelections();if(!n||!(null==o?void 0:o.length))return;const s=this._editor.getOption(37);let r=o;const a=1===o.length&&o[0].isEmpty();if(a){if(!s)return;r=[new hh(r[0].startLineNumber,1,r[0].startLineNumber,1+n.getLineLength(r[0].startLineNumber))]}const l=null===(t=this._editor._getViewModel())||void 0===t?void 0:t.getPlainTextToCopy(o,s,U),d={multicursorText:Array.isArray(l)?l:null,pasteOnNewLine:a,mode:null},c=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter((e=>!!e.prepareDocumentPaste));if(!c.length)return void this.setCopyMetadata(e.clipboardData,{defaultPastePayload:d});const h=Dk(e.clipboardData),u=c.flatMap((e=>{var t;return null!==(t=e.copyMimeTypes)&&void 0!==t?t:[]})),g=_k();this.setCopyMetadata(e.clipboardData,{id:g,providerCopyMimeTypes:u,defaultPastePayload:d});const p=Wt((async e=>{const t=jh(await Promise.all(c.map((async t=>{try{return await t.prepareDocumentPaste(n,r,h,e)}catch(e){return void console.error(e)}}))));t.reverse();for(const e of t)for(const[t,i]of e)h.replace(t,i);return h}));null===(i=yD._currentCopyOperation)||void 0===i||i.dataTransferPromise.cancel(),yD._currentCopyOperation={handle:g,dataTransferPromise:p}}async handlePaste(e){var t,i,n,o;if(!e.clipboardData||!this._editor.hasTextFocus())return;null===(t=RL.get(this._editor))||void 0===t||t.closeMessage(),null===(i=this._currentPasteOperation)||void 0===i||i.cancel(),this._currentPasteOperation=void 0;const s=this._editor.getModel(),r=this._editor.getSelections();if(!(null==r?void 0:r.length)||!s)return;if(!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const a=this.fetchCopyMetadata(e),l=Ik(e.clipboardData);l.delete(LD);const d=[...e.clipboardData.types,...null!==(n=null==a?void 0:a.providerCopyMimeTypes)&&void 0!==n?n:[],Tg.uriList],c=this._languageFeaturesService.documentPasteEditProvider.ordered(s).filter((e=>{var t,i;const n=null===(t=this._pasteAsActionContext)||void 0===t?void 0:t.preferred;return!(n&&e.providedPasteEditKinds&&!this.providerMatchesPreference(e,n))&&(null===(i=e.pasteMimeTypes)||void 0===i?void 0:i.some((e=>Ck(e,d))))}));c.length?(e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferred,c,r,l,a):this.doPasteInline(c,r,l,a,e)):(null===(o=this._pasteAsActionContext)||void 0===o?void 0:o.preferred)&&this.showPasteAsNoEditMessage(r,this._pasteAsActionContext.preferred)}showPasteAsNoEditMessage(e,t){var i;null===(i=RL.get(this._editor))||void 0===i||i.showMessage(v(0,"No paste edits for '{0}' found",t instanceof kk?t.value:t.providerId),e[0].getStartPosition())}doPasteInline(e,t,i,n,o){const s=Wt((async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),d=new Cx(a,3,void 0,r);try{if(await this.mergeInDataFromCopy(i,n,d.token),d.token.isCancellationRequested)return;const s=e.filter((e=>this.isSupportedPasteProvider(e,i)));if(!s.length||1===s.length&&s[0]instanceof Yk)return this.applyDefaultPasteHandler(i,n,d.token,o);const r={triggerKind:EC.Automatic},c=await this.getPasteEdits(s,i,l,t,r,d.token);if(d.token.isCancellationRequested)return;if(1===c.length&&c[0].provider instanceof Yk)return this.applyDefaultPasteHandler(i,n,d.token,o);if(c.length){const e="afterPaste"===a.getOption(85).showPasteSelector;return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:c},e,(async(e,t)=>{var i,n;const o=await(null===(n=(i=e.provider).resolveDocumentPasteEdit)||void 0===n?void 0:n.call(i,e,t));return o&&(e.additionalEdit=o.additionalEdit),e}),d.token)}await this.applyDefaultPasteHandler(i,n,d.token,o)}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(t[0].getEndPosition(),v(0,"Running paste handlers. Click to cancel"),s),this._currentPasteOperation=s}showPasteAsPick(e,t,i,n,o){const s=Wt((async r=>{const a=this._editor;if(!a.hasModel())return;const l=a.getModel(),d=new Cx(a,3,void 0,r);try{if(await this.mergeInDataFromCopy(n,o,d.token),d.token.isCancellationRequested)return;let s=t.filter((t=>this.isSupportedPasteProvider(t,n,e)));e&&(s=s.filter((t=>this.providerMatchesPreference(t,e))));const r={triggerKind:EC.PasteAs,only:e&&e instanceof kk?e:void 0};let a,c=await this.getPasteEdits(s,n,l,i,r,d.token);if(d.token.isCancellationRequested)return;if(e&&(c=c.filter((t=>e instanceof kk?e.contains(t.kind):e.providerId===t.provider.id))),!c.length)return void(r.only&&this.showPasteAsNoEditMessage(i,r.only));if(e)a=c.at(0);else{const e=await this._quickInputService.pick(c.map((e=>{var t;return{label:e.title,description:null===(t=e.kind)||void 0===t?void 0:t.value,edit:e}})),{placeHolder:v(0,"Select Paste Action")});a=null==e?void 0:e.edit}if(!a)return;const h=mx(l.uri,i,a);await this._bulkEditService.apply(h,{editor:this._editor})}finally{d.dispose(),this._currentPasteOperation===s&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:v(0,"Running paste handlers")},(()=>s))}setCopyMetadata(e,t){e.setData(LD,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(LD);if(i)try{return JSON.parse(i)}catch(e){return}const[n,o]=mk.getTextData(e.clipboardData);return o?{defaultPastePayload:{mode:o.mode,multicursorText:null!==(t=o.multicursorText)&&void 0!==t?t:null,pasteOnNewLine:!!o.isFromEmptySelection}}:void 0}async mergeInDataFromCopy(e,t,i){var n;if((null==t?void 0:t.id)&&(null===(n=yD._currentCopyOperation)||void 0===n?void 0:n.handle)===t.id){const t=await yD._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[i,n]of t)e.replace(i,n)}if(!e.has(Tg.uriList)){const t=await this._clipboardService.readResources();if(i.isCancellationRequested)return;t.length&&e.append(Tg.uriList,vk(Sk.create(t)))}}async getPasteEdits(e,t,i,n,o,s){const r=await Vt(Promise.all(e.map((async e=>{var r,a;try{const l=await(null===(r=e.provideDocumentPasteEdits)||void 0===r?void 0:r.call(e,i,n,t,o,s));return null===(a=null==l?void 0:l.edits)||void 0===a?void 0:a.map((t=>({...t,provider:e})))}catch(e){console.error(e)}}))),s);return fx(jh(null!=r?r:[]).flat().filter((e=>!o.only||o.only.contains(e.kind))))}async applyDefaultPasteHandler(e,t,i,n){var o,s,r,a;const l=null!==(o=e.get(Tg.text))&&void 0!==o?o:e.get("text"),d=null!==(s=await(null==l?void 0:l.asString()))&&void 0!==s?s:"";if(i.isCancellationRequested)return;const c={clipboardEvent:n,text:d,pasteOnNewLine:null!==(r=null==t?void 0:t.defaultPastePayload.pasteOnNewLine)&&void 0!==r&&r,multicursorText:null!==(a=null==t?void 0:t.defaultPastePayload.multicursorText)&&void 0!==a?a:null,mode:null};this._editor.trigger("keyboard","paste",c)}isSupportedPasteProvider(e,t,i){var n;return!!(null===(n=e.pasteMimeTypes)||void 0===n?void 0:n.some((e=>t.matches(e))))&&(!i||this.providerMatchesPreference(e,i))}providerMatchesPreference(e,t){return t instanceof kk?!e.providedPasteEditKinds||e.providedPasteEditKinds.some((e=>t.contains(e))):e.id===t.providerId}};DD.ID="editor.contrib.copyPasteActionController",DD=yD=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([SD(1,_d),SD(2,Tk),SD(3,OL),SD(4,Pk),SD(5,KL),SD(6,FL)],DD);const ED="9_cutcopypaste",ND=q||document.queryCommandSupported("cut"),ID=q||document.queryCommandSupported("copy"),TD=void 0!==navigator.clipboard&&!d||document.queryCommandSupported("paste");function MD(e){return e.register(),e}const AD=ND?MD(new Gc({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:q?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Mc.MenubarEditMenu,group:"2_ccp",title:v(0,"Cu&&t"),order:1},{menuId:Mc.EditorContext,group:ED,title:v(0,"Cut"),when:gh.writable,order:1},{menuId:Mc.CommandPalette,group:"",title:v(0,"Cut"),order:1},{menuId:Mc.SimpleEditorContext,group:ED,title:v(0,"Cut"),when:gh.writable,order:1}]})):void 0,RD=ID?MD(new Gc({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:q?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Mc.MenubarEditMenu,group:"2_ccp",title:v(0,"&&Copy"),order:2},{menuId:Mc.EditorContext,group:ED,title:v(0,"Copy"),order:2},{menuId:Mc.CommandPalette,group:"",title:v(0,"Copy"),order:1},{menuId:Mc.SimpleEditorContext,group:ED,title:v(0,"Copy"),order:2}]})):void 0;Pc.appendMenuItem(Mc.MenubarEditMenu,{submenu:Mc.MenubarCopy,title:b(0,"Copy As"),group:"2_ccp",order:3}),Pc.appendMenuItem(Mc.EditorContext,{submenu:Mc.EditorContextCopy,title:b(0,"Copy As"),group:ED,order:3}),Pc.appendMenuItem(Mc.EditorContext,{submenu:Mc.EditorContextShare,title:b(0,"Share"),group:"11_share",order:-1,when:$d.and($d.notEquals("resourceScheme","output"),gh.editorTextFocus)}),Pc.appendMenuItem(Mc.ExplorerContext,{submenu:Mc.ExplorerContextShare,title:b(0,"Share"),group:"11_share",order:-1});const PD=TD?MD(new Gc({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:q?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Mc.MenubarEditMenu,group:"2_ccp",title:v(0,"&&Paste"),order:4},{menuId:Mc.EditorContext,group:ED,title:v(0,"Paste"),when:gh.writable,order:4},{menuId:Mc.CommandPalette,group:"",title:v(0,"Paste"),order:1},{menuId:Mc.SimpleEditorContext,group:ED,title:v(0,"Paste"),when:gh.writable,order:4}]})):void 0;function OD(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(bd).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(37),i=n.getSelection();return i&&i.isEmpty()&&!e||n.getContainerDomNode().ownerDocument.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(Gs().execCommand(t),!0))))}OD(AD,"cut"),OD(RD,"copy"),PD&&(PD.addImplementation(1e4,"code-editor",((e,t)=>{var i,n;const o=e.get(bd),s=e.get(OL),r=o.getFocusedCodeEditor();return!(!r||!r.hasTextFocus())&&(r.getContainerDomNode().ownerDocument.execCommand("paste")?null!==(n=null===(i=DD.get(r))||void 0===i?void 0:i.finishedPaste())&&void 0!==n?n:Promise.resolve():!$||(async()=>{const e=await s.readText();if(""!==e){const t=uk.INSTANCE.get(e);let i=!1,n=null,o=null;t&&(i=r.getOption(37)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,o=t.mode),r.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:o})}})())})),PD.addImplementation(0,"generic-dom",((e,t)=>(Gs().execCommand("paste"),!0)))),ID&&ih(class extends Qc{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v(0,"Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:gh.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(37)&&t.getSelection().isEmpty()||(hk.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),hk.forceCopyWithSyntaxHighlighting=!1))}});const FD={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,renderGutterMenu:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0};class BD{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class WD{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class VD{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return zD(e,t)}compute(e,t,i){return i}}class HD{constructor(e,t){this.newValue=e,this.didChange=t}}function zD(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new HD(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&Wh(e,t);return new HD(t,!i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const o=zD(e[n],t[n]);o.didChange&&(e[n]=o.newValue,i=!0)}return new HD(e,i)}class UD{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return zD(e,t)}validate(e){return this.defaultValue}}class KD{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return zD(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function jD(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class qD extends KD{constructor(e,t,i,n=void 0){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return jD(e,this.defaultValue)}}function $D(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}class GD extends KD{static clampedInt(e,t,i,n){return $D(e,t,i,n)}constructor(e,t,i,n,o,s=void 0){void 0!==s&&(s.type="integer",s.default=i,s.minimum=n,s.maximum=o),super(e,t,i,s),this.minimum=n,this.maximum=o}validate(e){return GD.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function ZD(e,t,i,n){if(void 0===e)return t;const o=YD.float(e,t);return YD.clamp(o,i,n)}class YD extends KD{static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}validate(e){return this.validationFn(YD.float(e,this.defaultValue))}}class QD extends KD{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return QD.string(e,this.defaultValue)}}function XD(e,t,i,n){return"string"!=typeof e?t:n&&e in n?n[e]:-1===i.indexOf(e)?t:e}class JD extends KD{constructor(e,t,i,n,o=void 0){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return XD(e,this.defaultValue,this._allowedValues)}}class eE extends VD{constructor(e,t,i,n,o,s,r=void 0){void 0!==r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var tE,iE;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(tE||(tE={}));class nE extends VD{constructor(){super(51,"fontLigatures",nE.OFF,{anyOf:[{type:"boolean",description:v(0,"Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:v(0,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:v(0,"Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e||0===e.length?nE.OFF:"true"===e?nE.ON:e:Boolean(e)?nE.ON:nE.OFF}}nE.OFF='"liga" off, "calt" off',nE.ON='"liga" on, "calt" on';class oE extends VD{constructor(){super(54,"fontVariations",oE.OFF,{anyOf:[{type:"boolean",description:v(0,"Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:v(0,"Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:v(0,"Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?oE.OFF:"true"===e?oE.TRANSLATE:e:Boolean(e)?oE.TRANSLATE:oE.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}oE.OFF="normal",oE.TRANSLATE="translate";class sE extends VD{constructor(){super(53,"fontWeight",vE.fontWeight,{anyOf:[{type:"number",minimum:sE.MINIMUM_VALUE,maximum:sE.MAXIMUM_VALUE,errorMessage:v(0,'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:sE.SUGGESTION_VALUES}],default:vE.fontWeight,description:v(0,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(GD.clampedInt(e,vE.fontWeight,sE.MINIMUM_VALUE,sE.MAXIMUM_VALUE))}}sE.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],sE.MINIMUM_VALUE=1,sE.MAXIMUM_VALUE=1e3;class rE extends UD{constructor(){super(145)}compute(e,t,i){return rE.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const o=(i+e.viewLineCount+n)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:o,minimapLineCount:Math.floor(e.viewLineCount/o)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const s=t.stableMinimapLayoutInput,r=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.paddingTop===s.paddingTop&&e.paddingBottom===s.paddingBottom&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,c=e.minimap.renderCharacters;let h=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const u=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,f=e.viewLineCount,_=e.remainingWidth,v=e.isViewportWrapping,b=c?2:3;let w=Math.floor(o*n);const C=w/o;let y=!1,S=!1,k=b*h,x=h/o,L=1;if("fill"===g||"fit"===g){const{typicalViewportLineCount:i,extraLinesBeforeFirstLine:s,extraLinesBeyondLastLine:l,desiredRatio:c,minimapLineCount:u}=rE.computeContainedMinimapLineCount({viewLineCount:f,scrollBeyondLastLine:d,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:a,pixelRatio:o});if(f/u>1)y=!0,S=!0,h=1,k=1,x=h/o;else{let n=!1,d=h+1;if("fit"===g){const e=Math.ceil((s+f+l)*k);v&&r&&_<=t.stableFitRemainingWidth?(n=!0,d=t.stableFitMaxMinimapScale):n=e>w}if("fill"===g||n){y=!0;const n=h;k=Math.min(a*o,Math.max(1,Math.floor(1/c))),v&&r&&_<=t.stableFitRemainingWidth&&(d=t.stableFitMaxMinimapScale),h=Math.min(d,Math.max(1,Math.floor(k/b))),h>n&&(L=Math.min(2,h/n)),x=h/o/L,w=Math.ceil(Math.max(i,s+f+l)*k),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const D=Math.floor(u*x),E=Math.min(D,Math.max(0,Math.floor((_-m-2)*x/(l+x)))+8);let N=Math.floor(o*E);const I=N/o;return N=Math.floor(N*L),{renderMinimap:c?1:2,minimapLeft:"left"===p?0:i-E-m,minimapWidth:E,minimapHeightIsEditorHeight:y,minimapIsSampling:S,minimapScale:h,minimapLineHeight:k,minimapCanvasInnerWidth:N,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:I,minimapCanvasOuterHeight:C}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,d=t.viewLineCount,c=e.get(137),h="inherit"===c?e.get(136):c,u="inherit"===h?e.get(132):h,g=e.get(135),p=t.isDominatedByLongLines,m=e.get(57),f=0!==e.get(68).renderType,_=e.get(69),v=e.get(105),b=e.get(84),w=e.get(73),C=e.get(103),y=C.verticalScrollbarSize,S=C.verticalHasArrows,k=C.arrowSize,x=C.horizontalScrollbarSize,L=e.get(43),D="never"!==e.get(110);let E=e.get(66);L&&D&&(E+=16);let N=0;if(f){const e=Math.max(s,_);N=Math.round(e*a)}let I=0;m&&(I=o*t.glyphMarginDecorationLaneCount);let T=0,M=T+I,A=M+N,R=A+E;const P=i-I-N-E;let O=!1,F=!1,B=-1;"inherit"===h&&p?(O=!0,F=!0):"on"===u||"bounded"===u?F=!0:"wordWrapColumn"===u&&(B=g);const W=rE._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:v,paddingTop:b.top,paddingBottom:b.bottom,minimap:w,verticalScrollbarWidth:y,viewLineCount:d,remainingWidth:P,isViewportWrapping:F},t.memory||new WD);0!==W.renderMinimap&&0===W.minimapLeft&&(T+=W.minimapWidth,M+=W.minimapWidth,A+=W.minimapWidth,R+=W.minimapWidth);const V=P-W.minimapWidth,H=Math.max(1,Math.floor((V-y-2)/r)),z=S?k:0;return F&&(B=Math.max(1,H),"bounded"===u&&(B=Math.min(B,g))),{width:i,height:n,glyphMarginLeft:T,glyphMarginWidth:I,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:M,lineNumbersWidth:N,decorationsLeft:A,decorationsWidth:E,contentLeft:R,contentWidth:V,minimap:W,viewportColumn:H,isWordWrapMinified:O,isViewportWrapping:F,wrappingColumn:B,verticalScrollbarWidth:y,horizontalScrollbarHeight:x,overviewRuler:{top:z,width:y,height:n-2*z,right:0}}}}function aE(e){const t=e.get(98);return"editable"===t?e.get(91):"on"!==t}function lE(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}!function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(iE||(iE={}));const dE="inUntrustedWorkspace",cE="editor.unicodeHighlight.allowedCharacters",hE="editor.unicodeHighlight.invisibleCharacters",uE="editor.unicodeHighlight.nonBasicASCII",gE="editor.unicodeHighlight.ambiguousCharacters",pE="editor.unicodeHighlight.includeComments",mE="editor.unicodeHighlight.includeStrings",fE="editor.unicodeHighlight.allowedLocales";function _E(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const vE={fontFamily:K?"Menlo, Monaco, 'Courier New', monospace":j?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:K?12:14,lineHeight:0,letterSpacing:0},bE=[];function wE(e){return bE[e.id]=e,e}const CE={acceptSuggestionOnCommitCharacter:wE(new qD(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:v(0,"Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:wE(new JD(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",v(0,"Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:v(0,"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:wE(new class extends VD{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[v(0,"Use platform APIs to detect when a Screen Reader is attached."),v(0,"Optimize for usage with a Screen Reader."),v(0,"Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:v(0,"Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:wE(new GD(3,"accessibilityPageSize",10,1,1073741824,{description:v(0,"Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:wE(new QD(4,"ariaLabel",v(0,"Editor content"))),ariaRequired:wE(new qD(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:wE(new qD(8,"screenReaderAnnounceInlineSuggestion",!0,{description:v(0,"Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:wE(new JD(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v(0,"Use language configurations to determine when to autoclose brackets."),v(0,"Autoclose brackets only when the cursor is to the left of whitespace."),""],description:v(0,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:wE(new JD(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v(0,"Use language configurations to determine when to autoclose comments."),v(0,"Autoclose comments only when the cursor is to the left of whitespace."),""],description:v(0,"Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:wE(new JD(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",v(0,"Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:v(0,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:wE(new JD(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",v(0,"Type over closing quotes or brackets only if they were automatically inserted."),""],description:v(0,"Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:wE(new JD(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",v(0,"Use language configurations to determine when to autoclose quotes."),v(0,"Autoclose quotes only when the cursor is to the left of whitespace."),""],description:v(0,"Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:wE(new eE(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[v(0,"The editor will not insert indentation automatically."),v(0,"The editor will keep the current line's indentation."),v(0,"The editor will keep the current line's indentation and honor language defined brackets."),v(0,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),v(0,"The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:v(0,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:wE(new qD(13,"automaticLayout",!1)),autoSurround:wE(new JD(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[v(0,"Use language configurations to determine when to automatically surround selections."),v(0,"Surround with quotes but not brackets."),v(0,"Surround with brackets but not quotes."),""],description:v(0,"Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:wE(new class extends VD{constructor(){const e={enabled:Tu.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:Tu.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:v(0,"Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:v(0,"Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:jD(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:jD(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}),bracketPairGuides:wE(new class extends VD{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[v(0,"Enables bracket pair guides."),v(0,"Enables bracket pair guides only for the active bracket pair."),v(0,"Disables bracket pair guides.")],default:e.bracketPairs,description:v(0,"Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[v(0,"Enables horizontal guides as addition to vertical bracket pair guides."),v(0,"Enables horizontal guides only for the active bracket pair."),v(0,"Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:v(0,"Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:v(0,"Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:v(0,"Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[v(0,"Highlights the active indent guide."),v(0,"Highlights the active indent guide even if bracket guides are highlighted."),v(0,"Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:v(0,"Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:_E(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:_E(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:jD(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:jD(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:_E(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}),stickyTabStops:wE(new qD(116,"stickyTabStops",!1,{description:v(0,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:wE(new qD(17,"codeLens",!0,{description:v(0,"Controls whether the editor shows CodeLens.")})),codeLensFontFamily:wE(new QD(18,"codeLensFontFamily","",{description:v(0,"Controls the font family for CodeLens.")})),codeLensFontSize:wE(new GD(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:v(0,"Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:wE(new qD(20,"colorDecorators",!0,{description:v(0,"Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:wE(new JD(148,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[v(0,"Make the color picker appear both on click and hover of the color decorator"),v(0,"Make the color picker appear on hover of the color decorator"),v(0,"Make the color picker appear on click of the color decorator")],description:v(0,"Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:wE(new GD(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:v(0,"Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:wE(new qD(22,"columnSelection",!1,{description:v(0,"Enable that the selection with the mouse and keys is doing column selection.")})),comments:wE(new class extends VD{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:v(0,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:v(0,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:jD(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:jD(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:wE(new qD(24,"contextmenu",!0)),copyWithSyntaxHighlighting:wE(new qD(25,"copyWithSyntaxHighlighting",!0,{description:v(0,"Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:wE(new eE(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:v(0,"Control the cursor animation style.")})),cursorSmoothCaretAnimation:wE(new JD(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[v(0,"Smooth caret animation is disabled."),v(0,"Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),v(0,"Smooth caret animation is always enabled.")],description:v(0,"Controls whether the smooth caret animation should be enabled.")})),cursorStyle:wE(new eE(28,"cursorStyle",tE.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return tE.Line;case"block":return tE.Block;case"underline":return tE.Underline;case"line-thin":return tE.LineThin;case"block-outline":return tE.BlockOutline;case"underline-thin":return tE.UnderlineThin}}),{description:v(0,"Controls the cursor style.")})),cursorSurroundingLines:wE(new GD(29,"cursorSurroundingLines",0,0,1073741824,{description:v(0,"Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:wE(new JD(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[v(0,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),v(0,"`cursorSurroundingLines` is enforced always.")],markdownDescription:v(0,"Controls when `#editor.cursorSurroundingLines#` should be enforced.")})),cursorWidth:wE(new GD(31,"cursorWidth",0,0,1073741824,{markdownDescription:v(0,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:wE(new qD(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:wE(new qD(33,"disableMonospaceOptimizations",!1)),domReadOnly:wE(new qD(34,"domReadOnly",!1)),dragAndDrop:wE(new qD(35,"dragAndDrop",!0,{description:v(0,"Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:wE(new class extends qD{constructor(){super(37,"emptySelectionClipboard",!0,{description:v(0,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),dropIntoEditor:wE(new class extends VD{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:v(0,"Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:v(0,"Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[v(0,"Show the drop selector widget after a file is dropped into the editor."),v(0,"Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:jD(t.enabled,this.defaultValue.enabled),showDropSelector:XD(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}),stickyScroll:wE(new class extends VD{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(115,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:v(0,"Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:v(0,"Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:v(0,"Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:v(0,"Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:jD(t.enabled,this.defaultValue.enabled),maxLineCount:GD.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:XD(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:jD(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}),experimentalWhitespaceRendering:wE(new JD(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[v(0,"Use a new rendering method with svgs."),v(0,"Use a new rendering method with font characters."),v(0,"Use the stable rendering method.")],description:v(0,"Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:wE(new QD(39,"extraEditorClassName","")),fastScrollSensitivity:wE(new YD(40,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:v(0,"Scrolling speed multiplier when pressing `Alt`.")})),find:wE(new class extends VD{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:v(0,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[v(0,"Never seed search string from the editor selection."),v(0,"Always seed search string from the editor selection, including word at cursor position."),v(0,"Only seed search string from the editor selection.")],description:v(0,"Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[v(0,"Never turn on Find in Selection automatically (default)."),v(0,"Always turn on Find in Selection automatically."),v(0,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:v(0,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:v(0,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:K},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:v(0,"Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:v(0,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:jD(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":XD(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":XD(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:jD(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:jD(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:jD(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:wE(new qD(42,"fixedOverflowWidgets",!1)),folding:wE(new qD(43,"folding",!0,{description:v(0,"Controls whether the editor has code folding enabled.")})),foldingStrategy:wE(new JD(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[v(0,"Use a language-specific folding strategy if available, else the indentation-based one."),v(0,"Use the indentation-based folding strategy.")],description:v(0,"Controls the strategy for computing folding ranges.")})),foldingHighlight:wE(new qD(45,"foldingHighlight",!0,{description:v(0,"Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:wE(new qD(46,"foldingImportsByDefault",!1,{description:v(0,"Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:wE(new GD(47,"foldingMaximumRegions",5e3,10,65e3,{description:v(0,"The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:wE(new qD(48,"unfoldOnClickAfterEndOfLine",!1,{description:v(0,"Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:wE(new QD(49,"fontFamily",vE.fontFamily,{description:v(0,"Controls the font family.")})),fontInfo:wE(new class extends UD{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:wE(new nE),fontSize:wE(new class extends KD{constructor(){super(52,"fontSize",vE.fontSize,{type:"number",minimum:6,maximum:100,default:vE.fontSize,description:v(0,"Controls the font size in pixels.")})}validate(e){const t=YD.float(e,this.defaultValue);return 0===t?vE.fontSize:YD.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:wE(new sE),fontVariations:wE(new oE),formatOnPaste:wE(new qD(55,"formatOnPaste",!1,{description:v(0,"Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:wE(new qD(56,"formatOnType",!1,{description:v(0,"Controls whether the editor should automatically format the line after typing.")})),glyphMargin:wE(new qD(57,"glyphMargin",!0,{description:v(0,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:wE(new class extends VD{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[v(0,"Show Peek view of the results (default)"),v(0,"Go to the primary result and show a Peek view"),v(0,"Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:v(0,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:v(0,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:v(0,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:v(0,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:v(0,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:v(0,"Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:v(0,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:v(0,"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:v(0,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:v(0,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:v(0,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,s;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:XD(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:XD(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:XD(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:XD(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:XD(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:XD(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:QD.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:QD.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:QD.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:QD.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:QD.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:wE(new qD(59,"hideCursorInOverviewRuler",!1,{description:v(0,"Controls whether the cursor should be hidden in the overview ruler.")})),hover:wE(new class extends VD{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:v(0,"Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:v(0,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:v(0,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:v(0,"Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:v(0,"Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:jD(t.enabled,this.defaultValue.enabled),delay:GD.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:jD(t.sticky,this.defaultValue.sticky),hidingDelay:GD.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:jD(t.above,this.defaultValue.above)}}}),inDiffEditor:wE(new qD(61,"inDiffEditor",!1)),letterSpacing:wE(new YD(64,"letterSpacing",vE.letterSpacing,(e=>YD.clamp(e,-5,20)),{description:v(0,"Controls the letter spacing in pixels.")})),lightbulb:wE(new class extends VD{constructor(){const e={enabled:iE.On};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[iE.Off,iE.OnCode,iE.On],default:e.enabled,enumDescriptions:[v(0,"Disable the code action menu."),v(0,"Show the code action menu when the cursor is on lines with code."),v(0,"Show the code action menu when the cursor is on lines with code or on empty lines.")],description:v(0,"Enables the Code Action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:XD(e.enabled,this.defaultValue.enabled,[iE.Off,iE.OnCode,iE.On])}:this.defaultValue}}),lineDecorationsWidth:wE(new class extends VD{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return"string"==typeof e&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):GD.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?GD.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}),lineHeight:wE(new class extends YD{constructor(){super(67,"lineHeight",vE.lineHeight,(e=>YD.clamp(e,0,150)),{markdownDescription:v(0,"Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:wE(new class extends VD{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[v(0,"Line numbers are not rendered."),v(0,"Line numbers are rendered as absolute number."),v(0,"Line numbers are rendered as distance in lines to cursor position."),v(0,"Line numbers are rendered every 10 lines.")],default:"on",description:v(0,"Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:wE(new GD(69,"lineNumbersMinChars",5,1,300)),linkedEditing:wE(new qD(70,"linkedEditing",!1,{description:v(0,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:wE(new qD(71,"links",!0,{description:v(0,"Controls whether the editor should detect links and make them clickable.")})),matchBrackets:wE(new JD(72,"matchBrackets","always",["always","near","never"],{description:v(0,"Highlight matching brackets.")})),minimap:wE(new class extends VD{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1,showRegionSectionHeaders:!0,showMarkSectionHeaders:!0,sectionHeaderFontSize:9,sectionHeaderLetterSpacing:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:v(0,"Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:v(0,"Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[v(0,"The minimap has the same size as the editor contents (and might scroll)."),v(0,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),v(0,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:v(0,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:v(0,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:v(0,"Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:v(0,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:v(0,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:v(0,"Limit the width of the minimap to render at most a certain number of columns.")},"editor.minimap.showRegionSectionHeaders":{type:"boolean",default:e.showRegionSectionHeaders,description:v(0,"Controls whether named regions are shown as section headers in the minimap.")},"editor.minimap.showMarkSectionHeaders":{type:"boolean",default:e.showMarkSectionHeaders,description:v(0,"Controls whether MARK: comments are shown as section headers in the minimap.")},"editor.minimap.sectionHeaderFontSize":{type:"number",default:e.sectionHeaderFontSize,description:v(0,"Controls the font size of section headers in the minimap.")},"editor.minimap.sectionHeaderLetterSpacing":{type:"number",default:e.sectionHeaderLetterSpacing,description:v(0,"Controls the amount of space (in pixels) between characters of section header. This helps the readability of the header in small font sizes.")}})}validate(e){var t,i;if(!e||"object"!=typeof e)return this.defaultValue;const n=e;return{enabled:jD(n.enabled,this.defaultValue.enabled),autohide:jD(n.autohide,this.defaultValue.autohide),size:XD(n.size,this.defaultValue.size,["proportional","fill","fit"]),side:XD(n.side,this.defaultValue.side,["right","left"]),showSlider:XD(n.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:jD(n.renderCharacters,this.defaultValue.renderCharacters),scale:GD.clampedInt(n.scale,1,1,3),maxColumn:GD.clampedInt(n.maxColumn,this.defaultValue.maxColumn,1,1e4),showRegionSectionHeaders:jD(n.showRegionSectionHeaders,this.defaultValue.showRegionSectionHeaders),showMarkSectionHeaders:jD(n.showMarkSectionHeaders,this.defaultValue.showMarkSectionHeaders),sectionHeaderFontSize:YD.clamp(null!==(t=n.sectionHeaderFontSize)&&void 0!==t?t:this.defaultValue.sectionHeaderFontSize,4,32),sectionHeaderLetterSpacing:YD.clamp(null!==(i=n.sectionHeaderLetterSpacing)&&void 0!==i?i:this.defaultValue.sectionHeaderLetterSpacing,0,5)}}}),mouseStyle:wE(new JD(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:wE(new YD(75,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:v(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:wE(new qD(76,"mouseWheelZoom",!1,{markdownDescription:v(0,K?"Zoom the font of the editor when using mouse wheel and holding `Cmd`.":"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:wE(new qD(77,"multiCursorMergeOverlapping",!0,{description:v(0,"Merge multiple cursors when they are overlapping.")})),multiCursorModifier:wE(new eE(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?K?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[v(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),v(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:v(0,"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:wE(new JD(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[v(0,"Each cursor pastes a single line of the text."),v(0,"Each cursor pastes the full text.")],markdownDescription:v(0,"Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:wE(new GD(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:v(0,"Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:wE(new JD(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[v(0,"Does not highlight occurrences."),v(0,"Highlights occurrences only in the current file."),v(0,"Experimental: Highlights occurrences across all valid open files.")],markdownDescription:v(0,"Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:wE(new qD(82,"overviewRulerBorder",!0,{description:v(0,"Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:wE(new GD(83,"overviewRulerLanes",3,0,3)),padding:wE(new class extends VD{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:v(0,"Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:v(0,"Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:GD.clampedInt(t.top,0,0,1e3),bottom:GD.clampedInt(t.bottom,0,0,1e3)}}}),pasteAs:wE(new class extends VD{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:v(0,"Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:v(0,"Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[v(0,"Show the paste selector widget after content is pasted into the editor."),v(0,"Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:jD(t.enabled,this.defaultValue.enabled),showPasteSelector:XD(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}),parameterHints:wE(new class extends VD{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:v(0,"Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:v(0,"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:jD(t.enabled,this.defaultValue.enabled),cycle:jD(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:wE(new JD(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[v(0,"Focus the tree when opening peek"),v(0,"Focus the editor when opening peek")],description:v(0,"Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:wE(new qD(88,"definitionLinkOpensInPeek",!1,{description:v(0,"Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:wE(new class extends VD{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[v(0,"Quick suggestions show inside the suggest widget"),v(0,"Quick suggestions show as ghost text"),v(0,"Quick suggestions are disabled")]}];super(89,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:v(0,"Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:v(0,"Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:v(0,"Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:v(0,"Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if("boolean"==typeof e){const t=e?"on":"off";return{comments:t,strings:t,other:t}}if(!e||"object"!=typeof e)return this.defaultValue;const{other:t,comments:i,strings:n}=e,o=["on","inline","off"];let s,r,a;return s="boolean"==typeof t?t?"on":"off":XD(t,this.defaultValue.other,o),r="boolean"==typeof i?i?"on":"off":XD(i,this.defaultValue.comments,o),a="boolean"==typeof n?n?"on":"off":XD(n,this.defaultValue.strings,o),{other:s,comments:r,strings:a}}}),quickSuggestionsDelay:wE(new GD(90,"quickSuggestionsDelay",10,0,1073741824,{description:v(0,"Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:wE(new qD(91,"readOnly",!1)),readOnlyMessage:wE(new class extends VD{constructor(){super(92,"readOnlyMessage",void 0)}validate(e){return e&&"object"==typeof e?e:this.defaultValue}}),renameOnType:wE(new qD(93,"renameOnType",!1,{description:v(0,"Controls whether the editor auto renames on type."),markdownDeprecationMessage:v(0,"Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:wE(new qD(94,"renderControlCharacters",!0,{description:v(0,"Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:wE(new JD(95,"renderFinalNewline",j?"dimmed":"on",["off","on","dimmed"],{description:v(0,"Render last line number when the file ends with a newline.")})),renderLineHighlight:wE(new JD(96,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",v(0,"Highlights both the gutter and the current line.")],description:v(0,"Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:wE(new qD(97,"renderLineHighlightOnlyWhenFocus",!1,{description:v(0,"Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:wE(new JD(98,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:wE(new JD(99,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",v(0,"Render whitespace characters except for single spaces between words."),v(0,"Render whitespace characters only on selected text."),v(0,"Render only trailing whitespace characters."),""],description:v(0,"Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:wE(new GD(100,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:wE(new qD(101,"roundedSelection",!0,{description:v(0,"Controls whether selections should have rounded corners.")})),rulers:wE(new class extends VD{constructor(){const e=[],t={type:"number",description:v(0,"Number of monospace characters at which this editor ruler will render.")};super(102,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:v(0,"Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:v(0,"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if("number"==typeof i)t.push({column:GD.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:GD.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:wE(new class extends VD{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(103,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[v(0,"The vertical scrollbar will be visible only when necessary."),v(0,"The vertical scrollbar will always be visible."),v(0,"The vertical scrollbar will always be hidden.")],default:"auto",description:v(0,"Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[v(0,"The horizontal scrollbar will be visible only when necessary."),v(0,"The horizontal scrollbar will always be visible."),v(0,"The horizontal scrollbar will always be hidden.")],default:"auto",description:v(0,"Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:v(0,"The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:v(0,"The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:v(0,"Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:v(0,"When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=GD.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=GD.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:GD.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:lE(t.vertical,this.defaultValue.vertical),horizontal:lE(t.horizontal,this.defaultValue.horizontal),useShadows:jD(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:jD(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:jD(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:jD(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:jD(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:GD.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:GD.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:jD(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:jD(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}}),scrollBeyondLastColumn:wE(new GD(104,"scrollBeyondLastColumn",4,0,1073741824,{description:v(0,"Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:wE(new qD(105,"scrollBeyondLastLine",!0,{description:v(0,"Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:wE(new qD(106,"scrollPredominantAxis",!0,{description:v(0,"Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:wE(new qD(107,"selectionClipboard",!0,{description:v(0,"Controls whether the Linux primary clipboard should be supported."),included:j})),selectionHighlight:wE(new qD(108,"selectionHighlight",!0,{description:v(0,"Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:wE(new qD(109,"selectOnLineNumbers",!0)),showFoldingControls:wE(new JD(110,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[v(0,"Always show the folding controls."),v(0,"Never show the folding controls and reduce the gutter size."),v(0,"Only show the folding controls when the mouse is over the gutter.")],description:v(0,"Controls when the folding controls on the gutter are shown.")})),showUnused:wE(new qD(111,"showUnused",!0,{description:v(0,"Controls fading out of unused code.")})),showDeprecated:wE(new qD(140,"showDeprecated",!0,{description:v(0,"Controls strikethrough deprecated variables.")})),inlayHints:wE(new class extends VD{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(141,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:v(0,"Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[v(0,"Inlay hints are enabled"),v(0,"Inlay hints are showing by default and hide when holding {0}",K?"Ctrl+Option":"Ctrl+Alt"),v(0,"Inlay hints are hidden by default and show when holding {0}",K?"Ctrl+Option":"Ctrl+Alt"),v(0,"Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:v(0,"Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:v(0,"Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:v(0,"Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return"boolean"==typeof t.enabled&&(t.enabled=t.enabled?"on":"off"),{enabled:XD(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:GD.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:QD.string(t.fontFamily,this.defaultValue.fontFamily),padding:jD(t.padding,this.defaultValue.padding)}}}),snippetSuggestions:wE(new JD(112,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[v(0,"Show snippet suggestions on top of other suggestions."),v(0,"Show snippet suggestions below other suggestions."),v(0,"Show snippets suggestions with other suggestions."),v(0,"Do not show snippet suggestions.")],description:v(0,"Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:wE(new class extends VD{constructor(){super(113,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:v(0,"Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:v(0,"Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:jD(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:jD(e.selectSubwords,this.defaultValue.selectSubwords)}:this.defaultValue}}),smoothScrolling:wE(new qD(114,"smoothScrolling",!1,{description:v(0,"Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:wE(new GD(117,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:wE(new class extends VD{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(118,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[v(0,"Insert suggestion without overwriting text right of the cursor."),v(0,"Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:v(0,"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:v(0,"Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:v(0,"Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:v(0,"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[v(0,"Always select a suggestion when automatically triggering IntelliSense."),v(0,"Never select a suggestion when automatically triggering IntelliSense."),v(0,"Select a suggestion only when triggering IntelliSense from a trigger character."),v(0,"Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:v(0,"Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:v(0,"Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:v(0,"Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:v(0,"Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:v(0,"Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:v(0,"Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:v(0,"This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:v(0,"This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:v(0,"When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:XD(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:jD(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:jD(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:jD(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:jD(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:XD(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:jD(t.showIcons,this.defaultValue.showIcons),showStatusBar:jD(t.showStatusBar,this.defaultValue.showStatusBar),preview:jD(t.preview,this.defaultValue.preview),previewMode:XD(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:jD(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:jD(t.showMethods,this.defaultValue.showMethods),showFunctions:jD(t.showFunctions,this.defaultValue.showFunctions),showConstructors:jD(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:jD(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:jD(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:jD(t.showFields,this.defaultValue.showFields),showVariables:jD(t.showVariables,this.defaultValue.showVariables),showClasses:jD(t.showClasses,this.defaultValue.showClasses),showStructs:jD(t.showStructs,this.defaultValue.showStructs),showInterfaces:jD(t.showInterfaces,this.defaultValue.showInterfaces),showModules:jD(t.showModules,this.defaultValue.showModules),showProperties:jD(t.showProperties,this.defaultValue.showProperties),showEvents:jD(t.showEvents,this.defaultValue.showEvents),showOperators:jD(t.showOperators,this.defaultValue.showOperators),showUnits:jD(t.showUnits,this.defaultValue.showUnits),showValues:jD(t.showValues,this.defaultValue.showValues),showConstants:jD(t.showConstants,this.defaultValue.showConstants),showEnums:jD(t.showEnums,this.defaultValue.showEnums),showEnumMembers:jD(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:jD(t.showKeywords,this.defaultValue.showKeywords),showWords:jD(t.showWords,this.defaultValue.showWords),showColors:jD(t.showColors,this.defaultValue.showColors),showFiles:jD(t.showFiles,this.defaultValue.showFiles),showReferences:jD(t.showReferences,this.defaultValue.showReferences),showFolders:jD(t.showFolders,this.defaultValue.showFolders),showTypeParameters:jD(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:jD(t.showSnippets,this.defaultValue.showSnippets),showUsers:jD(t.showUsers,this.defaultValue.showUsers),showIssues:jD(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:wE(new class extends VD{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:v(0,"Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[v(0,"Show the inline suggestion toolbar whenever an inline suggestion is shown."),v(0,"Show the inline suggestion toolbar when hovering over an inline suggestion."),v(0,"Never show the inline suggestion toolbar.")],description:v(0,"Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:v(0,"Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:v(0,"Controls the font family of the inline suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:jD(t.enabled,this.defaultValue.enabled),mode:XD(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:XD(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:jD(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:jD(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:QD.string(t.fontFamily,this.defaultValue.fontFamily)}}}),inlineEdit:wE(new class extends VD{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1,backgroundColoring:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:v(0,"Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[v(0,"Show the inline edit toolbar whenever an inline suggestion is shown."),v(0,"Show the inline edit toolbar when hovering over an inline suggestion."),v(0,"Never show the inline edit toolbar.")],description:v(0,"Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:v(0,"Controls the font family of the inline edit.")},"editor.experimentalInlineEdit.backgroundColoring":{type:"boolean",default:e.backgroundColoring,description:v(0,"Controls whether to color the background of inline edits.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:jD(t.enabled,this.defaultValue.enabled),showToolbar:XD(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:QD.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:jD(t.keepOnBlur,this.defaultValue.keepOnBlur),backgroundColoring:jD(t.backgroundColoring,this.defaultValue.backgroundColoring)}}}),inlineCompletionsAccessibilityVerbose:wE(new qD(149,"inlineCompletionsAccessibilityVerbose",!1,{description:v(0,"Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:wE(new GD(119,"suggestFontSize",0,0,1e3,{markdownDescription:v(0,"Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:wE(new GD(120,"suggestLineHeight",0,0,1e3,{markdownDescription:v(0,"Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:wE(new qD(121,"suggestOnTriggerCharacters",!0,{description:v(0,"Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:wE(new JD(122,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[v(0,"Always select the first suggestion."),v(0,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),v(0,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:v(0,"Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:wE(new JD(123,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[v(0,"Tab complete will insert the best matching suggestion when pressing tab."),v(0,"Disable tab completions."),v(0,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:v(0,"Enables tab completions.")})),tabIndex:wE(new GD(124,"tabIndex",0,-1,1073741824)),unicodeHighlight:wE(new class extends VD{constructor(){const e={nonBasicASCII:dE,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:dE,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(125,"unicodeHighlight",e,{[uE]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,dE],default:e.nonBasicASCII,description:v(0,"Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[hE]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:v(0,"Controls whether characters that just reserve space or have no width at all are highlighted.")},[gE]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:v(0,"Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[pE]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,dE],default:e.includeComments,description:v(0,"Controls whether characters in comments should also be subject to Unicode highlighting.")},[mE]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,dE],default:e.includeStrings,description:v(0,"Controls whether characters in strings should also be subject to Unicode highlighting.")},[cE]:{restricted:!0,type:"object",default:e.allowedCharacters,description:v(0,"Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[fE]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:v(0,"Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(Lh(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(Lh(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new HD(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:_E(t.nonBasicASCII,dE,[!0,!1,dE]),invisibleCharacters:jD(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:jD(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:_E(t.includeComments,dE,[!0,!1,dE]),includeStrings:_E(t.includeStrings,dE,[!0,!1,dE]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:wE(new JD(126,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[v(0,"Unusual line terminators are automatically removed."),v(0,"Unusual line terminators are ignored."),v(0,"Unusual line terminators prompt to be removed.")],description:v(0,"Remove unusual line terminators that might cause problems.")})),useShadowDOM:wE(new qD(127,"useShadowDOM",!0)),useTabStops:wE(new qD(128,"useTabStops",!0,{description:v(0,"Spaces and tabs are inserted and deleted in alignment with tab stops.")})),wordBreak:wE(new JD(129,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[v(0,"Use the default line break rule."),v(0,"Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:v(0,"Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSegmenterLocales:wE(new class extends VD{constructor(){super(130,"wordSegmenterLocales",[],{anyOf:[{description:v(0,"Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"string"},{description:v(0,"Locales to be used for word segmentation when doing word related navigations or operations. Specify the BCP 47 language tag of the word you wish to recognize (e.g., ja, zh-CN, zh-Hant-TW, etc.)."),type:"array",items:{type:"string"}}]})}validate(e){if("string"==typeof e&&(e=[e]),Array.isArray(e)){const t=[];for(const i of e)if("string"==typeof i)try{Intl.Segmenter.supportedLocalesOf(i).length>0&&t.push(i)}catch(e){}return t}return this.defaultValue}}),wordSeparators:wE(new QD(131,"wordSeparators",Au,{description:v(0,"Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:wE(new JD(132,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[v(0,"Lines will never wrap."),v(0,"Lines will wrap at the viewport width."),v(0,"Lines will wrap at `#editor.wordWrapColumn#`."),v(0,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:v(0,"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:wE(new QD(133,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:wE(new QD(134,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:wE(new GD(135,"wordWrapColumn",80,1,1073741824,{markdownDescription:v(0,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:wE(new JD(136,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:wE(new JD(137,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:wE(new class extends UD{constructor(){super(142)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(74)?n.push("mouse-default"):"copy"===t.get(74)&&n.push("mouse-copy"),t.get(111)&&n.push("showUnused"),t.get(140)&&n.push("showDeprecated"),n.join(" ")}}),defaultColorDecorators:wE(new qD(147,"defaultColorDecorators",!1,{markdownDescription:v(0,"Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:wE(new class extends UD{constructor(){super(143)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:wE(new qD(144,"tabFocusMode",!1,{markdownDescription:v(0,"Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:wE(new rE),wrappingInfo:wE(new class extends UD{constructor(){super(146)}compute(e,t,i){const n=t.get(145);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}),wrappingIndent:wE(new class extends VD{constructor(){super(138,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[v(0,"No indentation. Wrapped lines begin at column 1."),v(0,"Wrapped lines get the same indentation as the parent."),v(0,"Wrapped lines get +1 indentation toward the parent."),v(0,"Wrapped lines get +2 indentation toward the parent.")],description:v(0,"Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return 2===t.get(2)?0:i}}),wrappingStrategy:wE(new class extends VD{constructor(){super(139,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[v(0,"Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),v(0,"Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:v(0,"Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return XD(e,"simple",["simple","advanced"])}compute(e,t,i){return 2===t.get(2)?"advanced":i}})},yE=Object.freeze({id:"editor",order:5,type:"object",title:v(0,"Editor"),scope:5}),SE={...yE,properties:{"editor.tabSize":{type:"number",default:Tu.tabSize,minimum:1,markdownDescription:v(0,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:v(0,'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.')},"editor.insertSpaces":{type:"boolean",default:Tu.insertSpaces,markdownDescription:v(0,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:Tu.detectIndentation,markdownDescription:v(0,"Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:Tu.trimAutoWhitespace,description:v(0,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Tu.largeFileOptimizations,description:v(0,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[v(0,"Turn off Word Based Suggestions."),v(0,"Only suggest words from the active document."),v(0,"Suggest words from all open documents of the same language."),v(0,"Suggest words from all open documents.")],description:v(0,"Controls whether completions should be computed based on words in the document and from which documents they are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[v(0,"Semantic highlighting enabled for all color themes."),v(0,"Semantic highlighting disabled for all color themes."),v(0,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:v(0,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:v(0,"Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:v(0,"Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:v(0,"Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:v(0,"Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:v(0,"Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:v(0,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:v(0,"The opening bracket character or string sequence.")},{type:"string",description:v(0,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:v(0,"Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:v(0,"The opening bracket character or string sequence.")},{type:"string",description:v(0,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:FD.maxComputationTime,description:v(0,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:FD.maxFileSize,description:v(0,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:FD.renderSideBySide,description:v(0,"Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:FD.renderSideBySideInlineBreakpoint,description:v(0,"If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:FD.useInlineViewWhenSpaceIsLimited,description:v(0,"If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:FD.renderMarginRevertIcon,description:v(0,"When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.renderGutterMenu":{type:"boolean",default:FD.renderGutterMenu,description:v(0,"When enabled, the diff editor shows a special gutter for revert and stage actions.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:FD.ignoreTrimWhitespace,description:v(0,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:FD.renderIndicators,description:v(0,"Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:FD.diffCodeLens,description:v(0,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:FD.diffWordWrap,markdownEnumDescriptions:[v(0,"Lines will never wrap."),v(0,"Lines will wrap at the viewport width."),v(0,"Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:FD.diffAlgorithm,markdownEnumDescriptions:[v(0,"Uses the legacy diffing algorithm."),v(0,"Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:FD.hideUnchangedRegions.enabled,markdownDescription:v(0,"Controls whether the diff editor shows unchanged regions.")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:FD.hideUnchangedRegions.revealLineCount,markdownDescription:v(0,"Controls how many lines are used for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:FD.hideUnchangedRegions.minimumLineCount,markdownDescription:v(0,"Controls how many lines are used as a minimum for unchanged regions."),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:FD.hideUnchangedRegions.contextLineCount,markdownDescription:v(0,"Controls how many lines are used as context when comparing unchanged regions."),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:FD.experimental.showMoves,markdownDescription:v(0,"Controls whether the diff editor should show detected code moves.")},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:FD.experimental.showEmptyDecorations,description:v(0,"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}};for(const e of bE){const t=e.schema;if(void 0!==t)if(void 0!==(kE=t).type||void 0!==kE.anyOf)SE.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(SE.properties[e]=t[e])}var kE;let xE=null;function LE(){return null===xE&&(xE=Object.create(null),Object.keys(SE.properties).forEach((e=>{xE[e]=!0}))),xE}xc.as(Rg).registerConfiguration(SE);const DE=new class{constructor(){this.QuickFix=new kk("quickfix"),this.Refactor=new kk("refactor"),this.RefactorExtract=this.Refactor.append("extract"),this.RefactorInline=this.Refactor.append("inline"),this.RefactorMove=this.Refactor.append("move"),this.RefactorRewrite=this.Refactor.append("rewrite"),this.Notebook=new kk("notebook"),this.Source=new kk("source"),this.SourceOrganizeImports=this.Source.append("organizeImports"),this.SourceFixAll=this.Source.append("fixAll"),this.SurroundWith=this.Refactor.append("surround")}};var EE;function NE(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}!function(e){e.Refactor="refactor",e.RefactorPreview="refactor preview",e.Lightbulb="lightbulb",e.Default="other (default)",e.SourceAction="source action",e.QuickFix="quick fix action",e.FixAll="fix all",e.OrganizeImports="organize imports",e.AutoFix="auto fix",e.QuickFixHover="quick fix hover window",e.OnSave="save participants",e.ProblemsView="problems view"}(EE||(EE={}));class IE{static fromUser(e,t){return e&&"object"==typeof e?new IE(IE.getKindFromUser(e,t.kind),IE.getApplyFromUser(e,t.apply),IE.getPreferredUser(e)):new IE(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new kk(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}}class TE{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){var t;if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=await this.provider.resolveCodeAction(this.action,e)}catch(e){Le(e)}t&&(this.action.edit=t.edit)}return this}}const ME="editor.action.codeAction",AE="editor.action.quickFix",RE="editor.action.autoFix",PE="editor.action.refactor",OE="editor.action.sourceAction",FE="editor.action.organizeImports",BE="editor.action.fixAll";class WE extends lt{static codeActionsPreferredComparator(e,t){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:0}static codeActionsComparator({action:e},{action:t}){return e.isAI&&!t.isAI?1:!e.isAI&&t.isAI?-1:Gh(e.diagnostics)?Gh(t.diagnostics)?WE.codeActionsPreferredComparator(e,t):-1:Gh(t.diagnostics)?1:WE.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(WE.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&DE.QuickFix.contains(new kk(e.kind))&&!!e.isPreferred))}get hasAIFix(){return this.validActions.some((({action:e})=>!!e.isAI))}get allAIFixes(){return this.validActions.every((({action:e})=>!!e.isAI))}}const VE={actions:[],documentation:void 0};async function HE(e,t,i,n,o,s){var r;const a=n.filter||{},l={...a,excludes:[...a.excludes||[],DE.Notebook]},d={only:null===(r=a.include)||void 0===r?void 0:r.value,trigger:n.type},c=new yx(t,s),h=2===n.type,u=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>function(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>NE(t,i,e.include)))||!e.includeSourceActions&&DE.Source.contains(t))}(i,new kk(e))))))}(e,t,h?l:a),g=new at,p=u.map((async e=>{try{o.report(e);const n=await e.provideCodeActions(t,i,d,c.token);if(n&&g.add(n),c.token.isCancellationRequested)return VE;const s=((null==n?void 0:n.actions)||[]).filter((e=>e&&function(e,t){const i=t.kind?new kk(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>NE(i,t,e.include)))||!e.includeSourceActions&&i&&DE.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}(a,e))),r=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new kk(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new kk(e.kind)))return t.command}(e,s,a.include);return{actions:s.map((t=>new TE(t,e))),documentation:r}}catch(e){if(Ne(e))throw e;return Le(e),VE}})),m=e.onDidChange((()=>{Wh(e.all(t),u)||c.cancel()}));try{const i=await Promise.all(p),o=i.map((e=>e.actions)).flat(),s=[...jh(i.map((e=>e.documentation))),...zE(e,t,n,o)];return new WE(o,s,g)}finally{m.dispose(),c.dispose()}}function*zE(e,t,i,n){var o,s,r;if(t&&n.length)for(const a of e.all(t))a._getAdditionalMenuItems&&(yield*null===(o=a._getAdditionalMenuItems)||void 0===o?void 0:o.call(a,{trigger:i.type,only:null===(r=null===(s=i.filter)||void 0===s?void 0:s.include)||void 0===r?void 0:r.value},n.map((e=>e.action))))}var UE;async function KE(e,t,i,n,o=At.None){var s;const r=e.get(Tk),a=e.get(Nd),l=e.get(Vc),d=e.get(fD);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred,reason:i}),await t.resolve(o),!o.isCancellationRequested){if((null===(s=t.action.edit)||void 0===s?void 0:s.edits.length)&&!(await r.apply(t.action.edit,{editor:null==n?void 0:n.editor,label:t.action.title,quotableLabel:t.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:i!==UE.OnSave,showPreview:null==n?void 0:n.preview})).isApplied)return;if(t.action.command)try{await a.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);d.error("string"==typeof t?t:v(0,"An unknown error occurred while applying the code action"))}}}!function(e){e.OnSave="onSave",e.FromProblemsView="fromProblemsView",e.FromCodeActions="fromCodeActions",e.FromAILightbulb="fromAILightbulb"}(UE||(UE={})),Id.registerCommand("_executeCodeActionProvider",(async function(e,t,i,n,o){if(!(t instanceof Po))throw Te();const{codeActionProvider:s}=e.get(Pk),r=e.get(Cd).getModel(t);if(!r)throw Te();const a=uh.isISelection(i)?uh.liftSelection(i):hh.isIRange(i)?r.validateRange(i):void 0;if(!a)throw Te();const l="string"==typeof n?new kk(n):void 0,d=await HE(s,r,a,{type:1,triggerAction:EE.Default,filter:{includeSourceActions:!0,include:l}},BL.None,At.None),c=[],h=Math.min(d.validActions.length,"number"==typeof o?o:0);for(let e=0;ee.action))}finally{setTimeout((()=>d.dispose()),100)}}));var jE;let qE=jE=class{constructor(e){this.keybindingService=e}getResolver(){const e=new sn((()=>this.keybindingService.getKeybindings().filter((e=>jE.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===FE?t={kind:DE.SourceOrganizeImports.value}:e.command===BE&&(t={kind:DE.SourceFixAll.value}),{resolvedKeybinding:e.resolvedKeybinding,...IE.fromUser(t,{kind:kk.None,apply:"never"})}}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new kk(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}};qE.codeActionCommands=[PE,ME,OE,FE,BE],qE=jE=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,uD)],qE);var $E=i(6938),GE={};GE.styleTagTransform=Gr(),GE.setAttributes=Kr(),GE.insert=zr().bind(null,"head"),GE.domAPI=Vr(),GE.insertStyleElement=qr(),Br()($E.Z,GE),$E.Z&&$E.Z.locals&&$E.Z.locals;var ZE=i(250),YE={};YE.styleTagTransform=Gr(),YE.setAttributes=Kr(),YE.insert=zr().bind(null,"head"),YE.domAPI=Vr(),YE.insertStyleElement=qr(),Br()(ZE.Z,YE),ZE.Z&&ZE.Z.locals&&ZE.Z.locals;var QE=i(6865),XE={};XE.styleTagTransform=Gr(),XE.setAttributes=Kr(),XE.insert=zr().bind(null,"head"),XE.domAPI=Vr(),XE.insertStyleElement=qr(),Br()(QE.Z,XE),QE.Z&&QE.Z.locals&&QE.Z.locals,Tm("symbolIcon.arrayForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.booleanForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v(0,"The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.colorForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.constantForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v(0,"The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v(0,"The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v(0,"The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},v(0,"The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v(0,"The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.fileForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.folderForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v(0,"The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v(0,"The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.keyForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.keywordForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},v(0,"The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.moduleForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.namespaceForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.nullForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.numberForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.objectForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.operatorForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.packageForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.propertyForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.referenceForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.snippetForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.stringForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.structForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.textForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.typeParameterForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.unitForeground",{dark:Hm,light:Hm,hcDark:Hm,hcLight:Hm},v(0,"The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tm("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},v(0,"The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const JE=Object.freeze({kind:kk.Empty,title:v(0,"More Actions...")}),eN=Object.freeze([{kind:DE.QuickFix,title:v(0,"Quick Fix")},{kind:DE.RefactorExtract,title:v(0,"Extract"),icon:Ml.wrench},{kind:DE.RefactorInline,title:v(0,"Inline"),icon:Ml.wrench},{kind:DE.RefactorRewrite,title:v(0,"Rewrite"),icon:Ml.wrench},{kind:DE.RefactorMove,title:v(0,"Move"),icon:Ml.wrench},{kind:DE.SurroundWith,title:v(0,"Surround With"),icon:Ml.surroundWith},{kind:DE.Source,title:v(0,"Source Action"),icon:Ml.symbolFile},JE]);var tN=i(5528),iN={};iN.styleTagTransform=Gr(),iN.setAttributes=Kr(),iN.insert=zr().bind(null,"head"),iN.domAPI=Vr(),iN.insertStyleElement=qr(),Br()(tN.Z,iN),tN.Z&&tN.Z.locals&&tN.Z.locals;var nN,oN,sN=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(oN||(oN={}));let rN=nN=class extends lt{constructor(e,t,i){var n,o,s;super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new kt),this.onClick=this._onClick.event,this._state=oN.Hidden,this._iconClasses=[],this._domNode=Sr("div.lightBulbWidget"),this._domNode.role="listbox",this._register($L.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),this._register((n=this._domNode,o=e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=Rs(this._domNode),n=this._editor.getOption(67);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{1==(1&e.buttons)&&this.hide()}))),this._register(_t.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,(()=>{var e,t,i,n;this._preferredKbLabel=null!==(t=null===(e=this._keybindingService.lookupKeybinding(RE))||void 0===e?void 0:e.getLabel())&&void 0!==t?t:void 0,this._quickFixKbLabel=null!==(n=null===(i=this._keybindingService.lookupKeybinding(AE))||void 0===i?void 0:i.getLabel())&&void 0!==n?n:void 0,this._updateLightBulbTitleAndIcon()})))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();if(!this._editor.getOptions().get(65).enabled)return this.hide();const n=this._editor.getModel();if(!n)return this.hide();const{lineNumber:o,column:s}=n.validatePosition(i),r=n.getOptions().tabSize,a=this._editor.getOptions().get(50),l=sw(n.getLineContent(o),r),d=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let c=o,h=1;if(!(a.spaceWidth*l>22)){if(o>1&&!d(o-1))c-=1;else if(o=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([sN(1,uD),sN(2,Nd)],rN);class aN{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}function lN(e,t,i){return Math.min(Math.max(e,t),i)}class dN{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class cN{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{try{e.releasePointerCapture(t)}catch(e){}})))}catch(t){s=ls(e)}this._hooks.add(ws(s,ur.POINTER_MOVE,(e=>{e.buttons===i?(e.preventDefault(),this._pointerMoveCallback(e)):this.stopMonitoring(!0)}))),this._hooks.add(ws(s,ur.POINTER_UP,(e=>this.stopMonitoring(!0))))}}class mN extends lt{onclick(e,t){this._register(ws(e,ur.CLICK,(i=>t(new Ge(ls(e),i)))))}onmousedown(e,t){this._register(ws(e,ur.MOUSE_DOWN,(i=>t(new Ge(ls(e),i)))))}onmouseover(e,t){this._register(ws(e,ur.MOUSE_OVER,(i=>t(new Ge(ls(e),i)))))}onmouseleave(e,t){this._register(ws(e,ur.MOUSE_LEAVE,(i=>t(new Ge(ls(e),i)))))}onkeydown(e,t){this._register(ws(e,ur.KEY_DOWN,(e=>t(new Ke(e)))))}onkeyup(e,t){this._register(ws(e,ur.KEY_UP,(e=>t(new Ke(e)))))}oninput(e,t){this._register(ws(e,ur.INPUT,t))}onblur(e,t){this._register(ws(e,ur.BLUR,t))}onfocus(e,t){this._register(ws(e,ur.FOCUS,t))}ignoreGesture(e){return $L.ignoreTarget(e)}}class fN extends mN{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...Rl.asClassNameArray(e.icon)),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new pN),this._register(ys(this.bgDomNode,ur.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._register(ys(this.domNode,ur.POINTER_DOWN,(e=>this._arrowPointerDown(e)))),this._pointerdownRepeatTimer=this._register(new Ds),this._pointerdownScheduleRepeatTimer=this._register(new $t)}_arrowPointerDown(e){e.target&&e.target instanceof Element&&(this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet((()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24,ls(e))}),200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{}),(()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()})),e.preventDefault())}}class _N extends lt{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new $t)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{var e;null===(e=this._domNode)||void 0===e||e.setClassName(this._visibleClassName)}),0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,null===(t=this._domNode)||void 0===t||t.setClassName(this._invisibleClassName+(e?" fade":"")))}}class vN extends mN{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new _N(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new pN),this._shouldRender=!0,this.domNode=CL(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(ws(this.domNode.domNode,ur.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(e){const t=this._register(new fN(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=CL(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(ws(this.slider.domNode,ur.POINTER_DOWN,(e=>{0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}))),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);i<=o&&o<=n?0===e.button&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.offsetX&&"number"==typeof e.offsetY)t=e.offsetX,i=e.offsetY;else{const n=Rs(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}const n=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),0===e.button&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>{const o=this._sliderOrthogonalPointerPosition(e),s=Math.abs(o-i);if(U&&s>140)return void this._setDesiredScrollPositionNow(n.getScrollPosition());const r=this._sliderPointerPosition(e)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class bN{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new bN(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,o){const s=Math.max(0,i-e),r=Math.max(0,s-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),d=(r-l)/(n-i),c=o*d;return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:d,computedSliderPosition:Math.round(c)}}_refreshComputedValues(){const e=bN._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new Ze(null,1,0))}),this._createArrow({className:"scra",icon:Ml.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Ze(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class CN extends vN{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new bN(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:Ml.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Ze(null,0,1))}),this._createArrow({className:"scra",icon:Ml.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Ze(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class yN{constructor(e,t,i,n,o,s,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,o|=0,s|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),o<0&&(o=0),r+o>s&&(r=s-o),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=o,this.scrollHeight=s,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new yN(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new yN(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:r,scrollTopChanged:a}}}class SN extends lt{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new kt),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new yN(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var i;const n=this._state.withScrollDimensions(e,t);this._setState(n,Boolean(this._smoothScrolling)),null===(i=this._smoothScrolling)||void 0===i||i.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new LN(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=LN.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class kN{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function xN(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class LN{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e0&&Math.abs(e.deltaY)>0)return 1;let i=.5;if(this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(i+=.25),t){const n=Math.abs(e.deltaX),o=Math.abs(e.deltaY),s=Math.abs(t.deltaX),r=Math.abs(t.deltaY),a=Math.max(Math.min(n,s),1),l=Math.max(Math.min(o,r),1),d=Math.max(n,s),c=Math.max(o,r);d%a==0&&c%l==0&&(i-=.5)}return Math.min(Math.max(i,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}TN.INSTANCE=new TN;class MN extends mN{get options(){return this._options}constructor(e,t,i){super(),this._onScroll=this._register(new kt),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new kt),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,K&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new CN(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new wN(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=CL(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=CL(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=CL(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e))),this._hideTimeout=this._register(new $t),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=ot(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,K&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new Ze(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=ot(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new Ze(e))};this._mouseWheelToDispose.push(ws(this._listenOnDomNode,ur.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){var t;if(null===(t=e.browserEvent)||void 0===t?void 0:t.defaultPrevented)return;const i=TN.INSTANCE;i.acceptStandardWheelEvent(e);let n=!1;if(e.deltaY||e.deltaX){let t=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&o+t===0?o=t=0:Math.abs(t)>=Math.abs(o)?o=0:t=0),this._options.flipAxes&&([t,o]=[o,t]);const s=!K&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=t,t=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,t*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(t){const e=50*t,i=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,i)}if(o){const e=50*o,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&i.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),n=!0)}let o=n;!o&&this._options.alwaysConsumeMouseWheel&&(o=!0),!o&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(o=!0),o&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class AN extends MN{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new SN({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>Ls(ls(e),t)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class RN extends MN{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class PN extends MN{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new SN({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:t=>Ls(ls(e),t)});super(e,t,i),this._register(i),this._element=e,this._register(this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}))),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}function ON(e,t){const i=[];for(const n of t){if(e.start>=n.range.end)continue;if(e.end=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}}(DN||(DN={}));class BN{get paddingTop(){return this._paddingTop}set paddingTop(e){this._size=this._size+e-this._paddingTop,this._paddingTop=e}constructor(e){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=null!=e?e:0,this._size=this._paddingTop}splice(e,t,i=[]){const n=i.length-t,o=ON({start:0,end:e},this.groups),s=ON({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map((e=>({range:FN(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(const n of e){const e=n.range.start,o=n.range.end,s=n.size;i&&s===i.size?i.range.end=o:(i={range:{start:e,end:o},size:s},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,r,s),this._size=this._paddingTop+this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var VN=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const HN={CurrentDragAndDropData:void 0},zN={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class UN{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class KN{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class jN{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class $N{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Fs(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(e,t,i,n=zN){var o,s,r,a,l,d,c,h,u,g,p,m,f;if(this.virtualDelegate=t,this.domId="list_id_"+ ++$N.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new zt(50),this.splicing=!1,this.dragOverAnimationStopDisposable=lt.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=lt.None,this.onDragLeaveTimeout=lt.None,this.disposables=new at,this._onDidChangeContentHeight=new kt,this._onDidChangeContentWidth=new kt,this.onDidChangeContentHeight=_t.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=this.createRangeMap(null!==(o=n.paddingTop)&&void 0!==o?o:0);for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new WN(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=null!==(s=n.horizontalScrolling)&&void 0!==s?s:zN.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=void 0===n.paddingBottom?0:n.paddingBottom,this.accessibilityProvider=new qN(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(null!==(r=n.transformOptimization)&&void 0!==r?r:zN.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add($L.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new SN({forceIntegerValues:!0,smoothScrollDuration:null!==(a=n.smoothScrolling)&&void 0!==a&&a?125:0,scheduleAtNextAnimationFrame:e=>Ls(ls(this.domNode),e)})),this.scrollableElement=this.disposables.add(new RN(this.rowsContainer,{alwaysConsumeMouseWheel:null!==(l=n.alwaysConsumeMouseWheel)&&void 0!==l?l:zN.alwaysConsumeMouseWheel,horizontal:1,vertical:null!==(d=n.verticalScrollMode)&&void 0!==d?d:zN.verticalScrollMode,useShadows:null!==(c=n.useShadows)&&void 0!==c?c:zN.useShadows,mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity,scrollByPage:n.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(ws(this.rowsContainer,qL.Change,(e=>this.onTouchChange(e)))),this.disposables.add(ws(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add(ws(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add(ws(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add(ws(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add(ws(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=null!==(h=n.setRowLineHeight)&&void 0!==h?h:zN.setRowLineHeight,this.setRowHeight=null!==(u=n.setRowHeight)&&void 0!==u?u:zN.setRowHeight,this.supportDynamicHeights=null!==(g=n.supportDynamicHeights)&&void 0!==g?g:zN.supportDynamicHeights,this.dnd=null!==(p=n.dnd)&&void 0!==p?p:this.disposables.add(zN.dnd),this.layout(null===(m=n.initialSize)||void 0===m?void 0:m.height,null===(f=n.initialSize)||void 0===f?void 0:f.width)}updateOptions(e){let t;if(void 0!==e.paddingBottom&&(this.paddingBottom=e.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.scrollByPage&&(t={...null!=t?t:{},scrollByPage:e.scrollByPage}),void 0!==e.mouseWheelScrollSensitivity&&(t={...null!=t?t:{},mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&(t={...null!=t?t:{},fastScrollSensitivity:e.fastScrollSensitivity}),t&&this.scrollableElement.updateOptions(t),void 0!==e.paddingTop&&e.paddingTop!==this.rangeMap.paddingTop){const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),i=e.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=e.paddingTop,this.render(t,Math.max(0,this.lastRenderTop+i),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}createRangeMap(e){return new BN(e)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=DN.intersect(n,o),r=new Map;for(let e=s.end-1;e>=s.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.unshift(t.row)}t.row=null,t.stale=!0}const a={start:e+t,end:this.items.length},l=DN.intersect(a,n),d=DN.relativeComplement(a,n),c=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:lt.None,checkedDisposable:lt.None,stale:!1})));let h;0===e&&t>=this.items.length?(this.rangeMap=this.createRangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,c),h=this.items,this.items=c):(this.rangeMap.splice(e,t,c),h=this.items.splice(e,t,...c));const u=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=FN(l,u),m=DN.intersect(g,p);for(let e=m.start;eFN(e,u))),v=[{start:e,end:e+i.length},..._].map((e=>DN.intersect(g,e))).reverse();for(const e of v)for(let t=e.end-1;t>=e.start;t--){const e=this.items[t],i=r.get(e.templateId),n=null==i?void 0:i.pop();this.insertItemInDOM(t,n)}for(const e of r.values())for(const t of e)this.cache.release(t);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map((e=>e.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Ls(ls(this.domNode),(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(e){return this.items[e].element}indexOf(e){return this.items.findIndex((t=>t.element===e))}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){const i={height:"number"==typeof e?e:Bs(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:Fs(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=DN.relativeComplement(r,e).reverse(),l=DN.relativeComplement(e,r);if(s){const t=DN.intersect(e,r);for(let e=t.start;e{for(const e of l)for(let t=e.start;t=e.start;t--)this.insertItemInDOM(t)})),void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==o&&(this.rowsContainer.style.width=`${Math.max(o,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t){var i,n,o;const s=this.items[e];if(!s.row)if(t)s.row=t,s.stale=!0;else{const e=this.cache.alloc(s.templateId);s.row=e.row,s.stale||(s.stale=e.isReusingConnectedDomNode)}const r=this.accessibilityProvider.getRole(s.element)||"listitem";s.row.domNode.setAttribute("role",r);const a=this.accessibilityProvider.isChecked(s.element);if("boolean"==typeof a)s.row.domNode.setAttribute("aria-checked",String(!!a));else if(a){const e=e=>s.row.domNode.setAttribute("aria-checked",String(!!e));e(a.value),s.checkedDisposable=a.onDidChange((()=>e(a.value)))}if(s.stale||!s.row.domNode.parentElement){const t=null!==(o=null===(n=null===(i=this.items.at(e+1))||void 0===i?void 0:i.row)||void 0===n?void 0:n.domNode)&&void 0!==o?o:null;s.row.domNode.parentElement===this.rowsContainer&&s.row.domNode.nextElementSibling===t||this.rowsContainer.insertBefore(s.row.domNode,t),s.stale=!1}this.updateItemInDOM(s,e);const l=this.renderers.get(s.templateId);if(!l)throw new Error(`No renderer found for template id ${s.templateId}`);null==l||l.renderElement(s.element,e,s.row.templateData,s.size);const d=this.dnd.getDragURI(s.element);s.dragStartDisposable.dispose(),s.row.domNode.draggable=!!d,d&&(s.dragStartDisposable=ws(s.row.domNode,"dragstart",(e=>this.onDragStart(s.element,d,e)))),this.horizontalScrolling&&(this.measureItemWidth(s),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width="fit-content",e.width=Fs(e.row.domNode);const t=ls(e.row.domNode).getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return _t.map(this.disposables.add(new ok(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return _t.map(this.disposables.add(new ok(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return _t.filter(_t.map(this.disposables.add(new ok(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>1===e.browserEvent.button),this.disposables)}get onMouseDown(){return _t.map(this.disposables.add(new ok(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return _t.map(this.disposables.add(new ok(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return _t.map(this.disposables.add(new ok(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return _t.any(_t.map(this.disposables.add(new ok(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),_t.map(this.disposables.add(new ok(this.domNode,qL.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return _t.map(this.disposables.add(new ok(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return _t.map(this.disposables.add(new ok(this.rowsContainer,qL.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element,sector:this.getTargetSector(e,t)}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){var n,o;if(!i.dataTransfer)return;const s=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(xk.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(s,i)),void 0===e&&(e=String(s.length));const t=Sr(".monaco-drag-image");t.textContent=e;const n=(e=>{for(;e&&!e.classList.contains("monaco-workbench");)e=e.parentElement;return e||this.domNode.ownerDocument})(this.domNode);n.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>n.removeChild(t)),0)}this.domNode.classList.add("dragging"),this.currentDragData=new UN(s),HN.CurrentDragAndDropData=new KN(s),null===(o=(n=this.dnd).onDragStart)||void 0===o||o.call(n,this.currentDragData,i)}onDragOver(e){var t,i;if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),HN.CurrentDragAndDropData&&"vscode-ui"===HN.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(HN.CurrentDragAndDropData)this.currentDragData=HN.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new jN}const n=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.sector,e.browserEvent);if(this.canDrop="boolean"==typeof n?n:n.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let o;e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof n&&0===(null===(t=n.effect)||void 0===t?void 0:t.type)?"copy":"move",o="boolean"!=typeof n&&n.feedback?n.feedback:void 0===e.index?[-1]:[e.index],o=Zh(o).filter((e=>e>=-1&&ee-t)),o=-1===o[0]?[-1]:o;let s="boolean"!=typeof n&&n.effect&&n.effect.position?n.effect.position:"drop-target";if(r=this.currentDragFeedback,a=o,(Array.isArray(r)&&Array.isArray(a)?Wh(r,a):r===a)&&this.currentDragFeedbackPosition===s)return!0;var r,a;if(this.currentDragFeedback=o,this.currentDragFeedbackPosition=s,this.currentDragFeedbackDisposable.dispose(),-1===o[0])this.domNode.classList.add(s),this.rowsContainer.classList.add(s),this.currentDragFeedbackDisposable=rt((()=>{this.domNode.classList.remove(s),this.rowsContainer.classList.remove(s)}));else{if(o.length>1&&"drop-target"!==s)throw new Error("Can't use multiple feedbacks with position different than 'over'");"drop-target-after"===s&&o[0]{var e;for(const t of o){const i=this.items[t];i.dropTarget=!1,null===(e=i.row)||void 0===e||e.domNode.classList.remove(s)}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=jt((()=>this.clearDragOverFeedback()),100,this.disposables),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,HN.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.sector,e.browserEvent))}onDragEnd(e){var t,i;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,HN.CurrentDragAndDropData=void 0,null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=lt.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=As(this.domNode).top;this.dragOverAnimationDisposable=function(e,t){const i=()=>{t(),n=Ls(e,i)};let n=Ls(e,i);return rt((()=>n.dispose()))}(ls(this.domNode),this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=jt((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3,this.disposables),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getTargetSector(e,t){if(void 0===t)return;const i=e.offsetY/this.items[t].size;return lN(Math.floor(i/.25),0,3)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;lr(i)&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=e.start;t--)this.insertItemInDOM(t);for(let e=a.start;ee===t;function ZN(e=GN){return(t,i)=>Wh(t,i,e)}new WeakMap;class YN{constructor(e,t,i){this.owner=e,this.debugNameSource=t,this.referenceFn=i}getDebugName(e){return function(e,t){var i;const n=XN.get(e);if(n)return n;const o=function(e,t){const i=XN.get(e);if(i)return i;const n=t.owner?function(e){var t;const i=eI.get(e);if(i)return i;const n=function(e){const t=e.constructor;return t?t.name:"Object"}(e);let o=null!==(t=JN.get(n))&&void 0!==t?t:0;o++,JN.set(n,o);const s=1===o?n:`${n}#${o}`;return eI.set(e,s),s}(t.owner)+".":"";let o;const s=t.debugNameSource;if(void 0!==s){if("function"!=typeof s)return n+s;if(o=s(),void 0!==o)return n+o}const r=t.referenceFn;if(void 0!==r&&(o=tI(r),void 0!==o))return n+o;if(void 0!==t.owner){const i=function(e,t){for(const i in e)if(e[i]===t)return i}(t.owner,e);if(void 0!==i)return n+i}}(e,t);if(o){let t=null!==(i=QN.get(o))&&void 0!==i?i:0;t++,QN.set(o,t);const n=1===t?o:`${o}#${t}`;return XN.set(e,n),n}}(e,this)}}const QN=new Map,XN=new WeakMap,JN=new Map,eI=new WeakMap;function tI(e){const t=e.toString(),i=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(t),n=i?i[1]:void 0;return null==n?void 0:n.trim()}let iI,nI,oI,sI;class rI{get TChange(){return null}reportChanges(){this.get()}read(e){return e?e.readObservable(this):this.get()}map(e,t){const i=void 0===t?void 0:e,n=void 0===t?e:t;return oI({owner:i,debugName:()=>{const e=tI(n);if(void 0!==e)return e;const t=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(n.toString());return t?`${this.debugName}.${t[2]}`:i?void 0:`${this.debugName} (mapped)`},debugReferenceFn:n},(e=>n(this.read(e),e)))}recomputeInitiallyAndOnChange(e,t){return e.add(iI(this,t)),this}}class aI extends rI{constructor(){super(...arguments),this.observers=new Set}addObserver(e){const t=this.observers.size;this.observers.add(e),0===t&&this.onFirstObserverAdded()}removeObserver(e){this.observers.delete(e)&&0===this.observers.size&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}function lI(e,t){const i=new hI(e,t);try{e(i)}finally{i.finish()}}function dI(e){if(sI)e(sI);else{const t=new hI(e,void 0);sI=t;try{e(t)}finally{t.finish(),sI=void 0}}}function cI(e,t,i){e?t(e):lI(t,i)}class hI{constructor(e,t){var i;this._fn=e,this._getDebugName=t,this.updatingObservers=[],null===(i=void 0)||void 0===i||i.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():tI(this._fn)}updateObserver(e,t){this.updatingObservers.push({observer:e,observable:t}),e.beginUpdate(t)}finish(){var e;const t=this.updatingObservers;for(let e=0;e{}),(()=>`Setting ${this.debugName}`)));try{const o=this._value;this._setValue(e),null===(n=void 0)||void 0===n||n.handleObservableChanged(this,{oldValue:o,newValue:e,change:i,didChange:!0,hadValue:!0});for(const e of this.observers)t.updateObserver(e,this),e.handleChange(this,i)}finally{o&&o.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(e){this._value=e}}function pI(e,t){let i;return i="string"==typeof e?new YN(void 0,e,void 0):new YN(e,void 0,void 0),new mI(i,t,GN)}class mI extends gI{_setValue(e){this._value!==e&&(this._value&&this._value.dispose(),this._value=e)}dispose(){var e;null===(e=this._value)||void 0===e||e.dispose()}}function fI(e,t){return void 0!==t?new CI(new YN(e,void 0,t),t,void 0,void 0,void 0,GN):new CI(new YN(void 0,void 0,e),e,void 0,void 0,void 0,GN)}function _I(e,t,i){return new yI(new YN(e,void 0,t),t,void 0,void 0,void 0,GN,i)}function vI(e,t){var i;return new CI(new YN(e.owner,e.debugName,e.debugReferenceFn),t,void 0,void 0,e.onLastObserverRemoved,null!==(i=e.equalsFn)&&void 0!==i?i:GN)}function bI(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const o=new at;return new CI(new YN(n,void 0,i),(e=>(o.clear(),i(e,o))),void 0,void 0,(()=>o.dispose()),GN)}function wI(e,t){let i,n;void 0===t?(i=e,n=void 0):(n=e,i=t);const o=new at;return new CI(new YN(n,void 0,i),(e=>{o.clear();const t=i(e);return t&&o.add(t),t}),void 0,void 0,(()=>o.dispose()),GN)}oI=vI;class CI extends aI{get debugName(){var e;return null!==(e=this._debugNameData.getDebugName(this))&&void 0!==e?e:"(anonymous)"}constructor(e,t,i,n,o=void 0,s){var r,a;super(),this._debugNameData=e,this._computeFn=t,this.createChangeSummary=i,this._handleChange=n,this._handleLastObserverRemoved=o,this._equalityComparator=s,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=null===(r=this.createChangeSummary)||void 0===r?void 0:r.call(this),null===(a=void 0)||void 0===a||a.handleDerivedCreated(this)}onLastObserverRemoved(){var e;this.state=0,this.value=void 0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),null===(e=this._handleLastObserverRemoved)||void 0===e||e.call(this)}get(){var e;if(0===this.observers.size){const t=this._computeFn(this,null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this));return this.onLastObserverRemoved(),t}do{if(1===this.state)for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break;1===this.state&&(this.state=3),this._recomputeIfNeeded()}while(3!==this.state);return this.value}_recomputeIfNeeded(){var e,t;if(3===this.state)return;const i=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=i;const n=0!==this.state,o=this.value;this.state=3;const s=this.changeSummary;this.changeSummary=null===(e=this.createChangeSummary)||void 0===e?void 0:e.call(this);try{this.value=this._computeFn(this,s)}finally{for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}const r=n&&!this._equalityComparator(o,this.value);if(null===(t=void 0)||void 0===t||t.handleDerivedRecomputed(this,{oldValue:o,newValue:this.value,change:void 0,didChange:r,hadValue:n}),r)for(const e of this.observers)e.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(e){this.updateCount++;const t=1===this.updateCount;if(3===this.state&&(this.state=1,!t))for(const e of this.observers)e.handlePossibleChange(this);if(t)for(const e of this.observers)e.beginUpdate(this)}endUpdate(e){if(this.updateCount--,0===this.updateCount){const e=[...this.observers];for(const t of e)t.endUpdate(this)}Sc((()=>this.updateCount>=0))}handlePossibleChange(e){if(3===this.state&&this.dependencies.has(e)&&!this.dependenciesToBeRemoved.has(e)){this.state=1;for(const e of this.observers)e.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:t=>t===e},this.changeSummary),n=3===this.state;if(i&&(1===this.state||n)&&(this.state=2,n))for(const e of this.observers)e.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)}}class yI extends CI{constructor(e,t,i,n,o=void 0,s,r){super(e,t,i,n,o,s),this.set=r}}function SI(e){return new DI(new YN(void 0,void 0,e),e,void 0,void 0)}function kI(e,t){var i;return new DI(new YN(e.owner,e.debugName,null!==(i=e.debugReferenceFn)&&void 0!==i?i:t),t,void 0,void 0)}function xI(e,t){var i;return new DI(new YN(e.owner,e.debugName,null!==(i=e.debugReferenceFn)&&void 0!==i?i:t),t,e.createEmptyChangeSummary,e.handleChange)}function LI(e){const t=new at,i=kI({owner:void 0,debugName:void 0,debugReferenceFn:e},(i=>{t.clear(),e(i,t)}));return rt((()=>{i.dispose(),t.dispose()}))}class DI{get debugName(){var e;return null!==(e=this._debugNameData.getDebugName(this))&&void 0!==e?e:"(anonymous)"}constructor(e,t,i,n){var o,s;this._debugNameData=e,this._runFn=t,this.createChangeSummary=i,this._handleChange=n,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=null===(o=this.createChangeSummary)||void 0===o?void 0:o.call(this),null===(s=void 0)||void 0===s||s.handleAutorunCreated(this),this._runIfNeeded(),Je(this)}dispose(){this.disposed=!0;for(const e of this.dependencies)e.removeObserver(this);this.dependencies.clear(),et(this)}_runIfNeeded(){var e,t,i;if(3===this.state)return;const n=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=n,this.state=3;const o=this.disposed;try{if(!o){null===(e=void 0)||void 0===e||e.handleAutorunTriggered(this);const i=this.changeSummary;this.changeSummary=null===(t=this.createChangeSummary)||void 0===t?void 0:t.call(this),this._runFn(this,i)}}finally{o||null===(i=void 0)||void 0===i||i.handleAutorunFinished(this);for(const e of this.dependenciesToBeRemoved)e.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){3===this.state&&(this.state=1),this.updateCount++}endUpdate(){if(1===this.updateCount)do{if(1===this.state){this.state=3;for(const e of this.dependencies)if(e.reportChanges(),2===this.state)break}this._runIfNeeded()}while(3!==this.state);this.updateCount--,Sc((()=>this.updateCount>=0))}handlePossibleChange(e){3===this.state&&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:t=>t===e},this.changeSummary))&&(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 EI(e){return new NI(e)}!function(e){e.Observer=DI}(SI||(SI={}));class NI extends rI{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 II(e,t){return new TI(e,t)}class TI extends aI{constructor(e,t){super(),this.event=e,this._getValue=t,this.hasValue=!1,this.handleEvent=e=>{var t;const i=this._getValue(e),n=this.value,o=!this.hasValue||n!==i;let s=!1;o&&(this.value=i,this.hasValue&&(s=!0,cI(TI.globalTransaction,(e=>{var t;null===(t=void 0)||void 0===t||t.handleFromEventObservableTriggered(this,{oldValue:n,newValue:i,change:void 0,didChange:o,hadValue:this.hasValue});for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>{const e=this.getDebugName();return"Event fired"+(e?`: ${e}`:"")}))),this.hasValue=!0),s||null===(t=void 0)||void 0===t||t.handleFromEventObservableTriggered(this,{oldValue:n,newValue:i,change:void 0,didChange:o,hadValue:this.hasValue})}}getDebugName(){return tI(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 MI(e,t){return new AI(e,t)}!function(e){e.Observer=TI,e.batchEventsGlobally=function(e,t){let i=!1;void 0===TI.globalTransaction&&(TI.globalTransaction=e,i=!0);try{t()}finally{i&&(TI.globalTransaction=void 0)}}}(II||(II={}));class AI extends aI{constructor(e,t){super(),this.debugName=e,this.event=t,this.handleEvent=()=>{lI((e=>{for(const t of this.observers)e.updateObserver(t,this),t.handleChange(this,void 0)}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function RI(e){return"string"==typeof e?new PI(e):new PI(void 0,e)}class PI extends aI{get debugName(){var e;return null!==(e=new YN(this._owner,this._debugName,void 0).getDebugName(this))&&void 0!==e?e:"Observable Signal"}constructor(e,t){super(),this._debugName=e,this._owner=t}trigger(e,t){if(e)for(const i of this.observers)e.updateObserver(i,this),i.handleChange(this,t);else lI((e=>{this.trigger(e,t)}),(()=>`Trigger signal ${this.debugName}`))}get(){}}function OI(e,t){const i=new FI(!0,t);return e.addObserver(i),t?t(e.get()):e.reportChanges(),rt((()=>{e.removeObserver(i)}))}nI=function(e){const t=new FI(!1,void 0);return e.addObserver(t),rt((()=>{e.removeObserver(t)}))},function(e){iI=e}(OI);class FI{constructor(e,t){this._forceRecompute=e,this._handleValue=t,this._counter=0}beginUpdate(e){this._counter++}endUpdate(e){this._counter--,0===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(e.get()):e.reportChanges())}handlePossibleChange(e){}handleChange(e,t){}}class BI{constructor(e,t){this._map=e,this._keySelector=t,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach((e=>e.store.dispose())),this._cache.clear()}setItems(e){const t=[],i=new Set(this._cache.keys());for(const n of e){const e=this._keySelector?this._keySelector(n):n;let o=this._cache.get(e);if(o)i.delete(e);else{const t=new at;o={out:this._map(n,t),store:t},this._cache.set(e,o)}t.push(o.out)}for(const e of i)this._cache.get(e).store.dispose(),this._cache.delete(e);this._items=t}getItems(){return this._items}}function WI(e,t,i,n){return t||(t=e=>null!=e),new Promise(((o,s)=>{let r=!0,a=!1;const l=e.map((e=>({isFinished:t(e),error:!!i&&i(e),state:e}))),d=SI((e=>{const{isFinished:t,error:i,state:n}=l.read(e);(t||i)&&(r?a=!0:d.dispose(),i?s(!0===i?n:i):o(n))}));if(n){const e=n.onCancellationRequested((()=>{d.dispose(),e.dispose(),s(new Ie)}));if(n.isCancellationRequested)return d.dispose(),e.dispose(),void s(new Ie)}r=!1,a&&d.dispose()}))}var VI,HI,zI=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class UI{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class KI{get name(){return this._trait}get renderer(){return new UI(this)}constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new kt,this.onChange=this._onChange.event}splice(e,t,i){const n=i.length-t,o=e+t,s=[];let r=0;for(;r=o;)s.push(this.sortedIndexes[r++]+n);this.renderer.splice(e,t,i.length),this._set(s,s)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(hT),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=cT(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return Vh(this.sortedIndexes,e,hT)>=0}dispose(){ot(this._onChange)}}zI([jL],KI.prototype,"renderer",null);class jI extends KI{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class qI{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,new Array(i.length).fill(!1));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString()));if(0===n.length)return this.trait.splice(e,t,new Array(i.length).fill(!1));const o=new Set(n),s=i.map((e=>o.has(this.identityProvider.getId(e).toString())));this.trait.splice(e,t,s)}}function $I(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function GI(e,t){return!!e.classList.contains(t)||!e.classList.contains("monaco-list")&&!!e.parentElement&&GI(e.parentElement,t)}function ZI(e){return GI(e,"monaco-editor")}function YI(e){return GI(e,"monaco-tree-sticky-row")}function QI(e){return e.classList.contains("monaco-tree-sticky-container")}function XI(e){return!!("A"===e.tagName&&e.classList.contains("monaco-button")||"DIV"===e.tagName&&e.classList.contains("monaco-button-dropdown"))||!e.classList.contains("monaco-list")&&!!e.parentElement&&XI(e.parentElement)}class JI{get onKeyDown(){return _t.chain(this.disposables.add(new ok(this.view.domNode,"keydown")).event,(e=>e.filter((e=>!$I(e.target))).map((e=>new Ke(e)))))}constructor(e,t,i){this.list=e,this.view=t,this.disposables=new at,this.multipleSelectionDisposables=new at,this.multipleSelectionSupport=i.multipleSelectionSupport,this.disposables.add(this.onKeyDown((e=>{switch(e.keyCode){case 3:return this.onEnter(e);case 16:return this.onUpArrow(e);case 18:return this.onDownArrow(e);case 11:return this.onPageUpArrow(e);case 12:return this.onPageDownArrow(e);case 9:return this.onEscape(e);case 31:this.multipleSelectionSupport&&(K?e.metaKey:e.ctrlKey)&&this.onCtrlA(e)}})))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionSupport=e.multipleSelectionSupport)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Qh(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}zI([jL],JI.prototype,"onKeyDown",null),function(e){e[e.Automatic=0]="Automatic",e[e.Trigger=1]="Trigger"}(VI||(VI={})),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(HI||(HI={}));const eT=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=98&&e.keyCode<=107||e.keyCode>=85&&e.keyCode<=95)}};class tT{constructor(e,t,i,n,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.keyboardNavigationEventFilter=n,this.delegate=o,this.enabled=!1,this.state=HI.Idle,this.mode=VI.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new at,this.disposables=new at,this.updateOptions(e.options)}updateOptions(e){var t,i;null===(t=e.typeNavigationEnabled)||void 0===t||t?this.enable():this.disable(),this.mode=null!==(i=e.typeNavigationMode)&&void 0!==i?i:VI.Automatic}enable(){if(this.enabled)return;let e=!1;const t=_t.chain(this.enabledDisposables.add(new ok(this.view.domNode,"keydown")).event,(t=>t.filter((e=>!$I(e.target))).filter((()=>this.mode===VI.Automatic||this.triggered)).map((e=>new Ke(e))).filter((t=>e||this.keyboardNavigationEventFilter(t))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>pr(e,!0))).map((e=>e.browserEvent.key)))),i=_t.debounce(t,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables);_t.reduce(_t.any(t,i),((e,t)=>null===t?null:(e||"")+t),void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),i(this.onClear,this,this.enabledDisposables),t((()=>e=!0),void 0,this.enabledDisposables),i((()=>e=!1),void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));"string"==typeof i?na(i):i&&na(i.get())}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=HI.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===HI.Idle?1:0;this.state=HI.Typing;for(let t=0;t1&&1===t.length)return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}else if(void 0===r||Sa(e,r))return this.previouslyFocused=i,this.list.setFocus([o]),void this.list.reveal(o)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class iT{constructor(e,t){this.list=e,this.view=t,this.disposables=new at;const i=_t.chain(this.disposables.add(new ok(t.domNode,"keydown")).event,(e=>e.filter((e=>!$I(e.target))).map((e=>new Ke(e))))),n=_t.chain(i,(e=>e.filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)))));n(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!lr(n)||-1===n.tabIndex)return;const o=ls(n).getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function nT(e){return K?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function oT(e){return e.browserEvent.shiftKey}const sT={isSelectionSingleChangeEvent:nT,isSelectionRangeChangeEvent:oT};class rT{constructor(e){this.list=e,this.disposables=new at,this._onPointer=new kt,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||sT),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add($L.addTarget(e.getHTMLElement()))),_t.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||sT))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){ZI(e.browserEvent.target)||js()!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if($I(e.browserEvent.target)||ZI(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if($I(e.browserEvent.target)||ZI(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),cr(i=e.browserEvent)&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if($I(e.browserEvent.target)||ZI(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;if(e.browserEvent.isHandledByList)return;e.browserEvent.isHandledByList=!0;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Qh(Math.min(i,t),Math.max(i,t)+1),o=this.list.getSelection(),s=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);for(n.reverse(),o=i;o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class aT{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){var t,i;const n=this.selectorSuffix&&`.${this.selectorSuffix}`,o=[];e.listBackground&&o.push(`.monaco-list${n} .monaco-list-rows { background: ${e.listBackground}; }`),e.listFocusBackground&&(o.push(`.monaco-list${n}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),o.push(`.monaco-list${n}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&o.push(`.monaco-list${n}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(o.push(`.monaco-list${n}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),o.push(`.monaco-list${n}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&o.push(`.monaco-list${n}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&o.push(`.monaco-list${n}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(o.push(`.monaco-list${n} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),o.push(`.monaco-list${n} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&o.push(`.monaco-list${n} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(o.push(`.monaco-list${n} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),o.push(`.monaco-list${n} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(o.push(`.monaco-list${n} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),o.push(`.monaco-list${n} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&o.push(`.monaco-list${n} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&o.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&o.push(`.monaco-list${n}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`);const s=Ir(e.listFocusAndSelectionOutline,Ir(e.listSelectionOutline,null!==(t=e.listFocusOutline)&&void 0!==t?t:""));s&&o.push(`.monaco-list${n}:focus .monaco-list-row.focused.selected { outline: 1px solid ${s}; outline-offset: -1px;}`),e.listFocusOutline&&o.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${n}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`);const r=Ir(e.listSelectionOutline,null!==(i=e.listInactiveFocusOutline)&&void 0!==i?i:"");r&&o.push(`.monaco-list${n} .monaco-list-row.focused.selected { outline: 1px dotted ${r}; outline-offset: -1px; }`),e.listSelectionOutline&&o.push(`.monaco-list${n} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listInactiveFocusOutline&&o.push(`.monaco-list${n} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&o.push(`.monaco-list${n} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropOverBackground&&o.push(`\n\t\t\t\t.monaco-list${n}.drop-target,\n\t\t\t\t.monaco-list${n} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${n} .monaco-list-row.drop-target { background-color: ${e.listDropOverBackground} !important; color: inherit !important; }\n\t\t\t`),e.listDropBetweenBackground&&(o.push(`\n\t\t\t.monaco-list${n} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,\n\t\t\t.monaco-list${n} .monaco-list-row.drop-target-before::before {\n\t\t\t\tcontent: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`),o.push(`\n\t\t\t.monaco-list${n} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,\n\t\t\t.monaco-list${n} .monaco-list-row.drop-target-after::after {\n\t\t\t\tcontent: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;\n\t\t\t\tbackground-color: ${e.listDropBetweenBackground};\n\t\t\t}`)),e.tableColumnsBorder&&o.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`),e.tableOddRowsBackgroundColor&&o.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=o.join("\n")}}const lT={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:fu.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:fu.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:fu.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},dT={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function cT(e,t){const i=[];let n=0,o=0;for(;n=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]e-t;class uT{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){var o;let s=0;for(const r of this.renderers)null===(o=r.disposeElement)||void 0===o||o.call(r,e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class gT{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return{container:e,disposables:new at}}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e),o=n&&"string"!=typeof n?n:EI(n);i.disposables.add(SI((e=>{this.setAriaLabel(e.readObservable(o),i.container)})));const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof s?i.container.setAttribute("aria-level",`${s}`):i.container.removeAttribute("aria-level")}setAriaLabel(e,t){e?t.setAttribute("aria-label",e):t.removeAttribute("aria-label")}disposeElement(e,t,i,n){i.disposables.clear()}disposeTemplate(e){e.disposables.dispose()}}class pT{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,e,t)}onDragOver(e,t,i,n,o){return this.dnd.onDragOver(e,t,i,n,o)}onDragLeave(e,t,i,n){var o,s;null===(s=(o=this.dnd).onDragLeave)||void 0===s||s.call(o,e,t,i,n)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}drop(e,t,i,n,o){this.dnd.drop(e,t,i,n,o)}dispose(){this.dnd.dispose()}}class mT{get onDidChangeFocus(){return _t.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return _t.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=_t.chain(this.disposables.add(new ok(this.view.domNode,"keydown")).event,(t=>t.map((e=>new Ke(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map((e=>pr(e,!0))).filter((()=>!1)))),i=_t.chain(this.disposables.add(new ok(this.view.domNode,"keyup")).event,(t=>t.forEach((()=>e=!1)).map((e=>new Ke(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map((e=>pr(e,!0))).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})))),n=_t.chain(this.view.onContextMenu,(t=>t.filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:new Ge(ls(this.view.domNode),i),browserEvent:i})))));return _t.any(t,i,n)}get onKeyDown(){return this.disposables.add(new ok(this.view.domNode,"keydown")).event}get onDidFocus(){return _t.signal(this.disposables.add(new ok(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return _t.signal(this.disposables.add(new ok(this.view.domNode,"blur",!0)).event)}constructor(e,t,i,n,o=dT){var s,r,a,l;this.user=e,this._options=o,this.focus=new KI("focused"),this.anchor=new KI("anchor"),this.eventBufferer=new It,this._ariaLabel="",this.disposables=new at,this._onDidDispose=new kt,this.onDidDispose=this._onDidDispose.event;const d=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new jI("listbox"!==d);const c=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(c.push(new gT(this.accessibilityProvider)),null===(a=(r=this.accessibilityProvider).onDidChangeActiveDescendant)||void 0===a||a.call(r,this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map((e=>new uT(e.templateId,[...c,e])));const h={...o,dnd:o.dnd&&new pT(this,o.dnd)};if(this.view=this.createListView(t,i,n,h),this.view.domNode.setAttribute("role",d),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=Js(this.view.domNode);this.styleController=new aT(e,this.view.domId)}if(this.spliceable=new aN([new qI(this.focus,this.view,o.identityProvider),new qI(this.selection,this.view,o.identityProvider),new qI(this.anchor,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new iT(this,this.view)),("boolean"!=typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new JI(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||eT;this.typeNavigationController=new tT(this,this.view,o.keyboardNavigationLabelProvider,null!==(l=o.keyboardNavigationEventFilter)&&void 0!==l?l:()=>!0,e),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(e,t,i,n){return new $N(e,t,i,n)}createMouseController(e){return new rT(this)}updateOptions(e={}){var t,i;this._options={...this._options,...e},null===(t=this.typeNavigationController)||void 0===t||t.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(i=this.keyboardController)||void 0===i||i.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new gN(this.user,`Invalid start index: ${e}`);if(t<0)throw new gN(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}indexOf(e){return this.view.indexOf(e)}indexAt(e){return this.view.indexAt(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new gN(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new gN(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return Yh(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new gN(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}async focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.getFocus()[0];if(n!==i&&(void 0===n||i>n)){const o=this.findPreviousIndex(i,!1,t);o>-1&&n!==o?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();let s=o+this.view.renderHeight;i>n&&(s-=this.view.elementHeight(i)),this.view.setScrollTop(s),this.view.getScrollTop()!==o&&(this.setFocus([]),await Kt(0),await this.focusNextPage(e,t))}}async focusPreviousPage(e,t,i=(()=>0)){let n;const o=i(),s=this.view.getScrollTop()+o;n=0===s?this.view.indexAt(s):this.view.indexAfter(s-1);const r=this.getFocus()[0];if(r!==n&&(void 0===r||r>=n)){const i=this.findNextIndex(n,!1,t);i>-1&&r!==i?this.setFocus([i],e):this.setFocus([n],e)}else{const n=s;this.view.setScrollTop(s-this.view.renderHeight-o),this.view.getScrollTop()+i()!==n&&(this.setFocus([]),await Kt(0),await this.focusPreviousPage(e,t,i))}}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t,i=0){if(e<0||e>=this.length)throw new gN(this.user,`Invalid index ${e}`);const n=this.view.getScrollTop(),o=this.view.elementTop(e),s=this.view.elementHeight(e);if(bl(t)){const e=s-this.view.renderHeight+i;this.view.setScrollTop(e*lN(t,0,1)+o-i)}else{const e=o+s,t=n+this.view.renderHeight;o=t||(o=t&&s>=this.view.renderHeight?this.view.setScrollTop(o-i):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e,t=0){if(e<0||e>=this.length)throw new gN(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(ni+this.view.renderHeight)return null;const s=o-this.view.renderHeight+t;return Math.abs((i+t-n)/s)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(e){return this.view.getElementDomId(e)}getElementTop(e){return this.view.elementTop(e)}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}zI([jL],mT.prototype,"onDidChangeFocus",null),zI([jL],mT.prototype,"onDidChangeSelection",null),zI([jL],mT.prototype,"onContextMenu",null),zI([jL],mT.prototype,"onKeyDown",null),zI([jL],mT.prototype,"onDidFocus",null),zI([jL],mT.prototype,"onDidBlur",null);var fT=i(5305),_T={};_T.styleTagTransform=Gr(),_T.setAttributes=Kr(),_T.insert=zr().bind(null,"head"),_T.domAPI=Vr(),_T.insertStyleElement=qr(),Br()(fT.Z,_T),fT.Z&&fT.Z.locals&&fT.Z.locals;const vT=Sr,bT="selectOption.entry.template";class wT{get templateId(){return bT}renderTemplate(e){const t=Object.create(null);return t.root=e,t.text=_r(e,vT(".option-text")),t.detail=_r(e,vT(".option-detail")),t.decoratorRight=_r(e,vT(".option-decorator-right")),t}renderElement(e,t,i){const n=i,o=e.text,s=e.detail,r=e.decoratorRight,a=e.isDisabled;n.text.textContent=o,n.detail.textContent=s||"",n.decoratorRight.innerText=r||"",a?n.root.classList.add("option-disabled"):n.root.classList.remove("option-disabled")}disposeTemplate(e){}}class CT extends lt{constructor(e,t,i,n,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=n,this.selectBoxOptions=o||Object.create(null),"number"!=typeof this.selectBoxOptions.minBottomMargin?this.selectBoxOptions.minBottomMargin=CT.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding","string"==typeof this.selectBoxOptions.ariaLabel&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),"string"==typeof this.selectBoxOptions.ariaDescription&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new kt,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(i),this.selected=t||0,e&&this.setOptions(e,t),this.initStyleSheet()}setTitle(e){!this._hover&&e?this._hover=this._register(iD().setupUpdatableHover(QL("mouse"),this.selectElement,e)):this._hover&&this._hover.update(e)}getHeight(){return 22}getTemplateId(){return bT}constructSelectDropDown(e){this.contextViewProvider=e,this.selectDropDownContainer=Sr(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=_r(this.selectDropDownContainer,vT(".select-box-details-pane"));const t=_r(this.selectDropDownContainer,vT(".select-box-dropdown-container-width-control")),i=_r(t,vT(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",_r(i,this.widthControlElement),this._dropDownPosition=0,this.styleElement=Js(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(ws(this.selectDropDownContainer,ur.DRAG_START,(e=>{pr(e,!0)})))}registerListeners(){let e;this._register(ys(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value}),this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}))),this._register(ws(this.selectElement,ur.CLICK,(e=>{pr(e),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(ws(this.selectElement,ur.MOUSE_DOWN,(e=>{pr(e)}))),this._register(ws(this.selectElement,"touchstart",(t=>{e=this._isVisible}))),this._register(ws(this.selectElement,"touchend",(t=>{pr(t),e?this.hideSelectDropDown(!0):this.showSelectDropDown()}))),this._register(ws(this.selectElement,ur.KEY_DOWN,(e=>{const t=new Ke(e);let i=!1;K?18!==t.keyCode&&16!==t.keyCode&&10!==t.keyCode&&3!==t.keyCode||(i=!0):(18===t.keyCode&&t.altKey||16===t.keyCode&&t.altKey||10===t.keyCode||3===t.keyCode)&&(i=!0),i&&(this.showSelectDropDown(),pr(e,!0))})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){Wh(this.options,e)||(this.options=e,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled)),"string"==typeof e.description&&(this._hasDetails=!0)}))),void 0!==t&&(this.select(t),this._currentSelection=this.selected)}setOptionsList(){var e;null===(e=this.selectList)||void 0===e||e.splice(0,this.selectList.length,this.options)}select(e){e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&this.setTitle(this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(e){this.selectElement.tabIndex=e?0:-1}render(e){this.container=e,e.classList.add("select-container"),e.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const e=[];this.styles.listFocusBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(e.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),e.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&e.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),e.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=e.join("\n")}styleSelectElement(){var e,t,i;const n=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",o=null!==(t=this.styles.selectForeground)&&void 0!==t?t:"",s=null!==(i=this.styles.selectBorder)&&void 0!==i?i:"";this.selectElement.style.backgroundColor=n,this.selectElement.style.color=o,this.selectElement.style.borderColor=s}styleList(){var e,t;const i=null!==(e=this.styles.selectBackground)&&void 0!==e?e:"",n=Ir(this.styles.selectListBackground,i);this.selectDropDownListContainer.style.backgroundColor=n,this.selectionDetailsPane.style.backgroundColor=n;const o=null!==(t=this.styles.focusBorder)&&void 0!==t?t:"";this.selectDropDownContainer.style.outlineColor=o,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(e,t,i){const n=document.createElement("option");return n.value=e,n.text=e,n.disabled=!!i,n}showSelectDropDown(){this.selectionDetailsPane.innerText="",this.contextViewProvider&&!this._isVisible&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:e=>this.renderSelectDropDown(e),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(e){this.contextViewProvider&&this._isVisible&&(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),e&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(e,t){return e.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(t),{dispose:()=>{try{e.removeChild(this.selectDropDownContainer)}catch(e){}}}}measureMaxDetailsHeight(){let e=0;return this.options.forEach(((t,i)=>{this.updateDetail(i),this.selectionDetailsPane.offsetHeight>e&&(e=this.selectionDetailsPane.offsetHeight)})),e}layoutSelectDropDown(e){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const t=ls(this.selectElement),i=Rs(this.selectElement),n=ls(this.selectElement).getComputedStyle(this.selectElement),o=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),s=t.innerHeight-i.top-i.height-(this.selectBoxOptions.minBottomMargin||0),r=i.top-CT.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,a=this.selectElement.offsetWidth,l=this.setWidthControlElement(this.widthControlElement),d=Math.max(l,Math.round(a)).toString()+"px";this.selectDropDownContainer.style.width=d,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let c=this.selectList.contentHeight;this._hasDetails&&void 0===this._cachedMaxDetailsHeight&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const h=this._hasDetails?this._cachedMaxDetailsHeight:0,u=c+o+h,g=Math.floor((s-o-h)/this.getHeight()),p=Math.floor((r-o-h)/this.getHeight());if(e)return!(i.top+i.height>t.innerHeight-22||i.topg&&this.options.length>g?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),0));if(i.top+i.height>t.innerHeight-22||i.tops&&(c=g*this.getHeight())}else u>r&&(c=p*this.getHeight());return this.selectList.layout(c),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=c+o+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=c+o+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=d,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}return!1}setWidthControlElement(e){let t=0;if(e){let i=0,n=0;this.options.forEach(((e,t)=>{const o=e.detail?e.detail.length:0,s=e.decoratorRight?e.decoratorRight.length:0,r=e.text.length+o+s;r>n&&(i=t,n=r)})),e.textContent=this.options[i].text+(this.options[i].decoratorRight?this.options[i].decoratorRight+" ":""),t=Os(e)}return t}createSelectList(e){if(this.selectList)return;this.selectDropDownListContainer=_r(e,vT(".select-box-dropdown-list-container")),this.listRenderer=new wT,this.selectList=new mT("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:e=>{let t=e.text;return e.detail&&(t+=`. ${e.detail}`),e.decoratorRight&&(t+=`. ${e.decoratorRight}`),e.description&&(t+=`. ${e.description}`),t},getWidgetAriaLabel:()=>v(0,"Select Box"),getRole:()=>K?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const t=this._register(new ok(this.selectDropDownListContainer,"keydown")),i=_t.chain(t.event,(e=>e.filter((()=>this.selectList.length>0)).map((e=>new Ke(e)))));this._register(_t.chain(i,(e=>e.filter((e=>3===e.keyCode))))(this.onEnter,this)),this._register(_t.chain(i,(e=>e.filter((e=>2===e.keyCode))))(this.onEnter,this)),this._register(_t.chain(i,(e=>e.filter((e=>9===e.keyCode))))(this.onEscape,this)),this._register(_t.chain(i,(e=>e.filter((e=>16===e.keyCode))))(this.onUpArrow,this)),this._register(_t.chain(i,(e=>e.filter((e=>18===e.keyCode))))(this.onDownArrow,this)),this._register(_t.chain(i,(e=>e.filter((e=>12===e.keyCode))))(this.onPageDown,this)),this._register(_t.chain(i,(e=>e.filter((e=>11===e.keyCode))))(this.onPageUp,this)),this._register(_t.chain(i,(e=>e.filter((e=>14===e.keyCode))))(this.onHome,this)),this._register(_t.chain(i,(e=>e.filter((e=>13===e.keyCode))))(this.onEnd,this)),this._register(_t.chain(i,(e=>e.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113))))(this.onCharacter,this)),this._register(ws(this.selectList.getHTMLElement(),ur.POINTER_UP,(e=>this.onPointerUp(e)))),this._register(this.selectList.onMouseOver((e=>void 0!==e.index&&this.selectList.setFocus([e.index])))),this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e)))),this._register(ws(this.selectDropDownContainer,ur.FOCUS_OUT,(e=>{this._isVisible&&!Vs(e.relatedTarget,this.selectDropDownContainer)&&this.onListBlur()}))),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(e){if(!this.selectList.length)return;pr(e);const t=e.target;if(!t)return;if(t.classList.contains("slider"))return;const i=t.closest(".monaco-list-row");if(!i)return;const n=Number(i.getAttribute("data-index")),o=i.classList.contains("option-disabled");n>=0&&n{for(let t=0;tthis.selected+2)this.selected+=2;else{if(t)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){this.selected>0&&(pr(e,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(e){pr(e),this.selectList.focusPreviousPage(),setTimeout((()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)}),1)}onHome(e){pr(e),this.options.length<2||(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(e){pr(e),this.options.length<2||(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(e){const t=ye.toString(e.keyCode);let i=-1;for(let n=0;n{this._register(ws(this.selectElement,e,(e=>{this.selectElement.focus()})))})),this._register(ys(this.selectElement,"click",(e=>{pr(e,!0)}))),this._register(ys(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value,this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})}))),this._register(ys(this.selectElement,"keydown",(e=>{let t=!1;K?18!==e.keyCode&&16!==e.keyCode&&10!==e.keyCode||(t=!0):(18===e.keyCode&&e.altKey||10===e.keyCode||3===e.keyCode)&&(t=!0),t&&e.stopPropagation()})))}get onDidSelect(){return this._onDidSelect.event}setOptions(e,t){this.options&&Wh(this.options,e)||(this.options=e,this.selectElement.options.length=0,this.options.forEach(((e,t)=>{this.selectElement.add(this.createOption(e.text,t,e.isDisabled))}))),void 0!==t&&this.select(t)}select(e){0===this.options.length?this.selected=0:e>=0&&ethis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new kd)),this._actionRunner}set actionRunner(e){this._actionRunner=e}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register($L.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,d&&this._register(ws(e,ur.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(xk.TEXT,this._action.label)})))),this._register(ws(t,qL.Tap,(e=>this.onClick(e,!0)))),this._register(ws(t,ur.MOUSE_DOWN,(e=>{i||pr(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),K&&this._register(ws(t,ur.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register(ws(t,ur.CLICK,(e=>{pr(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register(ws(t,ur.DBLCLICK,(e=>{pr(e,!0)}))),[ur.MOUSE_UP,ur.MOUSE_OUT].forEach((e=>{this._register(ws(t,e,(e=>{pr(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;pr(e,!0);const n=kl(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var e,t,i;if(!this.element)return;const n=null!==(e=this.getTooltip())&&void 0!==e?e:"";if(this.updateAriaLabel(),null===(t=this.options.hoverDelegate)||void 0===t?void 0:t.showNativeHover)this.element.title=n;else if(this.customHover||""===n)this.customHover&&this.customHover.update(n);else{const e=null!==(i=this.options.hoverDelegate)&&void 0!==i?i:QL("element");this.customHover=this._store.add(iD().setupUpdatableHover(e,this.element,n))}}updateAriaLabel(){var e;if(this.element){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.element.setAttribute("aria-label",t)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}class NT extends ET{constructor(e,t,i){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),xl(this.element);const t=document.createElement("a");if(t.classList.add("action-label"),t.setAttribute("role",this.getDefaultAriaRole()),this.label=t,this.element.appendChild(t),this.options.label&&this.options.keybinding){const e=document.createElement("span");e.classList.add("keybinding"),e.textContent=this.options.keybinding,this.element.appendChild(e)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===xd.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(e=this.action.label,this.options.keybinding&&(e=v(0,"{0} ({1})",e,this.options.keybinding))),null!=e?e:void 0}updateClass(){var e;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):null===(e=this.label)||void 0===e||e.classList.remove("codicon")}updateEnabled(){var e,t;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),null===(e=this.element)||void 0===e||e.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),null===(t=this.element)||void 0===t||t.classList.add("disabled"))}updateAriaLabel(){var e;if(this.label){const t=null!==(e=this.getTooltip())&&void 0!==e?e:"";this.label.setAttribute("aria-label",t)}}updateChecked(){this.label&&(void 0!==this.action.checked?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.removeAttribute("aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}class IT extends ET{constructor(e,t,i,n,o,s,r){super(e,t),this.selectBox=new xT(i,n,o,s,r),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(e){this.selectBox.select(e)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(e,t){this.actionRunner.run(this._action,this.getActionContext(e,t))}getActionContext(e,t){return e}setFocusable(e){this.selectBox.setFocusable(e)}focus(){var e;null===(e=this.selectBox)||void 0===e||e.focus()}blur(){var e;null===(e=this.selectBox)||void 0===e||e.blur()}render(e){this.selectBox.render(e)}}class TT extends lt{constructor(e,t={}){var i,n,o,s,r,a,l;let d,c;switch(super(),this._actionRunnerDisposables=this._register(new at),this.viewItemDisposables=this._register(new ut),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new kt),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new kt({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new kt),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new kt),this.onWillRun=this._onWillRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(s=null===(o=this.options.triggerKeys)||void 0===o?void 0:o.keyDown)&&void 0!==s&&s,keys:null!==(a=null===(r=this.options.triggerKeys)||void 0===r?void 0:r.keys)&&void 0!==a?a:[3,10]},this._hoverDelegate=null!==(l=t.hoverDelegate)&&void 0!==l?l:this._register(XL()),this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new kd,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",this._orientation){case 0:d=[15],c=[17];break;case 1:d=[16],c=[18],this.domNode.className+=" vertical"}this._register(ws(this.domNode,ur.KEY_DOWN,(e=>{const t=new Ke(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;d&&(t.equals(d[0])||t.equals(d[1]))?i=this.focusPrevious():c&&(t.equals(c[0])||t.equals(c[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof ET&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(ws(this.domNode,ur.KEY_UP,(e=>{const t=new Ke(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026)||t.equals(16)||t.equals(18)||t.equals(15)||t.equals(17))&&this.updateFocusedItem()}))),this.focusTracker=this._register(fr(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{js()!==this.domNode&&Vs(js(),this.domNode)||(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof ET&&e.isEnabled()));e instanceof ET&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof ET&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){var e,t;for(let i=0;it.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){this._actionRunner=e,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e)))),this.viewItems.forEach((t=>t.actionRunner=e))}getContainer(){return this.domNode}getAction(e){var t;if("number"==typeof e)return null===(t=this.viewItems[e])||void 0===t?void 0:t.action;if(lr(e)){for(;e.parentElement!==this.actionsList;){if(!e.parentElement)return;e=e.parentElement}for(let t=0;t{const i=document.createElement("li");let o;i.className="action-item",i.setAttribute("role","presentation");const s={hoverDelegate:this._hoverDelegate,...t};this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e,s)),o||(o=new NT(this.context,e,s)),this.options.allowContextMenu||this.viewItemDisposables.set(o,ws(i,ur.CONTEXT_MENU,(e=>{pr(e,!0)}))),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(i),this.focusable&&o instanceof ET&&0===this.viewItems.length&&o.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(o)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,o),n++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=ot(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),vs(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return 0===this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===xd.ID));return this.updateFocus(),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&(this.options.focusOnlyEnabledItems&&!i.isEnabled()||i.action.id===xd.ID));return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n,o;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const s=void 0!==this.focusedItem?this.viewItems[this.focusedItem]:void 0;if(s){let n=!0;Dl(s.focus)||(n=!1),this.options.focusOnlyEnabledItems&&Dl(s.isEnabled)&&!s.isEnabled()&&(n=!1),s.action.id===xd.ID&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(s.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0),n&&(null===(o=s.showHover)||void 0===o||o.call(s))}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof ET){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}async run(e,t){await this._actionRunner.run(e,t)}dispose(){this._context=void 0,this.viewItems=ot(this.viewItems),this.getContainer().remove(),super.dispose()}}var MT=i(2749),AT={};AT.styleTagTransform=Gr(),AT.setAttributes=Kr(),AT.insert=zr().bind(null,"head"),AT.domAPI=Vr(),AT.insertStyleElement=qr(),Br()(MT.Z,AT),MT.Z&&MT.Z.locals&&MT.Z.locals;class RT{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,s=t.length;o=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},sM=function(e,t){return function(i,n){t(i,n,e)}};const rM="acceptSelectedCodeAction",aM="previewSelectedCodeAction";class lM{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 n,o;i.text.textContent=null!==(o=null===(n=e.group)||void 0===n?void 0:n.title)&&void 0!==o?o:""}disposeTemplate(e){}}let dM=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");return i.className="title",e.append(i),{container:e,icon:t,text:i,keybinding:new KT(e,te)}}renderElement(e,t,i){var n,o,s;if((null===(n=e.group)||void 0===n?void 0:n.icon)?(i.icon.className=Rl.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=Em(e.group.icon.color.id))):(i.icon.className=Rl.asClassName(Ml.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=pM(e.label),i.keybinding.set(e.keybinding),function(e,...t){e?kr(...t):xr(...t)}(!!e.keybinding,i.keybinding.element);const r=null===(o=this._keybindingService.lookupKeybinding(rM))||void 0===o?void 0:o.getLabel(),a=null===(s=this._keybindingService.lookupKeybinding(aM))||void 0===s?void 0:s.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:r&&a?this._supportsPreview&&e.canPreview?i.container.title=v(0,"{0} to Apply, {1} to Preview",r,a):i.container.title=v(0,"{0} to Apply",r):i.container.title=""}disposeTemplate(e){e.keybinding.dispose()}};dM=oM([sM(1,uD)],dM);class cM extends UIEvent{constructor(){super("acceptSelectedAction")}}class hM extends UIEvent{constructor(){super("previewSelectedAction")}}function uM(e){if("action"===e.kind)return e.label}let gM=class extends lt{constructor(e,t,i,n,o,s){super(),this._delegate=n,this._contextViewService=o,this._keybindingService=s,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new Pt),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const r={getHeight:e=>"header"===e.kind?this._headerLineHeight:this._actionLineHeight,getTemplateId:e=>e.kind};this._list=this._register(new mT(e,this.domNode,r,[new dM(t,this._keybindingService),new lM],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:uM},accessibilityProvider:{getAriaLabel:e=>{if("action"===e.kind){let t=e.label?pM(null==e?void 0:e.label):"";return e.disabled&&(t=v(0,"{0}, Disabled Reason: {1}",t,e.disabled)),t}return null},getWidgetAriaLabel:()=>v(0,"Action Widget"),getRole:e=>"action"===e.kind?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(XT),this._register(this._list.onMouseClick((e=>this.onListClick(e)))),this._register(this._list.onMouseOver((e=>this.onListHover(e)))),this._register(this._list.onDidChangeFocus((()=>this.onFocus()))),this._register(this._list.onDidChangeSelection((e=>this.onListSelection(e)))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&"action"===e.kind}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter((e=>"header"===e.kind)).length,i=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(i);let n=e;if(this._allMenuItems.length>=50)n=380;else{const t=this._allMenuItems.map(((e,t)=>{const i=this.domNode.ownerDocument.getElementById(this._list.getElementID(t));if(i){i.style.width="auto";const e=i.getBoundingClientRect().width;return i.style.width="",e}return 0}));n=Math.max(...t,e)}const o=Math.min(i,.7*this.domNode.ownerDocument.body.clientHeight);return this._list.layout(o,n),this.domNode.style.height=`${o}px`,this._list.domFocus(),n}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(0===t.length)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const o=e?new hM:new cM;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 hM):this._list.setSelection([])}onFocus(){var e,t;const i=this._list.getFocus();if(0===i.length)return;const n=i[0],o=this._list.element(n);null===(t=(e=this._delegate).onFocus)||void 0===t||t.call(e,o.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&"action"===t.kind){const e=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=e?e.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus("number"==typeof e.index?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};function pM(e){return e.replace(/\r\n|\r|\n/g," ")}gM=oM([sM(4,cD),sM(5,uD)],gM);var mM=function(e,t){return function(i,n){t(i,n,e)}};Tm("actionBar.toggledBackground",{dark:__,light:__,hcDark:__,hcLight:__},v(0,"Background color for toggled action items in action bar."));const fM={Visible:new gc("codeActionMenuVisible",!1,v(0,"Whether the action widget list is visible"))},_M=vd("actionWidgetService");let vM=class extends lt{get isVisible(){return fM.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new dt)}show(e,t,i,n,o,s,r){const a=fM.Visible.bindTo(this._contextKeyService),l=this._instantiationService.createInstance(gM,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>o,render:e=>(a.set(!0),this._renderWidget(e,l,null!=r?r:[])),onHide:e=>{a.reset(),this._onWidgetClosed(e)}},s,!1)}acceptSelected(e){var t;null===(t=this._list.value)||void 0===t||t.acceptSelected(e)}focusPrevious(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusPrevious()}focusNext(){var e,t;null===(t=null===(e=this._list)||void 0===e?void 0:e.value)||void 0===t||t.focusNext()}hide(e){var t;null===(t=this._list.value)||void 0===t||t.hide(e),this._list.clear()}_renderWidget(e,t,i){var n;const o=document.createElement("div");if(o.classList.add("action-widget"),e.appendChild(o),this._list.value=t,!this._list.value)throw new Error("List has no value");o.appendChild(this._list.value.domNode);const s=new at,r=document.createElement("div"),a=e.appendChild(r);a.classList.add("context-view-block"),s.add(ws(a,ur.MOUSE_DOWN,(e=>e.stopPropagation())));const l=document.createElement("div"),d=e.appendChild(l);d.classList.add("context-view-pointerBlock"),s.add(ws(d,ur.POINTER_MOVE,(()=>d.remove()))),s.add(ws(d,ur.MOUSE_DOWN,(()=>d.remove())));let c=0;if(i.length){const e=this._createActionBar(".action-widget-action-bar",i);e&&(o.appendChild(e.getContainer().parentElement),s.add(e),c=e.getContainer().offsetWidth)}const h=null===(n=this._list.value)||void 0===n?void 0:n.layout(c);o.style.width=`${h}px`;const u=s.add(fr(e));return s.add(u.onDidBlur((()=>this.hide(!0)))),s}_createActionBar(e,t){if(!t.length)return;const i=Sr(e),n=new TT(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;null===(t=this._list.value)||void 0===t||t.hide(e)}};vM=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([mM(0,cD),mM(1,pc),mM(2,_d)],vM),Ng(_M,vM,1);const bM=1100;var wM,CM;Wc(class extends Bc{constructor(){super({id:"hideCodeActionWidget",title:b(0,"Hide action widget"),precondition:fM.Visible,keybinding:{weight:bM,primary:9,secondary:[1033]}})}run(e){e.get(_M).hide(!0)}}),Wc(class extends Bc{constructor(){super({id:"selectPrevCodeAction",title:b(0,"Select previous action"),precondition:fM.Visible,keybinding:{weight:bM,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(e){const t=e.get(_M);t instanceof vM&&t.focusPrevious()}}),Wc(class extends Bc{constructor(){super({id:"selectNextCodeAction",title:b(0,"Select next action"),precondition:fM.Visible,keybinding:{weight:bM,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(e){const t=e.get(_M);t instanceof vM&&t.focusNext()}}),Wc(class extends Bc{constructor(){super({id:rM,title:b(0,"Accept selected action"),precondition:fM.Visible,keybinding:{weight:bM,primary:3,secondary:[2137]}})}run(e){const t=e.get(_M);t instanceof vM&&t.acceptSelected()}}),Wc(class extends Bc{constructor(){super({id:aM,title:b(0,"Preview selected action"),precondition:fM.Visible,keybinding:{weight:bM,primary:2051}})}run(e){const t=e.get(_M);t instanceof vM&&t.acceptSelected(!0)}}),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(wM||(wM={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=v(0,"Error"),t[e.Warning]=v(0,"Warning"),t[e.Info]=v(0,"Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case pD.Error:return e.Error;case pD.Warning:return e.Warning;case pD.Info:return e.Info;case pD.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return pD.Error;case e.Warning:return pD.Warning;case e.Info:return pD.Info;case e.Hint:return pD.Ignore}}}(wM||(wM={})),function(e){const t="";function i(e,i){const n=[t];return e.source?n.push(e.source.replace("¦","\\¦")):n.push(t),e.code?"string"==typeof e.code?n.push(e.code.replace("¦","\\¦")):n.push(e.code.value.replace("¦","\\¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(wM.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("¦","\\¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(CM||(CM={}));const yM=vd("markerService"),SM=new gc("supportedCodeAction",""),kM="_typescript.applyFixAllCodeAction";class xM extends lt{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new $t),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),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((e=>Ql(e,t.uri)))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2,triggerAction:EE.Default})}),this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(1===e.type)return t;const i=this._editor.getOption(65).enabled;if(i!==iE.Off){if(i===iE.On)return t;if(i===iE.OnCode){if(!t.isEmpty())return t;const e=this._editor.getModel(),{lineNumber:i,column:n}=t.getPosition(),o=e.getLineContent(i);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===e.getLineMaxColumn(i)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return t}}}var LM;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i){this.trigger=e,this.position=t,this._cancellablePromise=i,this.type=1,this.actions=i.catch((e=>{if(Ne(e))return DM;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(LM||(LM={}));const DM=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class EM extends lt{constructor(e,t,i,n,o,s){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=o,this._configurationService=s,this._codeActionOracle=this._register(new dt),this._state=LM.Empty,this._onDidChangeState=this._register(new kt),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=SM.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(65)&&this._update()}))),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(LM.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return!!this._configurationService&&this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:null==t?void 0:t.uri})}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(LM.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(91)){const t=this._registry.all(e).flatMap((e=>{var t;return null!==(t=e.providedCodeActionKinds)&&void 0!==t?t:[]}));this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new xM(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(LM.Empty);const n=t.selection.getStartPosition(),o=Wt((async i=>{var n,o,s,r,a,l,d,c,h,u;if(this._settingEnabledNearbyQuickfixes()&&1===t.trigger.type&&(t.trigger.triggerAction===EE.QuickFix||(null===(o=null===(n=t.trigger.filter)||void 0===n?void 0:n.include)||void 0===o?void 0:o.contains(DE.QuickFix)))){const n=await HE(this._registry,e,t.selection,t.trigger,BL.None,i),o=[...n.allActions];if(i.isCancellationRequested)return DM;const g=null===(s=n.validActions)||void 0===s?void 0:s.some((e=>!!e.action.kind&&DE.QuickFix.contains(new kk(e.action.kind)))),p=this._markerService.read({resource:e.uri});if(g){for(const e of n.validActions)(null===(a=null===(r=e.action.command)||void 0===r?void 0:r.arguments)||void 0===a?void 0:a.some((e=>"string"==typeof e&&e.includes(kM))))&&(e.action.diagnostics=[...p.filter((e=>e.relatedInformation))]);return{validActions:n.validActions,allActions:o,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}if(!g&&p.length>0){const s=t.selection.getPosition();let r=s,a=Number.MAX_VALUE;const g=[...n.validActions];for(const m of p){const f=m.endColumn,_=m.endLineNumber,v=m.startLineNumber;if(_===s.lineNumber||v===s.lineNumber){r=new wd(_,f);const m={type:t.trigger.type,triggerAction:t.trigger.triggerAction,filter:{include:(null===(l=t.trigger.filter)||void 0===l?void 0:l.include)?null===(d=t.trigger.filter)||void 0===d?void 0:d.include:DE.QuickFix},autoApply:t.trigger.autoApply,context:{notAvailableMessage:(null===(c=t.trigger.context)||void 0===c?void 0:c.notAvailableMessage)||"",position:r}},v=new uh(r.lineNumber,r.column,r.lineNumber,r.column),b=await HE(this._registry,e,v,m,BL.None,i);if(0!==b.validActions.length){for(const e of b.validActions)(null===(u=null===(h=e.action.command)||void 0===h?void 0:h.arguments)||void 0===u?void 0:u.some((e=>"string"==typeof e&&e.includes(kM))))&&(e.action.diagnostics=[...p.filter((e=>e.relatedInformation))]);0===n.allActions.length&&o.push(...b.allActions),Math.abs(s.column-f)i.findIndex((t=>t.action.title===e.action.title))===t));return m.sort(((e,t)=>e.action.isPreferred&&!t.action.isPreferred?-1:!e.action.isPreferred&&t.action.isPreferred||e.action.isAI&&!t.action.isAI?1:!e.action.isAI&&t.action.isAI?-1:0)),{validActions:m,allActions:o,documentation:n.documentation,hasAutoFix:n.hasAutoFix,hasAIFix:n.hasAIFix,allAIFixes:n.allAIFixes,dispose:()=>{n.dispose()}}}}return HE(this._registry,e,t.selection,t.trigger,BL.None,i)}));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(o,250));const s=new LM.Triggered(t.trigger,n,o);let r=!1;1===this._state.type&&(r=1===this._state.trigger.type&&1===s.type&&2===s.trigger.type&&this._state.position!==s.position),r?setTimeout((()=>{this.setState(s)}),500):this.setState(s)}),void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:EE.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;null===(t=this._codeActionOracle.value)||void 0===t||t.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||this._disposed||this._onDidChangeState.fire(e))}}var NM,IM=function(e,t){return function(i,n){t(i,n,e)}};let TM=NM=class extends lt{static get(e){return e.getContribution(NM.ID)}constructor(e,t,i,n,o,s,r,a,l,d,c){super(),this._commandService=r,this._configurationService=a,this._actionWidgetService=l,this._instantiationService=d,this._telemetryService=c,this._activeCodeActions=this._register(new dt),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new EM(this._editor,o.codeActionProvider,t,i,s,a)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._lightBulbWidget=new sn((()=>{const e=this._editor.getContribution(rN.ID);return e&&this._register(e.onClick((e=>this.showCodeActionsFromLightbulb(e.actions,e)))),e})),this._resolver=n.createInstance(qE),this._register(this._editor.onDidLayoutChange((()=>this._actionWidgetService.hide())))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(e,t){if(this._telemetryService.publicLog2("codeAction.showCodeActionsFromLightbulb",{codeActionListLength:e.validActions.length,codeActions:e.validActions.map((e=>e.action.title)),codeActionProviders:e.validActions.map((e=>{var t,i;return null!==(i=null===(t=e.provider)||void 0===t?void 0:t.displayName)&&void 0!==i?i:""}))}),e.allAIFixes&&1===e.validActions.length){const t=e.validActions[0],i=t.action.command;return i&&"inlineChat.start"===i.id&&i.arguments&&i.arguments.length>=1&&(i.arguments[0]={...i.arguments[0],autoSend:!1}),void await this._applyCodeAction(t,!1,!1,UE.FromAILightbulb)}await this.showCodeActionList(e,t,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(e,t,i){return this.showCodeActionList(t,i,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(e,t,i,n){var o;if(!this._editor.hasModel())return;null===(o=RL.get(this._editor))||void 0===o||o.closeMessage();const s=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:s}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,i,n){try{await this._instantiationService.invokeFunction(KE,e,n,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:EE.QuickFix,filter:{}})}}async update(e){var t,i,n,o,s,r,a;if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let l;try{l=await e.actions}catch(e){return void xe(e)}if(!this._disposed)if(null===(i=this._lightBulbWidget.value)||void 0===i||i.update(l,e.trigger,e.position),1===e.trigger.type){if(null===(n=e.trigger.filter)||void 0===n?void 0:n.include){const t=this.tryGetValidActionToApply(e.trigger,l);if(t){try{null===(o=this._lightBulbWidget.value)||void 0===o||o.hide(),await this._applyCodeAction(t,!1,!1,UE.FromCodeActions)}finally{l.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,l);if(t&&t.action.disabled)return null===(s=RL.get(this._editor))||void 0===s||s.showMessage(t.action.disabled,e.trigger.context.position),void l.dispose()}}const t=!!(null===(r=e.trigger.filter)||void 0===r?void 0:r.include);if(e.trigger.context&&(!l.allActions.length||!t&&!l.validActions.length))return null===(a=RL.get(this._editor))||void 0===a||a.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=l,void l.dispose();this._activeCodeActions.value=l,this.showCodeActionList(l,this.toCoords(e.position),{includeDisabledActions:t,fromLightbulb:!1})}else this._actionWidgetService.isVisible?l.dispose():this._activeCodeActions.value=l}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),o=this._editor.getDomNode();if(!o)return;const s=i.includeDisabledActions&&(this._showDisabled||0===e.validActions.length)?e.allActions:e.validActions;if(!s.length)return;const r=wd.isIPosition(t)?this.toCoords(t):t,a={onSelect:async(e,t)=>{this._applyCodeAction(e,!0,!!t,i.fromLightbulb?UE.FromAILightbulb:UE.FromCodeActions),this._actionWidgetService.hide(!1),n.clear()},onHide:t=>{var o;null===(o=this._editor)||void 0===o||o.focus(),n.clear(),i.fromLightbulb&&void 0!==t&&this._telemetryService.publicLog2("codeAction.showCodeActionList.onHide",{codeActionListLength:e.validActions.length,didCancel:t,codeActions:e.validActions.map((e=>e.action.title))})},onHover:async(e,t)=>{var i;if(t.isCancellationRequested)return;let n=!1;const o=e.action.kind;if(o){const e=new kk(o);n=[DE.RefactorExtract,DE.RefactorInline,DE.RefactorRewrite,DE.RefactorMove,DE.Source].some((t=>t.contains(e)))}return{canPreview:n||!!(null===(i=e.action.edit)||void 0===i?void 0:i.edits.length)}},onFocus:e=>{var t,i;if(e&&e.action){const o=e.action.ranges,s=e.action.diagnostics;if(n.clear(),o&&o.length>0){const e=s&&(null==s?void 0:s.length)>1?s.map((e=>({range:e,options:NM.DECORATION}))):o.map((e=>({range:e,options:NM.DECORATION})));n.set(e)}else if(s&&s.length>0){const e=s.map((e=>({range:e,options:NM.DECORATION})));n.set(e);const o=s[0];o.startLineNumber&&o.startColumn&&oa(v(0,"Context: {0} at line {1} and column {2}.",null===(i=null===(t=this._editor.getModel())||void 0===t?void 0:t.getWordAtPosition({lineNumber:o.startLineNumber,column:o.startColumn}))||void 0===i?void 0:i.word,o.startLineNumber,o.startColumn))}}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,function(e,t,i){if(!t)return e.map((e=>{var t;return{kind:"action",item:e,group:JE,disabled:!!e.action.disabled,label:e.action.disabled||e.action.title,canPreview:!!(null===(t=e.action.edit)||void 0===t?void 0:t.edits.length)}}));const n=eN.map((e=>({group:e,actions:[]})));for(const t of e){const e=t.action.kind?new kk(t.action.kind):kk.None;for(const i of n)if(i.group.kind.contains(e)){i.actions.push(t);break}}const o=[];for(const e of n)if(e.actions.length){o.push({kind:"header",group:e.group});for(const t of e.actions){const n=e.group;o.push({kind:"action",item:t,group:t.action.isAI?{title:n.title,kind:n.kind,icon:Ml.sparkle}:n,label:t.action.title,disabled:!!t.action.disabled,keybinding:i(t.action)})}}return o}(s,this._shouldShowHeaders(),this._resolver.getResolver()),a,r,o,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=Rs(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}_shouldShowHeaders(){var e;const t=null===(e=this._editor)||void 0===e?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:null==t?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map((e=>{var t;return{id:e.id,label:e.title,tooltip:null!==(t=e.tooltip)&&void 0!==t?t:"",class:void 0,enabled:!0,run:()=>{var t;return this._commandService.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}}}));return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:v(0,"Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:v(0,"Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};function MM(e){return $d.regex(SM.keys()[0],new RegExp("(\\s|^)"+hn(e.value)+"\\b"))}TM.ID="editor.contrib.codeActionController",TM.DECORATION=zy.register({description:"quickfix-highlight",className:"quickfix-edit-highlight"}),TM=NM=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([IM(1,yM),IM(2,pc),IM(3,_d),IM(4,Pk),IM(5,WL),IM(6,Nd),IM(7,Cg),IM(8,_M),IM(9,_d),IM(10,Vc)],TM),jv(((e,t)=>{((e,i)=>{i&&t.addRule(`.monaco-editor .quickfix-edit-highlight { background-color: ${i}; }`)})(0,e.getColor(wf));const i=e.getColor(yf);i&&t.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${Bv(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)}));const AM={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:v(0,"Kind of the code action to run.")},apply:{type:"string",description:v(0,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[v(0,"Always apply the first returned code action."),v(0,"Apply the first returned code action if it is the only one."),v(0,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:v(0,"Controls if only preferred code actions should be returned.")}}};function RM(e,t,i,n,o=EE.Default){if(e.hasModel()){const s=TM.get(e);null==s||s.manualTriggerAtCurrentPosition(t,o,i,n)}}oh(TM.ID,TM,3),oh(rN.ID,rN,4),ih(class extends Qc{constructor(){super({id:AE,label:v(0,"Quick Fix..."),alias:"Quick Fix...",precondition:$d.and(gh.writable,gh.hasCodeActionsProvider),kbOpts:{kbExpr:gh.textInputFocus,primary:2137,weight:100}})}run(e,t){return RM(t,v(0,"No code actions available"),void 0,void 0,EE.QuickFix)}}),ih(class extends Qc{constructor(){super({id:PE,label:v(0,"Refactor..."),alias:"Refactor...",precondition:$d.and(gh.writable,gh.hasCodeActionsProvider),kbOpts:{kbExpr:gh.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:$d.and(gh.writable,MM(DE.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:AM}]}})}run(e,t,i){const n=IE.fromUser(i,{kind:DE.Refactor,apply:"never"});return RM(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?v(0,"No preferred refactorings for '{0}' available",i.kind):v(0,"No refactorings for '{0}' available",i.kind):n.preferred?v(0,"No preferred refactorings available"):v(0,"No refactorings available"),{include:DE.Refactor.contains(n.kind)?n.kind:kk.None,onlyIncludePreferredActions:n.preferred},n.apply,EE.Refactor)}}),ih(class extends Qc{constructor(){super({id:OE,label:v(0,"Source Action..."),alias:"Source Action...",precondition:$d.and(gh.writable,gh.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:$d.and(gh.writable,MM(DE.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:AM}]}})}run(e,t,i){const n=IE.fromUser(i,{kind:DE.Source,apply:"never"});return RM(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?v(0,"No preferred source actions for '{0}' available",i.kind):v(0,"No source actions for '{0}' available",i.kind):n.preferred?v(0,"No preferred source actions available"):v(0,"No source actions available"),{include:DE.Source.contains(n.kind)?n.kind:kk.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,EE.SourceAction)}}),ih(class extends Qc{constructor(){super({id:FE,label:v(0,"Organize Imports"),alias:"Organize Imports",precondition:$d.and(gh.writable,MM(DE.SourceOrganizeImports)),kbOpts:{kbExpr:gh.textInputFocus,primary:1581,weight:100}})}run(e,t){return RM(t,v(0,"No organize imports action available"),{include:DE.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",EE.OrganizeImports)}}),ih(class extends Qc{constructor(){super({id:RE,label:v(0,"Auto Fix..."),alias:"Auto Fix...",precondition:$d.and(gh.writable,MM(DE.QuickFix)),kbOpts:{kbExpr:gh.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return RM(t,v(0,"No auto fixes available"),{include:DE.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",EE.AutoFix)}}),ih(class extends Qc{constructor(){super({id:BE,label:v(0,"Fix All"),alias:"Fix All",precondition:$d.and(gh.writable,MM(DE.SourceFixAll))})}run(e,t){return RM(t,v(0,"No fix all action available"),{include:DE.SourceFixAll,includeSourceActions:!0},"ifSingle",EE.FixAll)}}),th(new class extends Yc{constructor(){super({id:ME,precondition:$d.and(gh.writable,gh.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:AM}]}})}runEditorCommand(e,t,i){const n=IE.fromUser(i,{kind:kk.Empty,apply:"ifSingle"});return RM(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?v(0,"No preferred code actions for '{0}' available",i.kind):v(0,"No code actions for '{0}' available",i.kind):n.preferred?v(0,"No preferred code actions available"):v(0,"No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}),xc.as(Rg).registerConfiguration({...yE,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:v(0,"Enable/disable showing group headers in the Code Action menu."),default:!0}}}),xc.as(Rg).registerConfiguration({...yE,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:v(0,"Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});const PM=vd("markerDecorationsService");let OM=class{constructor(e,t){}dispose(){}};OM.ID="editor.contrib.markerDecorations",OM=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,PM)],OM),oh(OM.ID,OM,0);var FM=i(5875),BM={};BM.styleTagTransform=Gr(),BM.setAttributes=Kr(),BM.insert=zr().bind(null,"head"),BM.domAPI=Vr(),BM.insertStyleElement=qr(),Br()(FM.Z,BM),FM.Z&&FM.Z.locals&&FM.Z.locals;class WM extends lt{constructor(e,t){super(),this._onDidChange=this._register(new kt),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let e=null;const t=()=>{e?this.observe({width:e.width,height:e.height}):this.observe()};let i=!1,n=!1;const o=()=>{if(i&&!n)try{i=!1,n=!0,t()}finally{Ls(ls(this._referenceDomElement),(()=>{n=!1,o()}))}};this._resizeObserver=new ResizeObserver((t=>{e=t&&t[0]&&t[0].contentRect?{width:t[0].contentRect.width,height:t[0].contentRect.height}:null,i=!0,o()})),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}class VM extends lt{constructor(e){super(),this._onDidChange=this._register(new kt),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(e,!0),this._mediaQueryList=null,this._handleChange(e,!1)}_handleChange(e,t){var i;null===(i=this._mediaQueryList)||void 0===i||i.removeEventListener("change",this._listener),this._mediaQueryList=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}}class HM extends lt{get value(){return this._value}constructor(e){super(),this._onDidChange=this._register(new kt),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(e);const t=this._register(new VM(e));this._register(t.onDidChange((()=>{this._value=this._getPixelRatio(e),this._onDidChange.fire(this._value)})))}_getPixelRatio(e){const t=document.createElement("canvas").getContext("2d");return(e.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)}}const zM=new class{constructor(){this.mapWindowIdToPixelRatioMonitor=new Map}_getOrCreatePixelRatioMonitor(e){const t=us(e);let i=this.mapWindowIdToPixelRatioMonitor.get(t);return i||(i=it(new HM(e)),this.mapWindowIdToPixelRatioMonitor.set(t,i),it(_t.once(_s)((({vscodeWindowId:e})=>{e===t&&(null==i||i.dispose(),this.mapWindowIdToPixelRatioMonitor.delete(t))})))),i}getInstance(e){return this._getOrCreatePixelRatioMonitor(e)}};class UM{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class KM{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(e){this._createDomElements(),e.document.body.appendChild(this._container),this._readFromDomElements(),e.document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");yL(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");yL(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");yL(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let s;0===e.type&&(s=t),2===e.type&&(s=i),1===e.type&&(s=n),s.appendChild(document.createElement("br"));const r=document.createElement("span");KM._render(r,e),s.appendChild(r),o.push(r)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;ethis._values[e]))}}const YM=new class extends lt{constructor(){super(...arguments),this._cache=new Map,this._evictUntrustedReadingsTimeout=-1,this._onDidChange=this._register(new kt),this.onDidChange=this._onDidChange.event}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache.clear(),this._onDidChange.fire()}_ensureCache(e){const t=us(e);let i=this._cache.get(t);return i||(i=new ZM,this._cache.set(t,i)),i}_writeToCache(e,t,i){this._ensureCache(e).put(t,i),i.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=e.setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings(e)}),5e3))}_evictUntrustedReadings(e){const t=this._ensureCache(e),i=t.getValues();let n=!1;for(const e of i)e.isTrusted||(n=!0,t.remove(e));n&&this._onDidChange.fire()}readFontInfo(e,t){const i=this._ensureCache(e);if(!i.has(t)){let i=this._actualReadFontInfo(e,t);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new GM({pixelRatio:zM.getInstance(e).value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(e,t,i)}return i.get(t)}_createRequest(e,t,i,n){const o=new UM(e,t);return i.push(o),null==n||n.push(o),o}_actualReadFontInfo(e,t){const i=[],n=[],o=this._createRequest("n",0,i,n),s=this._createRequest("m",0,i,null),r=this._createRequest(" ",0,i,n),a=this._createRequest("0",0,i,n),l=this._createRequest("1",0,i,n),d=this._createRequest("2",0,i,n),c=this._createRequest("3",0,i,n),h=this._createRequest("4",0,i,n),u=this._createRequest("5",0,i,n),g=this._createRequest("6",0,i,n),p=this._createRequest("7",0,i,n),m=this._createRequest("8",0,i,n),f=this._createRequest("9",0,i,n),_=this._createRequest("→",0,i,n),v=this._createRequest("→",0,i,null),b=this._createRequest("·",0,i,n),w=this._createRequest(String.fromCharCode(11825),0,i,null),C="|/-_ilm%";for(let e=0,t=8;e.001){S=!1;break}}let x=!0;return S&&v.width!==k&&(x=!1),v.width>_.width&&(x=!1),new GM({pixelRatio:zM.getInstance(e).value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,fontVariationSettings:t.fontVariationSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:S,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:r.width,middotWidth:b.width,wsmiddotWidth:w.width,maxDigitWidth:y},!0)}};class QM{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=QM._read(e,this.key);this.migrate(t,(t=>QM._read(e,t)),((t,i)=>QM._write(e,t,i)))}static _read(e,t){if(void 0===e)return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const o=t.substring(0,n);return e[o]=e[o]||{},void this._write(e[o],t.substring(n+1),i)}e[t]=i}}function XM(e,t){QM.items.push(new QM(e,t))}function JM(e,t){XM(e,((i,n,o)=>{if(void 0!==i)for(const[n,s]of t)if(i===n)return void o(e,s)}))}QM.items=[],JM("wordWrap",[[!0,"on"],[!1,"off"]]),JM("lineNumbers",[[!0,"on"],[!1,"off"]]),JM("cursorBlinking",[["visible","solid"]]),JM("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),JM("renderLineHighlight",[[!0,"line"],[!1,"none"]]),JM("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),JM("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),JM("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),JM("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),JM("autoIndent",[[!1,"advanced"],[!0,"full"]]),JM("matchBrackets",[[!0,"always"],[!1,"never"]]),JM("renderFinalNewline",[[!0,"on"],[!1,"off"]]),JM("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),JM("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),JM("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),XM("autoClosingBrackets",((e,t,i)=>{!1===e&&(i("autoClosingBrackets","never"),void 0===t("autoClosingQuotes")&&i("autoClosingQuotes","never"),void 0===t("autoSurround")&&i("autoSurround","never"))})),XM("renderIndentGuides",((e,t,i)=>{void 0!==e&&(i("renderIndentGuides",void 0),void 0===t("guides.indentation")&&i("guides.indentation",!!e))})),XM("highlightActiveIndentGuide",((e,t,i)=>{void 0!==e&&(i("highlightActiveIndentGuide",void 0),void 0===t("guides.highlightActiveIndentation")&&i("guides.highlightActiveIndentation",!!e))}));const eA={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};XM("suggest.filteredTypes",((e,t,i)=>{if(e&&"object"==typeof e){for(const n of Object.entries(eA))!1===e[n[0]]&&void 0===t(`suggest.${n[1]}`)&&i(`suggest.${n[1]}`,!1);i("suggest.filteredTypes",void 0)}})),XM("quickSuggestions",((e,t,i)=>{if("boolean"==typeof e){const t=e?"on":"off";i("quickSuggestions",{comments:t,strings:t,other:t})}})),XM("experimental.stickyScroll.enabled",((e,t,i)=>{"boolean"==typeof e&&(i("experimental.stickyScroll.enabled",void 0),void 0===t("stickyScroll.enabled")&&i("stickyScroll.enabled",e))})),XM("experimental.stickyScroll.maxLineCount",((e,t,i)=>{"number"==typeof e&&(i("experimental.stickyScroll.maxLineCount",void 0),void 0===t("stickyScroll.maxLineCount")&&i("stickyScroll.maxLineCount",e))})),XM("codeActionsOnSave",((e,t,i)=>{if(e&&"object"==typeof e){let t=!1;const n={};for(const i of Object.entries(e))"boolean"==typeof i[1]?(t=!0,n[i[0]]=i[1]?"explicit":"never"):n[i[0]]=i[1];t&&i("codeActionsOnSave",n)}})),XM("codeActionWidget.includeNearbyQuickfixes",((e,t,i)=>{"boolean"==typeof e&&(i("codeActionWidget.includeNearbyQuickfixes",void 0),void 0===t("codeActionWidget.includeNearbyQuickFixes")&&i("codeActionWidget.includeNearbyQuickFixes",e))})),XM("lightbulb.enabled",((e,t,i)=>{"boolean"==typeof e&&i("lightbulb.enabled",e?void 0:"off")}));const tA=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new kt,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus)}};let iA=class extends lt{constructor(e,t,i,n,o){super(),this._accessibilityService=o,this._onDidChange=this._register(new kt),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new kt),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new WD,this.isSimpleWidget=e,this.contextMenuId=t,this._containerObserver=this._register(new WM(n,i.dimension)),this._targetWindowId=ls(n).vscodeWindowId,this._rawOptions=aA(i),this._validatedOptions=rA.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(jM.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(tA.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(YM.onDidChange((()=>this._recomputeOptions()))),this._register(zM.getInstance(ls(n)).onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=rA.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=$M.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:tA.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return rA.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:nA(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:c||d,pixelRatio:zM.getInstance(gs(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return YM.readFontInfo(gs(this._targetWindowId,!0).window,e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=aA(e);rA.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=rA.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(e){this._glyphMarginDecorationLaneCount!==e&&(this._glyphMarginDecorationLaneCount=e,this._recomputeOptions())}};function nA(){let e="";return u||g||(e+="no-user-select "),u&&(e+="no-minimap-shadow ",e+="enable-user-select "),K&&(e+="mac "),e}iA=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(4,ak)],iA);class oA{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class sA{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class rA{static validateOptions(e){const t=new oA;for(const i of bE){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new sA;for(const n of bE)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&Wh(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!rA._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of bE){const s=!rA._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new BD(i):null}static applyUpdate(e,t){let i=!1;for(const n of bE)if(t.hasOwnProperty(n.name)){const o=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=o.newValue,i=i||o.didChange}return i}}function aA(e){const t=Ch(e);return function(e){QM.items.forEach((t=>t.apply(e)))}(t),t}class lA{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(e){return new dA(this.x-e.scrollX,this.y-e.scrollY)}}class dA{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(e){return new lA(this.clientX+e.scrollX,this.clientY+e.scrollY)}}class cA{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class hA{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function uA(e){const t=Rs(e);return new cA(t.left,t.top,t.width,t.height)}function gA(e,t,i){const n=t.width/e.offsetWidth,o=t.height/e.offsetHeight,s=(i.x-t.x)/n,r=(i.y-t.y)/o;return new hA(s,r)}class pA extends Ge{constructor(e,t,i){super(ls(i),e),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=t,this.pos=new lA(this.posx,this.posy),this.editorPos=uA(i),this.relativePos=gA(i,this.editorPos,this.pos)}}class mA{constructor(e){this._editorViewDomNode=e}_create(e){return new pA(e,!1,this._editorViewDomNode)}onContextMenu(e,t){return ws(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return ws(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return ws(e,ur.MOUSE_DOWN,(e=>{t(this._create(e))}))}onPointerDown(e,t){return ws(e,ur.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onMouseLeave(e,t){return ws(e,ur.MOUSE_LEAVE,(e=>{t(this._create(e))}))}onMouseMove(e,t){return ws(e,"mousemove",(e=>t(this._create(e))))}}class fA{constructor(e){this._editorViewDomNode=e}_create(e){return new pA(e,!1,this._editorViewDomNode)}onPointerUp(e,t){return ws(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return ws(e,ur.POINTER_DOWN,(e=>{t(this._create(e),e.pointerId)}))}onPointerLeave(e,t){return ws(e,ur.POINTER_LEAVE,(e=>{t(this._create(e))}))}onPointerMove(e,t){return ws(e,"pointermove",(e=>t(this._create(e))))}}class _A extends lt{constructor(e){super(),this._editorViewDomNode=e,this._globalPointerMoveMonitor=this._register(new pN),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=ys(e.ownerDocument,"keydown",(e=>{e.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalPointerMoveMonitor.startMonitoring(e,t,i,(e=>{n(new pA(e,!0,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class vA{constructor(e){this._editor=e,this._instanceId=++vA._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new Zt((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const n=this._counter++;i=new bA(t,`dyn-rule-${this._instanceId}-${n}`,Us(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}vA._idPool=0;class bA{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElementDisposables=new at,this._styleElement=Js(i,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let o;o="object"==typeof n?Em(n.id):n,i+=`\n\t${wA(e)}: ${o};`}return i+="\n}",i}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function wA(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}class CA extends lt{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=s.left?n.width=Math.max(n.width,s.left+s.width-n.left):(t[i++]=n,n=s)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let o=0,s=e.length;or)return null;if((t=Math.min(r,Math.max(0,t)))===(n=Math.min(r,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(i,s.clientRectDeltaLeft,s.clientRectScale)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let a=e.children[t].firstChild,l=e.children[n].firstChild;if(a&&l||(!a&&0===i&&t>0&&(a=e.children[t-1].firstChild,i=1073741824),!l&&0===o&&n>0&&(l=e.children[n-1].firstChild,o=1073741824)),!a||!l)return null;i=Math.min(a.textContent.length,Math.max(0,i)),o=Math.min(l.textContent.length,Math.max(0,o));const d=this._readClientRects(a,i,l,o,s.endNode);return s.markDidDomLayout(),this._createHorizontalRangesFromClientRects(d,s.clientRectDeltaLeft,s.clientRectScale)}}class MA{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n=o||(r[a++]=new MA(Math.max(1,t.startColumn-n+1),Math.min(s+1,t.endColumn-n+1),t.className,t.type));return r}static filter(e,t,i,n){if(0===e.length)return[];const o=[];let s=0;for(let r=0,a=e.length;rt)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const d=l.startLineNumber===t?l.startColumn:i,c=l.endLineNumber===t?l.endColumn:n;o[s++]=new MA(d,c,a.inlineClassName,a.type)}return o}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=MA._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class PA{static normalize(e,t){if(0===t.length)return[];const i=[],n=new RA;let o=0;for(let s=0,r=t.length;s1&&Tn(e.charCodeAt(a-2))&&a--,l>1&&Tn(e.charCodeAt(l-2))&&l--;const h=a-1,u=l-2;o=n.consumeLowerThan(h,o,i),0===n.count&&(o=h),n.insert(u,d,c)}return n.consumeLowerThan(1073741824,o,i),i}}class OA{constructor(e,t,i,n){this.endIndex=e,this.type=t,this.metadata=i,this.containsRTL=n,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class FA{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class BA{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u,g,p,m,f,_,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=r,this.lineTokens=a,this.lineDecorations=l.sort(MA.compare),this.tabSize=d,this.startVisibleColumn=c,this.spaceWidth=h,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=f,this.fontLigatures=_,this.selectionsOnLine=v&&v.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(e,t,i,n){const o=(t<<16|i<<0)>>>0;this._data[e-1]=o,this._horizontalOffset[e-1]=n}getHorizontalOffset(e){return 0===this._horizontalOffset.length?0:this._horizontalOffset[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=VA.getPartIndex(t),n=VA.getCharIndex(t);return new WA(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i<<0)>>>0;let o=0,s=this.length-1;for(;o+1>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;const r=this._data[o],a=this._data[s];if(r===n)return o;if(a===n)return s;const l=VA.getPartIndex(r),d=VA.getCharIndex(r);let c;return c=l!==VA.getPartIndex(a)?t:VA.getCharIndex(a),i-d<=c-i?o:s}}class HA{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function zA(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendString("");let i=0,n=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendString(''),1===s.type&&(o|=1,i++),2===s.type&&(o|=2,n++));t.appendString("");const s=new VA(1,i+n);return s.setColumnInfo(1,i,0,0),new HA(s,!1,o)}return t.appendString(""),new HA(new VA(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,n=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,s=e.lineContent,r=e.len,a=e.isOverflowing,l=e.overflowingCharCount,d=e.parts,c=e.fauxIndentLength,h=e.tabSize,u=e.startVisibleColumn,g=e.containsRTL,p=e.spaceWidth,m=e.renderSpaceCharCode,f=e.renderWhitespace,_=e.renderControlCharacters,b=new VA(r+1,d.length);let w=!1,C=0,y=u,S=0,k=0,x=0;g?t.appendString(''):t.appendString("");for(let e=0,a=d.length;e=c&&(t+=n)}}for(L&&(t.appendString(' style="width:'),t.appendString(String(p*i)),t.appendString('px"')),t.appendASCIICharCode(62);C1?t.appendCharCode(8594):t.appendCharCode(65515);for(let e=2;e<=o;e++)t.appendCharCode(160)}else i=2,o=1,t.appendCharCode(m),t.appendCharCode(8204);S+=i,k+=o,C>=c&&(y+=o)}}else for(t.appendASCIICharCode(62);C=c&&(y+=o)}D?x++:x=0,C>=r&&!w&&a.isPseudoAfter()&&(w=!0,b.setColumnInfo(C+1,e,S,k)),t.appendString("")}return w||b.setColumnInfo(r+1,d.length-1,S,k),a&&(t.appendString(''),t.appendString(v(0,"Show more ({0})",function(e){return e<1024?v(0,"{0} chars",e):e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}(l))),t.appendString("")),t.appendString(""),new HA(b,g,o)}(function(e){const t=e.lineContent;let i,n,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(s[r++]=new OA(n,"",0,!1));let a=n;for(let l=0,d=i.getCount();l=o){const i=!!t&&Vn(e.substring(a,o));s[r++]=new OA(o,c,0,i);break}const h=!!t&&Vn(e.substring(a,d));s[r++]=new OA(d,c,0,h),a=d}return s}(t,e.containsRTL,e.lineTokens,e.fauxIndentLength,o);e.renderControlCharacters&&!e.isBasicASCII&&(s=function(e,t){const i=[];let n=new OA(0,"",0,!1),o=0;for(const s of t){const t=s.endIndex;for(;on.endIndex&&(n=new OA(o,s.type,s.metadata,s.containsRTL),i.push(n)),n=new OA(o+1,"mtkcontrol",s.metadata,!1),i.push(n));o>n.endIndex&&(n=new OA(t,s.type,s.metadata,s.containsRTL),i.push(n))}return i}(t,s)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace&&!e.continuesWithWrappedLine)&&(s=function(e,t,i,n){const o=e.continuesWithWrappedLine,s=e.fauxIndentLength,r=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,d=e.selectionsOnLine,c=1===e.renderWhitespace,h=3===e.renderWhitespace,u=e.renderSpaceWidth!==e.spaceWidth,g=[];let p=0,m=0,f=n[m].type,_=n[m].containsRTL,v=n[m].endIndex;const b=n.length;let w,C=!1,y=_n(t);-1===y?(C=!0,y=i,w=i):w=bn(t);let S=!1,k=0,x=d&&d[k],L=a%r;for(let e=s;e=x.endOffset&&(k++,x=d&&d[k]),ew)a=!0;else if(9===o)a=!0;else if(32===o)if(c)if(S)a=!0;else{const n=e+1e),a&&h&&(a=C||e>w),a&&_&&e>=y&&e<=w&&(a=!1),S){if(!a||!l&&L>=r){if(u)for(let t=(p>0?g[p-1].endIndex:s)+1;t<=e;t++)g[p++]=new OA(t,"mtkw",1,!1);else g[p++]=new OA(e,"mtkw",1,!1);L%=r}}else(e===v||a&&e>s)&&(g[p++]=new OA(e,f,0,_),L%=r);for(9===o?L=r:jn(o)?L+=2:L++,S=a;e===v&&(m++,m0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(D=!0)}else D=!0;if(D)if(u)for(let e=(p>0?g[p-1].endIndex:s)+1;e<=i;e++)g[p++]=new OA(e,"mtkw",1,!1);else g[p++]=new OA(i,"mtkw",1,!1);else g[p++]=new OA(i,f,0,_);return g}(e,t,o,s));let r=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;td&&(d=e.startOffset,a[l++]=new OA(d,c,h,u)),!(e.endOffset+1<=n)){d=n,a[l++]=new OA(d,c+" "+e.className,h|e.metadata,u);break}d=e.endOffset+1,a[l++]=new OA(d,c+" "+e.className,h|e.metadata,u),r++}n>d&&(d=n,a[l++]=new OA(d,c,h,u))}const c=i[i.length-1].endIndex;if(r=50&&(o[s++]=new OA(d+1,t,i,l),c=d+1,d=-1);c!==a&&(o[s++]=new OA(a,t,i,l))}else o[s++]=r;n=a}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,l=i.containsRTL,d=Math.ceil(a/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}const $A=!!q||!(j||d||u);let GA=!0;class ZA{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(50),o=i.get(38);this.renderWhitespace="off"===o?i.get(99):"none",this.renderControlCharacters=i.get(94),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(33),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(67),this.stopRenderingLineAfter=i.get(117),this.fontLigatures=i.get(51)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class YA{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=CL(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return!(!Bv(this._options.themeType)&&"selection"!==this._options.renderWhitespace||(this._isMaybeInvalid=!0,0))}renderLine(e,t,i,n,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const s=n.getViewLineRenderingData(e),r=this._options,a=MA.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let l=null;if(Bv(r.themeType)||"selection"===this._options.renderWhitespace){const t=n.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:s.minColumn,n=i.endLineNumber===e?i.endColumn:s.maxColumn;t');const c=zA(d,o);o.appendString("");let h=null;return GA&&$A&&s.isBasicASCII&&r.useMonospaceOptimizations&&0===c.containsForeignElements&&(h=new QA(this._renderedViewLine?this._renderedViewLine.domNode:null,d,c.characterMapping)),h||(h=eR(this._renderedViewLine?this._renderedViewLine.domNode:null,d,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,t,i){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(i))}getWidth(e){return this._renderedViewLine?this._renderedViewLine.getWidth(e):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof QA}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof QA?this._renderedViewLine.monospaceAssumptionsAreValid():GA}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof QA&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==o&&t>o+1&&i>o+1)return new IA(!0,[new EA(this.getWidth(n),0)]);-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return s&&s.length>0?new IA(!1,s):null}getColumnOfNodeOffset(e,t){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t):1}}YA.CLASS_NAME="view-line";class QA{constructor(e,t,i){this._cachedWidth=-1,this.domNode=e,this.input=t;const n=Math.floor(t.lineContent.length/300);if(n>0){this._keyColumnPixelOffsetCache=new Float32Array(n);for(let e=0;e=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),GA=!1)}return GA}toSlowRenderedLine(){return eR(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getColumnPixelOffset(e,t,n),s=this._getColumnPixelOffset(e,i,n);return[new EA(o,s-o)]}_getColumnPixelOffset(e,t,i){if(t<=300){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const n=Math.floor((t-1)/300)-1,o=300*(n+1)+1;let s=-1;if(this._keyColumnPixelOffsetCache&&(s=this._keyColumnPixelOffsetCache[n],-1===s&&(s=this._actualReadPixelOffset(e,o,i),this._keyColumnPixelOffsetCache[n]=s)),-1===s){const e=this._characterMapping.getHorizontalOffset(t);return this._charWidth*e}const r=this._characterMapping.getHorizontalOffset(o),a=this._characterMapping.getHorizontalOffset(t);return s+this._charWidth*(a-r)}_getReadingTarget(e){return e.domNode.firstChild}_actualReadPixelOffset(e,t,i){if(!this.domNode)return-1;const n=this._characterMapping.getDomPosition(t),o=TA.readHorizontalRanges(this._getReadingTarget(this.domNode),n.partIndex,n.charIndex,n.partIndex,n.charIndex,i);return o&&0!==o.length?o[0].left:-1}getColumnOfNodeOffset(e,t){return tR(this._characterMapping,e,t)}}class XA{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(e){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,null==e||e.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,n);if(-1===o)return null;const s=this._readPixelOffset(this.domNode,e,i,n);return-1===s?null:[new EA(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,o){if(i===n){const n=this._readPixelOffset(e,t,i,o);return-1===n?null:[new EA(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,o)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(n);const t=this._getReadingTarget(e);return t.firstChild?(n.markDidDomLayout(),t.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[i];if(-1!==o)return o;const s=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=TA.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(n);const o=this._characterMapping.getDomPosition(i),s=TA.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getHorizontalOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new EA(0,this.getWidth(n))];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return TA.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n)}getColumnOfNodeOffset(e,t){return tR(this._characterMapping,e,t)}}class JA extends XA{_readVisibleRangesForRange(e,t,i,n,o){const s=super._readVisibleRangesForRange(e,t,i,n,o);if(!s||0===s.length||i===n||1===i&&n===this._characterMapping.length)return s;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=s[s.length-1];e.left=4&&3===e[0]&&8===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&8===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&6===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&9===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowGuard(e){return e.length>=1&&3===e[0]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}static isChildOfOverflowingOverlayWidgets(e){return e.length>=1&&5===e[0]}}class lR{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(145),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(67),this.stickyTabStops=n.get(116),this.typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return lR.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.viewModel.getLineCount();let s,r=null,a=null;return i.afterLineNumber!==o&&(a=new wd(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new wd(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,gR._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class cR extends dR{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=SA.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(e,t,i,n,o){super(e,t,i,n),this.hitTestResult=new sn((()=>gR.doHitTest(this._ctx,this))),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=e,this._eventTarget=o;const s=Boolean(this._eventTarget);this._useHitTestTarget=!s}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return aR.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.relativePos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};if(o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth){const r=e.viewModel.coordinatesConverter.convertViewPositionToModelPosition(i.range.getStartPosition()),a=e.viewModel.glyphLanes.getLanesAtLine(r.lineNumber);return s.glyphMarginLane=a[Math.floor(o/e.lineHeight)],t.fulfillMargin(2,n,i.range,s)}return o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,s))}return null}static _hitTestViewLines(e,t){if(!aR.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new wd(1,1),hR);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new wd(i,n),hR)}if(aR.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),o=uR(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new wd(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=uR(t.mouseContentHorizontalOffset-n),s=new wd(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}const i=t.hitTestResult.value;return 1===i.type?gR.createMouseTargetFromHitTestPosition(e,t,i.spanNode,i.position,i.injectedText):t.wouldBenefitFromHitTestTargetSwitch?(t.switchToHitTestTarget(),this._createMouseTarget(e,t)):t.fulfillUnknown()}static _hitTestMinimap(e,t){if(aR.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new wd(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(aR.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new wd(i,n))}}return null}static _hitTestScrollbar(e,t){if(aR.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new wd(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(145),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return gR._getMouseColumn(n,t.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const s=n.lineNumber,r=n.column,a=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>a){const e=uR(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(s,r);if(!l)return t.fulfillUnknown(n);const d=l.left;if(Math.abs(t.mouseContentHorizontalOffset-d)<1)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const c=[];if(c.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&c.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const h=t.pos.toClientCoordinates(ls(e.viewDomNode)),u=i.getBoundingClientRect(),g=u.left<=h.clientX&&h.clientX<=u.right;let p=null;for(let e=1;eo)){const i=Math.floor((n+o)/2);let s=t.pos.y+(i-t.mouseVerticalOffset);s<=t.editorPos.y&&(s=t.editorPos.y+1),s>=t.editorPos.y+t.editorPos.height&&(s=t.editorPos.y+t.editorPos.height-1);const r=new lA(t.pos.x,s),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates(ls(e.viewDomNode)));if(1===a.type)return a}return this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates(ls(e.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=Ks(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=ls(o),s=`${i.getComputedStyle(o,null).getPropertyValue("font-style")} ${i.getComputedStyle(o,null).getPropertyValue("font-variant")} ${i.getComputedStyle(o,null).getPropertyValue("font-weight")} ${i.getComputedStyle(o,null).getPropertyValue("font-size")}/${i.getComputedStyle(o,null).getPropertyValue("line-height")} ${i.getComputedStyle(o,null).getPropertyValue("font-family")}`,r=o.innerText;let a,l=e.left,d=0;if(t>e.left+e.width)d=r.length;else{const e=pR.getInstance();for(let i=0;ithis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(145).height;const n=new mA(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=ws(this.viewHelper.viewDomNode.ownerDocument,"mousemove",(e=>{this.viewHelper.viewDomNode.contains(e.target)||this._onMouseLeave(new pA(e,!1,this.viewHelper.viewDomNode))})))}))),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let o=0;this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>{o=t}))),this._register(ws(this.viewHelper.viewDomNode,ur.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()}))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,o)))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const e=TN.INSTANCE;let t=0,i=jM.getZoomLevel(),n=!1,o=0;function s(e){return K?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}this._register(ws(this.viewHelper.viewDomNode,ur.MOUSE_WHEEL,(r=>{if(this.viewController.emitMouseWheel(r),!this._context.configuration.options.get(76))return;const a=new Ze(r);if(e.acceptStandardWheelEvent(a),e.isPhysicalMouseWheel()){if(s(r)){const e=jM.getZoomLevel(),t=a.deltaY>0?1:-1;jM.setZoomLevel(e+t),a.preventDefault(),a.stopPropagation()}}else Date.now()-t>50&&(i=jM.getZoomLevel(),n=s(r),o=0),t=Date.now(),o+=a.deltaY,n&&(jM.setZoomLevel(i+o/5),a.preventDefault(),a.stopPropagation())}),{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(145)){const e=this._context.configuration.options.get(145).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}getTargetAtClientPoint(e,t){const i=new dA(e,t).toPageCoordinates(ls(this.viewHelper.viewDomNode)),n=uA(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const o=gA(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,o,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=Ks(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this.mouseTargetFactory.mouseTargetIsWidget(e)||e.preventDefault(),this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(d&&(n||s&&r))c(),this._mouseDownOperation.start(i.type,e,t);else if(o)e.preventDefault();else if(a){const n=i.detail;d&&this.viewHelper.shouldSuppressMouseDownOnViewZone(n.viewZoneId)&&(c(),this._mouseDownOperation.start(i.type,e,t),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(i.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:i})}}class fR extends lt{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._mouseTargetFactory=n,this._createMouseTarget=o,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new _A(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new _R(this._context,this._viewHelper,this._mouseTargetFactory,((e,t,i)=>this._dispatchMouse(e,t,i)))),this._mouseState=new bR,this._currentSelection=new uh(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!1);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):13!==t.type||"above"!==t.outsidePosition&&"below"!==t.outsidePosition?(this._topBottomDragScrolling.stop(),this._dispatchMouse(t,!0,1)):this._topBottomDragScrolling.start(t,e))}start(e,t,i){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const n=this._findMousePosition(t,!0);if(!n||!n.position)return;this._mouseState.trySetCount(t.detail,n.position),t.detail=this._mouseState.count;const o=this._context.configuration.options;if(!o.get(91)&&o.get(35)&&!o.get(22)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===n.type&&n.position&&this._currentSelection.containsPosition(n.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!1);hr(e)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(n,t.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,i,t.buttons,(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const s=e.posy-t.y-t.height,r=n.getCurrentScrollTop()+e.relativePos.y,a=lR.getZoneAtCoord(this._context,r);if(a){const e=this._helpPositionJumpOverViewZone(a);if(e)return rR.createOutsideEditor(o,e,"below",s)}const l=n.getLineNumberAtVerticalOffset(r);return rR.createOutsideEditor(o,new wd(l,i.getLineMaxColumn(l)),"below",s)}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);if(e.posxt.x+t.width){const n=e.posx-t.x-t.width;return rR.createOutsideEditor(o,new wd(s,i.getLineMaxColumn(s)),"right",n)}return null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return rR.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new wd(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t,i){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:i,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class _R extends lt{constructor(e,t,i,n){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._operation=null}dispose(){super.dispose(),this.stop()}start(e,t){this._operation?this._operation.setPosition(e,t):this._operation=new vR(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,e,t)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class vR extends lt{constructor(e,t,i,n,o,s){super(),this._context=e,this._viewHelper=t,this._mouseTargetFactory=i,this._dispatchMouse=n,this._position=o,this._mouseEvent=s,this._lastTime=Date.now(),this._animationFrameDisposable=Ls(ls(s.browserEvent),(()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(e,t){this._position=e,this._mouseEvent=t}_tick(){const e=Date.now(),t=e-this._lastTime;return this._lastTime=e,t}_getScrollSpeed(){const e=this._context.configuration.options.get(67),t=this._context.configuration.options.get(145).height/e,i=this._position.outsideDistance/e;return i<=1.5?Math.max(30,t*(1+i)):i<=3?Math.max(60,t*(2+i)):Math.max(200,t*(7+i))}_execute(){const e=this._context.configuration.options.get(67),t=this._getScrollSpeed()*(this._tick()/1e3)*e,i="above"===this._position.outsidePosition?-t:t;this._context.viewModel.viewLayout.deltaScrollNow(0,i),this._viewHelper.renderNow();const n=this._context.viewLayout.getLinesViewportData(),o="above"===this._position.outsidePosition?n.startLineNumber:n.endLineNumber;let s;{const e=uA(this._viewHelper.viewDomNode),t=this._context.configuration.options.get(145).horizontalScrollbarHeight,i=new lA(this._mouseEvent.pos.x,e.y+e.height-t-.1),n=gA(this._viewHelper.viewDomNode,e,i);s=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),e,i,n,null)}s.position&&s.position.lineNumber===o||(s="above"===this._position.outsidePosition?rR.createOutsideEditor(this._position.mouseColumn,new wd(o,1),"above",this._position.outsideDistance):rR.createOutsideEditor(this._position.mouseColumn,new wd(o,this._context.viewModel.getLineMaxColumn(o)),"below",this._position.outsideDistance)),this._dispatchMouse(s,!0,2),this._animationFrameDisposable=Ls(ls(s.element),(()=>this._execute()))}}class bR{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>bR.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}bR.CLEAR_MOUSE_DOWN_COUNT_TIME=400;class wR extends mR{constructor(e,t,i){super(e,t,i),this._register($L.addTarget(this.viewHelper.linesContentDomNode)),this._register(ws(this.viewHelper.linesContentDomNode,qL.Tap,(e=>this.onTap(e)))),this._register(ws(this.viewHelper.linesContentDomNode,qL.Change,(e=>this.onChange(e)))),this._register(ws(this.viewHelper.linesContentDomNode,qL.Contextmenu,(e=>this._onContextMenu(new pA(e,!1,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(ws(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new fA(this.viewHelper.viewDomNode);this._register(n.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)))),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,((e,t)=>this._onMouseDown(e,t))))}onTap(e){e.initialTarget&&this.viewHelper.linesContentDomNode.contains(e.initialTarget)&&(e.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(e,!1))}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(e,!0)}_dispatchGesture(e,t){const i=this._createMouseTarget(new pA(e,!1,this.viewHelper.viewDomNode),!1);i.position&&this.viewController.dispatchMouse({position:i.position,mouseColumn:i.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:e.tapCount,inSelectionMode:t,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===i.type&&null!==i.detail.injectedText})}_onMouseDown(e,t){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e,t)}}class CR extends mR{constructor(e,t,i){super(e,t,i),this._register($L.addTarget(this.viewHelper.linesContentDomNode)),this._register(ws(this.viewHelper.linesContentDomNode,qL.Tap,(e=>this.onTap(e)))),this._register(ws(this.viewHelper.linesContentDomNode,qL.Change,(e=>this.onChange(e)))),this._register(ws(this.viewHelper.linesContentDomNode,qL.Contextmenu,(e=>this._onContextMenu(new pA(e,!1,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new pA(e,!1,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(dk.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class yR extends lt{constructor(e,t,i){super(),(Z||de&&Y)&&ce?this.handler=this._register(new wR(e,t,i)):s.TouchEvent?this.handler=this._register(new CR(e,t,i)):this.handler=this._register(new mR(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var SR=i(6432),kR={};kR.styleTagTransform=Gr(),kR.setAttributes=Kr(),kR.insert=zr().bind(null,"head"),kR.domAPI=Vr(),kR.insertStyleElement=qr(),Br()(SR.Z,kR),SR.Z&&SR.Z.locals&&SR.Z.locals;var xR=i(5283),LR={};LR.styleTagTransform=Gr(),LR.setAttributes=Kr(),LR.insert=zr().bind(null,"head"),LR.domAPI=Vr(),LR.insertStyleElement=qr(),Br()(xR.Z,LR),xR.Z&&xR.Z.locals&&xR.Z.locals;class DR extends CA{}class ER extends DR{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new wd(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(67);const t=e.get(68);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(95);const i=e.get(145);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onDecorationsChanged(e){return e.affectsLineNumber}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new wd(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0||i===this._context.viewModel.getLineCount()?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=j?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._context.viewModel.getDecorationsInViewport(e.visibleRange).filter((e=>!!e.options.lineNumberClassName));o.sort(((e,t)=>hh.compareRangesUsingEnds(e.range,t.range)));let s=0;const r=this._context.viewModel.getLineCount(),a=[];for(let e=i;e<=n;e++){const n=e-i;let l=this._getLineRenderLineNumber(e),d="";for(;s${l}`):a[n]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}ER.CLASS_NAME="line-numbers",jv(((e,t)=>{const i=e.getColor(ib),n=e.getColor(vb);n?t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${n}; }`):i&&t.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i.transparent(.4)}; }`)}));var NR=i(7901),IR={};IR.styleTagTransform=Gr(),IR.setAttributes=Kr(),IR.insert=zr().bind(null,"head"),IR.domAPI=Vr(),IR.insertStyleElement=qr(),Br()(NR.Z,IR),NR.Z&&NR.Z.locals&&NR.Z.locals;class TR extends yA{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(145);this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=CL(document.createElement("div")),this._domNode.setClassName(TR.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=CL(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(TR.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(145);return this._canUseLayerHinting=!t.get(32),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}TR.CLASS_NAME="glyph-margin",TR.OUTER_CLASS_NAME="margin";var MR=i(8450),AR={};AR.styleTagTransform=Gr(),AR.setAttributes=Kr(),AR.insert=zr().bind(null,"head"),AR.domAPI=Vr(),AR.insertStyleElement=qr(),Br()(MR.Z,AR),MR.Z&&MR.Z.locals&&MR.Z.locals;const RR="monaco-mouse-cursor-text",PR=new class{constructor(){this._onDidChange=new kt,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}};var OR=function(e,t){return function(i,n){t(i,n,e)}};class FR{constructor(e,t,i,n,o){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new wd(this.modelLineNumber,this.distanceToModelLineStart+1),i=new wd(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const BR=d;let WR=class extends yA{constructor(e,t,i,n,o){super(e),this._keybindingService=n,this._instantiationService=o,this._primaryCursorPosition=new wd(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const s=this._context.configuration.options,r=s.get(145);this._setAccessibilityOptions(s),this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,this._contentHeight=r.height,this._fontInfo=s.get(50),this._lineHeight=s.get(67),this._emptySelectionClipboard=s.get(37),this._copyWithSyntaxHighlighting=s.get(25),this._visibleTextArea=null,this._selections=[new uh(1,1,1,1)],this._modelSelections=[new uh(1,1,1,1)],this._lastRenderPosition=null,this.textArea=CL(document.createElement("textarea")),SA.write(this.textArea,7),this.textArea.setClassName(`inputarea ${RR}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:a}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=a*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(s)),this.textArea.setAttribute("aria-required",s.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(s.get(124))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",v(0,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",s.get(91)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=CL(document.createElement("div")),this.textAreaCover.setPosition("absolute");const l={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t),getValueLengthInRange:(e,t)=>this._context.viewModel.getValueLengthInRange(e,t),modifyPosition:(e,t)=>this._context.viewModel.modifyPosition(e,t)},c={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,U),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,o=Array.isArray(e)?e.join(t):e;let s,r=null;if(hk.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:o,html:s,mode:r}},getScreenReaderContent:()=>{if(1===this._accessibilitySupport){const e=this._selections[0];if(K&&e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new sk(i,i.length,i.length,hh.fromPositions(t),0)}const t=500;if(K&&!e.isEmpty()&&l.getValueLengthInRange(e,0)0)return new sk(i,n,n,hh.fromPositions(t),0)}return sk.EMPTY}return rk.fromEditorSelection(l,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},g=this._register(new fk(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(pk,c,g,te,{isAndroid:p,isChrome:h,isFirefox:d,isSafari:u})),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta):this._viewController.type(e.text)}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:o}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),o=e.substring(n+1),s=o.lastIndexOf("\t"),r=o.length-s-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),d=a.column-1-l,c=o.substring(0,o.length-l),{tabSize:h}=this._context.viewModel.model.getOptions(),u=function(e,t,i,n){if(0===t.length)return 0;const o=e.createElement("div");o.style.position="absolute",o.style.top="-50000px",o.style.width="50000px";const s=e.createElement("span");yL(s,i),s.style.whiteSpace="pre",s.style.tabSize=n*i.spaceWidth+"px",s.append(t),o.appendChild(s),e.body.appendChild(o);const r=s.offsetWidth;return e.body.removeChild(o),r}(this.textArea.domNode.ownerDocument,c,this._fontInfo,h);return{distanceToModelLineStart:d,widthOfHiddenTextBefore:u}})(),{distanceToModelLineEnd:s}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),o=-1===n?e:e.substring(0,n),s=o.indexOf("\t"),r=-1===s?o.length:o.length-s-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,hh.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new FR(this._context,i.startLineNumber,n,o,s),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${RR} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${RR}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)}))),this._register(PR.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(e){this._textAreaInput.writeNativeTextAreaContent(e)}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=iC('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',[]);let n=!0,o=e.column,s=!0,r=e.column,a=0;for(;a<50&&(n||s);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(s&&r>t.length&&(s=!1),s){const e=t.charCodeAt(r-1);0!==i.get(e)?s=!1:r++}a++}return[t.substring(o-1,r-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=iC(this._context.configuration.options.get(131),[]);let n=e.column,o=0;for(;n>1;){const s=t.charCodeAt(n-2);if(0!==i.get(s)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Tn(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){var t,i,n;if(1===e.get(2)){const e=null===(t=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))||void 0===t?void 0:t.getAriaLabel(),o=null===(i=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))||void 0===i?void 0:i.getAriaLabel(),s=null===(n=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))||void 0===n?void 0:n.getAriaLabel(),r=v(0,"The editor is not accessible at this time.");return e?v(0,"{0} To enable screen reader optimized mode, use {1}",r,e):o?v(0,"{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",r,o):s?v(0,"{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",r,s):r}return e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===CE.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t;const i=e.get(145).wrappingColumn;if(-1!==i&&1!==this._accessibilitySupport){const t=e.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(i*t.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=BR?0:1}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(145);this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(50),this._lineHeight=t.get(67),this._emptySelectionClipboard=t.get(37),this._copyWithSyntaxHighlighting=t.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:n}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=n*this._fontInfo.spaceWidth+"px",this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("aria-required",t.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(t.get(124))),(e.hasChanged(34)||e.hasChanged(91))&&this._ensureReadOnlyAttribute(),e.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}_ensureReadOnlyAttribute(){const e=this._context.configuration.options;!PR.enabled||e.get(34)&&e.get(91)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(e){var t;this._primaryCursorPosition=new wd(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),null===(t=this._visibleTextArea)||void 0===t||t.prepareRender(e)}render(e){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){var e;if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const o=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,s=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const d=this._context.viewModel.getViewLineData(i.lineNumber),c=d.tokens.findTokenIndexAtOffset(i.column-1),h=c===d.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(h?d.tokens.getPresentation(c):null);this.textArea.domNode.scrollTop=s*this._lineHeight,this.textArea.domNode.scrollLeft=r,this._doRender({lastRenderPosition:null,top:o,left:a,width:l,height:this._lineHeight,useCover:!1,color:(HC.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const t=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(tthis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const i=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(i<0||i>this._contentHeight)this._renderAtTopLeft();else if(K||2===this._accessibilitySupport){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const n=null!==(e=this._textAreaInput.textAreaState.newlineCountBeforeSelection)&&void 0!==e?e:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=n*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:i,left:this._textAreaWrapping?this._contentLeft:t,width:this._textAreaWidth,height:BR?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;i=e.indexOf("\n",i+1),-1!==i;)t++;return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:BR?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;yL(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?fu.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(57)?i.setClassName("monaco-editor-background textAreaCover "+TR.OUTER_CLASS_NAME):0!==n.get(68).renderType?i.setClassName("monaco-editor-background textAreaCover "+ER.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}};WR=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([OR(3,uD),OR(4,_d)],WR);class VR{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){$S.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position,e.revealType):this._lastCursorLineSelect(e.position,e.revealType):e.inSelectionMode?this._lineSelectDrag(e.position,e.revealType):this._lineSelect(e.position,e.revealType):2===e.mouseDownCount?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position,e.revealType):e.inSelectionMode?this._wordSelectDrag(e.position,e.revealType):this._wordSelect(e.position,e.revealType)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position,e.revealType):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position,e.revealType):this.moveTo(e.position,e.revealType)}_usualArgs(e,t){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,revealType:t}}moveTo(e,t){$S.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_moveToSelect(e,t){$S.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_columnSelect(e,t,i){e=this._validateViewColumn(e),$S.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),$S.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e,t){$S.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelect(e,t){$S.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_wordSelectDrag(e,t){$S.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorWordSelect(e,t){$S.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelect(e,t){$S.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lineSelectDrag(e,t){$S.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelect(e,t){$S.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_lastCursorLineSelectDrag(e,t){$S.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e,t))}_selectAll(){$S.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class HR{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Pe("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let o=0,s=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===s?(o=i,s=1):s++)}if(e=n&&t<=o&&(this._lines[t-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const s=[];for(let e=0;ei)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class zR{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new HR((()=>this._host.createVisibleLine()))}_createDomNode(){const e=CL(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(145)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;et){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=s+e;r[e].layoutLine(t,n[t-o],this.viewportData.lineHeight)}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");UR._ttPolicy&&(t=UR._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;te}),UR._sb=new ag(1e5);class KR extends yA{constructor(e){super(e),this._visibleLines=new zR(this),this.domNode=this._visibleLines.domNode;const t=this._context.configuration.options.get(50);yL(this.domNode,t),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),o.appendString(s),o.appendString(""),!0)}layoutLine(e,t,i){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(i))}}class qR extends KR{constructor(e){super(e);const t=this._context.configuration.options.get(145);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(145);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class $R extends KR{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(145);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),yL(this.domNode,t.get(50))}onConfigurationChanged(e){const t=this._context.configuration.options;yL(this.domNode,t.get(50));const i=t.get(145);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class GR{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){var t;null===(t=this.onKeyDown)||void 0===t||t.call(this,e)}emitKeyUp(e){var t;null===(t=this.onKeyUp)||void 0===t||t.call(this,e)}emitContextMenu(e){var t;null===(t=this.onContextMenu)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var t;null===(t=this.onMouseMove)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var t;null===(t=this.onMouseLeave)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var t;null===(t=this.onMouseDown)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var t;null===(t=this.onMouseUp)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var t;null===(t=this.onMouseDrag)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var t;null===(t=this.onMouseDrop)||void 0===t||t.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var e;null===(e=this.onMouseDropCanceled)||void 0===e||e.call(this)}emitMouseWheel(e){var t;null===(t=this.onMouseWheel)||void 0===t||t.call(this,e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return GR.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i={...e};return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),5!==i.type&&8!==i.type||(i.detail=this.convertViewToModelViewZoneData(i.detail,t)),i}static convertViewToModelViewZoneData(e,t){return{viewZoneId:e.viewZoneId,positionBefore:e.positionBefore?t.convertViewPositionToModelPosition(e.positionBefore):e.positionBefore,positionAfter:e.positionAfter?t.convertViewPositionToModelPosition(e.positionAfter):e.positionAfter,position:t.convertViewPositionToModelPosition(e.position),afterLineNumber:t.convertViewPositionToModelPosition(new wd(e.afterLineNumber,1)).lineNumber}}}var ZR=i(7898),YR={};YR.styleTagTransform=Gr(),YR.setAttributes=Kr(),YR.insert=zr().bind(null,"head"),YR.domAPI=Vr(),YR.insertStyleElement=qr(),Br()(ZR.Z,YR),ZR.Z&&ZR.Z.locals&&ZR.Z.locals;class QR extends yA{constructor(e){super(e),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=CL(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let e=!1;const t=this._context.configuration.options.get(145),i=t.contentWidth-t.verticalScrollbarWidth;this.contentWidth!==i&&(this.contentWidth=i,e=!0);const n=t.contentLeft;return this.contentLeft!==n&&(this.contentLeft=n,e=!0),e}dispose(){super.dispose()}onConfigurationChanged(e){return this.update()}onScrollChanged(e){return e.scrollTopChanged||e.scrollLeftChanged}onDecorationsChanged(e){return!0}onZonesChanged(e){return!0}prepareRender(e){}render(e){var t;let i=0;const n=e.getDecorationsInViewport();for(const o of n){if(!o.options.blockClassName)continue;let n,s,r=this.blocks[i];r||(r=this.blocks[i]=CL(document.createElement("div")),this.domNode.appendChild(r)),o.options.blockIsAfterEnd?(n=e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!1),s=e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!0)):(n=e.getVerticalOffsetForLineNumber(o.range.startLineNumber,!0),s=o.range.isEmpty()&&!o.options.blockDoesNotCollapse?e.getVerticalOffsetForLineNumber(o.range.startLineNumber,!1):e.getVerticalOffsetAfterLineNumber(o.range.endLineNumber,!0));const[a,l,d,c]=null!==(t=o.options.blockPadding)&&void 0!==t?t:[0,0,0,0];r.setClassName("blockDecorations-block "+o.options.blockClassName),r.setLeft(this.contentLeft-c),r.setWidth(this.contentWidth+c+l),r.setTop(n-e.scrollTop-a),r.setHeight(s-n+a+d),i++}for(let e=i;e0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n){const o=e.top,s=o,r=e.top+e.height,a=o-i,l=s>=i,d=r,c=n.viewportHeight-r>=i;let h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),hr){const e=l-(r-n);l-=e,i-=e}if(l=22,_=u+i<=g.height-22;return this._fixedOverflowWidgets?{fitsAbove:f,aboveTop:Math.max(h,22),fitsBelow:_,belowTop:u,left:m}:{fitsAbove:f,aboveTop:r,fitsBelow:_,belowTop:a,left:p}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new tP(e.top,e.left+this._contentLeft)}_getAnchorsCoordinates(e){var t,i;return{primary:n(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),secondary:n((null===(t=this._secondaryAnchor.viewPosition)||void 0===t?void 0:t.lineNumber)===(null===(i=this._primaryAnchor.viewPosition)||void 0===i?void 0:i.lineNumber)?this._secondaryAnchor.viewPosition:null,this._affinity,this._lineHeight)};function n(t,i,n){if(!t)return null;const o=e.visibleRangeForPosition(t);if(!o)return null;const s=1===t.column&&3===i?0:o.left,r=e.getVerticalOffsetForLineNumber(t.lineNumber)-e.scrollTop;return new iP(r,s,n)}}_reduceAnchorCoordinates(e,t,i){if(!t)return e;const n=this._context.configuration.options.get(50);let o=t.left;return o=oe.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){var t;if(!this._renderData||"offViewport"===this._renderData.kind)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,"offViewport"===(null===(t=this._renderData)||void 0===t?void 0:t.kind)&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&nP(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&nP(this._actual.afterRender,this._actual,this._renderData.position)}}class eP{constructor(e,t){this.modelPosition=e,this.viewPosition=t}}class tP{constructor(e,t){this.top=e,this.left=t,this._coordinateBrand=void 0}}class iP{constructor(e,t,i){this.top=e,this.left=t,this.height=i,this._anchorCoordinateBrand=void 0}}function nP(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var oP=i(7633),sP={};sP.styleTagTransform=Gr(),sP.setAttributes=Kr(),sP.insert=zr().bind(null,"head"),sP.domAPI=Vr(),sP.insertStyleElement=qr(),Br()(oP.Z,sP),oP.Z&&oP.Z.locals&&oP.Z.locals;class rP extends DR{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(145);this._renderLineHighlight=t.get(96),this._renderLineHighlightOnlyWhenFocus=t.get(97),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new uh(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=new Set;for(const e of this._selections)t.add(e.positionLineNumber);const i=Array.from(t);i.sort(((e,t)=>e-t)),Wh(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(145);return this._renderLineHighlight=t.get(96),this._renderLineHighlightOnlyWhenFocus=t.get(97),this._wordWrap=i.isViewportWrapping,this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=[];for(let e=t;e<=i;e++)n[e-t]="";if(this._wordWrap){const o=this._renderOne(e,!1);for(const e of this._cursorLineNumbers){const s=this._context.viewModel.coordinatesConverter,r=s.convertViewPositionToModelPosition(new wd(e,1)).lineNumber,a=s.convertModelPositionToViewPosition(new wd(r,1)).lineNumber,l=s.convertModelPositionToViewPosition(new wd(r,this._context.viewModel.model.getLineMaxColumn(r))).lineNumber,d=Math.max(a,t),c=Math.min(l,i);for(let e=d;e<=c;e++)n[e-t]=o}}const o=this._renderOne(e,!0);for(const e of this._cursorLineNumbers)ei||(n[e-t]=o);this._renderData=n}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class aP extends rP{_renderOne(e,t){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class lP extends rP{_renderOne(e,t){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}jv(((e,t)=>{const i=e.getColor($v);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Gv)){const i=e.getColor(Gv);i&&(t.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${i}; }`),Bv(e.type)&&(t.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}));var dP=i(5926),cP={};cP.styleTagTransform=Gr(),cP.setAttributes=Kr(),cP.insert=zr().bind(null,"head"),cP.domAPI=Vr(),cP.insertStyleElement=qr(),Br()(dP.Z,cP),dP.Z&&dP.Z.locals&&dP.Z.locals;class hP extends DR{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:hh.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let e=o;e<=s;e++)r[e-o]="";this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let e=0,s=t.length;e',a=Math.max(s.range.startLineNumber,n),l=Math.min(s.range.endLineNumber,o);for(let e=a;e<=l;e++)i[e-n]+=r}}_renderNormalDecorations(e,t,i){var n;const o=e.visibleRange.startLineNumber;let s=null,r=!1,a=null,l=!1;for(let d=0,c=t.length;d';r[l]+=d}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class uP extends yA{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(103),r=o.get(75),a=o.get(40),l=o.get(106),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+zv(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new RN(t.domNode,d,this._context.viewLayout.getScrollable())),SA.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=CL(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const c=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(ws(i.domNode,"scroll",(e=>c(i.domNode,!0,!0)))),this._register(ws(t.domNode,"scroll",(e=>c(t.domNode,!0,!1)))),this._register(ws(n.domNode,"scroll",(e=>c(n.domNode,!0,!1)))),this._register(ws(this.scrollbarDomNode.domNode,"scroll",(e=>c(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(145);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(73).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(e){this.scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this.scrollbar.delegateScrollFromMouseWheelEvent(e)}onConfigurationChanged(e){if(e.hasChanged(103)||e.hasChanged(75)||e.hasChanged(40)){const e=this._context.configuration.options,t=e.get(103),i=e.get(75),n=e.get(40),o=e.get(106),s={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(145)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+zv(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}var gP=i(6740),pP={};pP.styleTagTransform=Gr(),pP.setAttributes=Kr(),pP.insert=zr().bind(null,"head"),pP.domAPI=Vr(),pP.insertStyleElement=qr(),Br()(gP.Z,pP),gP.Z&&gP.Z.locals&&gP.Z.locals;class mP{constructor(e,t,i,n,o){this.startLineNumber=e,this.endLineNumber=t,this.className=i,this.tooltip=n,this._decorationToRenderBrand=void 0,this.zIndex=null!=o?o:0}}class fP{constructor(e,t,i){this.className=e,this.zIndex=t,this.tooltip=i}}class _P{constructor(){this.decorations=[]}add(e){this.decorations.push(e)}getDecorations(){return this.decorations}}class vP extends DR{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=new _P;if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.classNamen)continue;const a=Math.max(s,i),l=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new wd(a,0)),d=this._context.viewModel.glyphLanes.getLanesAtLine(l.lineNumber).indexOf(e.preference.lane);t.push(new CP(a,d,e.preference.zIndex,e))}}_collectSortedGlyphRenderRequests(e){const t=[];return this._collectDecorationBasedGlyphRenderRequest(e,t),this._collectWidgetBasedGlyphRenderRequest(e,t),t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.laneIndex===t.laneIndex?e.zIndex===t.zIndex?t.type===e.type?0===e.type&&0===t.type?e.className0;){const e=t.peek();if(!e)break;const n=t.takeWhile((t=>t.lineNumber===e.lineNumber&&t.laneIndex===e.laneIndex));if(!n||0===n.length)break;const o=n[0];if(0===o.type){const e=[];for(const t of n){if(t.zIndex!==o.zIndex||t.type!==o.type)break;0!==e.length&&e[e.length-1]===t.className||e.push(t.className)}i.push(o.accept(e.join(" ")))}else o.widget.renderInfo={lineNumber:o.lineNumber,laneIndex:o.laneIndex}}this._decorationGlyphsToRender=i}render(e){if(!this._glyphMargin){for(const e of Object.values(this._widgets))e.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}return}const t=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const i of Object.values(this._widgets))if(i.renderInfo){const n=e.viewportData.relativeVerticalOffset[i.renderInfo.lineNumber-e.viewportData.startLineNumber],o=this._glyphMarginLeft+i.renderInfo.laneIndex*this._lineHeight;i.domNode.setDisplay("block"),i.domNode.setTop(n),i.domNode.setLeft(o),i.domNode.setWidth(t),i.domNode.setHeight(this._lineHeight)}else i.domNode.setDisplay("none");for(let i=0;ithis._decorationGlyphsToRender.length;){const e=this._managedDomNodes.pop();null==e||e.domNode.remove()}}}class wP{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.className=n,this.type=0}accept(e){return new yP(this.lineNumber,this.laneIndex,e)}}class CP{constructor(e,t,i,n){this.lineNumber=e,this.laneIndex=t,this.zIndex=i,this.widget=n,this.type=1}}class yP{constructor(e,t,i){this.lineNumber=e,this.laneIndex=t,this.combinedClassName=i}}var SP=i(5938),kP={};kP.styleTagTransform=Gr(),kP.setAttributes=Kr(),kP.insert=zr().bind(null,"head"),kP.domAPI=Vr(),kP.insertStyleElement=qr(),Br()(SP.Z,kP),SP.Z&&SP.Z.locals&&SP.Z.locals;class xP extends DR{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(146),n=t.get(50);this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(146),n=t.get(50);return this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,o;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._primaryPosition,d=this.getGuidesByLine(s,Math.min(r+1,this._context.viewModel.getLineCount()),l),c=[];for(let l=s;l<=r;l++){const r=l-s,h=d[r];let u="";const g=null!==(i=null===(t=e.visibleRangeForPosition(new wd(l,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of h){const i=-1===t.column?g+(t.visibleColumn-1)*this._spaceWidth:e.visibleRangeForPosition(new wd(l,t.column)).left;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const s=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(o=null===(n=e.visibleRangeForPosition(new wd(l,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==o?o:i+this._spaceWidth)-i:this._spaceWidth;u+=`
    `}c[r]=u}this._renderResult=c}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?rw.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?rw.EnabledForActive:rw.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let s=0,r=0,a=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);s=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),d=[];for(let i=e;i<=t;i++){const t=new Array;d.push(t);const c=n?n[i-e]:[],h=new du(c),u=o?o[i-e]:0;for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===c.length)&&s<=i&&i<=r&&e===a;t.push(...h.takeWhile((e=>e.visibleColumn!0))||[])}return d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function LP(e){if(!e||!e.isTransparent())return e}jv(((e,t)=>{const i=[{bracketColor:Db,guideColor:Rb,guideColorActive:Vb},{bracketColor:Eb,guideColor:Pb,guideColorActive:Hb},{bracketColor:Nb,guideColor:Ob,guideColorActive:zb},{bracketColor:Ib,guideColor:Fb,guideColorActive:Ub},{bracketColor:Tb,guideColor:Bb,guideColorActive:Kb},{bracketColor:Mb,guideColor:Wb,guideColorActive:jb}],n=new cw,o=[{indentColor:sb,indentColorActive:hb},{indentColor:rb,indentColorActive:ub},{indentColor:ab,indentColorActive:gb},{indentColor:lb,indentColorActive:pb},{indentColor:db,indentColorActive:mb},{indentColor:cb,indentColorActive:fb}],s=i.map((t=>{var i,n;const o=e.getColor(t.bracketColor),s=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=LP(null!==(i=LP(s))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=LP(null!==(n=LP(r))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(Sl),r=o.map((t=>{const i=e.getColor(t.indentColor),n=e.getColor(t.indentColorActive),o=LP(i),s=LP(n);if(o&&s)return{indentColor:o,indentColorActive:s}})).filter(Sl);if(s.length>0){for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${n.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${n.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${n.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${e} { --indent-color: ${i.indentColor}; --indent-color-active: ${i.indentColorActive}; }`)}t.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),t.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}));var DP=i(9536),EP={};EP.styleTagTransform=Gr(),EP.setAttributes=Kr(),EP.insert=zr().bind(null,"head"),EP.domAPI=Vr(),EP.insertStyleElement=qr(),Br()(DP.Z,EP),DP.Z&&DP.Z.locals&&DP.Z.locals;class NP{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(e,t){this._domNode=e,this.endNode=t,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class IP{constructor(){this._currentVisibleRange=new hh(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class TP{constructor(e,t,i,n,o,s,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class MP{constructor(e,t,i,n,o){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=o,this.type="selections";let s=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;e{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new Zt((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new IP,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(115).enabled,this._maxNumberStickyLines=n.get(115).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new YA(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(146)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(50),n=t.get(146);return this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(100),this._cursorSurroundingLines=t.get(29),this._cursorSurroundingLinesStyle=t.get(30),this._canUseLayerHinting=!t.get(32),this._stickyScrollEnabled=t.get(115).enabled,this._maxNumberStickyLines=t.get(115).maxLineCount,yL(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(145)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new ZA(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new TP(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new MP(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new wd(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(ns)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(e,t);const a=this._context.viewModel.getLineMinColumn(n);return ri)return-1;const n=new NP(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getWidth(n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=hh.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const o=[];let s=0;const r=new NP(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new wd(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ed)continue;const c=e===n.startLineNumber?n.startColumn:1,h=e!==n.endLineNumber,u=h?this._context.viewModel.getLineMaxColumn(e):n.endColumn,g=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,c,u,r);if(g){if(t&&ethis._visibleLines.getEndLineNumber())return null;const n=new NP(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,n);return this._updateLineWidthsSlowIfDomDidLayout(n),o}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new NA(t.outsideRenderedLine,t.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(e){e.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth(null)):o=!1}return o&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth(null);n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),j&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=o[0].startLineNumber,t=o[0].endLineNumber;for(let i=1,n=o.length;ia){if(!d)return-1;u=c}else if(5===s||6===s)if(6===s&&r<=c&&h<=l)u=r;else{const e=c-Math.max(5*this._lineHeight,.2*a),t=h-a;u=Math.max(t,e)}else if(1===s||2===s)if(2===s&&r<=c&&h<=l)u=r;else{const e=(c+h)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,c,h,3===s,4===s);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=this._context.configuration.options.get(145),n=t.left,o=n+t.width-i.verticalScrollbarWidth;let s=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)s=Math.min(s,Math.round(e.left)),r=Math.max(r,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)s=Math.min(s,Math.round(t.left)),r=Math.max(r,Math.round(t.left+t.width))}return e.minimalReveal||(s=Math.max(0,s-AP.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding),"selections"===e.type&&r-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(n,o,s,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,s){o=!!o,s=!!s;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}AP.HORIZONTAL_EXTRA_PX=30;var RP=i(9590),PP={};PP.styleTagTransform=Gr(),PP.setAttributes=Kr(),PP.insert=zr().bind(null,"head"),PP.domAPI=Vr(),PP.insertStyleElement=qr(),Br()(RP.Z,PP),RP.Z&&RP.Z.locals&&RP.Z.locals;class OP extends vP{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(145);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(145);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){var t,i;const n=e.getDecorationsInViewport(),o=[];let s=0;for(let e=0,r=n.length;e',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i].getDecorations();let a="";for(const e of r){let t='
    ';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var VP=i(435),HP={};HP.styleTagTransform=Gr(),HP.setAttributes=Kr(),HP.insert=zr().bind(null,"head"),HP.domAPI=Vr(),HP.insertStyleElement=qr(),Br()(VP.Z,HP),VP.Z&&VP.Z.locals&&VP.Z.locals;class zP{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=zP._clamp(e),this.g=zP._clamp(t),this.b=zP._clamp(i),this.a=zP._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}zP.Empty=new zP(0,0,0,0);class UP extends lt{static getInstance(){return this._INSTANCE||(this._INSTANCE=it(new UP)),this._INSTANCE}constructor(){super(),this._onDidChange=new kt,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(HC.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}_updateColorMap(){const e=HC.getColorMap();if(!e)return this._colors=[zP.Empty],void(this._backgroundIsLight=!0);this._colors=[zP.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}UP._INSTANCE=null;class KP{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class jP{constructor(e,t){this.tabSize=e,this.data=t}}class qP{constructor(e,t,i,n,o,s,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=r}}class $P{constructor(e,t,i,n,o,s,r,a,l,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=$P.isBasicASCII(i,s),this.containsRTL=$P.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=d}static isBasicASCII(e,t){return!t||zn(e)}static containsRTL(e,t,i){return!(t||!i)&&Vn(e)}}class GP{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class ZP{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new GP(new hh(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class YP{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class QP{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static compareByRenderingProps(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}static equals(e,t){return e.color===t.color&&e.zIndex===t.zIndex&&Wh(e.data,t.data)}static equalsArr(e,t){return Wh(e,t,QP.equals)}}const XP=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();class JP{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=JP.soften(e,.8),this.charDataLight=JP.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=d?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,_=r.r,v=r.g,b=r.b,w=o.r-_,C=o.g-v,y=o.b-b,S=Math.max(s,a),k=e.data;let x=m*h*u,L=i*f+4*t;for(let e=0;ee.width||i+c>e.height)return void console.warn("bad render request outside image data");const h=4*e.width,u=o/255*.5,g=s.r,p=s.g,m=s.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,v=m+(n.b-m)*u,b=Math.max(o,r),w=e.data;let C=i*h+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=eO[e[i]]<<4|15&eO[e[i+1]];return t},iO={1:Ye((()=>tO("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:Ye((()=>tO("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class nO{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=iO[e]?new JP(iO[e](),e):nO.createFromSampleData(nO.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of XP)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=nO._downsample(e,t);return new JP(i,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;tnO.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=sO._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=sO._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(h_);return i?new zP(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(u_);return t?zP._clamp(Math.round(255*t.rgba.a)):255}static _getSectionHeaderColor(e,t){const i=e.getColor(tf);return i?new zP(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.paddingTop===e.paddingTop&&this.paddingBottom===e.paddingBottom&&this.showSlider===e.showSlider&&this.autohide===e.autohide&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.sectionHeaderFontSize===e.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===e.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class rO{constructor(e,t,i,n,o,s,r,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.topPaddingLineCount=r,this.startLineNumber=a,this.endLineNumber=l}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(e){const t=Math.max(this.startLineNumber,e.startLineNumber),i=Math.min(this.endLineNumber,e.endLineNumber);return t>i?null:[t,i]}getYForLineNumber(e,t){return+(e-this.startLineNumber+this.topPaddingLineCount)*t}static create(e,t,i,n,o,s,r,a,l,d,c){const h=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){let t=a*e.lineHeight+e.paddingTop+e.paddingBottom;e.scrollBeyondLastLine&&(t+=Math.max(0,o-e.lineHeight-e.paddingBottom));const i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(d-o),c=l*s,h=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight),g=Math.floor(e.paddingTop/e.lineHeight);return new rO(l,d,h,s,c,i,g,1,Math.min(r,u))}let m;if(s&&i!==r){const e=i-t+1;m=Math.floor(e*u/h)}else{const e=o/p;m=Math.floor(e*u/h)}const f=Math.floor(e.paddingTop/p);let _,v=Math.floor(e.paddingBottom/p);if(e.scrollBeyondLastLine){const e=o/p;v=Math.max(v,e-1)}_=v>0?(f+r+v-o/p-1)*u/h:Math.max(0,(f+r)*u/h-m),_=Math.min(e.minimapHeight-m,_);const b=_/(d-o),w=l*b;if(g>=f+r+v)return new rO(l,d,_>0,b,w,m,f,1,r);{let i,o;i=t>1?t+f:Math.max(1,l/p);let s=Math.max(1,Math.floor(i-w*h/u));sl&&(s=Math.min(s,c.startLineNumber),o=Math.max(o,c.topPaddingLineCount)),c.scrollTop=e.paddingTop?(t-s+o+_)*u/h:l/e.paddingTop*(o+_)*u/h,new rO(l,d,!0,b,v,m,o,s,a)}}}class aO{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}aO.INVALID=new aO(-1);class lO{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new HR((()=>aO.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=n-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=cO.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let o=0,s=t-e+1;o{var t;return!(null===(t=e.options.minimap)||void 0===t?void 0:t.sectionHeaderStyle)}));if(this._samplingState){const e=[];for(const t of i){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),o=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new YP(new hh(n,i.startColumn,o,i.endColumn),t.options))}return e}return i}getSectionHeaderDecorationsInViewport(e,t){const i=this.options.minimapLineHeight,n=this.options.sectionHeaderFontSize/i;return e=Math.floor(Math.max(1,e-n)),this._getMinimapDecorationsInViewport(e,t).filter((e=>{var t;return!!(null===(t=e.options.minimap)||void 0===t?void 0:t.sectionHeaderStyle)}))}_getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new hh(n,1,o,this._context.viewModel.getLineMaxColumn(o))}else i=new hh(e,1,t,this._context.viewModel.getLineMaxColumn(t));return this._context.viewModel.getMinimapDecorationsInRange(i)}getSectionHeaderText(e,t){var i;const n=null===(i=e.options.minimap)||void 0===i?void 0:i.sectionHeaderText;if(!n)return null;const o=this._sectionHeaderCache.get(n);if(o)return o;const s=t(n);return this._sectionHeaderCache.set(n,s),s}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.viewModel.revealRange("mouse",!1,new hh(e,1,e,1),1,0)}setScrollTop(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e},1)}}class uO extends lt{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(a_),this._domNode=CL(document.createElement("div")),SA.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=CL(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=CL(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=CL(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=CL(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=CL(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=ys(this._domNode.domNode,ur.POINTER_DOWN,(e=>{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(0===e.button&&this._lastRenderData){const t=Rs(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e,i,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderPointerMoveMonitor=new pN,this._sliderPointerDownListener=ys(this._slider.domNode,ur.POINTER_DOWN,(e=>{e.preventDefault(),e.stopPropagation(),0===e.button&&this._lastRenderData&&this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)})),this._gestureDisposable=$L.addTarget(this._domNode.domNode),this._sliderTouchStartListener=ws(this._domNode.domNode,qL.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=ws(this._domNode.domNode,qL.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=ys(this._domNode.domNode,qL.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i){if(!(e.target&&e.target instanceof Element))return;const n=e.pageX;this._slider.toggleClassName("active",!0);const o=(e,o)=>{const s=Rs(this._domNode.domNode),r=Math.min(Math.abs(o-n),Math.abs(o-s.left),Math.abs(o-s.left-s.width));if(U&&r>140)return void this._model.setScrollTop(i.scrollTop);const a=e-t;this._model.setScrollTop(i.getDesiredScrollTopFromDelta(a))};e.pageY!==t&&o(e.pageY,n),this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>o(e.pageY,e.pageX)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const e=["minimap"];return"always"===this._model.options.showSlider?e.push("slider-always"):e.push("slider-mouseover"),this._model.options.autohide&&e.push("autohide"),e.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new dO(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesDeleted(e,t),!0}onLinesInserted(e,t){var i;return null===(i=this._lastRenderData)||void 0===i||i.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(a_),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=rO.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(hh.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const d=new gO(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,d,e,s),this._renderDecorationsLineHighlights(l,i,d,e,s);const c=new gO(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,c,e,s,a,r,n),this._renderDecorationsHighlights(l,i,c,e,s,a,r,n),this._renderSectionHeaders(e)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,r=0;for(const a of t){const t=n.intersectWithViewport(a);if(!t)continue;const[l,d]=t;for(let e=l;e<=d;e++)i.set(e,!0);const c=n.getYForLineNumber(l,o),h=n.getYForLineNumber(d,o);r>=c||(r>s&&e.fillRect(8,s,e.canvas.width,r-s),s=c),r=h}r>s&&e.fillRect(8,s,e.canvas.width,r-s)}_renderDecorationsLineHighlights(e,t,i,n,o){const s=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||1!==l.position)continue;const d=n.intersectWithViewport(a.range);if(!d)continue;const[c,h]=d,u=l.getColor(this._theme.value);if(!u||u.isTransparent())continue;let g=s.get(u.toString());g||(g=u.transparent(.5).toString(),s.set(u.toString(),g)),e.fillStyle=g;for(let t=c;t<=h;t++){if(i.has(t))continue;i.set(t,!0);const s=n.getYForLineNumber(c,o);e.fillRect(8,s,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,s,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=n.intersectWithViewport(l);if(!t)continue;const[d,c]=t;for(let t=d;t<=c;t++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,t,o,o,s,r,a)}}_renderDecorationsHighlights(e,t,i,n,o,s,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const d=n.intersectWithViewport(l.range);if(!d)continue;const[c,h]=d,u=t.getColor(this._theme.value);if(u&&!u.isTransparent())for(let d=c;d<=h;d++)switch(t.position){case 1:this.renderDecorationOnLine(e,i,l.range,u,n,d,o,o,s,r,a);continue;case 2:{const t=n.getYForLineNumber(d,o),i=2;this.renderDecoration(e,u,i,t,2,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,d,c){const h=o.getYForLineNumber(s,a);if(h+r<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===s?i.startColumn:1,m=g===s?i.endColumn:this._model.getLineMaxColumn(s),f=this.getXOffsetForPosition(t,s,p,l,d,c),_=this.getXOffsetForPosition(t,s,m,l,d,c);this.renderDecoration(e,n,f,h,_-f,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return 8;if((i-1)*o>=s)return s;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[8];let a=8;for(let e=1;e=s){r[e]=s;break}r[e]=l,a=l}e.set(t,r)}return i-1e.range.startLineNumber-t.range.startLineNumber));const p=uO._fitSectionHeader.bind(null,u,r-8);for(const o of g){const a=e.getYForLineNumber(o.range.startLineNumber,i)+n,d=a-n,h=d+2,g=this._model.getSectionHeaderText(o,p);uO._renderSectionLabel(u,g,2===(null===(t=o.options.minimap)||void 0===t?void 0:t.sectionHeaderStyle),l,c,r,d,s,a,h)}}static _fitSectionHeader(e,t,i){if(!i)return i;const n=e.measureText(i).width,o=e.measureText("…").width;if(n<=t||n<=o)return i;const s=i.length,r=n/i.length,a=Math.floor((t-o)/r)-1;let l=Math.ceil(a/2);for(;l>0&&/\s/.test(i[l-1]);)--l;return i.substring(0,l)+"…"+i.substring(s-(a-l))}static _renderSectionLabel(e,t,i,n,o,s,r,a,l,d){t&&(e.fillStyle=n,e.fillRect(0,r,s,a),e.fillStyle=o,e.fillText(t,8,l)),i&&(e.beginPath(),e.moveTo(0,d),e.lineTo(s,d),e.closePath(),e.stroke())}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new lO(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;const[s,r,a]=uO._renderUntouchedLines(o,e.topPaddingLineCount,t,i,n,this._lastRenderData),l=this._model.getMinimapLinesRenderingData(t,i,a),d=this._model.getOptions().tabSize,c=this._model.options.defaultBackgroundColor,h=this._model.options.backgroundColor,u=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),m=this._model.options.renderMinimap,f=this._model.options.charRenderer(),_=this._model.options.fontScale,v=this._model.options.minimapCharWidth,b=(1===m?2:3)*_,w=n>b?Math.floor((n-b)/2):0,C=h.a/255,y=new zP(Math.round((h.r-c.r)*C+c.r),Math.round((h.g-c.g)*C+c.g),Math.round((h.b-c.b)*C+c.b),255);let S=e.topPaddingLineCount*n;const k=[];for(let e=0,s=i-t+1;e=0&&n_)return;const r=m.charCodeAt(w);if(9===r){const e=h-(w+C)%h;C+=e-1,b+=e*s}else if(32===r)b+=s;else{const h=jn(r)?2:1;for(let u=0;u_)return}}}}}class gO{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;ethis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}var pO=i(7173),mO={};mO.styleTagTransform=Gr(),mO.setAttributes=Kr(),mO.insert=zr().bind(null,"head"),mO.domAPI=Vr(),mO.insertStyleElement=qr(),Br()(pO.Z,mO),pO.Z&&pO.Z.locals&&pO.Z.locals;class fO extends yA{constructor(e,t){super(e),this._viewDomNode=t;const i=this._context.configuration.options.get(145);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=CL(document.createElement("div")),SA.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=CL(document.createElement("div")),SA.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(145);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=CL(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),e.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(t):this._domNode.appendChild(t),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(e,t){const i=this._widgets[e.getId()],n=t?t.preference:null,o=null==t?void 0:t.stackOridinal;return i.preference===n&&i.stack===o?(this._updateMaxMinWidth(),!1):(i.preference=n,i.stack=o,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var e,t;let i=0;const n=Object.keys(this._widgets);for(let o=0,s=n.length;o0));t.sort(((e,t)=>(this._widgets[e].stack||0)-(this._widgets[t].stack||0)));for(let e=0,n=t.length;e=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e+t;return[[0,e,s,e,e+t+o,e,s,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColorSingle===e.cursorColorSingle&&this.cursorColorPrimary===e.cursorColorPrimary&&this.cursorColorSecondary===e.cursorColorSecondary&&this.themeType===e.themeType&&fu.equals(this.backgroundColor,e.backgroundColor)&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class vO extends yA{constructor(e){super(e),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=CL(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=HC.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[{position:new wd(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new _O(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t1&&(n=0===t?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:e.selections[t].getPosition(),color:n})}return this._cursorPositions.sort(((e,t)=>wd.compare(e.position,t.position))),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(e){return!!e.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(e){return this._markRenderingIsNeeded()}onScrollChanged(e){return!!e.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(e){return this._markRenderingIsNeeded()}onThemeChanged(e){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render(),this._actualShouldRender=0}_render(){const e=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes)return this._domNode.setBackgroundColor(e?fu.Format.CSS.formatHexA(e):""),void this._domNode.setDisplay("none");const t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(QP.compareByRenderingProps),1!==this._actualShouldRender||QP.equalsArr(this._renderedDecorations,t)||(this._actualShouldRender=2),1!==this._actualShouldRender||Wh(this._renderedCursorPositions,this._cursorPositions,((e,t)=>e.position.lineNumber===t.position.lineNumber&&e.color===t.color))||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const i=this._settings.canvasWidth,n=this._settings.canvasHeight,o=this._settings.lineHeight,s=this._context.viewLayout,r=n/this._context.viewLayout.getScrollHeight(),a=6*this._settings.pixelRatio|0,l=a/2|0,d=this._domNode.domNode.getContext("2d");e?e.isOpaque()?(d.fillStyle=fu.Format.CSS.formatHexA(e),d.fillRect(0,0,i,n)):(d.clearRect(0,0,i,n),d.fillStyle=fu.Format.CSS.formatHexA(e),d.fillRect(0,0,i,n)):d.clearRect(0,0,i,n);const c=this._settings.x,h=this._settings.w;for(const e of t){const t=e.color,i=e.data;d.fillStyle=t;let u=0,g=0,p=0;for(let e=0,t=i.length/3;en&&(e=n-l),_=e-l,v=e+l}_>p+1||t!==u?(0!==e&&d.fillRect(c[u],g,h[u],p-g),u=t,g=_,p=v):v>p&&(p=v)}d.fillRect(c[u],g,h[u],p-g)}if(!this._settings.hideCursor){const e=2*this._settings.pixelRatio|0,t=e/2|0,i=this._settings.x[7],o=this._settings.w[7];let a=-100,l=-100,c=null;for(let h=0,u=this._cursorPositions.length;hn&&(p=n-t);const m=p-t,f=m+e;m>l+1||u!==c?(0!==h&&c&&d.fillRect(i,a,o,l-a),a=m,l=f):f>l&&(l=f),c=u,d.fillStyle=u}c&&d.fillRect(i,a,o,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,n),d.stroke(),d.moveTo(0,0),d.lineTo(i,0),d.stroke())}}class bO{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class wO{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(u=i-g);const p=a.color;let m=this._color2Id[p];m||(m=++this._lastAssignedId,this._color2Id[p]=m,this._id2Color[m]=p);const f=new bO(u-g,u+g,m);a.setColorZone(f),s.push(f)}return this._colorZonesInvalid=!1,s.sort(bO.compare),s}}class yO extends CA{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=CL(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new CO((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(67)),this._zoneManager.setPixelRatio(i.get(143)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(67)&&(this._zoneManager.setLineHeight(t.get(67)),this._render()),e.hasChanged(143)&&(this._zoneManager.setPixelRatio(t.get(143)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,d=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=d):r>=l?r=Math.max(r,d):(e.fillRect(0,s,n,r-s),s=l,r=d)}e.fillRect(0,s,n,r-s)}}var SO=i(509),kO={};kO.styleTagTransform=Gr(),kO.setAttributes=Kr(),kO.insert=zr().bind(null,"head"),kO.domAPI=Vr(),kO.insertStyleElement=qr(),Br()(SO.Z,kO),SO.Z&&SO.Z.locals&&SO.Z.locals;class xO extends yA{constructor(e){super(e),this.domNode=CL(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(102),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=CL(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(145);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(103);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}var NO=i(1213),IO={};IO.styleTagTransform=Gr(),IO.setAttributes=Kr(),IO.insert=zr().bind(null,"head"),IO.domAPI=Vr(),IO.insertStyleElement=qr(),Br()(NO.Z,IO),NO.Z&&NO.Z.locals&&NO.Z.locals;class TO{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class MO{constructor(e,t){this.lineNumber=e,this.ranges=t}}function AO(e){return new TO(e)}function RO(e){return new MO(e.lineNumber,e.ranges.map(AO))}class PO extends DR{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._roundedSelection=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._roundedSelection=t.get(101),this._typicalHalfwidthCharacterWidth=t.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;OO(a-i)i&&(d.top=1),OO(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=n[0].lineNumber,r=n[n.length-1].lineNumber;for(let a=0,l=n.length;a1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function OO(e){return e<0?-e:e}PO.SELECTION_CLASS_NAME="selected-text",PO.SELECTION_TOP_LEFT="top-left-radius",PO.SELECTION_BOTTOM_LEFT="bottom-left-radius",PO.SELECTION_TOP_RIGHT="top-right-radius",PO.SELECTION_BOTTOM_RIGHT="bottom-right-radius",PO.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",PO.ROUNDED_PIECE_WIDTH=10,jv(((e,t)=>{const i=e.getColor(ff);i&&!i.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${i}; }`)}));var FO,BO=i(7654),WO={};WO.styleTagTransform=Gr(),WO.setAttributes=Kr(),WO.insert=zr().bind(null,"head"),WO.domAPI=Vr(),WO.insertStyleElement=qr(),Br()(BO.Z,WO),BO.Z&&BO.Z.locals&&BO.Z.locals;class VO{constructor(e,t,i,n,o,s,r){this.top=e,this.left=t,this.paddingLeft=i,this.width=n,this.height=o,this.textContent=s,this.textContentClassName=r}}!function(e){e[e.Single=0]="Single",e[e.MultiPrimary=1]="MultiPrimary",e[e.MultiSecondary=2]="MultiSecondary"}(FO||(FO={}));class HO{constructor(e,t){this._context=e;const i=this._context.configuration.options,n=i.get(50);this._cursorStyle=i.get(28),this._lineHeight=i.get(67),this._typicalHalfwidthCharacterWidth=n.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=CL(document.createElement("div")),this._domNode.setClassName(`cursor ${RR}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),yL(this._domNode,n),this._domNode.setDisplay("none"),this._position=new wd(1,1),this._pluralityClass="",this.setPlurality(t),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(e){switch(e){default:case FO.Single:this._pluralityClass="";break;case FO.MultiPrimary:this._pluralityClass="cursor-primary";break;case FO.MultiSecondary:this._pluralityClass="cursor-secondary"}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(67),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),yL(this._domNode,i),!0}onCursorPositionChanged(e,t){return this._domNode.domNode.style.transitionProperty=t?"none":"",this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,o]=function(e,t){t>0&&Mn(e.charCodeAt(t))&&t--;const i=t+Fn(e,t);return[i-Bn(e,i),i]}(i,t-1);return[new wd(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="",i="";const[n,o]=this._getGraphemeAwarePosition();if(this._cursorStyle===tE.Line||this._cursorStyle===tE.LineThin){const s=e.visibleRangeForPosition(n);if(!s||s.outsideRenderedLine)return null;const r=ls(this._domNode.domNode);let a;this._cursorStyle===tE.Line?(a=Lr(r,this._lineCursorWidth>0?this._lineCursorWidth:2),a>2&&(t=o,i=this._getTokenClassName(n))):a=Lr(r,1);let l=s.left,d=0;a>=2&&l>=1&&(d=1,l-=d);const c=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta;return new VO(c,l,d,a,this._lineHeight,t,i)}const s=e.linesVisibleRangesForRange(new hh(n.lineNumber,n.column,n.lineNumber,n.column+o.length),!1);if(!s||0===s.length)return null;const r=s[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const a=r.ranges[0],l="\t"===o||a.width<1?this._typicalHalfwidthCharacterWidth:a.width;this._cursorStyle===tE.Block&&(t=o,i=this._getTokenClassName(n));let d=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.bigNumbersDelta,c=this._lineHeight;return this._cursorStyle!==tE.Underline&&this._cursorStyle!==tE.UnderlineThin||(d+=this._lineHeight-2,c=2),new VO(d,a.left,0,l,c,t,i)}_getTokenClassName(e){const t=this._context.viewModel.getViewLineData(e.lineNumber),i=t.tokens.findTokenIndexAtOffset(e.column-1);return t.tokens.getClassName(i)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${RR} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class zO extends yA{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(91),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new HO(this._context,FO.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=CL(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new $t,this._cursorFlatBlinkInterval=new Ds,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(91),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),zO.BLINK_INTERVAL,ls(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),zO.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case tE.Line:e+=" cursor-line-style";break;case tE.Block:e+=" cursor-block-style";break;case tE.Underline:e+=" cursor-underline-style";break;case tE.LineThin:e+=" cursor-line-thin-style";break;case tE.BlockOutline:e+=" cursor-block-outline-style";break;case tE.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return"on"!==this._cursorSmoothCaretAnimation&&"explicit"!==this._cursorSmoothCaretAnimation||(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=[{class:".cursor",foreground:Zv,background:Yv},{class:".cursor-primary",foreground:Qv,background:Xv},{class:".cursor-secondary",foreground:Jv,background:eb}];for(const n of i){const i=e.getColor(n.foreground);if(i){let o=e.getColor(n.background);o||(o=i.opposite()),t.addRule(`.monaco-editor .cursors-layer ${n.class} { background-color: ${i}; border-color: ${i}; color: ${o}; }`),Bv(e.type)&&t.addRule(`.monaco-editor .cursors-layer.has-selection ${n.class} { border-left: 1px solid ${o}; border-right: 1px solid ${o}; }`)}}}));const UO=()=>{throw new Error("Invalid change accessor")};class KO extends yA{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(145);this._lineHeight=t.get(67),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=CL(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=CL(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(e){xe(e)}}(e,n),n.addZone=UO,n.removeZone=UO,n.layoutZone=UO})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:CL(t.domNode),marginDomNode:t.marginDomNode?CL(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){xe(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){xe(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const o=Object.keys(this._zones);for(let t=0,n=o.length;tt)continue;const e=i.startLineNumber===t?i.startColumn:n.minColumn,o=i.endLineNumber===t?i.endColumn:n.maxColumn;e=S.endOffset&&(y++,S=i&&i[y]),9!==o&&32!==o)continue;if(h&&!w&&n<=v)continue;if(c&&n>=C&&n<=v&&32===o){const e=n-1>=0?r.charCodeAt(n-1):0,t=n+1=0?r.charCodeAt(n-1):0;if(32===o&&32!==e&&9!==e)continue}if(i&&(!S||S.startOffset>n||S.endOffset<=n))continue;const d=e.visibleRangeForPosition(new wd(t,n+1));d&&(s?(k=Math.max(k,d.left),b+=9===o?this._renderArrow(u,m,d.left):``):b+=9===o?`
    ${_?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:`
    ${String.fromCharCode(f)}
    `)}return s?(k=Math.round(k+m),``+b+""):b}_renderArrow(e,t,i){const n=e/2,o=i,s={x:0,y:t/7/2},r={x:.8*t,y:s.y},a={x:r.x-.2*r.x,y:r.y+.2*r.x},l={x:a.x+.1*r.x,y:a.y+.1*r.x},d={x:l.x+.35*r.x,y:l.y-.35*r.x};return``}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class GO{constructor(e){const t=e.options,i=t.get(50),n=t.get(38);"off"===n?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===n?(this.renderWhitespace=t.get(99),this.renderWithSVG=!0):(this.renderWhitespace=t.get(99),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=t.get(67),this.stopRenderingLineAfter=t.get(117)}equals(e){return this.renderWhitespace===e.renderWhitespace&&this.renderWithSVG===e.renderWithSVG&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter}}class ZO{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.lineHeight=0|t.lineHeight,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new hh(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewportViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class YO{get type(){return this._theme.type}get value(){return this._theme}constructor(e){this._theme=e}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class QO{constructor(e,t,i){this.configuration=e,this.theme=new YO(t),this.viewModel=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.viewModel.addViewEventHandler(e)}removeEventHandler(e){this.viewModel.removeViewEventHandler(e)}}let XO=class extends CA{constructor(e,t,i,n,o,s,r){super(),this._instantiationService=r,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new uh(1,1,1,1)],this._renderAnimationFrame=null;const a=new VR(t,n,o,e);this._context=new QO(t,i,n),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(WR,this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=CL(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=CL(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=CL(document.createElement("div")),SA.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new uP(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new AP(this._context,this._linesContent),this._viewZones=new KO(this._context),this._viewParts.push(this._viewZones);const l=new vO(this._context);this._viewParts.push(l);const d=new EO(this._context);this._viewParts.push(d);const c=new qR(this._context);this._viewParts.push(c),c.addDynamicOverlay(new aP(this._context)),c.addDynamicOverlay(new PO(this._context)),c.addDynamicOverlay(new xP(this._context)),c.addDynamicOverlay(new hP(this._context)),c.addDynamicOverlay(new $O(this._context));const h=new $R(this._context);this._viewParts.push(h),h.addDynamicOverlay(new lP(this._context)),h.addDynamicOverlay(new WP(this._context)),h.addDynamicOverlay(new OP(this._context)),h.addDynamicOverlay(new ER(this._context)),this._glyphMarginWidgets=new bP(this._context),this._viewParts.push(this._glyphMarginWidgets);const u=new TR(this._context);u.getDomNode().appendChild(this._viewZones.marginDomNode),u.getDomNode().appendChild(h.getDomNode()),u.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(u),this._contentWidgets=new XR(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new zO(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new fO(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const g=new xO(this._context);this._viewParts.push(g);const p=new QR(this._context);this._viewParts.push(p);const m=new hO(this._context);if(this._viewParts.push(m),l){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(l.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(g.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(u.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(d.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(m.getDomNode()),this._overflowGuardContainer.appendChild(p.domNode),this.domNode.appendChild(this._overflowGuardContainer),s?(s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),s.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new yR(this._context,a,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const e=this._context.viewModel.model,t=this._context.viewModel.glyphLanes;let i=[],n=0;i=i.concat(e.getAllMarginDecorations().map((e=>{var t,i,o;const s=null!==(i=null===(t=e.options.glyphMargin)||void 0===t?void 0:t.position)&&void 0!==i?i:Nh.Center;return n=Math.max(n,e.range.endLineNumber),{range:e.range,lane:s,persist:null===(o=e.options.glyphMargin)||void 0===o?void 0:o.persistLane}}))),i=i.concat(this._glyphMarginWidgets.getWidgets().map((t=>{const i=e.validateRange(t.preference.range);return n=Math.max(n,i.endLineNumber),{range:i,lane:t.preference.lane}}))),i.sort(((e,t)=>hh.compareRangesUsingStarts(e.range,t.range))),t.reset(n);for(const e of i)t.push(e.lane,e.range,e.persist);return t}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new sR(e,t)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new wd(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(145);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(16777216),this._linesContent.setHeight(16777216)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(142)+" "+zv(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onDecorationsChanged(e){return e.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new Pe;if(null===this._renderAnimationFrame){const e=this._createCoordinatedRendering();this._renderAnimationFrame=eF.INSTANCE.scheduleCoordinatedRendering({window:ls(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new Pe;try{return e.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new Pe;return e.renderText()},prepareRender:(t,i)=>{if(this._store.isDisposed)throw new Pe;return e.prepareRender(t,i)},render:(t,i)=>{if(this._store.isDisposed)throw new Pe;return e.render(t,i)}})}}_flushAccumulatedAndRenderNow(){const e=this._createCoordinatedRendering();JO((()=>e.prepareRenderText()));const t=JO((()=>e.renderText()));if(t){const[i,n]=t;JO((()=>e.prepareRender(i,n))),JO((()=>e.render(i,n)))}}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const e=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(e.requiredLanes)}JS.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return null;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new ZO(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender()),[e,new xA(this._context.viewLayout,i,this._viewLines)]},prepareRender:(e,t)=>{for(const i of e)i.prepareRender(t)},render:(e,t)=>{for(const i of e)i.render(t),i.onDidRender()}}}delegateVerticalScrollbarPointerDown(e){this._scrollbar.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._scrollbar.delegateScrollFromMouseWheelEvent(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new wd(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?GR.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new yO(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(e){this._textAreaHandler.writeScreenReaderContent(e)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){var t,i,n,o,s,r,a,l;this._contentWidgets.setWidgetPosition(e.widget,null!==(i=null===(t=e.position)||void 0===t?void 0:t.position)&&void 0!==i?i:null,null!==(o=null===(n=e.position)||void 0===n?void 0:n.secondaryPosition)&&void 0!==o?o:null,null!==(r=null===(s=e.position)||void 0===s?void 0:s.preference)&&void 0!==r?r:null,null!==(l=null===(a=e.position)||void 0===a?void 0:a.positionAffinity)&&void 0!==l?l:null),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){this._overlayWidgets.setWidgetPosition(e.widget,e.position)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}addGlyphMarginWidget(e){this._glyphMarginWidgets.addWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(e){const t=e.position;this._glyphMarginWidgets.setWidgetPosition(e.widget,t)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(e){this._glyphMarginWidgets.removeWidget(e.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};function JO(e){try{return e()}catch(e){return xe(e),null}}XO=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,_d)],XO);class eF{constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(e){return this._coordinatedRenderings.push(e),this._scheduleRender(e.window),{dispose:()=>{const t=this._coordinatedRenderings.indexOf(e);if(-1!==t&&(this._coordinatedRenderings.splice(t,1),0===this._coordinatedRenderings.length)){for(const[e,t]of this._animationFrameRunners)t.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(e){if(!this._animationFrameRunners.has(e)){const t=()=>{this._animationFrameRunners.delete(e),this._onRenderScheduled()};this._animationFrameRunners.set(e,xs(e,t,100))}}_onRenderScheduled(){const e=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const t of e)JO((()=>t.prepareRenderText()));const t=[];for(let i=0,n=e.length;in.renderText()))}for(let i=0,n=e.length;in.prepareRender(s,r)))}for(let i=0,n=e.length;in.render(s,r)))}}}eF.INSTANCE=new eF;class tF{constructor(e,t,i,n,o){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=o}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;ethis.injectionOffsets[e];e++)i0?this.breakOffsets[o-1]:0,0===t)if(e<=s)n=o-1;else{if(!(e>r))break;i=o+1}else if(e=r))break;i=o+1}}let r=e-s;return o>0&&(r+=this.wrappedTextIndentLength),new oF(o,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(o!==n)return this.offsetInInputWithInjectionsToOutputPosition(o,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new oF(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&iF(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(nF(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!iF(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!nF(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t||4===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}Cc()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let o=0;oe)break;if(e<=a)return{injectedTextIndex:o,offsetInInputWithInjections:r,length:s};n+=s}}}}function iF(e){return null==e||e===Ih.Right||e===Ih.Both}function nF(e){return null==e||e===Ih.Left||e===Ih.Both}class oF{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new wd(e+this.outputLineIndex,this.outputOffset+1)}}const sF=fL("domLineBreaksComputer",{createHTML:e=>e});class rF{static create(e){return new rF(new WeakRef(e))}constructor(e){this.targetWindow=e}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t)},finalize:()=>function(e,t,i,n,o,s,r,a){var l;function d(e){const i=a[e];if(i){const n=py.applyInjectedText(t[e],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new tF(s,o,[n.length],[],0)}return null}if(-1===o){const e=[];for(let i=0,n=t.length;ic?(r=0,l=0):d=c-e}const h=o.substr(r),u=aF(h,l,n,d,m,g);f[e]=r,_[e]=l,v[e]=h,b[e]=u[0],w[e]=u[1]}const C=m.build(),y=null!==(l=null==sF?void 0:sF.createHTML(C))&&void 0!==l?l:C;p.innerHTML=y,p.style.position="absolute",p.style.top="10000","keepAll"===r?(p.style.wordBreak="keep-all",p.style.overflowWrap="anywhere"):(p.style.wordBreak="inherit",p.style.overflowWrap="break-word"),e.document.body.appendChild(p);const S=document.createRange(),k=Array.prototype.slice.call(p.children,0),x=[];for(let e=0;ee.options)),l=c.map((e=>e.column-1))):(r=null,l=null),x[e]=new tF(l,r,t,s,n)}return e.document.body.removeChild(p),x}(Ll(this.targetWindow.deref()),s,e,t,i,n,o,r)}}}function aF(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendString('
    ');const r=e.length;let a=t,l=0;const d=[],c=[];let h=0");for(let t=0;t"),d[t]=l,c[t]=a;const n=h;h=t+1"),d[e.length]=l,c[e.length]=a,o.appendString("
    "),[d,c]}function lF(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{dF(e,o,n,0,null,i.length-1,null,s)}catch(e){return console.log(e),null}return 0===s.length?null:(s.push(i.length),s)}function dF(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||cF(e,t,i[n],i[n+1]),r=r||cF(e,t,i[s],i[s+1]),Math.abs(o[0].top-r[0].top)<=.1)return;if(n+1===s)return void a.push(s);const l=n+(s-n)/2|0,d=cF(e,t,i[l],i[l+1]);dF(e,t,i,n,o,l,d,a),dF(e,t,i,l,d,s,r,a)}function cF(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}class hF extends lt{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new ut),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(e,t,i){this._editor=e,this._instantiationService=i;for(const e of t)this._pending.has(e.id)?xe(new Error(`Cannot have two contributions with the same id ${e.id}`)):this._pending.set(e.id,e);this._instantiateSome(0),this._register(Ss(ls(this._editor.getDomNode()),(()=>{this._instantiateSome(1)}))),this._register(Ss(ls(this._editor.getDomNode()),(()=>{this._instantiateSome(2)}))),this._register(Ss(ls(this._editor.getDomNode()),(()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const e={};for(const[t,i]of this._instances)"function"==typeof i.saveViewState&&(e[t]=i.saveViewState());return e}restoreViewState(e){for(const[t,i]of this._instances)"function"==typeof i.restoreViewState&&i.restoreViewState(e[t])}get(e){return this._instantiateById(e),this._instances.get(e)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var e;return Ss(ls(null===(e=this._editor)||void 0===e?void 0:e.getDomNode()),(()=>{this._instantiateSome(1)}),50)}_instantiateSome(e){if(this._finishedInstantiation[e])return;this._finishedInstantiation[e]=!0;const t=this._findPendingContributionsByInstantiation(e);for(const e of t)this._instantiateById(e.id)}_findPendingContributionsByInstantiation(e){const t=[];for(const[,i]of this._pending)i.instantiation===e&&t.push(i);return t}_instantiateById(e){const t=this._pending.get(e);if(t){if(this._pending.delete(e),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const e=this._instantiationService.createInstance(t.ctor,this._editor);this._instances.set(t.id,e),"function"==typeof e.restoreViewState&&0!==t.instantiation&&console.warn(`Editor contribution '${t.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(e){xe(e)}}}}class uF{constructor(e,t,i,n,o,s,r){this.id=e,this.label=t,this.alias=i,this.metadata=n,this._precondition=o,this._run=s,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(e){return this.isSupported()?this._run(e):Promise.resolve(void 0)}}const gF={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};class pF{static create(e){return new pF(e.get(134),e.get(133))}constructor(e,t){this.classifier=new mF(e,t)}createLineBreaksComputer(e,t,i,n,o){const s=[],r=[],a=[];return{addRequest:(e,t,i)=>{s.push(e),r.push(t),a.push(i)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,d=[];for(let e=0,c=s.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let fF=[],_F=[];function vF(e,t,i,n,o,s,r,a){if(-1===o)return null;const l=i.length;if(l<=1)return null;const d="keepAll"===a,c=t.breakOffsets,h=t.breakOffsetsVisibleColumn,u=SF(i,n,o,s,r),g=o-u,p=fF,m=_F;let f=0,_=0,v=0,b=o;const w=c.length;let C=0;if(C>=0){let e=Math.abs(h[C]-b);for(;C+1=e)break;e=t,C++}}for(;Ct&&(t=_,o=v);let r=0,a=0,u=0,y=0;if(o<=b){let v=o,w=0===t?0:i.charCodeAt(t-1),C=0===t?0:e.get(w),S=!0;for(let o=t;o_&&yF(0,C,l,c,d)&&(r=t,a=v),v+=h,v>b){t>_?(u=t,y=v-h):(u=o+1,y=v),v-a>g&&(r=0),S=!1;break}w=l,C=c}if(S){f>0&&(p[f]=c[c.length-1],m[f]=h[c.length-1],f++);break}}if(0===r){let l=o,c=i.charCodeAt(t),h=e.get(c),p=!1;for(let n=t-1;n>=_;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){p=!0;break}let m,f;if(Mn(o)?(n--,m=0,f=2):(m=e.get(o),f=jn(o)?s:1),l<=b){if(0===u&&(u=t,y=l),l<=b-g)break;if(yF(0,m,c,h,d)){r=t,a=l;break}}l-=f,c=o,h=m}if(0!==r){const e=g-(y-a);if(e<=n){const t=i.charCodeAt(u);let o;o=Tn(t)?2:wF(t,y,n,s),e-o<0&&(r=0)}}if(p){C--;continue}}if(0===r&&(r=u,a=y),r<=_){const e=i.charCodeAt(_);Tn(e)?(r=_+2,a=v+2):(r=_+1,a=v+wF(e,v,n,s))}for(_=r,p[f]=r,v=a,m[f]=a,f++,b=a+g;C<0||C=S)break;S=e,C++}}return 0===f?null:(p.length=f,m.length=f,fF=t.breakOffsets,_F=t.breakOffsetsVisibleColumn,t.breakOffsets=p,t.breakOffsetsVisibleColumn=m,t.wrappedTextIndentLength=u,t)}function bF(e,t,i,n,o,s,r,a){const l=py.applyInjectedText(t,i);let d,c;if(i&&i.length>0?(d=i.map((e=>e.options)),c=i.map((e=>e.column-1))):(d=null,c=null),-1===o)return d?new tF(c,d,[l.length],[],0):null;const h=l.length;if(h<=1)return d?new tF(c,d,[l.length],[],0):null;const u="keepAll"===a,g=SF(l,n,o,s,r),p=o-g,m=[],f=[];let _=0,v=0,b=0,w=o,C=l.charCodeAt(0),y=e.get(C),S=wF(C,0,n,s),k=1;Tn(C)&&(S+=1,C=l.charCodeAt(1),y=e.get(C),k++);for(let t=k;tw&&((0===v||S-b>p)&&(v=i,b=S-a),m[_]=v,f[_]=b,_++,w=b+p,v=0),C=o,y=r}return 0!==_||i&&0!==i.length?(m[_]=h,f[_]=S,new tF(c,d,m,f,g)):null}function wF(e,t,i,n){return 9===e?i-t%i:jn(e)||e<32?n:1}function CF(e,t){return t-e%t}function yF(e,t,i,n,o){return 32!==i&&(2===t&&2!==n||1!==t&&1===n||!o&&3===t&&2!==n||!o&&3===n&&1!==t)}function SF(e,t,i,n,o){let s=0;if(0!==o){const r=_n(e);if(-1!==r){for(let i=0;ii&&(s=0)}}return s}class kF{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new sS(new hh(1,1,1,1),0,0,new wd(1,1),0),new sS(new hh(1,1,1,1),0,0,new wd(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new iS(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!t.isEmpty()?uh.fromRange(t.collapseToEnd(),this.modelState.selection.getDirection()):uh.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,s),a=this._validatePositionWithCache(e,o,n,r);return i.equals(s)&&n.equals(r)&&o.equals(a)?t:new sS(hh.fromPositions(r,a),t.selectionStartKind,t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=kF._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),s=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new sS(i,t.selectionStartKind,n,o,s)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new sS(n,i.selectionStartKind,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new sS(n,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new wd(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new wd(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new hh(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new sS(s,t.selectionStartKind,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class xF{constructor(e){this.context=e,this.cursors=[new kF(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return function(e,t){return Du(e,((e,i)=>-t(e,i)))}(this.cursors,su((e=>e.viewState.position),wd.compare)).viewState.position}getBottomMostViewPosition(){return function(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=o)}return i}(this.cursors,su((e=>e.viewState.position),wd.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(iS.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),hh.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class LF{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class DF{constructor(){this.type=0}}class EF{constructor(){this.type=1}}class NF{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class IF{constructor(e,t,i){this.selections=e,this.modelSelections=t,this.reason=i,this.type=3}}class TF{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler,this.affectsGlyphMargin=e.affectsGlyphMargin,this.affectsLineNumber=e.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}class MF{constructor(){this.type=5}}class AF{constructor(e){this.type=6,this.isFocused=e}}class RF{constructor(){this.type=7}}class PF{constructor(){this.type=8}}class OF{constructor(e,t){this.fromLineNumber=e,this.count=t,this.type=9}}class FF{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class BF{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class WF{constructor(e,t,i,n,o,s,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=o,this.revealHorizontal=s,this.scrollType=r,this.type=12}}class VF{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class HF{constructor(e){this.theme=e,this.type=14}}class zF{constructor(e){this.type=15,this.ranges=e}}class UF{constructor(){this.type=16}}class KF{constructor(){this.type=17}}class jF extends lt{constructor(){super(),this._onEvent=this._register(new kt),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class qF{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class $F{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(e){return e.kind!==this.kind?null:new $F(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class GF{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(e){return e.kind!==this.kind?null:new GF(this.oldHasFocus,e.hasFocus)}}class ZF{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}attemptToMerge(e){return e.kind!==this.kind?null:new ZF(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class YF{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class QF{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(e){return e.kind!==this.kind?null:this}}class XF{constructor(e,t,i,n,o,s,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;ts&&(n=n.slice(0,s),o=!0);const r=aB.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealAll(e,t,i,n,o,s){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=hh.fromPositions(r[0],r[0]),e.emitViewEvent(new WF(t,i,a,l,n,o,s))}revealPrimary(e,t,i,n,o,s){const r=[this._cursors.getPrimaryCursor().viewState.selection];e.emitViewEvent(new WF(t,i,null,r,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const t=iS.fromModelSelections(i.resultingSelection);this.setStates(e,"modelChange",i.isUndoing?5:i.isRedoing?6:2,t)&&this.revealAll(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,iS.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,iS.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let o=0,s=e.length;o0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=aB.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new IF(a,r,i)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new XF(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,d=n.text.lastIndexOf(a,l-1);if(-1===d)return null;t.push([d,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const s=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=aB.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){xe(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealAll(t,i,!1,0,!0,0)}getAutoClosedCharacters(){return lB.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._compositionState=new hB(this._model,this.getSelections())}endComposition(e,t){const i=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit((()=>{"keyboard"===t&&this._executeEditOperation(FS.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,i,this.getSelections(),this.getAutoClosedCharacters()))}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(FS.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,s);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new uh(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,s,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(FS.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(_S.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new rS(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new rS(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}class aB{static from(e,t){return new aB(e.getVersionId(),t.getCursorStates())}constructor(e,t){this.modelVersionId=e,this.cursorState=t}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class dB{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,s=[];for(let i=0;i0?(n[i].sort(o),s[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new uh(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new uh(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s}));r||(r=e.selectionsBefore);const a=[];for(const e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{hh.isEmpty(e)&&""===s||n.push({identifier:{major:t,minor:o++},range:e,text:s,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a={addEditOperation:s,addTrackedEditOperation:(e,t,i)=>{r=!0,s(e,t,i)},trackSelection:(t,i)=>{const n=uh.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return xe(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-hh.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;io.identifier.major?n.identifier.major:o.identifier.major,t[s.toString()]=!0;for(let t=0;t0&&i--}}return t}}class cB{constructor(e,t,i){this.text=e,this.startSelection=t,this.endSelection=i}}class hB{static _capture(e,t){const i=[];for(const n of t){if(n.startLineNumber!==n.endLineNumber)return null;i.push(new cB(e.getLineContent(n.startLineNumber),n.startColumn-1,n.endColumn-1))}return i}constructor(e,t){this._original=hB._capture(e,t)}deduceOutcome(e,t){if(!this._original)return null;const i=hB._capture(e,t);if(!i)return null;if(this._original.length!==i.length)return null;const n=[];for(let e=0,t=this._original.length;e>>1;t===e[s].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,o|=0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new gB(s,e,i,n,o)),s},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const s=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=pB.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0,i+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e-(t?1:0))+this._paddingTop}getVerticalOffsetAfterLineNumber(e,t=!1){return this._checkPendingChanges(),e|=0,this._lineHeight*e+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e+(t?1:0))+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,d;-1===r?(r=a,d=s+1,l=0):(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let c=o,h=c;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/i)*i,h-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let e=n;e<=s;e++){for(-1===f&&(c<=m&&mm)&&(f=e),c+=i,p[e-n]=h,h+=i;d===e;)h+=l,c+=l,r++,r>=a?d=s+1:(d=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(c>=t){s=e;break}}-1===f&&(f=s);const _=0|this.getVerticalOffsetForLineNumber(s);let v=n,b=s;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b,lineHeight:this._lineHeight}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}pB.INSTANCE_COUNT=0;class mB{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class fB extends lt{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new kt),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new mB(0,0,0,0),this._scrollable=this._register(new SN({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new $F(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class _B extends lt{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(145),s=n.get(84);this._linesLayout=new pB(t,n.get(67),s.top,s.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new fB(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new mB(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(114)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(67)&&this._linesLayout.setLineHeight(t.get(67)),e.hasChanged(84)){const e=t.get(84);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(145)){const e=t.get(145),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new mB(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(114)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(103);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(105)?o+=Math.max(0,t-n.get(67)-n.get(84).bottom):n.get(103).ignoreHorizontalScrollbarInContentHeight||(o+=this._getHorizontalScrollbarHeight(e,i)),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new mB(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new KP(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new KP(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(){const e=this._configuration.options,t=this._maxLineWidth,i=e.get(146),n=e.get(50),o=e.get(145);if(i.isViewportWrapping){const i=e.get(73);return t>o.contentWidth+n.typicalHalfwidthCharacterWidth&&i.enabled&&"right"===i.side?t+o.verticalScrollbarWidth:t}{const i=e.get(104)*n.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+i+o.verticalScrollbarWidth,s,this._overlayWidgetsMinWidth)}}setMaxLineWidth(e){this._maxLineWidth=e,this._updateContentWidth()}setOverlayWidgetsMinWidth(e){this._overlayWidgetsMinWidth=e,this._updateContentWidth()}_updateContentWidth(){const e=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new mB(e.width,this._computeContentWidth(),e.height,e.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(e,t)}getVerticalOffsetAfterLineNumber(e,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(e,t)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class vB{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,o=e.options;let s;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new wd(n.startLineNumber,1),0,!1,!0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new wd(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);s=new hh(e.lineNumber,e.column,t.lineNumber,t.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new YP(s,o),this._decorationsCache[t]=i}return i}getMinimapDecorationsInRange(e){return this._getDecorationsInRange(e,!0,!1).decorations}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(e,!1,!1),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(e,t=!1,i=!1){const n=new hh(e,this._linesCollection.getViewLineMinColumn(e),e,this._linesCollection.getViewLineMaxColumn(e));return this._getDecorationsInRange(n,t,i).inlineDecorations[0]}_getDecorationsInRange(e,t,i){const n=this._linesCollection.getDecorationsInRange(e,this.editorId,aE(this.configuration.options),t,i),o=e.startLineNumber,s=e.endLineNumber,r=[];let a=0;const l=[];for(let e=o;e<=s;e++)l[e-o]=[];for(let e=0,t=n.length;e1===e))}function CB(e,t){return yB(e,t.range,(e=>2===e))}function yB(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.tokenization.getLineTokens(n),s=n===t.startLineNumber,r=n===t.endLineNumber;let a=s?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1);){if(!i(o.getStandardTokenType(a)))return!1;a++}}return!0}function SB(e,t){return null===e?t?xB.INSTANCE:LB.INSTANCE:new kB(e,t)}class kB{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,o=this._projectionData.breakOffsets[i];let s;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new py(0,0,e+1,this._projectionData.injectionOptions[t],0)));s=py.applyInjectedText(e.getLineContent(t),i).substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=EB(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,o,s,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,d=a.injectionOptions;let c,h=null;if(l){h=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,s=a.breakOffsets[i];for(;ts)break;if(o0?a.wrappedTextIndentLength:0,r=t+Math.max(c-o,0),l=t+Math.min(h-o,s-o);r!==l&&n.push(new ZP(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(h<=s))break;e+=r,t++}}}c=l?e.tokenization.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:d[t].content,tokenMetadata:ZC.defaultTokenMetadata})))):e.tokenization.getLineTokens(t);for(let e=i;e0?n.wrappedTextIndentLength:0,s=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(s,r,o);let l=a.getLineContent();i>0&&(l=EB(n.wrappedTextIndentLength)+l);const d=this._projectionData.getMinOutputOffset(i)+1,c=l.length+1,h=i+1=DB.length)for(let t=1;t<=e;t++)DB[t]=NB(t);return DB[e]}function NB(e){return new Array(e+1).join(" ")}class IB{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Qw(e);const i=this.values,n=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Qw(e),t=Qw(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Qw(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,s=0;for(;t<=i;)if(n=t+(i-t)/2|0,o=this.prefixSum[n],s=o-this.values[n],e=o))break;t=n+1}return new MB(n,e-s)}}class TB{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new MB(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=Xh(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;nt.lineNumber===e+1));s.addRequest(i[e],n,t?t[e]:null)}const a=s.finalize(),l=[],d=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(hh.compareRangesUsingStarts);let c=1,h=0,u=-1,g=u+1=c&&t<=h,n=SB(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new TB(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(hh.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,s=t.length;eo+1?(i.push(new hh(n,1,o,1)),n=s.startLineNumber,o=s.endLineNumber):s.endLineNumber>o&&(o=s.endLineNumber)}return i.push(new hh(n,1,o,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(hh.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n({range:e,options:zy.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const o=t;let s=1,r=0,a=-1,l=a+1=s&&t<=r?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(d=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n,o){const s=this.fontInfo.equals(e),r=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n,d=this.wordBreak===o;if(s&&r&&a&&l&&d)return!1;const c=s&&r&&!a&&l&&d;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n,this.wordBreak=o;let h=null;if(c){h=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),s=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let e=0,t=n.length;er?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,d=l+r-1,u=d+1,g=u+(o-r)-1,a=!0):ot?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new RB(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new wd(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new wd(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let s=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const o=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=o;t{if(-1!==e.forWrappedLinesAfterColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesAfterColumn).lineNumber>=n.modelLineWrappedLineIdx)return;if(-1!==e.forWrappedLinesBeforeOrAtColumn&&this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.forWrappedLinesBeforeOrAtColumn).lineNumbern.modelLineWrappedLineIdx)return}const i=this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn),o=this.modelLineProjections[n.modelLineNumber-1].getViewPositionOfModelPosition(0,e.horizontalLine.endColumn);return o.lineNumber===n.modelLineWrappedLineIdx?new aw(e.visibleColumn,t,e.className,new lw(e.horizontalLine.top,i.column),-1,-1):o.lineNumber!!e)))}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[];const s=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let d=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1;let c=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(c=0===n?1:2),s.push(l),r.push(c),null===d&&(d=new wd(e+1,0))}else null!==d&&(o=o.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,e)),d=null)}null!==d&&(o=o.concat(this.model.guides.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const c=t-e+1,h=new Array(c);let u=0;for(let e=0,t=o.length;et&&(h=!0,c=t-o+1),l.getViewLinesData(this.model,n+1,d,c,o-e,i,a),o+=c,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),o=n.index,s=n.remainder,r=this.modelLineProjections[o],a=r.getViewLineMinColumn(this.model,o+1,s),l=r.getViewLineMaxColumn(this.model,o+1,s);tl&&(t=l);const d=r.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new wd(o+1,d)).equals(i)?new wd(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new hh(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new wd(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new hh(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2,n=!1,o=!1){const s=this.model.validatePosition(new wd(e,t)),r=s.lineNumber,a=s.column;let l=r-1,d=!1;if(o)for(;l0&&!this.modelLineProjections[l].isVisible();)l--,d=!0;if(0===l&&!this.modelLineProjections[l].isVisible())return new wd(n?0:1,1);const c=1+this.projectedModelLineLineCounts.getPrefixSum(l);let h;return h=d?o?this.modelLineProjections[l].getViewPositionOfModelPosition(c,1,i):this.modelLineProjections[l].getViewPositionOfModelPosition(c,this.model.getLineMaxColumn(l+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(c,a,i),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return hh.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new hh(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i,n,o){const s=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-s.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new hh(s.lineNumber,1,r.lineNumber,r.column),t,i,n,o);let a=[];const l=s.lineNumber-1,d=r.lineNumber-1;let c=null;for(let e=l;e<=d;e++)if(this.modelLineProjections[e].isVisible())null===c&&(c=new wd(e+1,e===l?s.column:1));else if(null!==c){const o=this.model.getLineMaxColumn(e);a=a.concat(this.model.getDecorationsInRange(new hh(c.lineNumber,c.column,e,o),t,i,n)),c=null}null!==c&&(a=a.concat(this.model.getDecorationsInRange(new hh(c.lineNumber,c.column,r.lineNumber,r.column),t,i,n)),c=null),a.sort(((e,t)=>{const i=hh.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));const h=[];let u=0,g=null;for(const e of a){const t=e.id;g!==t&&(g=t,h[u++]=e)}return h}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class RB{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}}class PB{constructor(e,t){this.modelRange=e,this.viewLines=t}}class OB{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t,i,n){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t,i,n)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class FB{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new BB(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new FF(t,i)}onModelLinesInserted(e,t,i,n){return new BF(t,i)}onModelLineChanged(e,t,i){return[!1,new OF(t,1),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let e=0;et)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}const WB=Nh.Right;class VB{constructor(e){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((e+1)*WB/8))}reset(e){const t=Math.ceil((e+1)*WB/8);this.lanes.length>>3]|=1<>>3]&1<>>3]&1<this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStart=zB.create(this.model),this.glyphLanes=new VB(0),this.model.isTooLargeForTokenization())this._lines=new FB(this.model);else{const e=this._configuration.options,t=e.get(50),i=e.get(139),s=e.get(146),r=e.get(138),a=e.get(129);this._lines=new AB(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r,a)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new rB(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new _B(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._handleVisibleLinesChanged(),e.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new VF(e)),this._eventDispatcher.emitOutgoingEvent(new ZF(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new vB(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(UP.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new UF)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new HF(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const e=this.viewLayout.getLinesViewportData(),t=new hh(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber));return this._toModelVisibleRanges(t)}visibleLinesStabilized(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!0)}_handleVisibleLinesChanged(){const e=this.getModelVisibleRanges();this._attachedView.setVisibleLines(e,!1)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new AF(e)),this._eventDispatcher.emitOutgoingEvent(new GF(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new DF)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new EF)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const e=new wd(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),t=this.coordinatesConverter.convertViewPositionToModelPosition(e);return new qB(t,this._viewportStart.startLineDelta)}return new qB(null,0)}_onConfigurationChanged(e,t){const i=this._captureStableViewport(),n=this._configuration.options,o=n.get(50),s=n.get(139),r=n.get(146),a=n.get(138),l=n.get(129);this._lines.setWrappingSettings(o,s,r.wrappingColumn,a,l)&&(e.emitViewEvent(new MF),e.emitViewEvent(new PF),e.emitViewEvent(new TF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(91)&&(this._decorations.reset(),e.emitViewEvent(new TF(null))),t.hasChanged(98)&&(this._decorations.reset(),e.emitViewEvent(new TF(null))),e.emitViewEvent(new NF(t)),this.viewLayout.onConfigurationChanged(t),i.recoverViewportStart(this.coordinatesConverter,this.viewLayout),tS.shouldRecreate(t)&&(this.cursorConfig=new tS(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e instanceof Cy?e.rawContentChangedEvent.changes:e.changes,s=e instanceof Cy?e.rawContentChangedEvent.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new du(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new MF),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[o,r,a,d]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),d&&(t.emitViewEvent(d),this.viewLayout.onLinesDeleted(d.fromLineNumber,d.toLineNumber));break}}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new PF),t.emitViewEvent(new TF(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const t=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&t){const e=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStart.startLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();e instanceof Cy&&t.emitOutgoingEvent(new nB(e.contentChangedEvent)),this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new RF),this.cursorConfig=new tS(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new iB(e))}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new tS(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new tB(e))}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new MF),e.emitViewEvent(new PF),e.emitViewEvent(new TF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new tS(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new oB(e))}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new TF(e)),this._eventDispatcher.emitOutgoingEvent(new eB(e))})))}setHiddenAreas(e,t){var i;this.hiddenAreasModel.setHiddenAreas(t,e);const n=this.hiddenAreasModel.getMergedRanges();if(n===this.previousHiddenAreas)return;this.previousHiddenAreas=n;const o=this._captureStableViewport();let s=!1;try{const e=this._eventDispatcher.beginEmitViewEvents();s=this._lines.setHiddenAreas(n),s&&(e.emitViewEvent(new MF),e.emitViewEvent(new PF),e.emitViewEvent(new TF(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const t=null===(i=o.viewportStartModelPosition)||void 0===i?void 0:i.lineNumber,r=t&&n.some((e=>e.startLineNumber<=t&&t<=e.endLineNumber));r||o.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),s&&this._eventDispatcher.emitOutgoingEvent(new QF)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(145),t=this._configuration.options.get(67),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new hh(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let o=0,s=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(st.toInlineDecoration(e)))]),new $P(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,t,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new jP(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,aE(this._configuration.options)),i=new UB;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const s=o.position;if(0===s)continue;const r=o.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,s)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;null==e||e.invalidateCachedColor();const i=t.options.minimap;null==i||i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getValueLengthInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueLengthInRange(i,t)}modifyPosition(e,t){const i=this.coordinatesConverter.convertViewPositionToModelPosition(e),n=this.model.modifyPosition(i,t);return this.coordinatesConverter.convertModelPositionToViewPosition(n)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(o)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(hh.compareRangesUsingStarts);let o=!1,s=!1;for(const t of e)t.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){const t=[];let n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Qg)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new hh(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(50),s=this._getColorMap();let r;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===vE.fontFamily?r=vE.fontFamily:(r=o.fontFamily,r=r.replace(/"/g,"'"),/[,']/.test(r)||/[+ ]/.test(r)&&(r=`'${r}'`),r=`${r}, ${vE.fontFamily}`),{mode:i,html:`
    `+this._getHTMLToCopy(n,s)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.tokenization.getLineTokens(e),d=l.getLineContent(),c=e===i?n-1:0,h=e===o?s-1:d.length;a+=""===d?"
    ":kL(d,l.inflate(),t,c,h,r,U)}return a}_getColorMap(){const e=HC.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new JF):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((s=>this._cursor.compositionType(s,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealAllCursors(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealAll(n,e,i,0,t,0)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new hh(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new WF(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new hh(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new WF(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new WF(e,!1,i,null,n,t,o))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new KF),this._eventDispatcher.emitOutgoingEvent(new YF))}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}batchEvents(e){this._withViewEventsCollector((()=>{e()}))}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class zB{static create(e){const t=e._setTrackedRange(null,new hh(1,1,1,1),1);return new zB(e,1,!1,t,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(e,t,i,n,o){this._model=e,this._viewLineNumber=t,this._isValid=i,this._modelTrackedRange=n,this._startLineDelta=o}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(e,t){const i=e.coordinatesConverter.convertViewPositionToModelPosition(new wd(t,e.getLineMinColumn(t))),n=e.model._setTrackedRange(this._modelTrackedRange,new hh(i.lineNumber,i.column,i.lineNumber,i.column),1),o=e.viewLayout.getVerticalOffsetForLineNumber(t),s=e.viewLayout.getCurrentScrollTop();this._viewLineNumber=t,this._isValid=!0,this._modelTrackedRange=n,this._startLineDelta=s-o}invalidate(){this._isValid=!1}}class UB{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const s=this._asMap[e];if(s){const e=s.data,t=e[e.length-3],r=e[e.length-1];if(t===o&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(o,i,n)}else{const s=new QP(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class KB{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(e,t){const i=this.hiddenAreas.get(e);i&&jB(i,t)||(this.hiddenAreas.set(e,t),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const e=Array.from(this.hiddenAreas.values()).reduce(((e,t)=>function(e,t){const i=[];let n=0,o=0;for(;n{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(145)){const e=t.get(145);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(r.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=o,this._commandService=s,this._themeService=a,this._register(new tW(this,this._contextKeyService)),this._register(new iW(this,this._contextKeyService,h)),this._instantiationService=this._register(n.createChild(new $B([pc,this._contextKeyService]))),this._modelData=null,this._focusTracker=new nW(e,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={},m=Array.isArray(i.contributions)?i.contributions:sh.getEditorContributions(),this._contributions.initialize(this,m,this._instantiationService);for(const e of sh.getEditorActions()){if(this._actions.has(e.id)){xe(new Error(`Cannot have two actions with the same id ${e.id}`));continue}const t=new uF(e.id,e.label,e.alias,e.metadata,null!==(g=e.precondition)&&void 0!==g?g:void 0,(t=>this._instantiationService.invokeFunction((i=>Promise.resolve(e.runEditorCommand(i,this,t))))),this._contextKeyService);this._actions.set(t.id,t)}const f=()=>!this._configuration.options.get(91)&&this._configuration.options.get(36).enabled;this._register(new Ar(this._domElement,{onDragOver:e=>{if(!f())return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this.showDropIndicatorAt(t.position)},onDrop:async e=>{if(!f())return;if(this.removeDropIndicator(),!e.dataTransfer)return;const t=this.getTargetAtClientPoint(e.clientX,e.clientY);(null==t?void 0:t.position)&&this._onDropIntoEditor.fire({position:t.position,event:e})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(e){var t;null===(t=this._modelData)||void 0===t||t.view.writeScreenReaderContent(e)}_createConfiguration(e,t,i,n){return new iA(e,t,i,this._domElement,n)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return gF.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e||{})}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?vS.getWordAtPosition(this._modelData.model,this._configuration.options.get(131),this._configuration.options.get(130),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){try{if(this._beginUpdate(),!this._modelData)return;this._modelData.model.setValue(e)}finally{this._endUpdate()}}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){var t;try{this._beginUpdate();const i=e;if(null===this._modelData&&null===i)return;if(this._modelData&&this._modelData.model===i)return;const n={oldModelUrl:(null===(t=this._modelData)||void 0===t?void 0:t.model.uri)||null,newModelUrl:(null==i?void 0:i.uri)||null};this._onWillChangeModel.fire(n);const o=this.hasTextFocus(),s=this._detachModel();this._attachModel(i),o&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(n),this._postDetachModelCleanup(s),this._contributionsDisposable=this._contributions.onAfterModelAttached()}finally{this._endUpdate()}}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(const i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(e,t,i,n){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(s.lineNumber,n)}getTopForLineNumber(e,t=!1){return this._modelData?GB._getVerticalOffsetForPosition(this._modelData,e,1,t):-1}getTopForPosition(e,t){return this._modelData?GB._getVerticalOffsetForPosition(this._modelData,e,t,!1):-1}static _getVerticalOffsetForPosition(e,t,i,n=!1){const o=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(o);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber,n)}getBottomForLineNumber(e,t=!1){return this._modelData?GB._getVerticalOffsetAfterPosition(this._modelData,e,1,t):-1}setHiddenAreas(e,t){var i;null===(i=this._modelData)||void 0===i||i.viewModel.setHiddenAreas(e.map((e=>hh.lift(e))),t)}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return vu.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!wd.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!hh.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new hh(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!wd.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new hh(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=uh.isISelection(e),n=hh.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new uh(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new hh(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!hh.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(hh.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]),this._contributions.restoreViewState(t.contributionsState||{});const i=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(i)}}handleInitialized(){var e;null===(e=this._getViewModel())||void 0===e||e.visibleLinesStabilized()}getContribution(e){return this._contributions.get(e)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let e=this.getActions();return e=e.filter((e=>e.isSupported())),e}getAction(e){return this._actions.get(e)||null}trigger(e,t,i){i=i||{};try{switch(this._beginUpdate(),t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null,t.clipboardEvent)}case"cut":return void this._cut(e)}const n=this.getAction(t);if(n)return void Promise.resolve(n.run(i)).then(void 0,xe);if(!this._modelData)return;if(this._triggerEditorCommand(e,t,i))return;this._triggerCommand(t,i)}finally{this._endUpdate()}}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o,s){if(!this._modelData)return;const r=this._modelData.viewModel,a=r.getSelection().getStartPosition();r.paste(t,i,n,e);const l=r.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({clipboardEvent:s,range:new hh(a.lineNumber,a.column,l.lineNumber,l.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=sh.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,xe)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(91)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(91)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(91))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}createDecorationsCollection(e){return new oW(this,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,aE(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,aE(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){this._modelData&&0!==e.length&&this._modelData.model.changeDecorations((t=>{t.deltaDecorations(e,[])}))}removeDecorationsByType(e){const t=this._decorationTypeKeysToIds[e];t&&this.changeDecorations((e=>e.deltaDecorations(t,[]))),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(145)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarPointerDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarPointerDown(e)}delegateScrollFromMouseWheelEvent(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateScrollFromMouseWheelEvent(e)}layout(e,t=!1){this._configuration.observeContainer(e),t||this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id:"+e.getId()),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}addGlyphMarginWidget(e){const t={widget:e,position:e.getPosition()};this._glyphMarginWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(t)}layoutGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const i=this._glyphMarginWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(i)}}removeGlyphMarginWidget(e){const t=e.getId();if(this._glyphMarginWidgets.hasOwnProperty(t)){const e=this._glyphMarginWidgets[t];delete this._glyphMarginWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(145);return{top:GB._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft(),height:i.get(67)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.viewModel.batchEvents((()=>{this._modelData.view.render(!0,e)}))}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){yL(e,this._configuration.options.get(50))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount());const i=e.onBeforeAttached(),n=new HB(this._id,this._configuration,e,rF.create(ls(this._domElement)),pF.create(this._configuration.options),(e=>Ls(ls(this._domElement),e)),this.languageConfigurationService,this._themeService,i);t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(t.reachedMaxCursorCount){const e=v(0,"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",this.getOption(80));this._notificationService.prompt(mD.Warning,e,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:v(0,"Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const e=[];for(let i=0,n=t.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new GR(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new XO(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(e){null==e||e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){var e;if(null===(e=this._contributionsDisposable)||void 0===e||e.dispose(),this._contributionsDisposable=void 0,!this._modelData)return null;const t=this._modelData.model,i=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),i&&this._domElement.contains(i)&&this._domElement.removeChild(i),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),t}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}showDropIndicatorAt(e){const t=[{range:new hh(e.lineNumber,e.column,e.lineNumber,e.column),options:GB.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(t),this.revealPosition(e,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(e,t){this._contextKeyService.createKey(e,t)}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&this._onBeginUpdate.fire()}_endUpdate(){this._updateCounter--,0===this._updateCounter&&this._onEndUpdate.fire()}};YB.dropIntoEditorDecorationOptions=zy.register({description:"workbench-dnd-target",className:"dnd-target"}),YB=GB=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ZB(3,_d),ZB(4,bd),ZB(5,Nd),ZB(6,pc),ZB(7,Vv),ZB(8,fD),ZB(9,ak),ZB(10,sp),ZB(11,Pk)],YB);let QB=0;class XB{constructor(e,t,i,n,o,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o,this.attachedView=s}dispose(){ot(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}class JB extends lt{constructor(e){super(),this._emitterOptions=e,this._onDidChangeToTrue=this._register(new kt(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new kt(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class eW extends kt{constructor(e,t){super({deliveryQueue:t}),this._contributions=e}fire(e){this._contributions.onBeforeInteractionEvent(),super.fire(e)}}class tW extends lt{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=gh.editorSimpleInput.bindTo(t),this._editorFocus=gh.focus.bindTo(t),this._textInputFocus=gh.textInputFocus.bindTo(t),this._editorTextFocus=gh.editorTextFocus.bindTo(t),this._tabMovesFocus=gh.tabMovesFocus.bindTo(t),this._editorReadonly=gh.readOnly.bindTo(t),this._inDiffEditor=gh.inDiffEditor.bindTo(t),this._editorColumnSelection=gh.columnSelection.bindTo(t),this._hasMultipleSelections=gh.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=gh.hasNonEmptySelection.bindTo(t),this._canUndo=gh.canUndo.bindTo(t),this._canRedo=gh.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._register(tA.onDidChangeTabFocus((e=>this._tabMovesFocus.set(e)))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._tabMovesFocus.set(tA.getTabFocusMode()),this._editorReadonly.set(e.get(91)),this._inDiffEditor.set(e.get(61)),this._editorColumnSelection.set(e.get(22))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class iW extends lt{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=gh.languageId.bindTo(t),this._hasCompletionItemProvider=gh.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=gh.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=gh.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=gh.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=gh.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=gh.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=gh.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=gh.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=gh.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=gh.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=gh.hasReferenceProvider.bindTo(t),this._hasRenameProvider=gh.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=gh.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=gh.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=gh.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=gh.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=gh.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=gh.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInEmbeddedEditor=gh.isInEmbeddedEditor.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInEmbeddedEditor.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInEmbeddedEditor.set(e.uri.scheme===qo.walkThroughSnippet||e.uri.scheme===qo.vscodeChatCodeBlock)})):this.reset()}}class nW extends lt{constructor(e,t){super(),this._onChange=this._register(new kt),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(fr(e)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus((()=>{this._hasDomElementFocus=!0,this._update()}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasDomElementFocus=!1,this._update()}))),t&&(this._overflowWidgetsDomNode=this._register(fr(t)),this._register(this._overflowWidgetsDomNode.onDidFocus((()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()}))),this._register(this._overflowWidgetsDomNode.onDidBlur((()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()}))))}_update(){const e=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==e&&(this._hadFocus=e,this._onChange.fire(void 0))}hasFocus(){var e;return null!==(e=this._hadFocus)&&void 0!==e&&e}}class oW{get length(){return this._decorationIds.length}constructor(e,t){this._editor=e,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(t)&&t.length>0&&this.set(t)}onDidChange(e,t,i){return this._editor.onDidChangeModelDecorations((i=>{this._isChangingDecorations||e.call(t,i)}),i)}getRange(e){return this._editor.hasModel()?e>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[e]):null}getRanges(){if(!this._editor.hasModel())return[];const e=this._editor.getModel(),t=[];for(const i of this._decorationIds){const n=e.getDecorationRange(i);n&&t.push(n)}return t}has(e){return this._decorationIds.includes(e.id)}clear(){0!==this._decorationIds.length&&this.set([])}set(e){try{this._isChangingDecorations=!0,this._editor.changeDecorations((t=>{this._decorationIds=t.deltaDecorations(this._decorationIds,e)}))}finally{this._isChangingDecorations=!1}return this._decorationIds}append(e){let t=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations((i=>{t=i.deltaDecorations([],e),this._decorationIds=this._decorationIds.concat(t)}))}finally{this._isChangingDecorations=!1}return t}}const sW=encodeURIComponent("");function aW(e){return sW+encodeURIComponent(e.toString())+rW}const lW=encodeURIComponent('');jv(((e,t)=>{const i=e.getColor(rf);i&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${aW(i)}") repeat-x bottom left; }`);const n=e.getColor(df);n&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${aW(n)}") repeat-x bottom left; }`);const o=e.getColor(hf);o&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${aW(o)}") repeat-x bottom left; }`);const s=e.getColor(gf);s&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return lW+encodeURIComponent(e.toString())+dW}(s)}") no-repeat bottom left; }`);const r=e.getColor(Cb);r&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${r.rgba.a}; }`)}));class cW{static capture(e){if(0===e.getScrollTop()||e.hasPendingScrollAnimation())return new cW(e.getScrollTop(),e.getContentHeight(),null,0,null);let t=null,i=0;const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}return new cW(e.getScrollTop(),e.getContentHeight(),t,i,e.getPosition())}constructor(e,t,i,n,o){this._initialScrollTop=e,this._initialContentHeight=t,this._visiblePosition=i,this._visiblePositionScrollDelta=n,this._cursorPosition=o}restore(e){if((this._initialContentHeight!==e.getContentHeight()||this._initialScrollTop!==e.getScrollTop())&&this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){if(this._initialContentHeight===e.getContentHeight()&&this._initialScrollTop===e.getScrollTop())return;const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i,1)}}class hW{constructor(){this.lenses=[],this._disposables=new at}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})}}async function uW(e,t,i){const n=e.ordered(t),o=new Map,s=new hW,r=n.map((async(e,n)=>{o.set(e,n);try{const n=await Promise.resolve(e.provideCodeLenses(t,i));n&&s.add(n,e)}catch(e){Le(e)}}));return await Promise.all(r),s.lenses=s.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:o.get(e.provider)o.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),s}var gW,pW;Id.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;xl(Po.isUri(i)),xl("number"==typeof n||!n);const{codeLensProvider:o}=e.get(Pk),s=e.get(Cd).getModel(i);if(!s)throw Te();const r=[],a=new at;return uW(o,s,At.None).then((e=>{a.add(e);const t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?r.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(s,i.symbol,At.None)).then((e=>r.push(e||i.symbol))));return Promise.all(t)})).then((()=>r)).finally((()=>{setTimeout((()=>a.dispose()),100)}))})),function(e){e[e.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",e[e.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"}(gW||(gW={})),function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(pW||(pW={}));class mW extends lt{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new Lt),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=pW.None,this.cache=new Map,this.flushDelayer=this._register(new Ut(mW.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;this._onDidChangeStorage.pause();try{null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.acceptExternal(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.acceptExternal(e,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(e,t){if(this.state===pW.Closed)return;let i=!1;kl(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire({key:e,external:!0})}get(e,t){const i=this.cache.get(e);return kl(i)?t:i}getBoolean(e,t){const i=this.get(e);return kl(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return kl(i)?t:parseInt(i,10)}async set(e,t,i=!1){if(this.state===pW.Closed)return;if(kl(t))return this.delete(e,i);const n=_l(t)||Array.isArray(t)?(o=t,JSON.stringify(o,Hx)):String(t);var o;return this.cache.get(e)!==n?(this.cache.set(e,n),this.pendingInserts.set(e,n),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire({key:e,external:i}),this.doFlush()):void 0}async delete(e,t=!1){if(this.state!==pW.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire({key:e,external:t}),this.doFlush()):void 0}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}async doFlush(e){return this.options.hint===gW.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger((()=>this.flushPending()),e)}}mW.DEFAULT_FLUSH_DELAY=100;class fW{constructor(){this.onDidChangeItemsExternal=_t.None,this.items=new Map}async updateItems(e){var t,i;null===(t=e.insert)||void 0===t||t.forEach(((e,t)=>this.items.set(t,e))),null===(i=e.delete)||void 0===i||i.forEach((e=>this.items.delete(e)))}}const _W="__$__targetStorageMarker",vW=vd("storageService");var bW;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(bW||(bW={}));class wW extends lt{constructor(e={flushInterval:wW.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Lt),this._onDidChangeTarget=this._register(new Lt),this._onWillSaveState=this._register(new kt),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(e,t,i){return _t.filter(this._onDidChangeValue.event,(i=>i.scope===e&&(void 0===t||i.key===t)),i)}emitDidChangeValue(e,t){const{key:i,external:n}=t;if(i===_W){switch(e){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:e})}else this._onDidChangeValue.fire({scope:e,key:i,target:this.getKeyTargets(e)[i],external:n})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n,o=!1){kl(t)?this.remove(e,i,o):this.withPausedEmitters((()=>{var s;this.updateKeyTarget(e,i,n),null===(s=this.getStorage(i))||void 0===s||s.set(e,t,o)}))}remove(e,t,i=!1){this.withPausedEmitters((()=>{var n;this.updateKeyTarget(e,t,void 0),null===(n=this.getStorage(t))||void 0===n||n.delete(e,i)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i,n=!1){var o,s;const r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(o=this.getStorage(t))||void 0===o||o.set(_W,JSON.stringify(r),n)):"number"==typeof r[e]&&(delete r[e],null===(s=this.getStorage(t))||void 0===s||s.set(_W,JSON.stringify(r),n))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(e){switch(e){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(e){const t=this.getStorage(e);return t?function(e){const t=e.get(_W);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}(t):Object.create(null)}}wW.DEFAULT_FLUSH_INTERVAL=6e4;const CW=vd("ICodeLensCache");class yW{constructor(e,t){this.lineCount=e,this.data=t}}let SW=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new ua(20,.75),Ss(s,(()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),_t.once(e.onWillSaveState)((i=>{i.reason===bW.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new hW;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new yW(e.getLineCount(),n);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 n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new hh(e,1,e,11)});const o=new hW;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new yW(i.lineCount,o))}}catch(e){}}};SW=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,vW)],SW),Ng(CW,SW,1);var kW=i(9934),xW={};xW.styleTagTransform=Gr(),xW.setAttributes=Kr(),xW.insert=zr().bind(null,"head"),xW.domAPI=Vr(),xW.insertStyleElement=qr(),Br()(kW.Z,xW),kW.Z&&kW.Z.locals&&kW.Z.locals;class LW{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){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class DW{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+DW._idPool++,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let t=0;t{e.symbol.command&&a.push(e.symbol),i.addDecoration({range:e.symbol.range,options:NW},(e=>this._decorationIds[t]=e)),r=r?hh.plusRange(r,e.symbol.range):hh.lift(e.symbol.range)})),this._viewZone=new LW(r.startLineNumber-1,o,s),this._viewZoneId=n.addZone(this._viewZone),a.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(a,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new DW(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],null==t||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),n=this._data[t].symbol;return!(!i||hh.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:NW},(e=>this._decorationIds[i]=e))}))}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;tes(RW.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?lN(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new cN(6),this._cache.set(i,n));const o=lN(n.update(t),this._min,this._max);return $o(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new dN;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return lN(0|this._overall()||this._default,this._min,this._max)}}let FW=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){var n,o,s;const r=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(o=null==i?void 0:i.max)&&void 0!==o?o:r**2,l=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,d=`${RW.of(e)},${r}${l?","+l:""}`;let c=this._data.get(d);return c||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),c=new PW(1.5*r)):c=new OW(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a),this._data.set(d,c)),c}_overallAverage(){const e=new dN;for(const t of this._data.values())e.update(t.default());return e.value}};FW=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([MW(0,Hc),MW(1,TW)],FW),Ng(AW,FW,1);var BW=function(e,t){return function(i,n){t(i,n,e)}};let WW=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=o,this._codeLensCache=s,this._disposables=new at,this._localToDispose=new at,this._lenses=[],this._oldCodeLensModels=new at,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Zt((()=>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((e=>{(e.hasChanged(50)||e.hasChanged(19)||e.hasChanged(18))&&this._updateLensStyle(),e.hasChanged(17)&&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(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=.9*this._editor.getOption(52)|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:o}=this._editor.getContainerDomNode();o.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),o.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),o.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(o.setProperty("--vscode-editorCodeLens-fontFamily",i),o.setProperty("--vscode-editorCodeLens-fontFamilyDefault",vE.fontFamily)),this._editor.changeViewZones((t=>{for(const i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&jt((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4,this._localToDispose));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof t.onDidChange){const e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new Zt((()=>{var t;const n=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=Wt((t=>uW(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const o=this._provideCodeLensDebounce.update(e,Date.now()-n);i.delay=o,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),xe)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(rt((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{var e;this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=[];let n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));const o=new EW;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule(),this._resolveCodeLensesScheduler.cancel(),null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0}))),this._localToDispose.add(this._editor.onDidFocusEditorText((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidBlurEditorText((()=>{i.cancel()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(rt((()=>{if(this._editor.getModel()){const e=cW.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){const i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new EW;for(const e of this._lenses)e.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 n;for(const o of e.lenses){const e=o.symbol.range.startLineNumber;e<1||e>t||(n&&n[n.length-1].symbol.range.startLineNumber===e?n.push(o):(n=[o],i.push(n)))}if(!i.length&&!this._lenses.length)return;const o=cW.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const n=new EW;let o=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),o++,r++)}for(;othis._resolveCodeLensesInViewportSoon()))),r++;n.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach((e=>{const o=e.computeIfNecessary(t);o&&(i.push(o),n.push(e))})),0===i.length)return;const o=Date.now(),s=Wt((e=>{const o=i.map(((i,o)=>{const s=new Array(i.length),r=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(s[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{s[n]=e}),Le)));return Promise.all(r).then((()=>{e.isCancellationRequested||n[o].isDisposed()||n[o].updateCommands(s)}))}));return Promise.all(o)}));this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{xe(e),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,(null===(e=this._currentCodeLensModel)||void 0===e?void 0:e.isDisposed)?void 0:this._currentCodeLensModel}};WW.ID="css.editor.codeLens",WW=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([BW(1,Pk),BW(2,AW),BW(3,Nd),BW(4,fD),BW(5,CW)],WW),oh(WW.ID,WW,1),ih(class extends Qc{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:gh.hasCodeLensProvider,label:v(0,"Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(KL),n=e.get(Nd),o=e.get(fD),s=t.getSelection().positionLineNumber,r=t.getContribution(WW.ID);if(!r)return;const a=await r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===s&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const d=await i.pick(l,{canPickMany:!1,placeHolder:v(0,"Select a command")});if(!d)return;let c=d.command;if(a.isDisposed){const e=await r.getModel(),t=null==e?void 0:e.lenses.find((e=>{var t;return e.symbol.range.startLineNumber===s&&(null===(t=e.symbol.command)||void 0===t?void 0:t.title)===c.title}));if(!t||!t.symbol.command)return;c=t.symbol.command}try{await n.executeCommand(c.id,...c.arguments||[])}catch(e){o.error(e)}}});let VW=!1;function HW(e){$&&(VW||(VW=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class zW{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class UW{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class KW{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class jW{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class qW{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class $W{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send(new zW(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new kt({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new KW(this._workerId,i,e,t))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new qW(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");const t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){const t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new UW(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=De(e.detail)),this._send(new UW(this._workerId,t,void 0,De(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new jW(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){const t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{null==n||n(e)}))),this._protocol=new $W({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}},handleEvent:(e,t)=>{if(YW(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(ZW(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let o=null;const s=globalThis.require;void 0!==s&&"function"==typeof s.getConfig?o=s.getConfig():void 0!==globalThis.requirejs&&(o=globalThis.requirejs.s.contexts._.config);const r=Dh(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const a=(e,t)=>this._request(e,t),l=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(function(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o=e=>function(t){return i(e,t)},s={};for(const t of e)YW(t)?s[t]=o(t):ZW(t)?s[t]=i(t,void 0):s[t]=n(t);return s}(t,a,l))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function ZW(e){return"o"===e[0]&&"n"===e[1]&&Ln(e.charCodeAt(2))}function YW(e){return/^onDynamic/.test(e)&&Ln(e.charCodeAt(9))}const QW=fL("defaultWorkerFactory",{createScriptURL:e=>e});class XW extends lt{constructor(e,t,i,n,o){super(),this.id=t,this.label=i;const s=function(e){const t=globalThis.MonacoEnvironment;if(t){if("function"==typeof t.getWorker)return t.getWorker("workerMain.js",e);if("function"==typeof t.getWorkerUrl){const i=t.getWorkerUrl("workerMain.js",e);return new Worker(QW?QW.createScriptURL(i):i,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof s.then?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)})),this._register(rt((()=>{var e;null===(e=this.worker)||void 0===e||e.then((e=>{e.onmessage=null,e.onmessageerror=null,e.removeEventListener("error",o),e.terminate()})),this.worker=null})))}getId(){return this.id}postMessage(e,t){var i;null===(i=this.worker)||void 0===i||i.then((i=>{try{i.postMessage(e,t)}catch(e){xe(e),xe(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:e}))}}))}}class JW{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){const n=++JW.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new XW(e,n,this._label||"anonymous"+n,t,(e=>{HW(e),this._webWorkerFailedBeforeError=e,i(e)}))}}JW.LAST_WORKER_ID=0;class eV{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}class tV{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new eV(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class rV{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=rV._getElements(e),[r,a,l]=rV._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(rV._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let o;return i<=n?(nV.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new eV(e,0,i,n-i+1)]):e<=t?(nV.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[new eV(e,t-e+1,i,0)]):(nV.Assert(e===t+1,"originalStart should only be one more than originalEnd"),nV.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const s=[0],r=[0],a=this.ComputeRecursionPoint(e,t,i,n,s,r,o),l=s[0],d=r[0];if(null!==a)return a;if(!o[0]){const s=this.ComputeDiffRecursive(e,l,i,d,o);let r=[];return r=o[0]?[new eV(l+1,t-(l+1)+1,d+1,n-(d+1)+1)]:this.ComputeDiffRecursive(l+1,t,d+1,n,o),this.ConcatenateChanges(s,r)}return[new eV(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,o,s,r,a,l,d,c,h,u,g,p,m,f,_){let v=null,b=null,w=new sV,C=t,y=i,S=u[0]-m[0]-n,k=-1073741824,x=this.m_forwardHistory.length-1;do{const t=S+e;t===C||t=0&&(e=(l=this.m_forwardHistory[x])[0],C=1,y=l.length-1)}while(--x>=-1);if(v=w.getReverseChanges(),_[0]){let e=u[0]+1,t=m[0]+1;if(null!==v&&v.length>0){const i=v[v.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}b=[new eV(e,h-e+1,t,p-t+1)]}else{w=new sV,C=s,y=r,S=u[0]-m[0]-a,k=1073741824,x=f?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=S+o;e===C||e=d[e+1]?(g=(c=d[e+1]-1)-S-a,c>k&&w.MarkNextChange(),k=c+1,w.AddOriginalElement(c+1,g+1),S=e+1-o):(g=(c=d[e-1])-S-a,c>k&&w.MarkNextChange(),k=c,w.AddModifiedElement(c+1,g+1),S=e-1-o),x>=0&&(o=(d=this.m_reverseHistory[x])[0],C=1,y=d.length-1)}while(--x>=-1);b=w.getChanges()}return this.ConcatenateChanges(v,b)}ComputeRecursionPoint(e,t,i,n,o,s,r){let a=0,l=0,d=0,c=0,h=0,u=0;e--,i--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,m=new Int32Array(p),f=new Int32Array(p),_=n-i,v=t-e,b=e-i,w=t-n,C=(v-_)%2==0;m[_]=e,f[v]=t,r[0]=!1;for(let y=1;y<=g/2+1;y++){let g=0,S=0;d=this.ClipDiagonalBound(_-y,y,_,p),c=this.ClipDiagonalBound(_+y,y,_,p);for(let e=d;e<=c;e+=2){a=e===d||eg+S&&(g=a,S=l),!C&&Math.abs(e-v)<=y-1&&a>=f[e])return o[0]=a,s[0]=l,i<=f[e]&&y<=1448?this.WALKTRACE(_,d,c,b,v,h,u,w,m,f,a,t,o,l,n,s,C,r):null}const k=(g-e+(S-i)-y)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(g,k))return r[0]=!0,o[0]=g,s[0]=S,k>0&&y<=1448?this.WALKTRACE(_,d,c,b,v,h,u,w,m,f,a,t,o,l,n,s,C,r):(e++,i++,[new eV(e,t-e+1,i,n-i+1)]);h=this.ClipDiagonalBound(v-y,y,v,p),u=this.ClipDiagonalBound(v+y,y,v,p);for(let g=h;g<=u;g+=2){a=g===h||g=f[g+1]?f[g+1]-1:f[g-1],l=a-(g-v)-w;const p=a;for(;a>e&&l>i&&this.ElementsAreEqual(a,l);)a--,l--;if(f[g]=a,C&&Math.abs(g-_)<=y&&a<=m[g])return o[0]=a,s[0]=l,p>=m[g]&&y<=1448?this.WALKTRACE(_,d,c,b,v,h,u,w,m,f,a,t,o,l,n,s,C,r):null}if(y<=1447){let e=new Int32Array(c-d+2);e[0]=_-d+1,oV.Copy2(m,d,e,1,c-d+1),this.m_forwardHistory.push(e),e=new Int32Array(u-h+2),e[0]=v-h+1,oV.Copy2(f,h,e,1,u-h+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,d,c,b,v,h,u,w,m,f,a,t,o,l,n,s,C,r)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,d=i.modifiedStart-e;if(tl&&(l=c,a=e)}i.originalStart-=a,i.modifiedStart-=a;const d=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],d)&&(e[t-1]=d[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,d=e)}return a>0?[l,d]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){const i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return oV.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],oV.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return oV.Copy(e,0,i,0,e.length),oV.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(nV.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),nV.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const n=e.originalStart;let o=e.originalLength;const s=e.modifiedStart;let r=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(r=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new eV(n,o,s,r),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&et&&(t=s),o>i&&(i=o),r>i&&(i=r)}t++,i++;const n=new lV(i,t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let cV=null,hV=null;class uV{static _createLink(e,t,i,n,o){let s=o-1;do{const i=t.charCodeAt(s);if(2!==e.get(i))break;s--}while(s>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=function(){return null===cV&&(cV=new dV([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),cV}()){const i=function(){if(null===hV){hV=new Xw(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}var pV,mV,fV,_V,vV,bV,wV,CV,yV,SV,kV,xV,LV,DV,EV,NV,IV,TV,MV,AV,RV,PV,OV,FV,BV,WV,VV,HV,zV,UV,KV,jV,qV,$V,GV,ZV,YV,QV,XV,JV,eH,tH,iH,nH,oH,sH;gV.INSTANCE=new gV,function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(pV||(pV={})),function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"}(mV||(mV={})),function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(fV||(fV={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(_V||(_V={})),function(e){e[e.Deprecated=1]="Deprecated"}(vV||(vV={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(bV||(bV={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(wV||(wV={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(CV||(CV={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(yV||(yV={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(SV||(SV={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(kV||(kV={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=88]="definitionLinkOpensInPeek",e[e.quickSuggestions=89]="quickSuggestions",e[e.quickSuggestionsDelay=90]="quickSuggestionsDelay",e[e.readOnly=91]="readOnly",e[e.readOnlyMessage=92]="readOnlyMessage",e[e.renameOnType=93]="renameOnType",e[e.renderControlCharacters=94]="renderControlCharacters",e[e.renderFinalNewline=95]="renderFinalNewline",e[e.renderLineHighlight=96]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=97]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=98]="renderValidationDecorations",e[e.renderWhitespace=99]="renderWhitespace",e[e.revealHorizontalRightPadding=100]="revealHorizontalRightPadding",e[e.roundedSelection=101]="roundedSelection",e[e.rulers=102]="rulers",e[e.scrollbar=103]="scrollbar",e[e.scrollBeyondLastColumn=104]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=105]="scrollBeyondLastLine",e[e.scrollPredominantAxis=106]="scrollPredominantAxis",e[e.selectionClipboard=107]="selectionClipboard",e[e.selectionHighlight=108]="selectionHighlight",e[e.selectOnLineNumbers=109]="selectOnLineNumbers",e[e.showFoldingControls=110]="showFoldingControls",e[e.showUnused=111]="showUnused",e[e.snippetSuggestions=112]="snippetSuggestions",e[e.smartSelect=113]="smartSelect",e[e.smoothScrolling=114]="smoothScrolling",e[e.stickyScroll=115]="stickyScroll",e[e.stickyTabStops=116]="stickyTabStops",e[e.stopRenderingLineAfter=117]="stopRenderingLineAfter",e[e.suggest=118]="suggest",e[e.suggestFontSize=119]="suggestFontSize",e[e.suggestLineHeight=120]="suggestLineHeight",e[e.suggestOnTriggerCharacters=121]="suggestOnTriggerCharacters",e[e.suggestSelection=122]="suggestSelection",e[e.tabCompletion=123]="tabCompletion",e[e.tabIndex=124]="tabIndex",e[e.unicodeHighlighting=125]="unicodeHighlighting",e[e.unusualLineTerminators=126]="unusualLineTerminators",e[e.useShadowDOM=127]="useShadowDOM",e[e.useTabStops=128]="useTabStops",e[e.wordBreak=129]="wordBreak",e[e.wordSegmenterLocales=130]="wordSegmenterLocales",e[e.wordSeparators=131]="wordSeparators",e[e.wordWrap=132]="wordWrap",e[e.wordWrapBreakAfterCharacters=133]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=134]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=135]="wordWrapColumn",e[e.wordWrapOverride1=136]="wordWrapOverride1",e[e.wordWrapOverride2=137]="wordWrapOverride2",e[e.wrappingIndent=138]="wrappingIndent",e[e.wrappingStrategy=139]="wrappingStrategy",e[e.showDeprecated=140]="showDeprecated",e[e.inlayHints=141]="inlayHints",e[e.editorClassName=142]="editorClassName",e[e.pixelRatio=143]="pixelRatio",e[e.tabFocusMode=144]="tabFocusMode",e[e.layoutInfo=145]="layoutInfo",e[e.wrappingInfo=146]="wrappingInfo",e[e.defaultColorDecorators=147]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=148]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=149]="inlineCompletionsAccessibilityVerbose"}(xV||(xV={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(LV||(LV={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(DV||(DV={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"}(EV||(EV={})),function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"}(NV||(NV={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(IV||(IV={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(TV||(TV={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(MV||(MV={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(AV||(AV={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(RV||(RV={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"}(PV||(PV={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(OV||(OV={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(FV||(FV={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(BV||(BV={})),function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"}(WV||(WV={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(VV||(VV={})),function(e){e[e.AIGenerated=1]="AIGenerated"}(HV||(HV={})),function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"}(zV||(zV={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(UV||(UV={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(KV||(KV={})),function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"}(jV||(jV={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"}(qV||(qV={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}($V||($V={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(GV||(GV={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(ZV||(ZV={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(YV||(YV={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(QV||(QV={})),function(e){e.Off="off",e.OnCode="onCode",e.On="on"}(XV||(XV={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(JV||(JV={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(eH||(eH={})),function(e){e[e.Deprecated=1]="Deprecated"}(tH||(tH={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(iH||(iH={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(nH||(nH={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(oH||(oH={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(sH||(sH={}));class rH{static chord(e,t){return Se(e,t)}}function aH(){return{editor:void 0,languages:void 0,CancellationTokenSource:Pt,Emitter:kt,KeyCode:PV,KeyMod:rH,Position:wd,Range:hh,Selection:uh,SelectionDirection:QV,MarkerSeverity:OV,MarkerTag:FV,Uri:Po,Token:yC}}rH.CtrlCmd=2048,rH.Shift=1024,rH.Alt=512,rH.WinCtrl=256;class lH{static computeUnicodeHighlights(e,t,i){const n=i?i.startLineNumber:1,o=i?i.endLineNumber:e.getLineCount(),s=new dH(t),r=s.getCandidateCodePoints();let a;a="allNonBasicAscii"===r?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(`[${hn(Array.from(r).map((e=>String.fromCodePoint(e))).join(""))}]`,"g");const l=new lC(null,a),d=[];let c,h=!1,u=0,g=0,p=0;e:for(let t=n,i=o;t<=i;t++){const i=e.getLineContent(t),n=i.length;l.reset(0);do{if(c=l.next(i),c){let e=c.index,o=c.index+c[0].length;e>0&&Tn(i.charCodeAt(e-1))&&e--,o+1=i){h=!0;break e}d.push(new hh(t,e+1,t,o+1))}}}while(c)}return{ranges:d,hasMore:h,ambiguousCharacterCount:u,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(e,t){const i=new dH(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),s=Jn.getLocales().filter((e=>!Jn.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:s}}case 1:return{kind:2}}}}class dH{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Jn.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of eo.codePoints)cH(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,o=!1;if(t)for(const e of t){const t=e.codePointAt(0),i=zn(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||eo.isInvisibleCharacter(t)||(o=!0)}return!n&&o?0:this.options.invisibleCharacters&&!cH(e)&&eo.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function cH(e){return" "===e||"\n"===e||"\t"===e}class hH{constructor(e,t,i){this.changes=e,this.moves=t,this.hitTimeout=i}}class uH{constructor(e,t){this.lineRangeMapping=e,this.changes=t}}class gH{constructor(e){this.text=e,this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;tkc(e,((e,t)=>e.range.getEndPosition().isBeforeOrEqual(t.range.getStartPosition())))))}apply(e){let t="",i=new wd(1,1);for(const n of this.edits){const o=n.range,s=o.getStartPosition(),r=o.getEndPosition(),a=fH(i,s);a.isEmpty()||(t+=e.getValueOfRange(a)),t+=n.text,i=r}const n=fH(i,e.endPositionExclusive);return n.isEmpty()||(t+=e.getValueOfRange(n)),t}applyToString(e){const t=new vH(e);return this.apply(t)}getNewRanges(){const e=[];let t=0,i=0,n=0;for(const o of this.edits){const s=bp.ofText(o.text),r=wd.lift({lineNumber:o.range.startLineNumber+i,column:o.range.startColumn+(o.range.startLineNumber===t?n:0)}),a=s.createRange(r);e.push(a),i=a.endLineNumber-o.range.endLineNumber,n=a.endColumn-o.range.endColumn,t=o.range.endLineNumber}return e}}class mH{constructor(e,t){this.range=e,this.text=t}}function fH(e,t){if(e.lineNumber===t.lineNumber&&e.column===Number.MAX_SAFE_INTEGER)return hh.fromPositions(t,t);if(!e.isBeforeOrEqual(t))throw new Pe("start must be before end");return new hh(e.lineNumber,e.column,t.lineNumber,t.column)}class _H{get endPositionExclusive(){return this.length.addToPosition(new wd(1,1))}}class vH extends _H{constructor(e){super(),this.value=e,this._t=new gH(this.value)}getValueOfRange(e){return this._t.getOffsetRange(e).substring(this.value)}get length(){return this._t.textLength}}class bH{static inverse(e,t,i){const n=[];let o=1,s=1;for(const t of e){const e=new bH(new Nu(o,t.original.startLineNumber),new Nu(s,t.modified.startLineNumber));e.modified.isEmpty||n.push(e),o=t.original.endLineNumberExclusive,s=t.modified.endLineNumberExclusive}const r=new bH(new Nu(o,t+1),new Nu(s,i+1));return r.modified.isEmpty||n.push(r),n}static clip(e,t,i){const n=[];for(const o of e){const e=o.original.intersect(t),s=o.modified.intersect(i);e&&!e.isEmpty&&s&&!s.isEmpty&&n.push(new bH(e,s))}return n}constructor(e,t){this.original=e,this.modified=t}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new bH(this.modified,this.original)}join(e){return new bH(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),t=this.modified.toInclusiveRange();if(e&&t)return new CH(e,t);if(1===this.original.startLineNumber||1===this.modified.startLineNumber){if(1!==this.modified.startLineNumber||1!==this.original.startLineNumber)throw new Pe("not a valid diff");return new CH(new hh(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new hh(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}return new CH(new hh(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new hh(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}}class wH extends bH{static fromRangeMappings(e){const t=Nu.join(e.map((e=>Nu.fromRangeInclusive(e.originalRange)))),i=Nu.join(e.map((e=>Nu.fromRangeInclusive(e.modifiedRange))));return new wH(t,i,e)}constructor(e,t,i){super(e,t),this.innerChanges=i}flip(){var e;return new wH(this.modified,this.original,null===(e=this.innerChanges)||void 0===e?void 0:e.map((e=>e.flip())))}withInnerChangesFromLineRanges(){return new wH(this.original,this.modified,[this.toRangeMapping()])}}class CH{constructor(e,t){this.originalRange=e,this.modifiedRange=t}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new CH(this.modifiedRange,this.originalRange)}toTextEdit(e){const t=e.getValueOfRange(this.modifiedRange);return new mH(this.originalRange,t)}}class yH{computeDiff(e,t,i){var n;const o=new EH(e,t,{maxComputationTime:i.maxComputationTimeMs,shouldIgnoreTrimWhitespace:i.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),s=[];let r=null;for(const e of o.changes){let t,i;t=0===e.originalEndLineNumber?new Nu(e.originalStartLineNumber+1,e.originalStartLineNumber+1):new Nu(e.originalStartLineNumber,e.originalEndLineNumber+1),i=0===e.modifiedEndLineNumber?new Nu(e.modifiedStartLineNumber+1,e.modifiedStartLineNumber+1):new Nu(e.modifiedStartLineNumber,e.modifiedEndLineNumber+1);let o=new wH(t,i,null===(n=e.charChanges)||void 0===n?void 0:n.map((e=>new CH(new hh(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),new hh(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)))));r&&(r.modified.endLineNumberExclusive!==o.modified.startLineNumber&&r.original.endLineNumberExclusive!==o.original.startLineNumber||(o=new wH(r.original.join(o.original),r.modified.join(o.modified),r.innerChanges&&o.innerChanges?r.innerChanges.concat(o.innerChanges):void 0),s.pop())),s.push(o),r=o}return Sc((()=>kc(s,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusive(10===e?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[t]},${this._columns[t]})`)).join(", ")+"]"}_assertIndex(e,t){if(e<0||e>=t.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return-1===e?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),10===this._charCodes[e]?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return-1===e?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),10===this._charCodes[e]?1:this._columns[e]+1)}}class LH{constructor(e,t,i,n,o,s,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=o,this.modifiedStartColumn=s,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){const n=t.getStartLineNumber(e.originalStart),o=t.getStartColumn(e.originalStart),s=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1),a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),d=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),c=i.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new LH(n,o,s,r,a,l,d,c)}}class DH{constructor(e,t,i,n,o){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=o}static createFromDiffResult(e,t,i,n,o,s,r){let a,l,d,c,h;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(d=n.getStartLineNumber(t.modifiedStart)-1,c=0):(d=n.getStartLineNumber(t.modifiedStart),c=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),s&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const s=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);if(s.getElements().length>0&&a.getElements().length>0){let e=SH(s,a,o,!0).changes;r&&(e=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n1&&r>1&&e.charCodeAt(i-2)===t.charCodeAt(r-2);)i--,r--;(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,s+1,1,r)}{let i=IH(e,1),r=IH(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-t{i.push(AH.fromOffsetPairs(e?e.getEndExclusives():RH.zero,n?n.getStarts():new RH(t,(e?e.seq2Range.endExclusive-e.seq1Range.endExclusive:0)+t)))})),i}static fromOffsetPairs(e,t){return new AH(new wu(e.offset1,t.offset1),new wu(e.offset2,t.offset2))}constructor(e,t){this.seq1Range=e,this.seq2Range=t}swap(){return new AH(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new AH(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return 0===e?this:new AH(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return 0===e?this:new AH(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return 0===e?this:new AH(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const t=this.seq1Range.intersect(e.seq1Range),i=this.seq2Range.intersect(e.seq2Range);if(t&&i)return new AH(t,i)}getStarts(){return new RH(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new RH(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class RH{constructor(e,t){this.offset1=e,this.offset2=t}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return 0===e?this:new RH(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}RH.zero=new RH(0,0),RH.max=new RH(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class PH{isValid(){return!0}}PH.instance=new PH;class OH{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new Pe("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&l>0&&3===s.get(a-1,l-1)&&(h+=r.get(a-1,l-1)),h+=n?n(a,l):1):h=-1;const u=Math.max(d,c,h);if(u===h){const e=a>0&&l>0?r.get(a-1,l-1):0;r.set(a,l,e+1),s.set(a,l,3)}else u===d?(r.set(a,l,0),s.set(a,l,1)):u===c&&(r.set(a,l,0),s.set(a,l,2));o.set(a,l,u)}const a=[];let l=e.length,d=t.length;function c(e,t){e+1===l&&t+1===d||a.push(new AH(new wu(e+1,l),new wu(t+1,d))),l=e,d=t}let h=e.length-1,u=t.length-1;for(;h>=0&&u>=0;)3===s.get(h,u)?(c(h,u),h--,u--):1===s.get(h,u)?h--:u--;return c(-1,-1),a.reverse(),new MH(a,!1)}}class HH{compute(e,t,i=PH.instance){if(0===e.length||0===t.length)return MH.trivial(e,t);const n=e,o=t;function s(e,t){for(;en.length||u>o.length)continue;const g=s(h,u);a.set(d,g);const p=h===r?l.get(d+1):l.get(d-1);if(l.set(d,g!==h?new zH(p,h,u,g-h):p),a.get(d)===n.length&&a.get(d)-d===o.length)break e}}let c=l.get(d);const h=[];let u=n.length,g=o.length;for(;;){const e=c?c.x+c.length:0,t=c?c.y+c.length:0;if(e===u&&t===g||h.push(new AH(new wu(e,u),new wu(t,g))),!c)break;u=c.x,g=c.y,c=c.prev}return h.reverse(),new MH(h,!1)}}class zH{constructor(e,t,i,n){this.prev=e,this.x=t,this.y=i,this.length=n}}class UH{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){if(e<0){if((e=-e-1)>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(2*e.length),this.negativeArr.set(e)}this.negativeArr[e]=t}else{if(e>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(2*e.length),this.positiveArr.set(e)}this.positiveArr[e]=t}}}class KH{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,t){e<0?(e=-e-1,this.negativeArr[e]=t):this.positiveArr[e]=t}}class jH{constructor(e,t,i){this.lines=e,this.considerWhitespaceChanges=i,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let n=!1;t.start>0&&t.endExclusive>=e.length&&(t=new wu(t.start-1,t.endExclusive),n=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let t=this.lineRange.start;tString.fromCharCode(e))).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const t=ZH(e>0?this.elements[e-1]:-1),i=ZH(et<=e));return new wd(this.lineRange.start+t+1,e-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(e){return hh.fromPositions(this.translateOffset(e.start),this.translateOffset(e.endExclusive))}findWordContaining(e){if(e<0||e>=this.elements.length)return;if(!qH(this.elements[e]))return;let t=e;for(;t>0&&qH(this.elements[t-1]);)t--;let i=e;for(;it<=e.start)))&&void 0!==t?t:0,o=null!==(i=function(t,i){const n=xu(t,(t=>e.endExclusive<=t));return n===t.length?void 0:t[n]}(this.firstCharOffsetByLine))&&void 0!==i?i:this.elements.length;return new wu(n,o)}}function qH(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}const $H={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function GH(e){return $H[e]}function ZH(e){return 10===e?8:13===e?7:BH(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:-1===e?3:44===e||59===e?5:4}function YH(e,t,i){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;const n=(new HH).compute(new jH([e],new wu(0,1),!1),new jH([t],new wu(0,1),!1),i);let o=0;const s=AH.invert(n.diffs,e.length);for(const t of s)t.seq1Range.forEach((t=>{BH(e.charCodeAt(t))||o++}));const r=function(t){let i=0;for(let n=0;nt.length?e:t);return o/r>.6&&r>10}function QH(e,t,i){let n=i;return n=XH(e,t,n),n=XH(e,t,n),n=function(e,t,i){if(!e.getBoundaryScore||!t.getBoundaryScore)return i;for(let n=0;n0?i[n-1]:void 0,s=i[n],r=n+10&&(r=r.delta(a))}o.push(r)}return n.length>0&&o.push(n[n.length-1]),o}function JH(e,t,i,n,o){let s=1;for(;e.seq1Range.start-s>=n.start&&e.seq2Range.start-s>=o.start&&i.isStronglyEqual(e.seq2Range.start-s,e.seq2Range.endExclusive-s)&&s<100;)s++;s--;let r=0;for(;e.seq1Range.start+rl&&(l=d,a=n)}return e.delta(a)}class ez{constructor(e,t){this.trimmedHash=e,this.lines=t}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){return 1e3-((0===e?0:tz(this.lines[e-1]))+(e===this.lines.length?0:tz(this.lines[e])))}getText(e){return this.lines.slice(e.start,e.endExclusive).join("\n")}isStronglyEqual(e,t){return this.lines[e]===this.lines[t]}}function tz(e){let t=0;for(;te===t)))return new hH([],[],!1);if(1===e.length&&0===e[0].length||1===t.length&&0===t[0].length)return new hH([new wH(new Nu(1,e.length+1),new Nu(1,t.length+1),[new CH(new hh(1,1,e.length,e[e.length-1].length+1),new hh(1,1,t.length,t[t.length-1].length+1))])],[],!1);const n=0===i.maxComputationTimeMs?PH.instance:new OH(i.maxComputationTimeMs),o=!i.ignoreTrimWhitespace,s=new Map;function r(e){let t=s.get(e);return void 0===t&&(t=s.size,s.set(e,t)),t}const a=e.map((e=>r(e.trim()))),l=t.map((e=>r(e.trim()))),d=new ez(a,e),c=new ez(l,t),h=(()=>d.length+c.length<1700?this.dynamicProgrammingDiffing.compute(d,c,n,((i,n)=>e[i]===t[n]?0===t[n].length?.1:1+Math.log(1+t[n].length):.99)):this.myersDiffingAlgorithm.compute(d,c,n))();let u=h.diffs,g=h.hitTimeout;u=QH(d,c,u),u=function(e,t,i){let n=i;if(0===n.length)return n;let o,s=0;do{o=!1;const r=[n[0]];for(let a=1;a5||i.seq1Range.length+i.seq2Range.length>5)}c(d,l)?(o=!0,r[r.length-1]=r[r.length-1].join(l)):r.push(l)}n=r}while(s++<10&&o);return n}(d,0,u);const p=[],m=i=>{if(o)for(let s=0;si.seq1Range.start-f==i.seq2Range.start-_)),m(i.seq1Range.start-f),f=i.seq1Range.endExclusive,_=i.seq2Range.endExclusive;const s=this.refineDiff(e,t,i,n,o);s.hitTimeout&&(g=!0);for(const e of s.mappings)p.push(e)}m(e.length-f);const v=nz(p,e,t);let b=[];return i.computeMoves&&(b=this.computeMoves(v,e,t,a,l,n,o)),Sc((()=>{function i(e,t){if(e.lineNumber<1||e.lineNumber>t.length)return!1;const i=t[e.lineNumber-1];return!(e.column<1||e.column>i.length+1)}function n(e,t){return!(e.startLineNumber<1||e.startLineNumber>t.length+1||e.endLineNumberExclusive<1||e.endLineNumberExclusive>t.length+1)}for(const o of v){if(!o.innerChanges)return!1;for(const n of o.innerChanges)if(!(i(n.modifiedRange.getStartPosition(),t)&&i(n.modifiedRange.getEndPosition(),t)&&i(n.originalRange.getStartPosition(),e)&&i(n.originalRange.getEndPosition(),e)))return!1;if(!n(o.modified,t)||!n(o.original,e))return!1}return!0})),new hH(v,b,g)}computeMoves(e,t,i,n,o,s,r){return function(e,t,i,n,o,s){let{moves:r,excludedChanges:a}=function(e,t,i,n){const o=[],s=e.filter((e=>e.modified.isEmpty&&e.original.length>=3)).map((e=>new WH(e.original,t,e))),r=new Set(e.filter((e=>e.original.isEmpty&&e.modified.length>=3)).map((e=>new WH(e.modified,i,e)))),a=new Set;for(const e of s){let t,i=-1;for(const n of r){const o=e.computeSimilarity(n);o>i&&(i=o,t=n)}if(i>.9&&t&&(r.delete(t),o.push(new bH(e.range,t.range)),a.add(e.source),a.add(t.source)),!n.isValid())return{moves:o,excludedChanges:a}}return{moves:o,excludedChanges:a}}(e,t,i,s);if(!s.isValid())return[];const l=function(e,t,i,n,o,s){const r=[],a=new pa;for(const i of e)for(let e=i.original.startLineNumber;ee.modified.startLineNumber),ru));for(const t of e){let e=[];for(let n=t.modified.startLineNumber;n{for(const i of e)if(i.originalLineRange.endLineNumberExclusive+1===t.endLineNumberExclusive&&i.modifiedLineRange.endLineNumberExclusive+1===o.endLineNumberExclusive)return i.originalLineRange=new Nu(i.originalLineRange.startLineNumber,t.endLineNumberExclusive),i.modifiedLineRange=new Nu(i.modifiedLineRange.startLineNumber,o.endLineNumberExclusive),void s.push(i);const i={modifiedLineRange:o,originalLineRange:t};l.push(i),s.push(i)})),e=s}if(!s.isValid())return[]}l.sort(lu(su((e=>e.modifiedLineRange.length),ru)));const d=new Iu,c=new Iu;for(const e of l){const t=e.modifiedLineRange.startLineNumber-e.originalLineRange.startLineNumber,i=d.subtractFrom(e.modifiedLineRange),n=c.subtractFrom(e.originalLineRange).getWithDelta(t),o=i.getIntersection(n);for(const e of o.ranges){if(e.length<3)continue;const i=e,n=e.delta(-t);r.push(new bH(n,i)),d.addRange(i),c.addRange(n)}}r.sort(su((e=>e.original.startLineNumber),ru));const h=new Lu(e);for(let t=0;te.original.startLineNumber<=i.original.startLineNumber)),l=Su(e,(e=>e.modified.startLineNumber<=i.modified.startLineNumber)),u=Math.max(i.original.startLineNumber-a.original.startLineNumber,i.modified.startLineNumber-l.modified.startLineNumber),g=h.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumbern.length||t>o.length)break;if(d.contains(t)||c.contains(e))break;if(!YH(n[e-1],o[t-1],s))break}for(f>0&&(c.addRange(new Nu(i.original.startLineNumber-f,i.original.startLineNumber)),d.addRange(new Nu(i.modified.startLineNumber-f,i.modified.startLineNumber))),_=0;_n.length||t>o.length)break;if(d.contains(t)||c.contains(e))break;if(!YH(n[e-1],o[t-1],s))break}_>0&&(c.addRange(new Nu(i.original.endLineNumberExclusive,i.original.endLineNumberExclusive+_)),d.addRange(new Nu(i.modified.endLineNumberExclusive,i.modified.endLineNumberExclusive+_))),(f>0||_>0)&&(r[t]=new bH(new Nu(i.original.startLineNumber-f,i.original.endLineNumberExclusive+_),new Nu(i.modified.startLineNumber-f,i.modified.endLineNumberExclusive+_)))}return r}(e.filter((e=>!a.has(e))),n,o,t,i,s);return tu(r,l),r=function(e){if(0===e.length)return e;e.sort(su((e=>e.original.startLineNumber),ru));const t=[e[0]];for(let i=1;i=0&&r>=0&&s+r<=2?t[t.length-1]=n.join(o):t.push(o)}return t}(r),r=r.filter((e=>{const i=e.original.toOffsetRange().slice(t).map((e=>e.trim()));return i.join("\n").length>=15&&function(e,t){let i=0;for(const t of e)t.length>=2&&i++;return i}(i)>=2})),r=function(e,t){const i=new Lu(e);return t.filter((t=>(i.findLastMonotonous((e=>e.original.startLineNumbere.modified.startLineNumber{const n=nz(this.refineDiff(t,i,new AH(e.original.toOffsetRange(),e.modified.toOffsetRange()),s,r).mappings,t,i,!0);return new uH(e,n)}))}refineDiff(e,t,i,n,o){const s=new jH(e,i.seq1Range,o),r=new jH(t,i.seq2Range,o),a=s.length+r.length<500?this.dynamicProgrammingDiffing.compute(s,r,n):this.myersDiffingAlgorithm.compute(s,r,n);let l=a.diffs;return l=QH(s,r,l),l=function(e,t,i){const n=AH.invert(i,e.length),o=[];let s=new RH(0,0);function r(i,r){if(i.offset10;){const i=n[0];if(!i.seq1Range.intersects(d.seq1Range)&&!i.seq2Range.intersects(d.seq2Range))break;const o=e.findWordContaining(i.seq1Range.start),s=t.findWordContaining(i.seq2Range.start),r=new AH(o,s),a=r.intersect(i);if(h+=a.seq1Range.length,u+=a.seq2Range.length,d=d.join(r),!(d.seq1Range.endExclusive>=i.seq1Range.endExclusive))break;n.shift()}h+u<2*(d.seq1Range.length+d.seq2Range.length)/3&&o.push(d),s=d.getEndExclusives()}for(;n.length>0;){const e=n.shift();e.seq1Range.isEmpty||(r(e.getStarts(),e),r(e.getEndExclusives().delta(-1),e))}return function(e,t){const i=[];for(;e.length>0||t.length>0;){const n=e[0],o=t[0];let s;s=n&&(!o||n.seq1Range.start0&&i[i.length-1].seq1Range.endExclusive>=s.seq1Range.start?i[i.length-1]=i[i.length-1].join(s):i.push(s)}return i}(i,o)}(s,r,l),l=function(e,t,i){const n=[];for(const e of i){const t=n[n.length-1];t&&(e.seq1Range.start-t.seq1Range.endExclusive<=2||e.seq2Range.start-t.seq2Range.endExclusive<=2)?n[n.length-1]=new AH(t.seq1Range.join(e.seq1Range),t.seq2Range.join(e.seq2Range)):n.push(e)}return n}(0,0,l),l=function(e,t,i){let n=i;if(0===n.length)return n;let o,s=0;do{o=!1;const a=[n[0]];for(let l=1;l5||o.length>500)return!1;const s=e.getText(o).trim();if(s.length>20||s.split(/\r\n|\r|\n/).length>1)return!1;const r=e.countLinesIn(i.seq1Range),a=i.seq1Range.length,l=t.countLinesIn(i.seq2Range),h=i.seq2Range.length,u=e.countLinesIn(n.seq1Range),g=n.seq1Range.length,p=t.countLinesIn(n.seq2Range),m=n.seq2Range.length;function f(e){return Math.min(e,130)}return Math.pow(Math.pow(f(40*r+a),1.5)+Math.pow(f(40*l+h),1.5),1.5)+Math.pow(Math.pow(f(40*u+g),1.5)+Math.pow(f(40*p+m),1.5),1.5)>74184.96480721243}h(c,d)?(o=!0,a[a.length-1]=a[a.length-1].join(d)):a.push(d)}n=a}while(s++<10&&o);const r=[];return function(e,t){for(let i=0;i{let o=i;function s(e){return e.length>0&&e.trim().length<=3&&i.seq1Range.length+i.seq2Range.length>100}const a=e.extendToFullLines(i.seq1Range),l=e.getText(new wu(a.start,i.seq1Range.start));s(l)&&(o=o.deltaStart(-l.length));const d=e.getText(new wu(i.seq1Range.endExclusive,a.endExclusive));s(d)&&(o=o.deltaEnd(d.length));const c=AH.fromOffsetPairs(t?t.getEndExclusives():RH.zero,n?n.getStarts():RH.max),h=o.intersect(c);r.length>0&&h.getStarts().equals(r[r.length-1].getEndExclusives())?r[r.length-1]=r[r.length-1].join(h):r.push(h)})),r}(s,r,l),{mappings:l.map((e=>new CH(s.translateRange(e.seq1Range),r.translateRange(e.seq2Range)))),hitTimeout:a.hitTimeout}}}function nz(e,t,i,n=!1){const o=[];for(const n of Uh(e.map((e=>function(e,t,i){let n=0,o=0;1===e.modifiedRange.endColumn&&1===e.originalRange.endColumn&&e.originalRange.startLineNumber+n<=e.originalRange.endLineNumber&&e.modifiedRange.startLineNumber+n<=e.modifiedRange.endLineNumber&&(o=-1),e.modifiedRange.startColumn-1>=i[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+o&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+o&&(n=1);const s=new Nu(e.originalRange.startLineNumber+n,e.originalRange.endLineNumber+1+o),r=new Nu(e.modifiedRange.startLineNumber+n,e.modifiedRange.endLineNumber+1+o);return new wH(s,r,[e])}(e,t,i))),((e,t)=>e.original.overlapOrTouch(t.original)||e.modified.overlapOrTouch(t.modified)))){const e=n[0],t=n[n.length-1];o.push(new wH(e.original.join(t.original),e.modified.join(t.modified),n.map((e=>e.innerChanges[0]))))}return Sc((()=>{if(!n&&o.length>0){if(o[0].modified.startLineNumber!==o[0].original.startLineNumber)return!1;if(i.length-o[o.length-1].modified.endLineNumberExclusive!=t.length-o[o.length-1].original.endLineNumberExclusive)return!1}return kc(o,((e,t)=>t.original.startLineNumber-e.original.endLineNumberExclusive==t.modified.startLineNumber-e.modified.endLineNumberExclusive&&e.original.endLineNumberExclusivee.startColumn){const t={range:e,...pz(n[1]),shouldBeInComments:!0};(t.text||t.hasSeparatorLine)&&i.push(t)}}}function pz(e){const t=(e=e.trim()).startsWith("-");return{text:e=e.replace(uz,""),hasSeparatorLine:t}}class mz extends aV{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const t=[];for(let i=0;ithis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class fz{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new mz(Po.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}async computeUnicodeHighlights(e,t,i){const n=this._getModel(e);return n?lH.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async findSectionHeaders(e,t){const i=this._getModel(e);return i?function(e,t){var i;let n=[];if(t.findRegionSectionHeaders&&(null===(i=t.foldingRules)||void 0===i?void 0:i.markers)){const i=function(e,t){const i=[],n=e.getLineCount();for(let o=1;o<=n;o++){const n=e.getLineContent(o),s=n.match(t.foldingRules.markers.start);if(s){const e={startLineNumber:o,startColumn:s[0].length+1,endLineNumber:o,endColumn:n.length+1};if(e.endColumn>e.startColumn){const t={range:e,...pz(n.substring(s[0].length)),shouldBeInComments:!1};(t.text||t.hasSeparatorLine)&&i.push(t)}}}return i}(e,t);n=n.concat(i)}if(t.findMarkSectionHeaders){const t=function(e){const t=[],i=e.getLineCount();for(let n=1;n<=i;n++)gz(e.getLineContent(n),n,t);return t}(e);n=n.concat(t)}return n}(i,t):[]}async computeDiff(e,t,i,n){const o=this._getModel(e),s=this._getModel(t);return o&&s?fz.computeDiff(o,s,i,n):null}static computeDiff(e,t,i,n){const o="advanced"===n?new iz:new yH,s=e.getLinesContent(),r=t.getLinesContent(),a=o.computeDiff(s,r,i);function l(e){return e.map((e=>{var t;return[e.original.startLineNumber,e.original.endLineNumberExclusive,e.modified.startLineNumber,e.modified.endLineNumberExclusive,null===(t=e.innerChanges)||void 0===t?void 0:t.map((e=>[e.originalRange.startLineNumber,e.originalRange.startColumn,e.originalRange.endLineNumber,e.originalRange.endColumn,e.modifiedRange.startLineNumber,e.modifiedRange.startColumn,e.modifiedRange.endLineNumber,e.modifiedRange.endColumn]))]}))}return{identical:!(a.changes.length>0)&&this._modelsAreIdentical(e,t),quitEarly:a.hitTimeout,changes:l(a.changes),moves:a.moves.map((e=>[e.lineRangeMapping.original.startLineNumber,e.lineRangeMapping.original.endLineNumberExclusive,e.lineRangeMapping.modified.startLineNumber,e.lineRangeMapping.modified.endLineNumberExclusive,l(e.changes)]))}}static _modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}async computeMoreMinimalEdits(e,t,i){const n=this._getModel(e);if(!n)return t;const o=[];let s;t=t.slice(0).sort(((e,t)=>e.range&&t.range?hh.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));let r=0;for(let e=1;efz._diffLimit){o.push({range:e,text:r});continue}const l=iV(t,r,i),d=n.offsetAt(hh.lift(e).getStartPosition());for(const e of l){const t=n.positionAt(d+e.originalStart),i=n.positionAt(d+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}};n.getValueInRange(s.range)!==s.text&&o.push(s)}}return"number"==typeof s&&o.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),o}async computeLinks(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?uV.computeLinks(e):[]}(t):null}async computeDefaultDocumentColors(e){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getValue&&"function"==typeof e.positionAt?function(e){const t=[],i=cz(e,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(i.length>0)for(const n of i){const i=n.filter((e=>void 0!==e)),o=i[1],s=i[2];if(!s)continue;let r;if("rgb"===o){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=lz(rz(e,n),cz(s,t),!1)}else if("rgba"===o){const t=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=lz(rz(e,n),cz(s,t),!0)}else if("hsl"===o){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=dz(rz(e,n),cz(s,t),!1)}else if("hsla"===o){const t=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=dz(rz(e,n),cz(s,t),!0)}else"#"===o&&(r=az(rz(e,n),o+s));r&&t.push(r)}return t}(e):[]}(t):null}async textualSuggest(e,t,i,n){const o=new ft,s=new RegExp(i,n),r=new Set;e:for(const i of e){const e=this._getModel(i);if(e)for(const i of e.words(s))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>fz._suggestionsLimit))break e}return{words:Array.from(r),duration:o.elapsed()}}async computeWordRanges(e,t,i,n){const o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;efunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},n={};for(const t of e)n[t]=i(t);return n}(i,((e,t)=>this._host.fhr(e,t))),o={host:n,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve(Dh(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}fz._diffLimit=1e5,fz._suggestionsLimit=1e4,"function"==typeof importScripts&&(globalThis.monaco=aH());const _z=vd("textResourceConfigurationService"),vz=vd("textResourcePropertiesService");var bz=function(e,t){return function(i,n){t(i,n,e)}};function wz(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let Cz=class extends lt{constructor(e,t,i,n,o){super(),this._modelService=e,this._workerManager=this._register(new Sz(this._modelService,n)),this._logService=i,this._register(o.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>wz(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(o.completionProvider.register("*",new yz(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return wz(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then((n=>n.computedUnicodeHighlights(e,t,i)))}async computeDiff(e,t,i,n){const o=await this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)));return o?{identical:o.identical,quitEarly:o.quitEarly,changes:s(o.changes),moves:o.moves.map((e=>new uH(new bH(new Nu(e[0],e[1]),new Nu(e[2],e[3])),s(e[4]))))}:null;function s(e){return e.map((e=>{var t;return new wH(new Nu(e[0],e[1]),new Nu(e[2],e[3]),null===(t=e[4])||void 0===t?void 0:t.map((e=>new CH(new hh(e[0],e[1],e[2],e[3]),new hh(e[4],e[5],e[6],e[7])))))}))}}computeMoreMinimalEdits(e,t,i=!1){if(Gh(t)){if(!wz(this._modelService,e))return Promise.resolve(t);const n=ft.create(),o=this._workerManager.withWorker().then((n=>n.computeMoreMinimalEdits(e,t,i)));return o.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),n.elapsed()))),Promise.race([o,Kt(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return wz(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return wz(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}findSectionHeaders(e,t){return this._workerManager.withWorker().then((i=>i.findSectionHeaders(e,t)))}};Cz=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([bz(0,Cd),bz(1,_z),bz(2,Hc),bz(3,sp),bz(4,Pk)],Cz);class yz{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}async provideCompletionItems(e,t){const i=this._configurationService.getValue(e.uri,t,"editor");if("off"===i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestions)wz(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())wz(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestions&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),r=s?new hh(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):hh.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=await this._workerManager.withWorker(),d=await l.textualSuggest(n,null==s?void 0:s.word,o);return d?{duration:d.duration,suggestions:d.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}}class Sz extends lt{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new Ds).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4),s),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Dz(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class kz extends lt{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const e=new Gt;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(const e in this._syncedModels)ot(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(const i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const o=new at;o.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),o.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),o.add(rt((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=o}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],ot(t)}}class xz{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Lz{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class Dz extends lt{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new JW(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new GW(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Lz(this)))}catch(e){HW(e),this._worker=new xz(new fz(new Lz(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(HW(e),this._worker=new xz(new fz(new Lz(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new kz(e,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(e,t=!1){return this._disposed?Promise.reject(function(){const e=new Error(Ee);return e.name=e.message,e}()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeUnicodeHighlights(e.toString(),t,i)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeMoreMinimalEdits(e.toString(),t,i)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}computeDefaultDocumentColors(e){return this._withSyncedResources([e]).then((t=>t.computeDefaultDocumentColors(e.toString())))}async textualSuggest(e,t,i){const n=await this._withSyncedResources(e),o=i.source,s=i.flags;return n.textualSuggest(e.map((e=>e.toString())),t,o,s)}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const o=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),s=o.source,r=o.flags;return i.computeWordRanges(e.toString(),t,s,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const o=this._modelService.getModel(e);if(!o)return null;const s=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),r=s.source,a=s.flags;return n.navigateValueSet(e.toString(),t,i,r,a)}))}findSectionHeaders(e,t){return this._withSyncedResources([e]).then((i=>i.findSectionHeaders(e.toString(),t)))}dispose(){super.dispose(),this._disposed=!0}}const Ez=[];function Nz(e){Ez.push(e)}function Iz(){return Ez.slice(0)}var Tz=function(e,t){return function(i,n){t(i,n,e)}};class Mz{constructor(e,t){this._editorWorkerClient=new Dz(e,!1,"editorWorkerService",t)}async provideDocumentColors(e,t){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const n=t.range,o=t.color,s=o.alpha,r=new fu(new gu(Math.round(255*o.red),Math.round(255*o.green),Math.round(255*o.blue),s)),a=s?fu.Format.CSS.formatRGB(r):fu.Format.CSS.formatRGBA(r),l=s?fu.Format.CSS.formatHSL(r):fu.Format.CSS.formatHSLA(r),d=s?fu.Format.CSS.formatHex(r):fu.Format.CSS.formatHexA(r),c=[];return c.push({label:a,textEdit:{range:n,text:a}}),c.push({label:l,textEdit:{range:n,text:l}}),c.push({label:d,textEdit:{range:n,text:d}}),c}}let Az=class extends lt{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new Mz(e,t)))}};async function Rz(e,t,i,n=!0){return Wz(new Oz,e,t,i,n)}function Pz(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}Az=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Tz(0,Cd),Tz(1,sp),Tz(2,Pk)],Az),Nz(Az);class Oz{constructor(){}async compute(e,t,i,n){const o=await e.provideDocumentColors(t,i);if(Array.isArray(o))for(const t of o)n.push({colorInfo:t,provider:e});return Array.isArray(o)}}class Fz{constructor(){}async compute(e,t,i,n){const o=await e.provideDocumentColors(t,i);if(Array.isArray(o))for(const e of o)n.push({range:e.range,color:[e.color.red,e.color.green,e.color.blue,e.color.alpha]});return Array.isArray(o)}}class Bz{constructor(e){this.colorInfo=e}async compute(e,t,i,n){const o=await e.provideColorPresentations(t,this.colorInfo,At.None);return Array.isArray(o)&&n.push(...o),Array.isArray(o)}}async function Wz(e,t,i,n,o){let s,r=!1;const a=[],l=t.ordered(i);for(let t=l.length-1;t>=0;t--){const o=l[t];if(o instanceof Mz)s=o;else try{await e.compute(o,i,n,a)&&(r=!0)}catch(e){Le(e)}}return r?a:s&&o?(await e.compute(s,i,n,a),a):[]}function Vz(e,t){const{colorProvider:i}=e.get(Pk),n=e.get(Cd).getModel(t);if(!n)throw Te();return{model:n,colorProviderRegistry:i,isDefaultColorDecoratorsEnabled:e.get(Cg).getValue("editor.defaultColorDecorators",{resource:t})}}Id.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof Po))throw Te();const{model:n,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:s}=Vz(e,i);return Wz(new Fz,o,n,At.None,s)})),Id.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:o,range:s}=n;if(!(o instanceof Po&&Array.isArray(i)&&4===i.length&&hh.isIRange(s)))throw Te();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=Vz(e,o),[d,c,h,u]=i;return Wz(new Bz({range:s,color:{red:d,green:c,blue:h,alpha:u}}),a,r,At.None,l)}));var Hz,zz=function(e,t){return function(i,n){t(i,n,e)}};const Uz=Object.create({});let Kz=Hz=class extends lt{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new at),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new vA(this._editor),this._decoratorLimitReporter=new jz,this._colorDecorationClassRefs=this._register(new at),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:Hz.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((e=>{const t=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(147);const i=t!==this._isColorDecoratorsEnabled||e.hasChanged(21),n=e.hasChanged(147);(i||n)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(147),this.updateColors()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(20)}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 $t,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}async beginCompute(){this._computePromise=Wt((async e=>{const t=this._editor.getModel();if(!t)return[];const i=new ft(!1),n=await Rz(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n}));try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){xe(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((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:zy.EMPTY})));this._editor.changeDecorations((i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let n=0;nthis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};Kz.ID="editor.contrib.colorDetector",Kz.RECOMPUTE_TIME=1e3,Kz=Hz=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([zz(1,Cg),zz(2,Pk),zz(3,AW)],Kz);class jz{constructor(){this._onDidChange=new kt,this._computed=0,this._limited=!1}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}oh(Kz.ID,Kz,1);class qz{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 kt,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new kt,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new kt,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 e=0;e({format:e.format,location:e.location.toString()})))}},e.fromJSONObject=function(e){const t=e=>fl(e)?e:void 0;if(e&&Array.isArray(e.src)&&e.src.every((e=>fl(e.format)&&fl(e.location))))return{weight:t(e.weight),style:t(e.style),src:e.src.map((e=>({format:e.format,location:Po.parse(e.location)})))}}}(Gz||(Gz={}));const Qz=new class{constructor(){this._onDidChange=new kt,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:v(0,"The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:v(0,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${Rl.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}const s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;const r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;Rl.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`},i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const o of n.filter((e=>!!e.description)).sort(e))i.push(`||${o.id}|${Rl.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!Rl.isThemeIcon(e.defaults))).sort(e))i.push(`||${o.id}|`);return i.join("\n")}};function Xz(e,t,i,n){return Qz.registerIcon(e,t,i,n)}function Jz(){return Qz}xc.add("base.contributions.icons",Qz),function(){const e=Tl();for(const t in e){const i="\\"+e[t].toString(16);Qz.registerIcon(t,{fontCharacter:i})}}();const eU="vscode://schemas/icons",tU=xc.as(Mg);tU.registerSchema(eU,Qz.getIconSchema());const iU=new Zt((()=>tU.notifySchemaChanged(eU)),200);Qz.onDidChange((()=>{iU.isScheduled()||iU.schedule()}));const nU=Xz("widget-close",Ml.close,v(0,"Icon for the close action in widgets.")),oU=(Xz("goto-previous-location",Ml.arrowUp,v(0,"Icon for goto previous editor location.")),Xz("goto-next-location",Ml.arrowDown,v(0,"Icon for goto next editor location.")),Rl.modify(Ml.sync,"spin"),Rl.modify(Ml.loading,"spin"),Sr);class sU extends lt{constructor(e,t,i,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=oU(".colorpicker-header"),_r(e,this._domNode),this._pickedColorNode=_r(this._domNode,oU(".picked-color")),_r(this._pickedColorNode,oU("span.codicon.codicon-color-mode")),this._pickedColorPresentation=_r(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const o=v(0,"Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",o),this._originalColorNode=_r(this._domNode,oU(".original-color")),this._originalColorNode.style.backgroundColor=fu.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(kf)||fu.white,this._register(i.onDidColorThemeChange((e=>{this.backgroundColor=e.getColor(kf)||fu.white}))),this._register(ws(this._pickedColorNode,ur.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(ws(this._originalColorNode,ur.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=fu.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 rU(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=fu.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class rU extends lt{constructor(e){super(),this._onClicked=this._register(new kt),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),_r(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),_r(this._button,t),_r(t,oU(".button"+Rl.asCSSSelector(Xz("color-picker-close",Ml.close,v(0,"Icon to close the color picker"))))).classList.add("close-icon"),this._register(ws(this._button,ur.CLICK,(()=>{this._onClicked.fire()})))}}class aU extends lt{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=oU(".colorpicker-body"),_r(e,this._domNode),this._saturationBox=new lU(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 cU(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new hU(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new uU(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 fu(new mu(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new fu(new mu(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new fu(new mu(360===i?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 lU extends lt{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new kt,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new kt,this.onColorFlushed=this._onColorFlushed.event,this._domNode=oU(".saturation-wrap"),_r(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",_r(this._domNode,this._canvas),this.selection=oU(".saturation-selection"),_r(this._domNode,this.selection),this.layout(),this._register(ws(this._domNode,ur.POINTER_DOWN,(e=>this.onPointerDown(e)))),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 pN);const t=Rs(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangePosition(e.pageX-t.left,e.pageY-t.top)),(()=>null));const i=ws(e.target.ownerDocument,ur.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)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}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 fu(new mu(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.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=fu.Format.CSS.format(t),i.fill(),i.fillStyle=n,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(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class dU extends lt{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new kt,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new kt,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=_r(e,oU(".standalone-strip")),this.overlay=_r(this.domNode,oU(".standalone-overlay"))):(this.domNode=_r(e,oU(".strip")),this.overlay=_r(this.domNode,oU(".overlay"))),this.slider=_r(this.domNode,oU(".slider")),this.slider.style.top="0px",this._register(ws(this.domNode,ur.POINTER_DOWN,(e=>this.onPointerDown(e)))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!(e.target&&e.target instanceof Element))return;const t=this._register(new pN),i=Rs(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,(e=>this.onDidChangeTop(e.pageY-i.top)),(()=>null));const n=ws(e.target.ownerDocument,ur.POINTER_UP,(()=>{this._onColorFlushed.fire(),n.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 cU extends dU{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,o=new fu(new gu(t,i,n,1)),s=new fu(new gu(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class hU extends dU{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class uU extends lt{constructor(e){super(),this._onClicked=this._register(new kt),this.onClicked=this._onClicked.event,this._button=_r(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register(ws(this._button,ur.CLICK,(()=>{this._onClicked.fire()})))}get button(){return this._button}}class gU extends mN{constructor(e,t,i,n,o=!1){super(),this.model=t,this.pixelRatio=i,this._register(zM.getInstance(ls(e)).onDidChange((()=>this.layout())));const s=oU(".colorpicker-widget");e.appendChild(s),this.header=this._register(new sU(s,this.model,n,o)),this.body=this._register(new aU(s,this.model,this.pixelRatio,o))}layout(){this.body.layout()}}var pU=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},mU=function(e,t){return function(i,n){t(i,n,e)}};class fU{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let _U=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return ii.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=Kz.get(this._editor);if(!n)return[];for(const e of t){if(!n.isColorDecoration(e))continue;const t=n.getColorData(e.range.getStartPosition());if(t)return[await wU(this,this._editor.getModel(),t.colorInfo,t.provider)]}return[]}renderHoverParts(e,t){return CU(this,this._editor,this._themeService,t,e)}};_U=pU([mU(1,Vv)],_U);class vU{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let bU=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel())return null;if(!Kz.get(this._editor))return null;const n=await Rz(i,this._editor.getModel(),At.None);let o=null,s=null;for(const t of n){const i=t.colorInfo;hh.containsRange(i.range,e.range)&&(o=i,s=t.provider)}const r=null!=o?o:e,a=null!=s?s:t,l=!!o;return{colorHover:await wU(this,this._editor.getModel(),r,a),foundInEditor:l}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new hh(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await SU(this._editor.getModel(),t,this._color,i,e),i=yU(this._editor,i,t))}renderHoverParts(e,t){return CU(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};async function wU(e,t,i,n){const o=t.getValueInRange(i.range),{red:s,green:r,blue:a,alpha:l}=i.color,d=new gu(Math.round(255*s),Math.round(255*r),Math.round(255*a),l),c=new fu(d),h=await Pz(t,i,n,At.None),u=new qz(c,[],0);return u.colorPresentations=h||[],u.guessColorPresentation(c,o),e instanceof _U?new fU(e,hh.lift(i.range),u,n):new vU(e,hh.lift(i.range),u,n)}function CU(e,t,i,n,o){if(0===n.length||!t.hasModel())return lt.None;if(o.setMinimumDimensions){const e=t.getOption(67)+8;o.setMinimumDimensions(new Ms(302,e))}const s=new at,r=n[0],a=t.getModel(),l=r.model,d=s.add(new gU(o.fragment,l,t.getOption(143),i,e instanceof bU));o.setColorPicker(d);let c=!1,h=new hh(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);if(e instanceof bU){const t=n[0].model.color;e.color=t,SU(a,l,t,h,r),s.add(l.onColorFlushed((t=>{e.color=t})))}else s.add(l.onColorFlushed((async e=>{await SU(a,l,e,h,r),c=!0,h=yU(t,h,l)})));return s.add(l.onDidChangeColor((e=>{SU(a,l,e,h,r)}))),s.add(t.onDidChangeModelContent((e=>{c?c=!1:(o.hide(),t.focus())}))),s}function yU(e,t,i){var n,o;const s=[],r=null!==(n=i.presentation.textEdit)&&void 0!==n?n:{range:t,text:i.presentation.label,forceMoveMarkers:!1};s.push(r),i.presentation.additionalTextEdits&&s.push(...i.presentation.additionalTextEdits);const a=hh.lift(r.range),l=e.getModel()._setTrackedRange(null,a,3);return e.executeEdits("colorpicker",s),e.pushUndoStop(),null!==(o=e.getModel()._getTrackedRange(l))&&void 0!==o?o:a}async function SU(e,t,i,n,o){const s=await Pz(e,{range:n,color:{red:i.rgba.r/255,green:i.rgba.g/255,blue:i.rgba.b/255,alpha:i.rgba.a}},o.provider,At.None);t.colorPresentations=s||[]}bU=pU([mU(1,Vv)],bU);const kU="editor.action.showHover",xU="editor.action.increaseHoverVerbosityLevel",LU=v(0,"Increase Hover Verbosity Level"),DU="editor.action.decreaseHoverVerbosityLevel",EU=v(0,"Decrease Hover Verbosity Level");var NU=i(9479),IU={};IU.styleTagTransform=Gr(),IU.setAttributes=Kr(),IU.insert=zr().bind(null,"head"),IU.domAPI=Vr(),IU.insertStyleElement=qr(),Br()(NU.Z,IU),NU.Z&&NU.Z.locals&&NU.Z.locals;const TU="editor.action.inlineSuggest.commit",MU="editor.action.inlineSuggest.showPrevious",AU="editor.action.inlineSuggest.showNext";var RU=i(394),PU={};PU.styleTagTransform=Gr(),PU.setAttributes=Kr(),PU.insert=zr().bind(null,"head"),PU.domAPI=Vr(),PU.insertStyleElement=qr(),Br()(RU.Z,PU),RU.Z&&RU.Z.locals&&RU.Z.locals;class OU extends kd{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new kt),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=_r(e,Sr(".monaco-dropdown")),this._label=_r(this._element,Sr(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[ur.CLICK,ur.MOUSE_DOWN,qL.Tap])this._register(ws(this.element,e,(e=>pr(e,!0))));for(const e of[ur.MOUSE_DOWN,qL.Tap])this._register(ws(this._label,e,(e=>{cr(e)&&(e.detail>1||0!==e.button)||(this.visible?this.hide():this.show())})));this._register(ws(this._label,ur.KEY_UP,(e=>{const t=new Ke(e);(t.equals(3)||t.equals(10))&&(pr(e,!0),this.visible?this.hide():this.show())})));const n=i(this._label);n&&this._register(n),this._register($L.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class FU extends OU{constructor(e,t){super(e,t),this._options=t,this._actions=[],this.actions=t.actions||[]}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(e,t)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e,t):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class BU extends ET{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new kt),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{var t;this.element=_r(e,Sr("a.action-label"));let i=[];return"string"==typeof this.options.classNames?i=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(i=this.options.classNames),i.find((e=>"icon"===e))||i.push("codicon"),this.element.classList.add(...i),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this._action.label&&this._register(iD().setupUpdatableHover(null!==(t=this.options.hoverDelegate)&&void 0!==t?t:QL("mouse"),this.element,this._action.label)),this.element.ariaLabel=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new FU(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return e.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let e=null;return this.action.tooltip?e=this.action.tooltip:this.action.label&&(e=this.action.label),null!=e?e:void 0}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}show(){var e;null===(e=this.dropdownMenu)||void 0===e||e.show()}updateEnabled(){var e,t;const i=!this.action.enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var WU=i(5498),VU={};VU.styleTagTransform=Gr(),VU.setAttributes=Kr(),VU.insert=zr().bind(null,"head"),VU.domAPI=Vr(),VU.insertStyleElement=qr(),Br()(WU.Z,VU),WU.Z&&WU.Z.locals&&WU.Z.locals;var HU=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},zU=function(e,t){return function(i,n){t(i,n,e)}};function UU(e,t,i,n,o,s){KU(e.getActions(t),i,!1,"string"==typeof n?e=>e===n:n,o,s)}function KU(e,t,i,n=(e=>"navigation"===e),o=(()=>!1),s=!1){let r,a;Array.isArray(t)?(r=t,a=t):(r=t.primary,a=t.secondary);const l=new Set;for(const[t,o]of e){let e;n(t)?(e=r,e.length>0&&s&&e.push(new xd)):(e=a,e.length>0&&e.push(new xd));for(let n of o){i&&(n=n instanceof Fc&&n.alt?n.alt:n);const o=e.push(n);n instanceof Ld&&l.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of l){const s=n(e)?r:a,l=t.actions;o(t,e,s.length)&&s.splice(i,1,...l)}}let jU=class extends NT{constructor(e,t,i,n,o,s,r,a){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable,keybinding:null==t?void 0:t.keybinding,hoverDelegate:null==t?void 0:t.hoverDelegate}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=o,this._themeService=s,this._contextMenuService=r,this._accessibilityService=a,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new dt),this._altKey=Mr.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(e){e.preventDefault(),e.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}render(e){if(super.render(e),e.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let t=!1;const i=()=>{var e;const i=!!(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)&&(!this._accessibilityService.isMotionReduced()||t)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&t);i!==this._wantsAltCommand&&(this._wantsAltCommand=i,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(i)),this._register(ws(e,"mouseleave",(e=>{t=!1,i()}))),this._register(ws(e,"mouseenter",(e=>{t=!0,i()}))),i()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var e;const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let o=i?v(0,"{0} ({1})",n,i):n;if(!this._wantsAltCommand&&(null===(e=this._menuItemAction.alt)||void 0===e?void 0:e.enabled)){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),i=t&&t.getLabel(),n=i?v(0,"{0} ({1})",e,i):e;o=v(0,"{0}\n[{1}] {2}",o,PT.modifierLabels[te].altKey,n)}return o}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){this._itemClassDispose.value=void 0;const{element:t,label:i}=this;if(!t||!i)return;const n=this._commandAction.checked&&(o=e.toggled)&&void 0!==o.condition&&e.toggled.icon?e.toggled.icon:e.icon;var o;if(n)if(Rl.isThemeIcon(n)){const e=Rl.asClassNameArray(n);i.classList.add(...e),this._itemClassDispose.value=rt((()=>{i.classList.remove(...e)}))}else i.style.backgroundImage=Wv(this._themeService.getColorTheme().type)?Er(n.dark):Er(n.light),i.classList.add("icon"),this._itemClassDispose.value=st(rt((()=>{i.style.backgroundImage="",i.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}};jU=HU([zU(2,uD),zU(3,fD),zU(4,pc),zU(5,Vv),zU(6,hD),zU(7,ak)],jU);let qU=class extends BU{constructor(e,t,i,n,o){var s,r,a;const l={...t,menuAsChild:null!==(s=null==t?void 0:t.menuAsChild)&&void 0!==s&&s,classNames:null!==(r=null==t?void 0:t.classNames)&&void 0!==r?r:Rl.isThemeIcon(e.item.icon)?Rl.asClassName(e.item.icon):void 0,keybindingProvider:null!==(a=null==t?void 0:t.keybindingProvider)&&void 0!==a?a:e=>i.lookupKeybinding(e.id)};super(e,{getActions:()=>e.actions},n,l),this._keybindingService=i,this._contextMenuService=n,this._themeService=o}render(e){super.render(e),xl(this.element),e.classList.add("menu-entry");const t=this._action,{icon:i}=t.item;if(i&&!Rl.isThemeIcon(i)){this.element.classList.add("icon");const e=()=>{this.element&&(this.element.style.backgroundImage=Wv(this._themeService.getColorTheme().type)?Er(i.dark):Er(i.light))};e(),this._register(this._themeService.onDidColorThemeChange((()=>{e()})))}}};qU=HU([zU(2,uD),zU(3,hD),zU(4,Vv)],qU);let $U=class extends ET{constructor(e,t,i,n,o,s,r,a){var l,d,c;let h;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=r,this._storageService=a,this._container=null,this._options=t,this._storageKey=`${e.item.submenu.id}_lastActionId`;const u=(null==t?void 0:t.persistLastActionId)?a.get(this._storageKey,1):void 0;u&&(h=e.actions.find((e=>u===e.id))),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(jU,h,{keybinding:this._getDefaultActionKeybindingLabel(h)});const g={keybindingProvider:e=>this._keybindingService.lookupKeybinding(e.id),...t,menuAsChild:null===(l=null==t?void 0:t.menuAsChild)||void 0===l||l,classNames:null!==(d=null==t?void 0:t.classNames)&&void 0!==d?d:["codicon","codicon-chevron-down"],actionRunner:null!==(c=null==t?void 0:t.actionRunner)&&void 0!==c?c:new kd};this._dropdown=new BU(e,e.actions,this._contextMenuService,g),this._register(this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof Fc&&this.update(e.action)})))}update(e){var t;(null===(t=this._options)||void 0===t?void 0:t.persistLastActionId)&&this._storageService.store(this._storageKey,e.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(jU,e,{keybinding:this._getDefaultActionKeybindingLabel(e)}),this._defaultAction.actionRunner=new class extends kd{async runAction(e,t){await e.run(void 0)}},this._container&&this._defaultAction.render(vr(this._container,Sr(".action-container")))}_getDefaultActionKeybindingLabel(e){var t;let i;if(null===(t=this._options)||void 0===t?void 0:t.renderKeybindingWithDefaultActionLabel){const t=this._keybindingService.lookupKeybinding(e.id);t&&(i=`(${t.getLabel()})`)}return i}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=Sr(".action-container");this._defaultAction.render(_r(this._container,t)),this._register(ws(t,ur.KEY_DOWN,(e=>{const t=new Ke(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=Sr(".dropdown-action-container");this._dropdown.render(_r(this._container,i)),this._register(ws(i,ur.KEY_DOWN,(e=>{var t;const i=new Ke(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};$U=HU([zU(2,uD),zU(3,fD),zU(4,hD),zU(5,Ac),zU(6,_d),zU(7,vW)],$U);let GU=class extends IT{constructor(e,t){super(null,e,e.actions.map((e=>({text:e.id===xd.ID?"─────────":e.label,isDisabled:!e.enabled}))),0,t,eM,{ariaLabel:e.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,e.actions.findIndex((e=>e.checked))))}render(e){super.render(e),e.style.borderColor=Em(T_)}runAction(e,t){const i=this.action.actions[t];i&&this.actionRunner.run(i)}};function ZU(e,t,i){return t instanceof Fc?e.createInstance(jU,t,i):t instanceof Oc?t.item.isSelection?e.createInstance(GU,t):t.item.rememberDefaultAction?e.createInstance($U,t,{...i,persistLastActionId:!0}):e.createInstance(qU,t,i):void 0}GU=HU([zU(1,cD)],GU);var YU=i(5478),QU={};QU.styleTagTransform=Gr(),QU.setAttributes=Kr(),QU.insert=zr().bind(null,"head"),QU.domAPI=Vr(),QU.insertStyleElement=qr(),Br()(YU.Z,QU),YU.Z&&YU.Z.locals&&YU.Z.locals;class XU extends lt{constructor(e,t,i={orientation:0}){var n;super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new Nt),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new at),i.hoverDelegate=null!==(n=i.hoverDelegate)&&void 0!==n?n:this._register(XL()),this.options=i,this.lookupKeybindings="function"==typeof this.options.getKeyBinding,this.toggleMenuAction=this._register(new JU((()=>{var e;return null===(e=this.toggleMenuActionViewItem)||void 0===e?void 0:e.show()}),i.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",e.appendChild(this.element),this.actionBar=this._register(new TT(this.element,{orientation:i.orientation,ariaLabel:i.ariaLabel,actionRunner:i.actionRunner,allowContextMenu:i.allowContextMenu,highlightToggledItems:i.highlightToggledItems,hoverDelegate:i.hoverDelegate,actionViewItemProvider:(e,n)=>{var o;if(e.id===JU.ID)return this.toggleMenuActionViewItem=new BU(e,e.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:Rl.asClassNameArray(null!==(o=i.moreIcon)&&void 0!==o?o:Ml.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0,hoverDelegate:this.options.hoverDelegate}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(i.actionViewItemProvider){const t=i.actionViewItemProvider(e,n);if(t)return t}if(e instanceof Ld){const i=new BU(e,e.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:e.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,hoverDelegate:this.options.hoverDelegate});return i.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(i),this.disposables.add(this._onDidChangeDropdownVisibility.add(i.onDidChangeVisibility)),i}}}))}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((e=>{this.actionBar.push(e,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(e)})}))}getKeybindingLabel(e){var t,i,n;const o=this.lookupKeybindings?null===(i=(t=this.options).getKeyBinding)||void 0===i?void 0:i.call(t,e):void 0;return null!==(n=null==o?void 0:o.getLabel())&&void 0!==n?n:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}class JU extends Sd{constructor(e,t){t=t||v(0,"More Actions..."),super(JU.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=e}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(e){this._menuActions=e}}JU.ID="toolbar.toggle.more";var eK,tK,iK=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},nK=function(e,t){return function(i,n){t(i,n,e)}};let oK=class{constructor(e,t,i){this._commandService=e,this._keybindingService=t,this._hiddenStates=new sK(i)}createMenu(e,t,i){return new aK(e,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...i},this._commandService,this._keybindingService,t)}resetHiddenStates(e){this._hiddenStates.reset(e)}};oK=iK([nK(0,Nd),nK(1,uD),nK(2,vW)],oK);let sK=eK=class{constructor(e){this._storageService=e,this._disposables=new at,this._onDidChange=new kt,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const t=e.get(eK._key,0,"{}");this._data=JSON.parse(t)}catch(e){this._data=Object.create(null)}this._disposables.add(e.onDidChangeValue(0,eK._key,this._disposables)((()=>{if(!this._ignoreChangeEvent)try{const t=e.get(eK._key,0,"{}");this._data=JSON.parse(t)}catch(e){console.log("FAILED to read storage after UPDATE",e)}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(e,t){var i;return null!==(i=this._hiddenByDefaultCache.get(`${e.id}/${t}`))&&void 0!==i&&i}setDefaultState(e,t,i){this._hiddenByDefaultCache.set(`${e.id}/${t}`,i)}isHidden(e,t){var i,n;const o=this._isHiddenByDefault(e,t),s=null!==(n=null===(i=this._data[e.id])||void 0===i?void 0:i.includes(t))&&void 0!==n&&n;return o?!s:s}updateHidden(e,t,i){this._isHiddenByDefault(e,t)&&(i=!i);const n=this._data[e.id];if(i)n?n.indexOf(t)<0&&n.push(t):this._data[e.id]=[t];else if(n){const i=n.indexOf(t);i>=0&&function(e,t){const i=e.length-1;te[1])));o.length>0&&(null!=s?s:s=[]).push(new Oc(t,n,o))}}s&&s.length>0&&t.push([n,s])}return t}static _fillInKbExprKeys(e,t){if(e)for(const i of e.keys())t.add(i)}static _compareMenuItems(e,t){const i=e.group,n=t.group;if(i!==n){if(!i)return 1;if(!n)return-1;if("navigation"===i)return-1;if("navigation"===n)return 1;const e=i.localeCompare(n);if(0!==e)return e}const o=e.order||0,s=t.order||0;return os?1:tK._compareTitles(Tc(e)?e.command.title:e.title,Tc(t)?t.command.title:t.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};rK=tK=iK([nK(3,Nd),nK(4,uD),nK(5,pc)],rK);let aK=class{constructor(e,t,i,n,o,s){this._disposables=new at,this._menuInfo=new rK(e,t,i.emitEventsForSubmenuChanges,n,o,s);const r=new Zt((()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})}),i.eventDebounceDelay);this._disposables.add(r),this._disposables.add(Pc.onDidChangeMenu((t=>{t.has(e)&&r.schedule()})));const a=this._disposables.add(new at);this._onDidChange=new Dt({onWillAddFirstListener:()=>{a.add(s.onDidChangeContext((e=>{const t=e.affectsSome(this._menuInfo.structureContextKeys),i=e.affectsSome(this._menuInfo.preconditionContextKeys),n=e.affectsSome(this._menuInfo.toggledContextKeys);(t||i||n)&&this._onDidChange.fire({menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n})}))),a.add(t.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})})))},onDidRemoveLastListener:a.clear.bind(a),delay:i.eventDebounceDelay,merge:e=>{let t=!1,i=!1,n=!1;for(const o of e)if(t=t||o.isStructuralChange,i=i||o.isEnablementChange,n=n||o.isToggleChange,t&&i&&n)break;return{menu:this,isStructuralChange:t,isEnablementChange:i,isToggleChange:n}}}),this.onDidChange=this._onDidChange.event}getActions(e){return this._menuInfo.createActionGroups(e)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};function lK(e,t,i){const n=void 0!==t.submenu?t.submenu.id:t.id,o="string"==typeof t.title?t.title:t.title.value,s=Ed({id:`hide/${e.id}/${n}`,label:v(0,"Hide '{0}'",o),run(){i.updateHidden(e,n,!0)}}),r=Ed({id:`toggle/${e.id}/${n}`,label:o,get checked(){return!i.isHidden(e,n)},run(){i.updateHidden(e,n,!!this.checked)}});return{hide:s,toggle:r,get isHidden(){return!r.checked}}}function dK(e,t=void 0,i,n){return Ed({id:`configureKeybinding/${e}`,label:v(0,"Configure Keybinding"),run(){const o=!n.lookupKeybinding(e)&&t?t.serialize():void 0;i.executeCommand("workbench.action.openGlobalKeybindings",`@command:${e}`+(o?` +when:${o}`:""))}})}aK=iK([nK(3,Nd),nK(4,uD),nK(5,pc)],aK);var cK=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},hK=function(e,t){return function(i,n){t(i,n,e)}};let uK=class extends XU{constructor(e,t,i,n,o,s,r,a){super(e,o,{getKeyBinding:e=>{var t;return null!==(t=s.lookupKeybinding(e.id))&&void 0!==t?t:void 0},...t,allowContextMenu:!0,skipTelemetry:"string"==typeof(null==t?void 0:t.telemetrySource)}),this._options=t,this._menuService=i,this._contextKeyService=n,this._contextMenuService=o,this._keybindingService=s,this._commandService=r,this._sessionDisposables=this._store.add(new at);const l=null==t?void 0:t.telemetrySource;l&&this._store.add(this.actionBar.onDidRun((e=>a.publicLog2("workbenchActionExecuted",{id:e.action.id,from:l}))))}setActions(e,t=[],i){var n,o,s;this._sessionDisposables.clear();const r=e.slice(),a=t.slice(),l=[];let d=0;const c=[];let h=!1;if(-1!==(null===(n=this._options)||void 0===n?void 0:n.hiddenItemStrategy))for(let e=0;enull==e?void 0:e.id))),t=this._options.overflowBehavior.maxItems-e.size;let i=0;for(let n=0;n=t&&(r[n]=void 0,c[n]=o))}}qh(r),qh(c),super.setActions(r,xd.join(c,a)),(l.length>0||r.length>0)&&this._sessionDisposables.add(ws(this.getElement(),"contextmenu",(e=>{var t,n,o,s,r;const a=new Ge(ls(this.getElement()),e),c=this.getItemAction(a.target);if(!c)return;a.preventDefault(),a.stopPropagation();const u=[];if(c instanceof Fc&&c.menuKeybinding?u.push(c.menuKeybinding):c instanceof Oc||c instanceof JU||u.push(dK(c.id,void 0,this._commandService,this._keybindingService)),l.length>0){let e=!1;if(1===d&&0===(null===(t=this._options)||void 0===t?void 0:t.hiddenItemStrategy)){e=!0;for(let e=0;ethis._menuService.resetHiddenStates(i)}))),0!==g.length&&this._contextMenuService.showContextMenu({getAnchor:()=>a,getActions:()=>g,menuId:null===(o=this._options)||void 0===o?void 0:o.contextMenu,menuActionOptions:{renderShortTitle:!0,...null===(s=this._options)||void 0===s?void 0:s.menuOptions},skipTelemetry:"string"==typeof(null===(r=this._options)||void 0===r?void 0:r.telemetrySource),contextKeyService:this._contextKeyService})})))}};uK=cK([hK(2,Ac),hK(3,pc),hK(4,hD),hK(5,uD),hK(6,Nd),hK(7,Vc)],uK);let gK=class extends uK{constructor(e,t,i,n,o,s,r,a,l){super(e,{resetMenu:t,...i},n,o,s,r,a,l),this._onDidChangeMenuItems=this._store.add(new kt),this.onDidChangeMenuItems=this._onDidChangeMenuItems.event;const d=this._store.add(n.createMenu(t,o,{emitEventsForSubmenuChanges:!0})),c=()=>{var t,n,o;const s=[],r=[];UU(d,null==i?void 0:i.menuOptions,{primary:s,secondary:r},null===(t=null==i?void 0:i.toolbarOptions)||void 0===t?void 0:t.primaryGroup,null===(n=null==i?void 0:i.toolbarOptions)||void 0===n?void 0:n.shouldInlineSubmenu,null===(o=null==i?void 0:i.toolbarOptions)||void 0===o?void 0:o.useSeparatorsInPrimaryActions),e.classList.toggle("has-no-actions",0===s.length&&0===r.length),super.setActions(s,r)};this._store.add(d.onDidChange((()=>{c(),this._onDidChangeMenuItems.fire(this)}))),c()}setActions(){throw new Pe("This toolbar is populated from a menu.")}};gK=cK([hK(3,Ac),hK(4,pc),hK(5,hD),hK(6,uD),hK(7,Nd),hK(8,Vc)],gK);var pK,mK=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},fK=function(e,t){return function(i,n){t(i,n,e)}};let _K=class extends lt{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=II(this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(62).showToolbar)),this.sessionPosition=void 0,this.position=fI(this,(e=>{var t,i,n;const o=null===(t=this.model.read(e))||void 0===t?void 0:t.primaryGhostText.read(e);if(!this.alwaysShowToolbar.read(e)||!o||0===o.parts.length)return this.sessionPosition=void 0,null;const s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);const r=new wd(o.lineNumber,Math.min(s,null!==(n=null===(i=this.sessionPosition)||void 0===i?void 0:i.column)&&void 0!==n?n:Number.MAX_SAFE_INTEGER));return this.sessionPosition=r,r})),this._register(LI(((t,i)=>{const n=this.model.read(t);if(!n||!this.alwaysShowToolbar.read(t))return;const o=bI(((t,i)=>{const o=i.add(this.instantiationService.createInstance(wK,this.editor,!0,this.position,n.selectedInlineCompletionIndex,n.inlineCompletionsCount,n.activeCommands));return e.addContentWidget(o),i.add(rt((()=>e.removeContentWidget(o)))),i.add(SI((e=>{this.position.read(e)&&n.lastTriggerKind.read(e)!==DC.Explicit&&n.triggerExplicitly()}))),o})),s=function(e,t){let i;return fI(e,(e=>(i=t(e,i),i)))}(this,((e,t)=>!!this.position.read(e)||!!t));i.add(SI((e=>{s.read(e)&&o.read(e)})))})))}};_K=mK([fK(2,_d)],_K);const vK=Xz("inline-suggestion-hints-next",Ml.chevronRight,v(0,"Icon for show next parameter hint.")),bK=Xz("inline-suggestion-hints-previous",Ml.chevronLeft,v(0,"Icon for show previous parameter hint."));let wK=pK=class extends lt{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new Sd(e,t,i,!0,(()=>this._commandService.executeCommand(e))),o=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let s=t;return o&&(s=v(0,"{0} ({1})",t,o.getLabel())),n.tooltip=s,n}constructor(e,t,i,n,o,s,r,a,l,d,c){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=o,this._extraCommands=s,this._commandService=r,this.keybindingService=l,this._contextKeyService=d,this._menuService=c,this.id="InlineSuggestionHintsContentWidget"+pK.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Pr("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Pr("div@toolBar")]),this.previousAction=this.createCommandAction(MU,v(0,"Previous"),Rl.asClassName(bK)),this.availableSuggestionCountAction=new Sd("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(AU,v(0,"Next"),Rl.asClassName(vK)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Mc.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Zt((()=>{this.availableSuggestionCountAction.label=""}),100)),this.disableButtonsDebounced=this._register(new Zt((()=>{this.previousAction.enabled=this.nextAction.enabled=!1}),100)),this.toolBar=this._register(a.createInstance(SK,this.nodes.toolBar,Mc.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof Fc)return a.createInstance(yK,e,void 0);if(e===this.availableSuggestionCountAction){const t=new CK(void 0,e,{label:!0,icon:!1});return t.setClass("availableSuggestionCount"),t}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{pK._dropDownVisible=e}))),this._register(SI((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register(SI((e=>{const t=this._suggestionCount.read(e),i=this._currentSuggestionIdx.read(e);void 0!==t?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${i+1}/${t}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),void 0!==t&&t>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()}))),this._register(SI((e=>{const t=this._extraCommands.read(e).map((e=>({class:void 0,id:e.id,enabled:!0,tooltip:e.tooltip||"",label:e.title,run:t=>this._commandService.executeCommand(e.id)})));for(const[e,i]of this.inlineCompletionsActionsMenus.getActions())for(const e of i)e instanceof Fc&&t.push(e);t.length>0&&t.unshift(new xd),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};wK._dropDownVisible=!1,wK.id=0,wK=pK=mK([fK(6,Nd),fK(7,_d),fK(8,uD),fK(9,pc),fK(10,Ac)],wK);class CK extends NT{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}class yK extends jU{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=Pr("div.keybinding").root;this._register(new KT(t,te,{disableTitle:!0,...UT})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let SK=class extends uK{constructor(e,t,i,n,o,s,r,a,l){super(e,{resetMenu:t,...i},n,o,s,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=o,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){var e,t,i,n,o,s,r;const a=[],l=[];UU(this.menu,null===(e=this.options2)||void 0===e?void 0:e.menuOptions,{primary:a,secondary:l},null===(i=null===(t=this.options2)||void 0===t?void 0:t.toolbarOptions)||void 0===i?void 0:i.primaryGroup,null===(o=null===(n=this.options2)||void 0===n?void 0:n.toolbarOptions)||void 0===o?void 0:o.shouldInlineSubmenu,null===(r=null===(s=this.options2)||void 0===s?void 0:s.toolbarOptions)||void 0===r?void 0:r.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),a.unshift(...this.prependedPrimaryActions),this.setActions(a,l)}setPrependedPrimaryActions(e){Wh(this.prependedPrimaryActions,e,((e,t)=>e===t))||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){Wh(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};SK=mK([fK(3,Ac),fK(4,pc),fK(5,hD),fK(6,uD),fK(7,Nd),fK(8,Vc)],SK);var kK=i(3135),xK={};xK.styleTagTransform=Gr(),xK.setAttributes=Kr(),xK.insert=zr().bind(null,"head"),xK.domAPI=Vr(),xK.insertStyleElement=qr(),Br()(kK.Z,xK),kK.Z&&kK.Z.locals&&kK.Z.locals;var LK,DK=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(LK||(LK={}));const EK=new kt,NK=new kt;class IK{constructor(e){this.el=e,this.disposables=new at}get onPointerMove(){return this.disposables.add(new ok(ls(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new ok(ls(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}DK([jL],IK.prototype,"onPointerMove",null),DK([jL],IK.prototype,"onPointerUp",null);class TK{get onPointerMove(){return this.disposables.add(new ok(this.el,qL.Change)).event}get onPointerUp(){return this.disposables.add(new ok(this.el,qL.End)).event}constructor(e){this.el=e,this.disposables=new at}dispose(){this.disposables.dispose()}}DK([jL],TK.prototype,"onPointerMove",null),DK([jL],TK.prototype,"onPointerUp",null);class MK{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(e){this.factory=e}dispose(){}}DK([jL],MK.prototype,"onPointerMove",null),DK([jL],MK.prototype,"onPointerUp",null);const AK="pointer-events-disabled";class RK extends lt{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this._orthogonalStartSash!==e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=_r(this.el,Sr(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(rt((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new ok(this._orthogonalStartDragHandle,"mouseenter")).event((()=>RK.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new ok(this._orthogonalStartDragHandle,"mouseleave")).event((()=>RK.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}}set orthogonalEndSash(e){if(this._orthogonalEndSash!==e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=_r(this.el,Sr(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(rt((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new ok(this._orthogonalEndDragHandle,"mouseenter")).event((()=>RK.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new ok(this._orthogonalEndDragHandle,"mouseleave")).event((()=>RK.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}}constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new zt(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new kt),this._onDidStart=this._register(new kt),this._onDidChange=this._register(new kt),this._onDidReset=this._register(new kt),this._onDidEnd=this._register(new kt),this.orthogonalStartSashDisposables=this._register(new at),this.orthogonalStartDragHandleDisposables=this._register(new at),this.orthogonalEndSashDisposables=this._register(new at),this.orthogonalEndDragHandleDisposables=this._register(new at),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=_r(e,Sr(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),K&&this.el.classList.add("mac");const n=this._register(new ok(this.el,"mousedown")).event;this._register(n((t=>this.onPointerStart(t,new IK(e))),this));const o=this._register(new ok(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));const s=this._register(new ok(this.el,"mouseenter")).event;this._register(s((()=>RK.onMouseEnter(this))));const r=this._register(new ok(this.el,"mouseleave")).event;this._register(r((()=>RK.onMouseLeave(this)))),this._register($L.addTarget(this.el));const a=this._register(new ok(this.el,qL.Start)).event;this._register(a((e=>this.onPointerStart(e,new TK(this.el))),this));const l=this._register(new ok(this.el,qL.Tap)).event;let d;this._register(l((e=>{if(d)return clearTimeout(d),d=void 0,void this.onPointerDoublePress(e);clearTimeout(d),d=setTimeout((()=>d=void 0),250)}),this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(EK.event((e=>{this.size=e,this.layout()})))),this._register(NK.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(e,t){pr(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new MK(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new MK(t))),!this.state)return;const n=this.el.ownerDocument.getElementsByTagName("iframe");for(const e of n)e.classList.add(AK);const o=e.pageX,s=e.pageY,r=e.altKey,a={startX:o,currentX:o,startY:s,currentY:s,altKey:r};this.el.classList.add("active"),this._onDidStart.fire(a);const l=Js(this.el),d=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":K?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":K?"col-resize":"ew-resize",l.textContent=`* { cursor: ${e} !important; }`},c=new at;d(),i||this.onDidEnablementChange.event(d,null,c),t.onPointerMove((e=>{pr(e,!1);const t={startX:o,currentX:e.pageX,startY:s,currentY:e.pageY,altKey:r};this._onDidChange.fire(t)}),null,c),t.onPointerUp((e=>{pr(e,!1),this.el.removeChild(l),this.el.classList.remove("active"),this._onDidEnd.fire(),c.dispose();for(const e of n)e.classList.remove(AK)}),null,c),c.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&RK.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&RK.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){RK.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){var t;const i=null!==(t=e.initialTarget)&&void 0!==t?t:e.target;if(i&&lr(i))return i.classList.contains("orthogonal-drag-handle")?i.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}class PK{constructor(){let e;this._onDidWillResize=new kt,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new kt,this.onDidResize=this._onDidResize.event,this._sashListener=new at,this._size=new Ms(0,0),this._minSize=new Ms(0,0),this._maxSize=new Ms(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new RK(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new RK(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new RK(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:LK.North}),this._southSash=new RK(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:LK.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(_t.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(_t.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(_t.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(_t.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:o,width:s}=this._maxSize;e=Math.max(i,Math.min(o,e)),t=Math.max(n,Math.min(s,t));const r=new Ms(t,e);Ms.equals(r,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=r,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}class OK extends lt{constructor(e,t=new Ms(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new PK),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=Ms.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize((e=>{this._resize(new Ms(e.dimension.width,e.dimension.height)),e.done&&(this._isResizing=!1)}))),this._register(this._resizableNode.onDidWillResize((()=>{this._isResizing=!0})))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return(null===(e=this._contentPosition)||void 0===e?void 0:e.position)?wd.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(t&&i)return Rs(t).top+i.top-30}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=Rs(t),o=Is(t.ownerDocument.body),s=n.top+i.top+i.height;return o.height-s-24}_findPositionPreference(e,t){var i,n;const o=Math.min(null!==(i=this._availableVerticalSpaceBelow(t))&&void 0!==i?i:1/0,e),s=Math.min(null!==(n=this._availableVerticalSpaceAbove(t))&&void 0!==n?n:1/0,e),r=Math.min(Math.max(s,o),e),a=Math.min(e,r);let l;return l=this._editor.getOption(60).above?a<=s?1:2:a<=o?2:1,1===l?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),l}_resize(e){this._resizableNode.layout(e.height,e.width)}}var FK=i(1210),BK={};BK.styleTagTransform=Gr(),BK.setAttributes=Kr(),BK.insert=zr().bind(null,"head"),BK.domAPI=Vr(),BK.insertStyleElement=qr(),Br()(FK.Z,BK),FK.Z&&FK.Z.locals&&FK.Z.locals;const WK=Sr;class VK extends lt{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 PN(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class HK extends lt{static render(e,t,i){return new HK(e,t,i)}constructor(e,t,i){super(),this.actionContainer=_r(e,WK("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=_r(this.actionContainer,WK("a.action")),this.action.setAttribute("role","button"),t.iconClass&&_r(this.action,WK(`span.icon.${t.iconClass}`)),_r(this.action,WK("span")).textContent=i?`${t.label} (${i})`:t.label,this._store.add(new UK(this.actionContainer,t.run)),this._store.add(new KK(this.actionContainer,t.run,[3,10])),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"))}}function zK(e,t){return e&&t?v(0,"Inspect this in the accessible view with {0}.",t):e?v(0,"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):""}class UK extends lt{constructor(e,t){super(),this._register(ws(e,ur.CLICK,(i=>{i.stopPropagation(),i.preventDefault(),t(e)})))}}class KK extends lt{constructor(e,t,i){super(),this._register(ws(e,ur.KEY_DOWN,(n=>{const o=new Ke(n);i.some((e=>o.equals(e)))&&(n.stopPropagation(),n.preventDefault(),t(e))})))}}var jK,qK=function(e,t){return function(i,n){t(i,n,e)}};let $K=jK=class extends OK{get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}get isVisibleFromKeyboard(){var e;return 1===(null===(e=this._visibleData)||void 0===e?void 0:e.source)}get isVisible(){var e;return null!==(e=this._hoverVisibleKey.get())&&void 0!==e&&e}get isFocused(){var e;return null!==(e=this._hoverFocusedKey.get())&&void 0!==e&&e}constructor(e,t,i,n,o){const s=e.getOption(67)+8,r=new Ms(150,s);super(e,r),this._configurationService=i,this._accessibilityService=n,this._keybindingService=o,this._hover=this._register(new VK),this._minimumSize=r,this._hoverVisibleKey=gh.hoverVisible.bindTo(t),this._hoverFocusedKey=gh.hoverFocused.bindTo(t),_r(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange((()=>{this.isVisible&&this._updateMaxDimensions()}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()})));const a=this._register(fr(this._resizableNode.domNode));this._register(a.onDidFocus((()=>{this._hoverFocusedKey.set(!0)}))),this._register(a.onDidBlur((()=>{this._hoverFocusedKey.set(!1)}))),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),null===(e=this._visibleData)||void 0===e||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return jK.ID}static _applyDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,o="number"==typeof i?`${i}px`:i;e.style.width=n,e.style.height=o}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return jK._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return jK._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n="number"==typeof t?`${t}px`:t,o="number"==typeof i?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=o}_setHoverWidgetMaxDimensions(e,t){jK._applyMaxDimensions(this._hover.contentsDomNode,e,t),jK._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth","number"==typeof e?`${e}px`:e),this._layoutContentWidget()}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i)}_updateResizableNodeMaxDimensions(){var e,t;const i=null!==(e=this._findMaximumRenderingWidth())&&void 0!==e?e:1/0,n=null!==(t=this._findMaximumRenderingHeight())&&void 0!==t?t:1/0;this._resizableNode.maxSize=new Ms(i,n),this._setHoverWidgetMaxDimensions(i,n)}_resize(e){var t,i;jK._lastDimensions=new Ms(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),null===(i=null===(t=this._visibleData)||void 0===t?void 0:t.colorPicker)||void 0===i||i.layout()}_findAvailableSpaceVertically(){var e;const t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition;if(t)return 1===this._positionPreference?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=6;return Array.from(this._hover.contentsDomNode.children).forEach((e=>{t+=e.clientHeight})),Math.min(e,t)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const e=Array.from(this._hover.contentsDomNode.children).some((e=>e.scrollWidth>e.clientWidth));return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),e}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const e=this._isHoverTextOverflowing(),t=void 0===this._contentWidth?0:this._contentWidth-2;return e||this._hover.containerDomNode.clientWidththis._visibleData.closestMouseDistance+4||(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),0))}_setHoverData(e){var t;null===(t=this._visibleData)||void 0===t||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),i=this._hover.contentsDomNode;i.style.fontSize=`${e}px`,i.style.lineHeight=""+t/e,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContent(e){const t=this._hover.contentsDomNode;t.style.paddingBottom="",t.textContent="",t.appendChild(e)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const e=Math.max(this._editor.getLayoutInfo().height/4,250,jK._lastDimensions.height),t=Math.max(.66*this._editor.getLayoutInfo().width,500,jK._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[null!==(e=this._positionPreference)&&void 0!==e?e:1]}:null}showAt(e,t){var i,n,o,s;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const r=Ws(this._hover.containerDomNode),a=t.showAtPosition;this._positionPreference=null!==(i=this._findPositionPreference(r,a))&&void 0!==i?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),null===(n=t.colorPicker)||void 0===n||n.layout();const l=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&zK(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),null!==(s=null===(o=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))||void 0===o?void 0:o.getAriaLabel())&&void 0!==s?s:"");l&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+l)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new Ms(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),e&&this._editor.focus()}_removeConstraintsRenderNormally(){const e=this._editor.getLayoutInfo();this._resizableNode.layout(e.height,e.width),this._setHoverWidgetDimensions("auto","auto")}setMinimumDimensions(e){this._minimumSize=new Ms(Math.max(this._minimumSize.width,e.width),Math.max(this._minimumSize.height,e.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const e=void 0===this._contentWidth?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new Ms(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=Ws(t),n=Os(t);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=Ws(t),n=Os(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition){const e=Ws(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(e,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-30})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+30})}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})}};function GK(e,t,i,n,o,s){const r=i+o/2,a=n+s/2,l=Math.max(Math.abs(e-r)-o/2,0),d=Math.max(Math.abs(t-a)-s/2,0);return Math.sqrt(l*l+d*d)}$K.ID="editor.contrib.resizableContentHoverWidget",$K._lastDimensions=new Ms(0,0),$K=jK=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([qK(1,pc),qK(2,Cg),qK(3,ak),qK(4,uD)],$K);class ZK{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class YK extends lt{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new kt),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Zt((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new Zt((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new Zt((()=>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(60).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=function(e){const t=new Pt,i=e(t.token);return new ni(t,(async e=>{const n=t.token.onCancellationRequested((()=>{n.dispose(),t.dispose(),e.reject(new Ie)}));try{for await(const n of i){if(t.token.isCancellationRequested)return;e.emitOne(n)}n.dispose(),t.dispose()}catch(i){n.dispose(),t.dispose(),e.reject(i)}}))}((e=>this._computer.computeAsync(e))),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){xe(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new ZK(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(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()}}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 QK{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class XK{constructor(e,t,i,n,o,s){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=o,this.supportsMarkerHover=s,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const JK=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};var ej=function(e,t){return function(i,n){t(i,n,e)}};const tj=vd("hoverService");let ij=class extends lt{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(e,t,i={},n,o){super(),this.placement=e,this.instantHover=t,this.overrideOptions=i,this.configurationService=n,this.hoverService=o,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new at),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))})))}showHover(e,t){const i="function"==typeof this.overrideOptions?this.overrideOptions(e,t):this.overrideOptions;this.hoverDisposables.clear();const n=lr(e.target)?[e.target]:e.target.targetElements;for(const e of n)this.hoverDisposables.add(ys(e,"keydown",(e=>{e.equals(9)&&this.hoverService.hideHover()})));const o=lr(e.content)?void 0:e.content.toString();return this.hoverService.showHover({...e,...i,persistence:{hideOnKeyDown:!0,...i.persistence},id:o,appearance:{...e.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...i.appearance}},t)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([ej(3,Cg),ej(4,tj)],ij);class nj{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function oj(e,t,i,n){const o=e.ordered(t).map(((e,o)=>async function(e,t,i,n,o){const s=await Promise.resolve(e.provideHover(i,n,o)).catch(Le);if(s&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(s))return new nj(e,s,t)}(e,o,t,i,n)));return ii.fromPromises(o).coalesce()}eh("_executeHoverProvider",((e,t,i)=>function(e,t,i,n){return oj(e,t,i,n).map((e=>e.hover)).toPromise()}(e.get(Pk).hoverProvider,t,i,At.None)));var sj=function(e,t){return function(i,n){t(i,n,e)}};const rj=Sr,aj=Xz("hover-increase-verbosity",Ml.add,v(0,"Icon for increaseing hover verbosity.")),lj=Xz("hover-decrease-verbosity",Ml.remove,v(0,"Icon for decreasing hover verbosity."));class dj{constructor(e,t,i,n,o,s=void 0){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=o,this.source=s}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}class cj{constructor(e,t,i){this.hover=e,this.hoverProvider=t,this.hoverPosition=i}supportsVerbosityAction(e){var t,i;switch(e){case xC.Increase:return null!==(t=this.hover.canIncreaseVerbosity)&&void 0!==t&&t;case xC.Decrease:return null!==(i=this.hover.canDecreaseVerbosity)&&void 0!==i&&i}}}let hj=class{constructor(e,t,i,n,o,s,r){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=o,this._keybindingService=s,this._hoverService=r,this.hoverOrdinal=3}createLoadingMessage(e){return new dj(this,e.range,[(new dd).appendText(v(0,"Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];let r=1e3;const a=i.getLineLength(n),l=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),d=this._editor.getOption(117),c=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:l});let h=!1;d>=0&&a>d&&e.range.startColumn>=d&&(h=!0,s.push(new dj(this,e.range,[{value:v(0,"Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,r++))),!h&&"number"==typeof c&&a>=c&&s.push(new dj(this,e.range,[{value:v(0,"Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,r++));let u=!1;for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,a=i.range.endLineNumber===n?i.range.endColumn:o,l=i.options.hoverMessage;if(!l||cd(l))continue;i.options.beforeContentClassName&&(u=!0);const d=new hh(e.range.startLineNumber,t,e.range.startLineNumber,a);s.push(new dj(this,d,iu(l),u,r++))}return s}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return ii.EMPTY;const n=this._editor.getModel(),o=this._languageFeaturesService.hoverProvider;return o.has(n)?this._getMarkdownHovers(o,n,e,i):ii.EMPTY}_getMarkdownHovers(e,t,i,n){const o=i.range.getStartPosition(),s=oj(e,t,o,n).filter((e=>!cd(e.hover.contents))).map((e=>{const t=e.hover.range?hh.lift(e.hover.range):i.range,n=new cj(e.hover,e.provider,o);return new dj(this,t,e.hover.contents,!1,e.ordinal,n)}));return s}renderHoverParts(e,t){return this._renderedHoverParts=new uj(t,e.fragment,this._editor,this._languageService,this._openerService,this._keybindingService,this._hoverService,this._configurationService,e.onContentsChanged),this._renderedHoverParts}markdownHoverContentAtIndex(e){var t,i;return null!==(i=null===(t=this._renderedHoverParts)||void 0===t?void 0:t.markdownHoverContentAtIndex(e))&&void 0!==i?i:""}doesMarkdownHoverAtIndexSupportVerbosityAction(e,t){var i,n;return null!==(n=null===(i=this._renderedHoverParts)||void 0===i?void 0:i.doesMarkdownHoverAtIndexSupportVerbosityAction(e,t))&&void 0!==n&&n}updateMarkdownHoverVerbosityLevel(e,t,i){var n;null===(n=this._renderedHoverParts)||void 0===n||n.updateMarkdownHoverPartVerbosityLevel(e,t,i)}};hj=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([sj(1,Mu),sj(2,LL),sj(3,Cg),sj(4,Pk),sj(5,uD),sj(6,tj)],hj);class uj extends lt{constructor(e,t,i,n,o,s,r,a,l){super(),this._editor=i,this._languageService=n,this._openerService=o,this._keybindingService=s,this._hoverService=r,this._configurationService=a,this._onFinishedRendering=l,this._focusedHoverPartIndex=-1,this._ongoingHoverOperations=new Map,this._renderedHoverParts=this._renderHoverParts(e,t,this._onFinishedRendering),this._register(rt((()=>{this._renderedHoverParts.forEach((e=>{e.disposables.dispose()}))}))),this._register(rt((()=>{this._ongoingHoverOperations.forEach((e=>{e.tokenSource.dispose(!0)}))})))}_renderHoverParts(e,t,i){return e.sort(su((e=>e.ordinal),ru)),e.map(((e,n)=>{const o=this._renderHoverPart(n,e.contents,e.source,i);return t.appendChild(o.renderedMarkdown),o}))}_renderHoverPart(e,t,i,n){const{renderedMarkdown:o,disposables:s}=this._renderMarkdownContent(t,n);if(!i)return{renderedMarkdown:o,disposables:s};const r=i.supportsVerbosityAction(xC.Increase),a=i.supportsVerbosityAction(xC.Decrease);if(!r&&!a)return{renderedMarkdown:o,disposables:s,hoverSource:i};const l=rj("div.verbosity-actions");return o.prepend(l),s.add(this._renderHoverExpansionAction(l,xC.Increase,r)),s.add(this._renderHoverExpansionAction(l,xC.Decrease,a)),this._register(ws(o,ur.FOCUS_IN,(t=>{t.stopPropagation(),this._focusedHoverPartIndex=e}))),this._register(ws(o,ur.FOCUS_OUT,(e=>{e.stopPropagation(),this._focusedHoverPartIndex=-1}))),{renderedMarkdown:o,disposables:s,hoverSource:i}}_renderMarkdownContent(e,t){const i=rj("div.hover-row");i.tabIndex=0;const n=rj("div.hover-row-contents");i.appendChild(n);const o=new at;return o.add(gj(this._editor,n,e,this._languageService,this._openerService,t)),{renderedMarkdown:i,disposables:o}}_renderHoverExpansionAction(e,t,i){const n=new at,o=t===xC.Increase,s=_r(e,rj(Rl.asCSSSelector(o?aj:lj)));s.tabIndex=0;const r=new ij("mouse",!1,{target:e,position:{hoverPosition:0}},this._configurationService,this._hoverService);if(n.add(this._hoverService.setupUpdatableHover(r,s,function(e,t){switch(t){case xC.Increase:{const t=e.lookupKeybinding(xU);return t?v(0,"Increase Hover Verbosity ({0})",t.getLabel()):v(0,"Increase Hover Verbosity")}case xC.Decrease:{const t=e.lookupKeybinding(DU);return t?v(0,"Decrease Hover Verbosity ({0})",t.getLabel()):v(0,"Decrease Hover Verbosity")}}}(this._keybindingService,t))),!i)return s.classList.add("disabled"),n;s.classList.add("enabled");const a=()=>this.updateMarkdownHoverPartVerbosityLevel(t);return n.add(new UK(s,a)),n.add(new KK(s,a,[3,10])),n}async updateMarkdownHoverPartVerbosityLevel(e,t=-1,i=!0){var n;const o=this._editor.getModel();if(!o)return;const s=-1!==t?t:this._focusedHoverPartIndex,r=this._getRenderedHoverPartAtIndex(s);if(!r||!(null===(n=r.hoverSource)||void 0===n?void 0:n.supportsVerbosityAction(e)))return;const a=r.hoverSource,l=await this._fetchHover(a,o,e);if(!l)return;const d=new cj(l,a.hoverProvider,a.hoverPosition),c=this._renderHoverPart(s,l.contents,d,this._onFinishedRendering);this._replaceRenderedHoverPartAtIndex(s,c),i&&this._focusOnHoverPartWithIndex(s),this._onFinishedRendering()}markdownHoverContentAtIndex(e){var t;const i=this._getRenderedHoverPartAtIndex(e);return null!==(t=null==i?void 0:i.renderedMarkdown.innerText)&&void 0!==t?t:""}doesMarkdownHoverAtIndexSupportVerbosityAction(e,t){var i;const n=this._getRenderedHoverPartAtIndex(e);return!(!n||!(null===(i=n.hoverSource)||void 0===i?void 0:i.supportsVerbosityAction(t)))}async _fetchHover(e,t,i){let n=i===xC.Increase?1:-1;const o=e.hoverProvider,s=this._ongoingHoverOperations.get(o);s&&(s.tokenSource.cancel(),n+=s.verbosityDelta);const r=new Pt;this._ongoingHoverOperations.set(o,{verbosityDelta:n,tokenSource:r});const a={verbosityRequest:{verbosityDelta:n,previousHover:e.hover}};let l;try{l=await Promise.resolve(o.provideHover(t,e.hoverPosition,r.token,a))}catch(e){Le(e)}return r.dispose(),this._ongoingHoverOperations.delete(o),l}_replaceRenderedHoverPartAtIndex(e,t){if(e>=this._renderHoverParts.length||e<0)return;const i=this._renderedHoverParts[e];i.renderedMarkdown.replaceWith(t.renderedMarkdown),i.disposables.dispose(),this._renderedHoverParts[e]=t}_focusOnHoverPartWithIndex(e){this._renderedHoverParts[e].renderedMarkdown.focus()}_getRenderedHoverPartAtIndex(e){return this._renderedHoverParts[e]}}function gj(e,t,i,n,o,s){const r=new at;for(const a of i){if(cd(a))continue;const i=rj("div.markdown-hover"),l=_r(i,rj("div.hover-contents")),d=r.add(new NL({editor:e},n,o));r.add(d.onDidRenderAsync((()=>{l.className="hover-contents code-hover-contents",s()})));const c=r.add(d.render(a));l.appendChild(c.element),t.appendChild(i)}return r}class pj{static insert(e,t){return{range:new hh(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}function mj(e,t){return!!e[t]}class fj{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=mj(e.event,t.triggerModifier),this.hasSideBySideModifier=mj(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class _j{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=mj(e,t.triggerModifier)}}class vj{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function bj(e){return"altKey"===e?K?new vj(57,"metaKey",6,"altKey"):new vj(5,"ctrlKey",6,"altKey"):K?new vj(6,"altKey",57,"metaKey"):new vj(6,"altKey",5,"ctrlKey")}class wj extends lt{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new kt),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new kt),this.onExecute=this._onExecute.event,this._onCancel=this._register(new kt),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=null!==(i=null==t?void 0:t.extractLineNumberFromMouseEvent)&&void 0!==i?i:e=>e.target.position?e.target.position.lineNumber:0,this._opts=bj(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(78)){const e=bj(this._editor.getOption(78));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new fj(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new fj(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new fj(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new _j(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new _j(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.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=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&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()}}class Cj{constructor(e,t){this.range=e,this.direction=t}}class yj{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new yj(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(e){if("function"==typeof this.provider.resolveInlayHint){if(this._currentResolve){if(await this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),await this._currentResolve}}async _doResolve(e){var t,i,n;try{const o=await Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=null!==(t=null==o?void 0:o.tooltip)&&void 0!==t?t:this.hint.tooltip,this.hint.label=null!==(i=null==o?void 0:o.label)&&void 0!==i?i:this.hint.label,this.hint.textEdits=null!==(n=null==o?void 0:o.textEdits)&&void 0!==n?n:this.hint.textEdits,this._isResolved=!0}catch(e){Le(e),this._isResolved=!1}}}class Sj{static async create(e,t,i,n){const o=[],s=e.ordered(t).reverse().map((e=>i.map((async i=>{try{const s=await e.provideInlayHints(t,i,n);((null==s?void 0:s.hints.length)||e.onDidChangeInlayHints)&&o.push([null!=s?s:Sj._emptyInlayHintList,e])}catch(e){Le(e)}}))));if(await Promise.all(s.flat()),n.isCancellationRequested||t.isDisposed())throw new Ie;return new Sj(i,o,t)}constructor(e,t,i){this._disposables=new at,this.ranges=e,this.provider=new Set;const n=[];for(const[e,o]of t){this._disposables.add(e),this.provider.add(o);for(const t of e.hints){const e=i.validatePosition(t.position);let s="before";const r=Sj._getRangeAtPosition(i,e);let a;r.getStartPosition().isBefore(e)?(a=hh.fromPositions(r.getStartPosition(),e),s="after"):(a=hh.fromPositions(e,r.getEndPosition()),s="before"),n.push(new yj(t,new Cj(a,s),o))}}this.items=n.sort(((e,t)=>wd.compare(e.hint.position,t.hint.position)))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new hh(i,n.startColumn,i,n.endColumn);e.tokenization.tokenizeIfCheap(i);const o=e.tokenization.getLineTokens(i),s=t.column-1,r=o.findTokenIndexAtOffset(s);let a=o.getStartOffset(r),l=o.getEndOffset(r);return l-a==1&&(a===s&&r>1?(a=o.getStartOffset(r-1),l=o.getEndOffset(r-1)):l===s&&rthis._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){xh(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Ej=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Dj(4,_d),Dj(5,bd),Dj(6,Nd),Dj(7,pc),Dj(8,Vv),Dj(9,fD),Dj(10,ak),Dj(11,sp),Dj(12,Pk)],Ej);var Nj=i(4350),Ij={};Ij.styleTagTransform=Gr(),Ij.setAttributes=Kr(),Ij.insert=zr().bind(null,"head"),Ij.domAPI=Vr(),Ij.insertStyleElement=qr(),Br()(Nj.Z,Ij),Nj.Z&&Nj.Z.locals&&Nj.Z.locals;var Tj=i(5798),Mj={};Mj.styleTagTransform=Gr(),Mj.setAttributes=Kr(),Mj.insert=zr().bind(null,"head"),Mj.domAPI=Vr(),Mj.insertStyleElement=qr(),Br()(Tj.Z,Mj),Tj.Z&&Tj.Z.locals&&Tj.Z.locals;const Aj=new fu(new gu(0,122,204)),Rj={showArrow:!0,showFrame:!0,className:"",frameColor:Aj,arrowColor:Aj,keepEditorSelection:!1};class Pj{constructor(e,t,i,n,o,s,r,a){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=r,this.ordinal=a,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class Oj{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class Fj{constructor(e){this._editor=e,this._ruleName=Fj._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),rr(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(){rr(this._ruleName),sr(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px !important; margin-left: -${this._height}px; `)}show(e){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:hh.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}Fj._IdGenerator=new Ox(".arrow-decoration-");class Bj{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new at,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=Ch(t),xh(this.options,Rj,!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((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}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 Fj(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&&0===e.minimap.minimapLeft?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 t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}null===(t=this._resizeSash)||void 0===t||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=hh.isIRange(e)?hh.lift(e):hh.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:zy.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),null===(e=this._arrow)||void 0===e||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const e=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,e)}let a=0,l=0;if(this._arrow&&this.options.showArrow&&(a=Math.round(r/3),this._arrow.height=a,this._arrow.show(i)),this.options.showFrame&&(l=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new Pj(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e)),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new Oj("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:l;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}const d=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=a+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);const c=this.editor.getModel();if(c){const t=c.validateRange(new hh(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(t,t.startLineNumber===c.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;let e;this._resizeSash=this._disposables.add(new RK(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),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(67),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var Wj=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Vj=function(e,t){return function(i,n){t(i,n,e)}};const Hj=vd("IPeekViewService");var zj;Ng(Hj,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}},1),function(e){e.inPeekEditor=new gc("inReferenceSearchEditor",!0,v(0,"Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(zj||(zj={}));let Uj=class{constructor(e,t){e instanceof Ej&&zj.inPeekEditor.bindTo(t)}dispose(){}};Uj.ID="editor.contrib.referenceController",Uj=Wj([Vj(1,pc)],Uj),oh(Uj.ID,Uj,0);const Kj={headerBackgroundColor:fu.white,primaryHeadingColor:fu.fromHex("#333333"),secondaryHeadingColor:fu.fromHex("#6c6c6cb3")};let jj=class extends Bj{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new kt,this.onDidClose=this._onDidClose.event,xh(this.options,Kj,!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=Sr(".head"),this._bodyElement=Sr(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=Sr(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),ys(this._titleElement,"click",(e=>this._onTitleClick(e)))),_r(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=Sr("span.filename"),this._secondaryHeading=Sr("span.dirname"),this._metaHeading=Sr("span.meta"),_r(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=Sr(".peekview-actions");_r(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new TT(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Sd("peekview.close",v(0,"Close"),Rl.asClassName(Ml.close),!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:ZU.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:vs(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,kr(this._metaHeading)):xr(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(67)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,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`)}};jj=Wj([Vj(2,_d)],jj);const qj=Tm("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:fu.black,hcLight:fu.white},v(0,"Background color of the peek view title area.")),$j=Tm("peekViewTitleLabel.foreground",{dark:fu.white,light:fu.black,hcDark:fu.white,hcLight:tf},v(0,"Color of the peek view title.")),Gj=Tm("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},v(0,"Color of the peek view title info.")),Zj=Tm("peekView.border",{dark:hf,light:hf,hcDark:Km,hcLight:Km},v(0,"Color of the peek view borders and arrow.")),Yj=Tm("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:fu.black,hcLight:fu.white},v(0,"Background color of the peek view result list.")),Qj=(Tm("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:fu.white,hcLight:tf},v(0,"Foreground color for line nodes in the peek view result list.")),Tm("peekViewResult.fileForeground",{dark:fu.white,light:"#1E1E1E",hcDark:fu.white,hcLight:tf},v(0,"Foreground color for file nodes in the peek view result list.")),Tm("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},v(0,"Background color of the selected entry in the peek view result list.")),Tm("peekViewResult.selectionForeground",{dark:fu.white,light:"#6C6C6C",hcDark:fu.white,hcLight:tf},v(0,"Foreground color of the selected entry in the peek view result list.")),Tm("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:fu.black,hcLight:fu.white},v(0,"Background color of the peek view editor.")));Tm("peekViewEditorGutter.background",{dark:Qj,light:Qj,hcDark:Qj,hcLight:Qj},v(0,"Background color of the gutter in the peek view editor.")),Tm("peekViewEditorStickyScroll.background",{dark:Qj,light:Qj,hcDark:Qj,hcLight:Qj},v(0,"Background color of sticky scroll in the peek view editor.")),Tm("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},v(0,"Match highlight color in the peek view result list.")),Tm("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},v(0,"Match highlight color in the peek view editor.")),Tm("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:jm,hcLight:jm},v(0,"Match highlight border in the peek view editor."));class Xj{get templateId(){return this.renderer.templateId}constructor(e,t){this.renderer=e,this.modelProvider=t}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:lt.None}}renderElement(e,t,i,n){var o;if(null===(o=i.disposable)||void 0===o||o.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const r=new Pt,a=s.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class Jj{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class eq{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new Xj(e,s)));this.list=new mT(e,t,i,r,function(e,t){return{...t,accessibilityProvider:t.accessibilityProvider&&new Jj(e,t.accessibilityProvider)}}(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return _t.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return _t.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return _t.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Qh(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}var tq=i(7658),iq={};iq.styleTagTransform=Gr(),iq.setAttributes=Kr(),iq.insert=zr().bind(null,"head"),iq.domAPI=Vr(),iq.insertStyleElement=qr(),Br()(tq.Z,iq),tq.Z&&tq.Z.locals&&tq.Z.locals;const nq={separatorBorder:fu.transparent};class oq{set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){var i,n;if(e!==this.visible){e?(this.size=lN(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e);try{null===(n=(i=this.view).setVisible)||void 0===n||n.call(i,e)}catch(e){console.error("Splitview: Failed to set visible view"),console.error(e)}}}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var e;return null===(e=this.view.proportionalLayout)||void 0===e||e}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}layout(e,t){this.layoutContainer(e);try{this.view.layout(this.size,e,t)}catch(e){console.error("Splitview: Failed to layout view"),console.error(e)}}dispose(){this.disposable.dispose()}}class sq extends oq{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class rq extends oq{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var aq,lq;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(aq||(aq={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Auto=function(e){return{type:"auto",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(lq||(lq={}));class dq extends lt{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}constructor(e,t={}){var i,n,o,s,r;super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=aq.Idle,this._onDidSashChange=this._register(new kt),this._onDidSashReset=this._register(new kt),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(n=t.inverseAltBehavior)&&void 0!==n&&n,this.proportionalLayout=null===(o=t.proportionalLayout)||void 0===o||o,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=_r(this.el,Sr(".sash-container")),this.viewContainer=Sr(".split-view-container"),this.scrollable=this._register(new SN({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:e=>Ls(ls(this.el),e)})),this.scrollableElement=this._register(new RN(this.viewContainer,{vertical:0===this.orientation?null!==(s=t.scrollbarVisibility)&&void 0!==s?s:1:2,horizontal:1===this.orientation?null!==(r=t.scrollbarVisibility)&&void 0!==r?r:1:2},this.scrollable));const a=this._register(new ok(this.viewContainer,"scroll")).event;this._register(a((e=>{const t=this.scrollableElement.getScrollPosition(),i=Math.abs(this.viewContainer.scrollLeft-t.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,n=Math.abs(this.viewContainer.scrollTop-t.scrollTop)<=1?void 0:this.viewContainer.scrollTop;void 0===i&&void 0===n||this.scrollableElement.setScrollPosition({scrollLeft:i,scrollTop:n})}))),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{e.scrollTopChanged&&(this.viewContainer.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this.viewContainer.scrollLeft=e.scrollLeft)}))),_r(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||nq),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=yl(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this._contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this._contentSize);if(this.size=e,this.layoutContext=t,this.proportions){let t=0;for(let i=0;i0&&(n.size=lN(Math.round(o*e/t),n.minimumSize,n.maximumSize))}}else{const t=Qh(this.viewItems.length),n=t.filter((e=>1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map((e=>e.proportionalLayout&&e.visible?e.size/this._contentSize:void 0)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const n=this.sashItems.findIndex((t=>t.sash===e)),o=st(ws(this.el.ownerDocument.body,"keydown",(e=>s(this.sashDragState.current,e.altKey))),ws(this.el.ownerDocument.body,"keyup",(()=>s(this.sashDragState.current,!1)))),s=(e,t)=>{const i=this.viewItems.map((e=>e.size));let s,r,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(n===this.sashItems.length-1){const e=this.viewItems[n];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[n+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}if(!t){const e=Qh(n,-1),t=Qh(n+1,this.viewItems.length),o=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),a=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),l=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),d=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),c=Math.max(o,d),h=Math.min(l,a),u=this.findFirstSnapIndex(e),g=this.findFirstSnapIndex(t);if("number"==typeof u){const e=this.viewItems[u],t=Math.floor(e.viewMinimumSize/2);s={index:u,limitDelta:e.visible?c-t:c+t,size:e.size}}if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);r={index:g,limitDelta:e.visible?h+t:h-t,size:e.size}}}this.sashDragState={start:e,current:e,index:n,sizes:i,minDelta:a,maxDelta:l,alt:t,snapBefore:s,snapAfter:r,disposable:o}};s(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const d=e-i,c=this.resize(t,d,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-c,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=lN(t="number"==typeof t?t:e.size,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(!(e<0||e>=this.viewItems.length)){if(this.state!==aq.Idle)throw new Error("Cant modify splitview");this.state=aq.Busy;try{const i=Qh(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),s=this.viewItems[e];t=lN(t=Math.round(t),s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o)}finally{this.state=aq.Idle}}}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=lN(i,t.minimumSize,t.maximumSize);const n=Qh(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==aq.Idle)throw new Error("Cant modify splitview");this.state=aq.Busy;try{const o=Sr(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(i));const s=e.onDidChange((e=>this.onViewChange(l,e))),r=st(s,rt((()=>this.viewContainer.removeChild(o))));let a;"number"==typeof t?a=t:("auto"===t.type&&(t=this.areViewsDistributed()?{type:"distribute"}:{type:"split",index:t.index}),a="split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize);const l=0===this.orientation?new sq(o,e,a,r):new rq(o,e,a,r);if(this.viewItems.splice(i,0,l),this.viewItems.length>1){const e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},t=0===this.orientation?new RK(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},{...e,orientation:1}):new RK(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},{...e,orientation:0}),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=_t.map(t.onDidStart,n)(this.onSashStart,this),s=_t.map(t.onDidChange,n)(this.onSashChange,this),r=_t.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),a=r(this.onSashEnd,this),l=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=Qh(e,-1),n=Qh(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(e)})),d=st(o,s,a,l,t),c={sash:t,disposable:d};this.sashItems.splice(i-1,0,c)}let d;o.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(d=[t.index]),n||this.relayout([i],d),n||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}finally{this.state=aq.Idle}}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,s=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const d=Qh(e,-1),c=Qh(e+1,this.viewItems.length);if(o)for(const e of o)Jh(d,e),Jh(c,e);if(n)for(const e of n)eu(d,e),eu(c,e);const h=d.map((e=>this.viewItems[e])),u=d.map((e=>i[e])),g=c.map((e=>this.viewItems[e])),p=c.map((e=>i[e])),m=d.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),f=d.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),_=0===c.length?Number.POSITIVE_INFINITY:c.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),v=0===c.length?Number.NEGATIVE_INFINITY:c.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),b=Math.max(m,v,s),w=Math.min(_,f,r);let C=!1;if(a){const e=this.viewItems[a.index],i=t>=a.limitDelta;C=i!==e.visible,e.setVisible(i,a.size)}if(!C&&l){const e=this.viewItems[l.index],i=te+t.size),0);let i=this.size-t;const n=Qh(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));for(const e of s)Jh(n,e);for(const e of o)eu(n,e);"number"==typeof e&&eu(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this._contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this._contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const s=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:c&&t[e]&&(r0)return;if(!e.visible&&e.snap)return t}}areViewsDistributed(){let e,t;for(const i of this.viewItems)if(e=void 0===e?i.size:Math.min(e,i.size),t=void 0===t?i.size:Math.max(t,i.size),t-e>2)return!1;return!0}dispose(){var e;null===(e=this.sashDragState)||void 0===e||e.disposable.dispose(),ot(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[],super.dispose()}}var cq=i(4932),hq={};hq.styleTagTransform=Gr(),hq.setAttributes=Kr(),hq.insert=zr().bind(null,"head"),hq.domAPI=Vr(),hq.insertStyleElement=qr(),Br()(cq.Z,hq),cq.Z&&cq.Z.locals&&cq.Z.locals;class uq{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=uq.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=_r(e,Sr(".monaco-table-tr")),i=[],n=[];for(let e=0;ethis.disposables.add(new gq(e,t)))),a={size:r.reduce(((e,t)=>e+t.column.weight),0),views:r.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new dq(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const l=new uq(n,o,(e=>this.splitview.getViewSize(e)));var d;this.list=this.disposables.add(new mT(e,this.domNode,(d=i,{getHeight(e){return d.getHeight(e)},getTemplateId(){return uq.TemplateId}}),[l],s)),_t.any(...r.map((e=>e.onDidLayout)))((([e,t])=>l.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=n.reduce(((e,t)=>e+t.weight),0),i=n[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=Js(this.domNode),this.style(lT)}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}pq.InstanceCount=0;var mq=i(8939),fq={};fq.styleTagTransform=Gr(),fq.setAttributes=Kr(),fq.insert=zr().bind(null,"head"),fq.domAPI=Vr(),fq.insertStyleElement=qr(),Br()(mq.Z,fq),mq.Z&&mq.Z.locals&&mq.Z.locals;class _q extends mN{constructor(e){var t;super(),this._onChange=this._register(new kt),this.onChange=this._onChange.event,this._onKeyDown=this._register(new kt),this.onKeyDown=this._onKeyDown.event,this._opts=e,this._checked=this._opts.isChecked;const i=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,i.push(...Rl.asClassNameArray(this._icon))),this._opts.actionClassName&&i.push(...this._opts.actionClassName.split(" ")),this._checked&&i.push("checked"),this.domNode=document.createElement("div"),this._hover=this._register(iD().setupUpdatableHover(null!==(t=e.hoverDelegate)&&void 0!==t?t:QL("mouse"),this.domNode,this._opts.title)),this.domNode.classList.add(...i),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),e.preventDefault(),void e.stopPropagation();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const vq=v(0,"Match Case"),bq=v(0,"Match Whole Word"),wq=v(0,"Use Regular Expression");class Cq extends _q{constructor(e){var t;super({icon:Ml.caseSensitive,title:vq+e.appendTitle,isChecked:e.isChecked,hoverDelegate:null!==(t=e.hoverDelegate)&&void 0!==t?t:QL("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class yq extends _q{constructor(e){var t;super({icon:Ml.wholeWord,title:bq+e.appendTitle,isChecked:e.isChecked,hoverDelegate:null!==(t=e.hoverDelegate)&&void 0!==t?t:QL("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Sq extends _q{constructor(e){var t;super({icon:Ml.regex,title:wq+e.appendTitle,isChecked:e.isChecked,hoverDelegate:null!==(t=e.hoverDelegate)&&void 0!==t?t:QL("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class kq{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class xq{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._navigator.next()}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return null===this._navigator.current()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new kq(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var Lq=i(9347),Dq={};Dq.styleTagTransform=Gr(),Dq.setAttributes=Kr(),Dq.insert=zr().bind(null,"head"),Dq.domAPI=Vr(),Dq.insertStyleElement=qr(),Br()(Lq.Z,Dq),Lq.Z&&Lq.Z.locals&&Lq.Z.locals;const Eq=Sr;class Nq extends mN{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new kt),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new kt),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(n=this.options.tooltip)&&void 0!==n?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=_r(e,Eq(".monaco-inputbox.idle"));const o=this.options.flexibleHeight?"textarea":"input",s=_r(this.element,Eq(".ibwrapper"));if(this.input=_r(s,Eq(o+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=_r(s,Eq("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new AN(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),_r(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new ok(e.ownerDocument,"selectionchange")),i=_t.filter(t.event,(()=>{const t=e.ownerDocument.getSelection();return(null==t?void 0:t.anchorNode)===s}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this._register(this.ignoreGesture(this.input)),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new TT(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.hover?this.hover.update(e):this.hover=this._register(iD().setupUpdatableHover(QL("mouse"),this.input,e))}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:Ws(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return qs(this.input)}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}getSelection(){var e;const t=this.input.selectionStart;return null===t?null:{start:t,end:null!==(e=this.input.selectionEnd)&&void 0!==e?e:t}}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){if("open"===this.state&&Lh(this.message,e))return;this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${Ir(i.border,"transparent")}`,this.message.content&&(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){const t=this.options.inputBoxStyles;switch(e){case 1:return{border:t.inputValidationInfoBorder,background:t.inputValidationInfoBackground,foreground:t.inputValidationInfoForeground};case 2:return{border:t.inputValidationWarningBorder,background:t.inputValidationWarningBackground,foreground:t.inputValidationWarningForeground};default:return{border:t.inputValidationErrorBorder,background:t.inputValidationErrorBackground,foreground:t.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e;const t=()=>e.style.width=Os(this.element)+"px";let i;this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:i=>{var n,o;if(!this.message)return null;e=_r(i,Eq(".monaco-inputbox-container")),t();const s={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?Ex(this.message.content,s):function(e,t={}){const i=Nx(t);return i.textContent=e,i}(this.message.content,s);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=null!==(n=a.background)&&void 0!==n?n:"",r.style.color=null!==(o=a.foreground)&&void 0!==o?o:"",r.style.border=a.border?`1px solid ${a.border}`:"",_r(e,r),null},onHide:()=>{this.state="closed"},layout:t}),i=3===this.message.type?v(0,"Error: {0}",this.message.content):2===this.message.type?v(0,"Warning: {0}",this.message.content):v(0,"Info: {0}",this.message.content),na(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}applyStyles(){var e,t,i;const n=this.options.inputBoxStyles,o=null!==(e=n.inputBackground)&&void 0!==e?e:"",s=null!==(t=n.inputForeground)&&void 0!==t?t:"",r=null!==(i=n.inputBorder)&&void 0!==i?i:"";this.element.style.backgroundColor=o,this.element.style.color=s,this.input.style.backgroundColor="inherit",this.input.style.color=s,this.element.style.border=`1px solid ${Ir(r,"transparent")}`}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=Ws(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){var e;this._hideMessage(),this.message=null,null===(e=this.actionbar)||void 0===e||e.dispose(),super.dispose()}}class Iq extends Nq{constructor(e,t,i){const n=v(0," or {0} for history","⇅"),o=v(0," ({0} for history)","⇅");super(e,t,i),this._onDidFocus=this._register(new kt),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new kt),this.onDidBlur=this._onDidBlur.event,this.history=new xq(i.history,100);const s=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(n)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?n:o,t=this.placeholder+e;i.showPlaceholderOnFocus&&!qs(this.input)?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||s()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>s())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(o)||e(n)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(e){this.value&&(e||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),this.value=null!=e?e:"",oa(this.value?this.value:v(0,"Cleared Input"))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,oa(this.value))}setPlaceHolder(e){super.setPlaceHolder(e),this.setTooltip(e)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}var Tq=i(7269),Mq={};Mq.styleTagTransform=Gr(),Mq.setAttributes=Kr(),Mq.insert=zr().bind(null,"head"),Mq.domAPI=Vr(),Mq.insertStyleElement=qr(),Br()(Tq.Z,Mq),Tq.Z&&Tq.Z.locals&&Tq.Z.locals;const Aq=v(0,"input");class Rq extends mN{constructor(e,t,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new dt),this.additionalToggles=[],this._onDidOptionChange=this._register(new kt),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new kt),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new kt),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new kt),this._onKeyUp=this._register(new kt),this._onCaseSensitiveKeyDown=this._register(new kt),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new kt),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||Aq,this.showCommonFindToggles=!!i.showCommonFindToggles;const n=i.appendCaseSensitiveLabel||"",o=i.appendWholeWordsLabel||"",s=i.appendRegexLabel||"",r=i.history||[],a=!!i.flexibleHeight,l=!!i.flexibleWidth,d=i.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Iq(this.domNode,t,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:r,showHistoryHint:i.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:d,inputBoxStyles:i.inputBoxStyles}));const c=this._register(XL());if(this.showCommonFindToggles){this.regex=this._register(new Sq({appendTitle:s,isChecked:!1,hoverDelegate:c,...i.toggleStyles})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new yq({appendTitle:o,isChecked:!1,hoverDelegate:c,...i.toggleStyles})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new Cq({appendTitle:n,isChecked:!1,hoverDelegate:c,...i.toggleStyles})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const e=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(t=>{if(t.equals(15)||t.equals(17)||t.equals(9)){const i=e.indexOf(this.domNode.ownerDocument.activeElement);if(i>=0){let n=-1;t.equals(17)?n=(i+1)%e.length:t.equals(15)&&(n=0===i?e.length-1:i-1),t.equals(9)?(e[i].blur(),this.inputBox.focus()):n>=0&&e[n].focus(),pr(t,!0)}}}))}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(null==i?void 0:i.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),null==e||e.appendChild(this.domNode),this._register(ws(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=!0}))),this._register(ws(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=!1,this._onInput.fire()}))),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(e){this.inputBox.layout(),this.updateInputBoxPadding(e.collapsedFindWidget)}enable(){var e,t,i;this.domNode.classList.remove("disabled"),this.inputBox.enable(),null===(e=this.regex)||void 0===e||e.enable(),null===(t=this.wholeWords)||void 0===t||t.enable(),null===(i=this.caseSensitive)||void 0===i||i.enable();for(const e of this.additionalToggles)e.enable()}disable(){var e,t,i;this.domNode.classList.add("disabled"),this.inputBox.disable(),null===(e=this.regex)||void 0===e||e.disable(),null===(t=this.wholeWords)||void 0===t||t.disable(),null===(i=this.caseSensitive)||void 0===i||i.disable();for(const e of this.additionalToggles)e.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}setAdditionalToggles(e){for(const e of this.additionalToggles)e.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new at;for(const t of null!=e?e:[])this.additionalTogglesDisposables.value.add(t),this.controls.appendChild(t.domNode),this.additionalTogglesDisposables.value.add(t.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()}))),this.additionalToggles.push(t);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(e=!1){var t,i,n,o,s,r;this.inputBox.paddingRight=e?0:(null!==(i=null===(t=this.caseSensitive)||void 0===t?void 0:t.width())&&void 0!==i?i:0)+(null!==(o=null===(n=this.wholeWords)||void 0===n?void 0:n.width())&&void 0!==o?o:0)+(null!==(r=null===(s=this.regex)||void 0===s?void 0:s.width())&&void 0!==r?r:0)+this.additionalToggles.reduce(((e,t)=>e+t.width()),0)}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var e,t;return null!==(t=null===(e=this.caseSensitive)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setCaseSensitive(e){this.caseSensitive&&(this.caseSensitive.checked=e)}getWholeWords(){var e,t;return null!==(t=null===(e=this.wholeWords)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setWholeWords(e){this.wholeWords&&(this.wholeWords.checked=e)}getRegex(){var e,t;return null!==(t=null===(e=this.regex)||void 0===e?void 0:e.checked)&&void 0!==t&&t}setRegex(e){this.regex&&(this.regex.checked=e,this.validate())}focusOnCaseSensitive(){var e;null===(e=this.caseSensitive)||void 0===e||e.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(e){this.inputBox.showMessage(e)}clearMessage(){this.inputBox.hideMessage()}}var Pq,Oq;!function(e){e[e.Expanded=0]="Expanded",e[e.Collapsed=1]="Collapsed",e[e.PreserveOrExpanded=2]="PreserveOrExpanded",e[e.PreserveOrCollapsed=3]="PreserveOrCollapsed"}(Pq||(Pq={})),function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element",e[e.Filter=3]="Filter"}(Oq||(Oq={}));class Fq extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class Bq{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function Wq(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function Vq(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function Hq(e){return"boolean"==typeof e.collapsible}class zq{constructor(e,t,i,n={}){var o;this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new It,this._onDidChangeCollapseState=new kt,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new kt,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new kt,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new zt(Ft),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.allowNonCollapsibleParents=null!==(o=n.allowNonCollapsibleParents)&&void 0!==o&&o,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=Qe.empty(),n={}){if(0===e.length)throw new Fq(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,s){var r;void 0===n&&(n=Qe.empty()),void 0===s&&(s=null!==(r=o.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],d=t[t.length-1],c=new rV({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,d),...l,...a.children.slice(d+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(c.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),u=(t,i,n)=>{if(s>0)for(let r=0;rt.originalStart-e.originalStart)))u(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-d,this.spliceSimple([...h,g],e.originalLength,Qe.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=Qe.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:s}){const{parentNode:r,listIndex:a,revealed:l,visible:d}=this.getParentNodeWithListIndex(e),c=[],h=Qe.map(i,(e=>this.createTreeNode(e,r,r.visible?1:0,l,c,n))),u=e[e.length-1];let g=0;for(let e=u;e>=0&&es.getId(e.element).toString()))):r.lastDiffIds=r.children.map((e=>s.getId(e.element).toString())):r.lastDiffIds=void 0;let v=0;for(const e of _)e.visible&&v++;if(0!==v)for(let e=u+p.length;ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(r,f-e),this.list.splice(a,e,c)}if(_.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};_.forEach(e)}this._onDidSplice.fire({insertedNodes:p,deletedNodes:_});let b=r;for(;b;){if(2===b.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}b=b.parent}}rerender(e){if(0===e.length)throw new Fq(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!Hq(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(Hq(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!Hq(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,s){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&o.push(r);const l=e.children||Qe.empty(),d=n&&0!==a&&!r.collapsed;let c=0,h=1;for(const e of l){const t=this.createTreeNode(e,r,a,d,o,s);r.children.push(t),h+=t.renderNodeCount,t.visible&&(t.visibleChildIndex=c++)}return this.allowNonCollapsibleParents||(r.collapsible=r.collapsible||r.children.length>0),r.visibleChildrenCount=c,r.visible=2===a?c>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=h):(r.renderNodeCount=0,n&&o.pop()),null==s||s(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):Wq(i)?(e.filterData=i.data,Vq(i.visibility)):(e.filterData=void 0,Vq(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new Fq(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new Fq(this.user,"Invalid tree location");const r=t.children[s];return{node:r,listIndex:i,revealed:n,visible:o&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[s,...r]=e;if(s<0||s>t.children.length)throw new Fq(this.user,"Invalid tree location");for(let e=0;ee.element))),this.data=e}}function Zq(e){return e instanceof UN?new Gq(e):e}class Yq{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=lt.None,this.disposables=new at}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,Zq(e),t)}onDragOver(e,t,i,n,o,s=!0){const r=this.dnd.onDragOver(Zq(e),t&&t.element,i,n,o),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return r;if(a&&"boolean"!=typeof r&&r.autoExpand&&(this.autoExpandDisposable=jt((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500,this.disposables)),"boolean"==typeof r||!r.accept||void 0===r.bubble||r.feedback)return s?r:{accept:"boolean"==typeof r?r:r.accept,effect:"boolean"==typeof r?void 0:r.effect,feedback:[i]};if(1===r.bubble){const i=this.modelProvider(),s=i.getNodeLocation(t),r=i.getParentNodeLocation(s),a=i.getNode(r),l=r&&i.getListIndex(r);return this.onDragOver(e,a,l,n,o,!1)}const l=this.modelProvider(),d=l.getNodeLocation(t),c=l.getListIndex(d),h=l.getListRenderCount(d);return{...r,feedback:Qh(c,c+h)}}drop(e,t,i,n,o){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(Zq(e),t&&t.element,i,n,o)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function Qq(e,t){return t&&{...t,identityProvider:t.identityProvider&&{getId(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new Yq(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return t.multipleSelectionController.isSelectionSingleChangeEvent({...e,element:e.element})},isSelectionRangeChangeEvent(e){return t.multipleSelectionController.isSelectionRangeChangeEvent({...e,element:e.element})}},accessibilityProvider:t.accessibilityProvider&&{...t.accessibilityProvider,getSetSize(t){const i=e(),n=i.getNodeLocation(t),o=i.getParentNodeLocation(n);return i.getNode(o).visibleChildrenCount},getPosInSet(e){return e.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))},keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}}}class Xq{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){var i,n;null===(n=(i=this.delegate).setDynamicHeight)||void 0===n||n.call(i,e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(Uq||(Uq={}));class Jq{get elements(){return this._elements}constructor(e,t=[]){this._elements=t,this.disposables=new at,this.onDidChange=_t.forEach(e,(e=>this._elements=e),this.disposables)}dispose(){this.disposables.dispose()}}class e${constructor(e,t,i,n,o,s={}){var r;this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedIndentGuides=o,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=e$.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=lt.None,this.disposables=new at,this.templateId=e.templateId,this.updateOptions(s),_t.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),null===(r=e.onDidChangeTwistieState)||void 0===r||r.call(e,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent){const t=lN(e.indent,0,40);if(t!==this.indent){this.indent=t;for(const[e,t]of this.renderedNodes)this.renderTreeElement(e,t)}}if(void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==Uq.None;if(t!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=t;for(const[e,t]of this.renderedNodes)this._renderIndentGuides(e,t);if(this.indentGuidesDisposable.dispose(),t){const e=new at;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=_r(e,Sr(".monaco-tl-row")),i=_r(t,Sr(".monaco-tl-indent")),n=_r(t,Sr(".monaco-tl-twistie")),o=_r(t,Sr(".monaco-tl-contents")),s=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:n,indentGuidesDisposable:lt.None,templateData:s}}renderElement(e,t,i,n){this.renderedNodes.set(e,i),this.renderedElements.set(e.element,e),this.renderTreeElement(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){var o,s;i.indentGuidesDisposable.dispose(),null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(e,t))}renderTreeElement(e,t){const i=e$.DefaultIndent+(e.depth-1)*this.indent;t.twistie.style.paddingLeft=`${i}px`,t.indent.style.width=i+this.indent-16+"px",e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded"),t.twistie.classList.remove(...Rl.asClassNameArray(Ml.treeItemExpanded));let n=!1;this.renderer.renderTwistie&&(n=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(n||t.twistie.classList.add(...Rl.asClassNameArray(Ml.treeItemExpanded)),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(e,t)}_renderIndentGuides(e,t){if(vs(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new at,n=this.modelProvider();for(;;){const o=n.getNodeLocation(e),s=n.getParentNodeLocation(o);if(!s)break;const r=n.getNode(s),a=Sr(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(rt((()=>this.renderedIndentGuides.delete(r,a)))),e=r}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),ot(this.disposables)}}e$.DefaultIndent=8;class t${get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new at,e.onWillRefilter(this.reset,this,this.disposables)}filter(e,t){let i=1;if(this._filter){const n=this._filter.filter(e,t);if(i="boolean"==typeof n?n?1:0:Wq(n)?Vq(n.visibility):n,0===i)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:cl.Default,visibility:i};const n=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),o=Array.isArray(n)?n:[n];for(const e of o){const t=e&&e.toString();if(void 0===t)return{data:cl.Default,visibility:i};let n;if(this.tree.findMatchType===jq.Contiguous){const e=t.toLowerCase().indexOf(this._lowercasePattern);if(e>-1){n=[Number.MAX_SAFE_INTEGER,0];for(let t=this._lowercasePattern.length;t>0;t--)n.push(e+t-1)}}else n=ul(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(n)return this._matchCount++,1===o.length?{data:n,visibility:i}:{data:{label:t,score:n},visibility:i}}return this.tree.findMode===Kq.Filter?"number"==typeof this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(e):2:{data:cl.Default,visibility:i}}reset(){this._totalCount=0,this._matchCount=0}dispose(){ot(this.disposables)}}!function(e){e[e.Highlight=0]="Highlight",e[e.Filter=1]="Filter"}(Kq||(Kq={})),function(e){e[e.Fuzzy=0]="Fuzzy",e[e.Contiguous=1]="Contiguous"}(jq||(jq={}));class i${get pattern(){return this._pattern}get mode(){return this._mode}set mode(e){e!==this._mode&&(this._mode=e,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(e))}get matchType(){return this._matchType}set matchType(e){e!==this._matchType&&(this._matchType=e,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(e))}constructor(e,t,i,n,o,s={}){var r,a;this.tree=e,this.view=i,this.filter=n,this.contextViewProvider=o,this.options=s,this._pattern="",this.width=0,this._onDidChangeMode=new kt,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new kt,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new kt,this._onDidChangeOpenState=new kt,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new at,this.disposables=new at,this._mode=null!==(r=e.options.defaultFindMode)&&void 0!==r?r:Kq.Highlight,this._matchType=null!==(a=e.options.defaultFindMatchType)&&void 0!==a?a:jq.Fuzzy,t.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(e={}){void 0!==e.defaultFindMode&&(this.mode=e.defaultFindMode),void 0!==e.defaultFindMatchType&&(this.matchType=e.defaultFindMatchType)}onDidSpliceModel(){this.widget&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}render(){var e,t,i,n;const o=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&o?null===(e=this.tree.options.showNotFoundMessage)||void 0===e||e?null===(t=this.widget)||void 0===t||t.showMessage({type:2,content:v(0,"No elements found.")}):null===(i=this.widget)||void 0===i||i.showMessage({type:2}):null===(n=this.widget)||void 0===n||n.clearMessage()}shouldAllowFocus(e){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1||!cl.isDefault(e.filterData)}layout(e){var t;this.width=e,null===(t=this.widget)||void 0===t||t.layout(e)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function n$(e,t){return e.position===t.position&&o$(e,t)}function o$(e,t){return e.node.element===t.node.element&&e.startIndex===t.startIndex&&e.height===t.height&&e.endIndex===t.endIndex}class s${constructor(e=[]){this.stickyNodes=e}get count(){return this.stickyNodes.length}equal(e){return Wh(this.stickyNodes,e.stickyNodes,n$)}lastNodePartiallyVisible(){if(0===this.count)return!1;const e=this.stickyNodes[this.count-1];if(1===this.count)return 0!==e.position;const t=this.stickyNodes[this.count-2];return t.position+t.height!==e.position}animationStateChanged(e){if(!Wh(this.stickyNodes,e.stickyNodes,o$))return!1;if(0===this.count)return!1;const t=this.stickyNodes[this.count-1],i=e.stickyNodes[e.count-1];return t.position!==i.position}}class r${constrainStickyScrollNodes(e,t,i){for(let n=0;ni||n>=t)return e.slice(0,n)}return e}}class a$ extends lt{constructor(e,t,i,n,o,s={}){var r;super(),this.tree=e,this.model=t,this.view=i,this.treeDelegate=o,this.maxWidgetViewRatio=.4;const a=this.validateStickySettings(s);this.stickyScrollMaxItemCount=a.stickyScrollMaxItemCount,this.stickyScrollDelegate=null!==(r=s.stickyScrollDelegate)&&void 0!==r?r:new r$,this._widget=this._register(new l$(i.getScrollableElement(),i,e,n,o,s.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(i.onDidScroll((()=>this.update()))),this._register(i.onDidChangeContentHeight((()=>this.update()))),this._register(e.onDidChangeCollapseState((()=>this.update()))),this.update()}get height(){return this._widget.height}getNodeAtHeight(e){let t;if(t=0===e?this.view.firstVisibleIndex:this.view.indexAt(e+this.view.scrollTop),!(t<0||t>=this.view.length))return this.view.element(t)}update(){const e=this.getNodeAtHeight(0);if(!e||0===this.tree.scrollTop)return void this._widget.setState(void 0);const t=this.findStickyState(e);this._widget.setState(t)}findStickyState(e){const t=[];let i=e,n=0,o=this.getNextStickyNode(i,void 0,n);for(;o&&(t.push(o),n+=o.height,!(t.length<=this.stickyScrollMaxItemCount)||(i=this.getNextVisibleNode(o),i));)o=this.getNextStickyNode(i,o.node,n);const s=this.constrainStickyNodes(t);return s.length?new s$(s):void 0}getNextVisibleNode(e){return this.getNodeAtHeight(e.position+e.height)}getNextStickyNode(e,t,i){const n=this.getAncestorUnderPrevious(e,t);if(n){if(n===e){if(!this.nodeIsUncollapsedParent(e))return;if(this.nodeTopAlignsWithStickyNodesBottom(e,i))return}return this.createStickyScrollNode(n,i)}}nodeTopAlignsWithStickyNodesBottom(e,t){const i=this.getNodeIndex(e),n=this.view.getElementTop(i),o=t;return this.view.scrollTop===n-o}createStickyScrollNode(e,t){const i=this.treeDelegate.getHeight(e),{startIndex:n,endIndex:o}=this.getNodeRange(e);return{node:e,position:this.calculateStickyNodePosition(o,t,i),height:i,startIndex:n,endIndex:o}}getAncestorUnderPrevious(e,t=void 0){let i=e,n=this.getParentNode(i);for(;n;){if(n===t)return i;i=n,n=this.getParentNode(i)}if(void 0===t)return i}calculateStickyNodePosition(e,t,i){let n=this.view.getRelativeTop(e);if(null===n&&this.view.firstVisibleIndex===e&&e+1r&&t<=r?r-i:t}constrainStickyNodes(e){if(0===e.length)return[];const t=this.view.renderHeight*this.maxWidgetViewRatio,i=e[e.length-1];if(e.length<=this.stickyScrollMaxItemCount&&i.position+i.height<=t)return e;const n=this.stickyScrollDelegate.constrainStickyScrollNodes(e,this.stickyScrollMaxItemCount,t);if(!n.length)return[];const o=n[n.length-1];if(n.length>this.stickyScrollMaxItemCount||o.position+o.height>t)throw new Error("stickyScrollDelegate violates constraints");return n}getParentNode(e){const t=this.model.getNodeLocation(e),i=this.model.getParentNodeLocation(t);return i?this.model.getNode(i):void 0}nodeIsUncollapsedParent(e){const t=this.model.getNodeLocation(e);return this.model.getListRenderCount(t)>1}getNodeIndex(e){const t=this.model.getNodeLocation(e);return this.model.getListIndex(t)}getNodeRange(e){const t=this.model.getNodeLocation(e),i=this.model.getListIndex(t);if(i<0)throw new Error("Node not found in tree");return{startIndex:i,endIndex:i+this.model.getListRenderCount(t)-1}}nodePositionTopBelowWidget(e){const t=[];let i=this.getParentNode(e);for(;i;)t.push(i),i=this.getParentNode(i);let n=0;for(let e=0;e0,i=!!e&&e.count>0;if(!t&&!i||t&&i&&this._previousState.equal(e))return;if(t!==i&&this.setVisible(i),!i)return this._previousState=void 0,this._previousElements=[],void this._previousStateDisposables.clear();const n=e.stickyNodes[e.count-1];if(this._previousState&&e.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${n.position}px`;else{this._previousStateDisposables.clear();const t=Array(e.count);for(let i=e.count-1;i>=0;i--){const n=e.stickyNodes[i],{element:o,disposable:s}=this.createElement(n,i,e.count);t[i]=o,this._rootDomNode.appendChild(o),this._previousStateDisposables.add(s)}this.stickyScrollFocus.updateElements(t,e),this._previousElements=t}this._previousState=e,this._rootDomNode.style.height=`${n.position+n.height}px`}createElement(e,t,i){const n=e.startIndex,o=document.createElement("div");o.style.top=`${e.position}px`,!1!==this.tree.options.setRowHeight&&(o.style.height=`${e.height}px`),!1!==this.tree.options.setRowLineHeight&&(o.style.lineHeight=`${e.height}px`),o.classList.add("monaco-tree-sticky-row"),o.classList.add("monaco-list-row"),o.setAttribute("data-index",`${n}`),o.setAttribute("data-parity",n%2==0?"even":"odd"),o.setAttribute("id",this.view.getElementID(n));const s=this.setAccessibilityAttributes(o,e.node.element,t,i),r=this.treeDelegate.getTemplateId(e.node),a=this.treeRenderers.find((e=>e.templateId===r));if(!a)throw new Error(`No renderer found for template id ${r}`);let l=e.node;l===this.tree.getNode(this.tree.getNodeLocation(e.node))&&(l=new Proxy(e.node,{}));const d=a.renderTemplate(o);a.renderElement(l,e.startIndex,d,e.height);const c=rt((()=>{s.dispose(),a.disposeElement(l,e.startIndex,d,e.height),a.disposeTemplate(d),o.remove()}));return{element:o,disposable:c}}setAccessibilityAttributes(e,t,i,n){var o;if(!this.accessibilityProvider)return lt.None;this.accessibilityProvider.getSetSize&&e.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(t,i,n))),this.accessibilityProvider.getPosInSet&&e.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(t,i))),this.accessibilityProvider.getRole&&e.setAttribute("role",null!==(o=this.accessibilityProvider.getRole(t))&&void 0!==o?o:"treeitem");const s=this.accessibilityProvider.getAriaLabel(t),r=s&&"string"!=typeof s?s:EI(s),a=SI((t=>{const i=t.readObservable(r);i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")}));"string"==typeof s||s&&e.setAttribute("aria-label",s.get());const l=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(t);return"number"==typeof l&&e.setAttribute("aria-level",`${l}`),e.setAttribute("aria-selected",String(!1)),a}setVisible(e){this._rootDomNode.classList.toggle("empty",!e),e||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class d$ extends lt{get domHasFocus(){return this._domHasFocus}set domHasFocus(e){e!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(e),this._domHasFocus=e)}constructor(e,t){super(),this.container=e,this.view=t,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new kt,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new kt,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this.container.addEventListener("focus",(()=>this.onFocus())),this.container.addEventListener("blur",(()=>this.onBlur())),this._register(this.view.onDidFocus((()=>this.toggleStickyScrollFocused(!1)))),this._register(this.view.onKeyDown((e=>this.onKeyDown(e)))),this._register(this.view.onMouseDown((e=>this.onMouseDown(e)))),this._register(this.view.onContextMenu((e=>this.handleContextMenu(e))))}handleContextMenu(e){const t=e.browserEvent.target;if(!QI(t)&&!YI(t))return void(this.focusedLast()&&this.view.domFocus());if(!hr(e.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const t=this.state.stickyNodes.findIndex((t=>{var i;return t.node.element===(null===(i=e.element)||void 0===i?void 0:i.element)}));if(-1===t)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");return this.container.focus(),void this.setFocus(t)}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const i=this.state.stickyNodes[this.focusedIndex].node.element,n=this.elements[this.focusedIndex];this._onContextMenu.fire({element:i,anchor:n,browserEvent:e.browserEvent,isStickyScroll:!0})}onKeyDown(e){if(this.domHasFocus&&this.state)if("ArrowUp"===e.key)this.setFocusedElement(Math.max(0,this.focusedIndex-1)),e.preventDefault(),e.stopPropagation();else if("ArrowDown"===e.key||"ArrowRight"===e.key){if(this.focusedIndex>=this.state.count-1){const e=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([e]),this.scrollNodeUnderWidget(e,this.state)}else this.setFocusedElement(this.focusedIndex+1);e.preventDefault(),e.stopPropagation()}}onMouseDown(e){const t=e.browserEvent.target;(QI(t)||YI(t))&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation())}updateElements(e,t){if(t&&0===t.count)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(t&&t.count!==e.length)throw new Error("Sticky scroll focus received illigel state");const i=this.focusedIndex;if(this.removeFocus(),this.elements=e,this.state=t,t){const e=lN(i,0,t.count-1);this.setFocus(e)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=t?0:-1}setFocusedElement(e){const t=this.state;if(!t)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(e),!(e1?t.stickyNodes[t.count-2]:void 0,o=this.view.getElementTop(e),s=n?n.position+n.height+i.height:i.height;this.view.scrollTop=o-s}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return!!this.state&&this.view.getHTMLElement().classList.contains("sticky-scroll-focused")}removeFocus(){-1!==this.focusedIndex&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(e){if(0>e)throw new Error("addFocus() can not remove focus");if(!this.state&&e>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&e>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const t=this.focusedIndex;t>=0&&this.toggleElementFocus(this.elements[t],!1),e>=0&&this.toggleElementFocus(this.elements[e],!0),this.focusedIndex=e}toggleElementFocus(e,t){this.toggleElementActiveFocus(e,t&&this.domHasFocus),this.toggleElementPassiveFocus(e,t)}toggleCurrentElementActiveFocus(e){-1!==this.focusedIndex&&this.toggleElementActiveFocus(this.elements[this.focusedIndex],e)}toggleElementActiveFocus(e,t){e.classList.toggle("focused",t)}toggleElementPassiveFocus(e,t){e.classList.toggle("passive-focused",t)}toggleStickyScrollFocused(e){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",e)}onFocus(){if(!this.state||0===this.elements.length)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.toggleCurrentElementActiveFocus(!0),-1===this.focusedIndex&&this.setFocus(0)}onBlur(){this.domHasFocus=!1,this.toggleCurrentElementActiveFocus(!1)}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function c$(e){let t=Oq.Unknown;return Hs(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=Oq.Twistie:Hs(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?t=Oq.Element:Hs(e.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(t=Oq.Filter),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function h$(e){const t=QI(e.browserEvent.target);return{element:e.element?e.element.element:null,browserEvent:e.browserEvent,anchor:e.anchor,isStickyScroll:t}}function u$(e,t){t(e),e.children.forEach((e=>u$(e,t)))}class g${get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new kt,this.onDidChange=this._onDidChange.event}set(e,t){!(null==t?void 0:t.__forceEvent)&&Wh(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>u$(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>u$(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>u$(e,s)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&e.visible&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class p$ extends rT{constructor(e,t,i){super(e),this.tree=t,this.stickyScrollProvider=i}onViewPointer(e){if(XI(e.browserEvent.target)||$I(e.browserEvent.target)||ZI(e.browserEvent.target))return;if(e.browserEvent.isHandledByList)return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16,o=YI(e.browserEvent.target);let s=!1;if(s=!!o||("function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick),o)this.handleStickyScrollMouseEvent(e,t);else{if(s&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e)}if(t.collapsible&&(!o||n)){const i=this.tree.getNodeLocation(t),o=e.browserEvent.altKey;if(this.tree.setFocus([i]),this.tree.toggleCollapsed(i,o),n)return void(e.browserEvent.isHandledByList=!0)}o||super.onViewPointer(e)}handleStickyScrollMouseEvent(e,t){if(function(e){return GI(e,"monaco-custom-toggle")}(e.browserEvent.target)||function(e){return GI(e,"action-item")}(e.browserEvent.target))return;const i=this.stickyScrollProvider();if(!i)throw new Error("Sticky scroll controller not found");const n=this.list.indexOf(t),o=this.list.getElementTop(n),s=i.nodePositionTopBelowWidget(t);this.tree.scrollTop=o-s,this.list.domFocus(),this.list.setFocus([n]),this.list.setSelection([n])}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&(e.browserEvent.isHandledByList||super.onDoubleClick(e))}onMouseDown(e){const t=e.browserEvent.target;QI(t)||YI(t)||super.onMouseDown(e)}onContextMenu(e){const t=e.browserEvent.target;QI(t)||YI(t)||super.onContextMenu(e)}}class m$ extends mT{constructor(e,t,i,n,o,s,r,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=r}createMouseController(e){return new p$(this,e.tree,e.stickyScrollProvider)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];let s;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(s=e+i)})),n.length>0&&super.setFocus(Zh([...super.getFocus(),...n])),o.length>0&&super.setSelection(Zh([...super.getSelection(),...o])),"number"==typeof s&&super.setAnchor(s)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class f${get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return _t.filter(_t.map(this.view.onMouseDblClick,c$),(e=>e.target!==Oq.Filter))}get onMouseOver(){return _t.map(this.view.onMouseOver,c$)}get onMouseOut(){return _t.map(this.view.onMouseOut,c$)}get onContextMenu(){var e,t;return _t.any(_t.filter(_t.map(this.view.onContextMenu,h$),(e=>!e.isStickyScroll)),null!==(t=null===(e=this.stickyScrollController)||void 0===e?void 0:e.onContextMenu)&&void 0!==t?t:_t.None)}get onPointer(){return _t.map(this.view.onPointer,c$)}get onKeyDown(){return this.view.onKeyDown}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return _t.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.mode)&&void 0!==t?t:Kq.Highlight}set findMode(e){this.findController&&(this.findController.mode=e)}get findMatchType(){var e,t;return null!==(t=null===(e=this.findController)||void 0===e?void 0:e.matchType)&&void 0!==t?t:jq.Fuzzy}set findMatchType(e){this.findController&&(this.findController.matchType=e)}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(e,t,i,n,o={}){var s;this._user=e,this._options=o,this.eventBufferer=new It,this.onDidChangeFindOpenState=_t.None,this.onDidChangeStickyScrollFocused=_t.None,this.disposables=new at,this._onWillRefilter=new kt,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new kt,this.treeDelegate=new Xq(i);const r=new Tt,a=new Tt,l=this.disposables.add(new Jq(a.event)),d=new pa;this.renderers=n.map((e=>new e$(e,(()=>this.model),r.event,l,d,o)));for(const e of this.renderers)this.disposables.add(e);let c;o.keyboardNavigationLabelProvider&&(c=new t$(this,o.keyboardNavigationLabelProvider,o.filter),o={...o,filter:c},this.disposables.add(c)),this.focus=new g$((()=>this.view.getFocusedElements()[0]),o.identityProvider),this.selection=new g$((()=>this.view.getSelectedElements()[0]),o.identityProvider),this.anchor=new g$((()=>this.view.getAnchorElement()),o.identityProvider),this.view=new m$(e,t,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...Qq((()=>this.model),o),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(e,this.view,o),r.input=this.model.onDidChangeCollapseState;const h=_t.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}),this.disposables);h((()=>null),null,this.disposables);const u=this.disposables.add(new kt),g=this.disposables.add(new zt(0));if(this.disposables.add(_t.any(h,this.focus.onDidChange,this.selection.onDidChange)((()=>{g.trigger((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);u.fire([...e.values()])}))}))),a.input=u.event,!1!==o.keyboardSupport){const e=_t.chain(this.view.onKeyDown,(e=>e.filter((e=>!$I(e.target))).map((e=>new Ke(e)))));_t.chain(e,(e=>e.filter((e=>15===e.keyCode))))(this.onLeftArrow,this,this.disposables),_t.chain(e,(e=>e.filter((e=>17===e.keyCode))))(this.onRightArrow,this,this.disposables),_t.chain(e,(e=>e.filter((e=>10===e.keyCode))))(this.onSpace,this,this.disposables)}if((null===(s=o.findWidgetEnabled)||void 0===s||s)&&o.keyboardNavigationLabelProvider&&o.contextViewProvider){const e=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new i$(this,this.model,this.view,c,o.contextViewProvider,e),this.focusNavigationFilter=e=>this.findController.shouldAllowFocus(e),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=_t.None,this.onDidChangeFindMatchType=_t.None;o.enableStickyScroll&&(this.stickyScrollController=new a$(this,this.model,this.view,this.renderers,this.treeDelegate,o),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=Js(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Uq.Always)}updateOptions(e={}){var t;this._options={...this._options,...e};for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(this._options),null===(t=this.findController)||void 0===t||t.updateOptions(e),this.updateStickyScroll(e),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Uq.Always)}get options(){return this._options}updateStickyScroll(e){var t;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new a$(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=_t.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),null===(t=this.stickyScrollController)||void 0===t||t.updateOptions(e)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(e){this.view.ariaLabel=e}domFocus(){var e;(null===(e=this.stickyScrollController)||void 0===e?void 0:e.focusedLast())?this.stickyScrollController.domFocus():this.view.domFocus()}layout(e,t){var i;this.view.layout(e,t),bl(t)&&(null===(i=this.findController)||void 0===i||i.layout(t))}style(e){var t,i;const n=`.${this.view.domId}`,o=[];e.treeIndentGuidesStroke&&(o.push(`.monaco-list${n}:hover .monaco-tl-indent > .indent-guide, .monaco-list${n}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeInactiveIndentGuidesStroke}; }`),o.push(`.monaco-list${n} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`));const s=null!==(t=e.treeStickyScrollBackground)&&void 0!==t?t:e.listBackground;s&&(o.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${s}; }`),o.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${s}; }`)),e.treeStickyScrollBorder&&o.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container { border-bottom: 1px solid ${e.treeStickyScrollBorder}; }`),e.treeStickyScrollShadow&&o.push(`.monaco-list${n} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-container-shadow { box-shadow: ${e.treeStickyScrollShadow} 0 6px 6px -6px inset; height: 3px; }`),e.listFocusForeground&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const r=Ir(e.listFocusAndSelectionOutline,Ir(e.listSelectionOutline,null!==(i=e.listFocusOutline)&&void 0!==i?i:""));r&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${r}; outline-offset: -1px;}`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),e.listFocusOutline&&(o.push(`.monaco-list${n}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),o.push(`.monaco-list${n}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.passive-focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),o.push(`.monaco-workbench.context-menu-visible .monaco-list${n}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=o.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}getNodeLocation(e){return this.model.getNodeLocation(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}toggleCollapsed(e,t=!1){return this.model.setCollapsed(e,void 0,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}))}getSelection(){return this.selection.get()}setFocus(e,t){this.eventBufferer.bufferEvents((()=>{const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}))}focusNext(e=1,t=!1,i,n=(hr(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusNext(e,t,i,n)}focusPrevious(e=1,t=!1,i,n=(hr(i)&&i.altKey?void 0:this.focusNavigationFilter)){this.view.focusPrevious(e,t,i,n)}focusNextPage(e,t=(hr(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusNextPage(e,t)}focusPreviousPage(e,t=(hr(e)&&e.altKey?void 0:this.focusNavigationFilter)){return this.view.focusPreviousPage(e,t,(()=>{var e,t;return null!==(t=null===(e=this.stickyScrollController)||void 0===e?void 0:e.height)&&void 0!==t?t:0}))}focusFirst(e,t=(hr(e)&&e.altKey?void 0:this.focusNavigationFilter)){this.view.focusFirst(e,t)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);if(-1!==i)if(this.stickyScrollController){const n=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(e));this.view.reveal(i,t,n)}else this.view.reveal(i,t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){var e;ot(this.disposables),null===(e=this.stickyScrollController)||void 0===e||e.dispose(),this.view.dispose()}}class _${constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new zq(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(e,t){return i.sorter.compare(e.element,t.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=Qe.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=Qe.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,{...i,onDidCreateNode:e=>{var t;if(null===e.element)return;const s=e;if(n.add(s.element),this.nodes.set(s.element,s),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.add(e),this.nodesByIdentity.set(e,s)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,s)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const s=e;if(n.has(s.element)||this.nodes.delete(s.element),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,s)}})}preserveCollapseState(e=Qe.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),Qe.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t){let t;return t=void 0===e.collapsed?void 0:e.collapsed===Pq.Collapsed||e.collapsed===Pq.PreserveOrCollapsed||e.collapsed!==Pq.Expanded&&e.collapsed!==Pq.PreserveOrExpanded&&Boolean(e.collapsed),{...e,children:this.preserveCollapseState(e.children),collapsed:t}}const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible;let n;return n=void 0===e.collapsed||e.collapsed===Pq.PreserveOrCollapsed||e.collapsed===Pq.PreserveOrExpanded?t.collapsed:e.collapsed===Pq.Collapsed||e.collapsed!==Pq.Expanded&&Boolean(e.collapsed),{...e,collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)}}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Fq(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new Fq(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Fq(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new Fq(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function v$(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:Qe.map(Qe.from(e.children),v$),collapsible:e.collapsible,collapsed:e.collapsed}}function b$(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=Qe.consume(Qe.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:Qe.map(Qe.concat(o,n),b$),collapsible:e.collapsible,collapsed:e.collapsed}}function w$(e,t=0){let i;return i=tw$(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function C$(e){return w$(e,0)}function y$(e,t,i){return e.element===t?{...e,children:i}:{...e,children:Qe.map(Qe.from(e.children),(e=>y$(e,t,i)))}}class S${get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new _$(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}setChildren(e,t=Qe.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId(e){return e.elements.map((e=>o.getId(e).toString())).join("\0")}});var o;if(null===e){const e=Qe.map(t,this.enabled?b$:v$);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new Fq(this.user,"Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),d=y$(C$(r),e,t),c=(this.enabled?b$:v$)(d),h=i.diffIdentityProvider?(e,t)=>i.diffIdentityProvider.getId(e)===i.diffIdentityProvider.getId(t):void 0;if(Wh(c.element.elements,r.element.elements,h))return void this._setChildren(s,c.children||Qe.empty(),{diffIdentityProvider:n,diffDepth:1});const u=l.children.map((e=>e===r?c:e));this._setChildren(l.element,u,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=Qe.map(t,C$),n=Qe.map(i,e?b$:v$);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,{...i,onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}})}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new Fq(this.user,`Tree element not found: ${e}`);return t}}const k$=e=>e[e.length-1];class x${get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new x$(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e,t){this.unwrapper=e,this.node=t}}class L${get onDidSplice(){return _t.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return _t.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return _t.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||k$;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new Bq((e=>new x$(n,e))),this.model=new S$(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return{...t,identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(e(i))}},sorter:t.sorter&&{compare(e,i){return t.sorter.compare(e.elements[0],i.elements[0])}},filter:t.filter&&{filter(i,n){return t.filter.filter(e(i),n)}}}}(n,i))}setChildren(e,t=Qe.empty(),i={}){this.model.setChildren(e,t,i)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}class D$ extends f${get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}setChildren(e,t=Qe.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new _$(e,t,i)}}class E${get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(e,t,i){this._compressedTreeNodeProvider=e,this.stickyScrollDelegate=t,this.renderer=i,this.templateId=i.templateId,i.onDidChangeTwistieState&&(this.onDidChangeTwistieState=i.onDidChangeTwistieState)}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){let o=this.stickyScrollDelegate.getCompressedNode(e);o||(o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element)),1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){var o,s,r,a;i.compressedTreeNode?null===(s=(o=this.renderer).disposeCompressedElements)||void 0===s||s.call(o,i.compressedTreeNode,t,i.data,n):null===(a=(r=this.renderer).disposeElement)||void 0===a||a.call(r,e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([jL],E$.prototype,"compressedTreeNodeProvider",null);class N${constructor(e){this.modelProvider=e,this.compressedStickyNodes=new Map}getCompressedNode(e){return this.compressedStickyNodes.get(e)}constrainStickyScrollNodes(e,t,i){if(this.compressedStickyNodes.clear(),0===e.length)return[];for(let n=0;ni||n>=t-1&&tthis,r=new N$((()=>this.model));super(e,t,i,n.map((e=>new E$(s,r,e))),{...I$(s,o),stickyScrollDelegate:r})}setChildren(e,t=Qe.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new L$(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}function M$(e){return{...e,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function A$(e,t){return!!t.parent&&(t.parent===e||A$(e,t.parent))}class R${get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new R$(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class P${constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Rl.asClassNameArray(Ml.treeItemLoading)),!0):(t.classList.remove(...Rl.asClassNameArray(Ml.treeItemLoading)),!1)}disposeElement(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function O$(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function F$(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class B$ extends UN{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function W$(e){return e instanceof UN?new B$(e):e}class V${constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){var i,n;null===(n=(i=this.dnd).onDragStart)||void 0===n||n.call(i,W$(e),t)}onDragOver(e,t,i,n,o,s=!0){return this.dnd.onDragOver(W$(e),t&&t.element,i,n,o)}drop(e,t,i,n,o){this.dnd.drop(W$(e),t&&t.element,i,n,o)}onDragEnd(e){var t,i;null===(i=(t=this.dnd).onDragEnd)||void 0===i||i.call(t,e)}dispose(){this.dnd.dispose()}}function H$(e){return e&&{...e,collapseByDefault:!0,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new V$(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent({...t,element:t.element})},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent({...t,element:t.element})}},accessibilityProvider:e.accessibilityProvider&&{...e.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))},filter:e.filter&&{filter(t,i){return e.filter.filter(t.element,i)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{...e.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}},sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),defaultFindVisibility:t=>t.hasChildren&&t.stale?1:"number"==typeof e.defaultFindVisibility?e.defaultFindVisibility:void 0===e.defaultFindVisibility?2:e.defaultFindVisibility(t.element)}}function z$(e,t){t(e),e.children.forEach((e=>z$(e,t)))}class U${get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return _t.map(this.tree.onDidChangeFocus,O$)}get onDidChangeSelection(){return _t.map(this.tree.onDidChangeSelection,O$)}get onMouseDblClick(){return _t.map(this.tree.onMouseDblClick,F$)}get onPointer(){return _t.map(this.tree.onPointer,F$)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(e,t,i,n,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new kt,this._onDidChangeNodeSlowState=new kt,this.nodeMapper=new Bq((e=>new R$(e))),this.disposables=new at,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.getDefaultCollapseState=e=>s.collapseByDefault?s.collapseByDefault(e)?Pq.PreserveOrCollapsed:Pq.PreserveOrExpanded:void 0,this.tree=this.createTree(e,t,i,n,s),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=M$({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(e,t,i,n,o){const s=new Xq(i),r=n.map((e=>new P$(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=H$(o)||{};return new D$(e,t,s,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}async setInput(e,t){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};await this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}async _updateChildren(e=this.root.element,t=!0,i=!1,n,o){if(void 0===this.root.element)throw new Fq(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await _t.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(await this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch(e){}}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}async expand(e,t=!1){if(void 0===this.root.element)throw new Fq(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await _t.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(await this.root.refreshPromise,await _t.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(await this.root.refreshPromise,await _t.toPromise(this._onDidRender.event)),n}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new Fq(this.user,`Data tree node not found: ${e}`);return t}async refreshAndRenderNode(e,t,i,n){await this.refreshNode(e,t,i),this.disposables.isDisposed||this.render(e,i,n)}async refreshNode(e,t,i){let n;return this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&function(e,t){return e===t||A$(e,t)||A$(t,e)}(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||(e!==this.root&&this.tree.getNode(e).collapsed?(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.stale=!0,void this.setChildren(e,[],t,i)):this.doRefreshSubTree(e,t,i))}async doRefreshSubTree(e,t,i){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=await this.doRefreshNode(e,t,i);e.stale=!1,await ti.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}async doRefreshNode(e,t,i){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=this.doGetChildren(e);if(wl(t))n=Promise.resolve(t);else{const i=Kt(800);i.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=t.finally((()=>i.cancel()))}}else n=Promise.resolve(Qe.empty());try{const o=await n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Ne(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}doGetChildren(e){let t=this.refreshPromises.get(e);if(t)return t;const i=this.dataSource.getChildren(e.element);return wl(i)?this.processChildren(i):(t=Wt((async()=>this.processChildren(await i))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(xe))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const t of e.children)s.set(t.element,t),this.identityProvider&&r.set(t.id,{node:t,collapsed:this.tree.hasElement(t)&&this.tree.isCollapsed(t)});const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=M$({element:t,parent:e,hasChildren:o,defaultCollapseState:this.getDefaultCollapseState(t)});return o&&i.defaultCollapseState===Pq.PreserveOrExpanded&&a.push(i),i}const l=this.identityProvider.getId(t).toString(),d=r.get(l);if(d){const e=d.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?d.collapsed?(e.children.forEach((e=>z$(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&!d.collapsed&&a.push(e),e}const c=M$({element:t,parent:e,id:l,hasChildren:o,defaultCollapseState:this.getDefaultCollapseState(t)});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(c),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(c),(n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1||o&&c.defaultCollapseState===Pq.PreserveOrExpanded)&&a.push(c),c}));for(const e of s.values())z$(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].forceExpanded=!0,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&{...i,diffIdentityProvider:i.diffIdentityProvider&&{getId(e){return i.diffIdentityProvider.getId(e.element)}}};this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:e.forceExpanded?(i=!1,e.forceExpanded=!1):i=e.defaultCollapseState,{element:e,children:e.hasChildren?Qe.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose(),this.tree.dispose()}}class K${get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new K$(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(e){this.node=e}}class j${constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...Rl.asClassNameArray(Ml.treeItemLoading)),!0):(t.classList.remove(...Rl.asClassNameArray(Ml.treeItemLoading)),!1)}disposeElement(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeElement)||void 0===s||s.call(o,this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){var o,s;null===(s=(o=this.renderer).disposeCompressedElements)||void 0===s||s.call(o,this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=ot(this.disposables)}}class q$ extends U${constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new Bq((e=>new K$(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new Xq(i),r=n.map((e=>new j$(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&H$(e);return t&&{...t,keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{...t.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))}}}}(o)||{};return new T$(e,t,s,r,a)}asTreeElement(e,t){return{incompressible:this.compressionDelegate.isIncompressible(e.element),...super.asTreeElement(e,t)}}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t,i){if(!this.identityProvider)return super.render(e,t);const n=e=>this.identityProvider.getId(e).toString(),o=e=>{const t=new Set;for(const i of e){const e=this.tree.getCompressedTreeNode(i===this.root?null:i);if(e.element)for(const i of e.element.elements)t.add(n(i.element))}return t},s=o(this.tree.getSelection()),r=o(this.tree.getFocus());super.render(e,t,i);const a=this.getSelection();let l=!1;const d=this.getFocus();let c=!1;const h=e=>{const t=e.element;if(t)for(let e=0;e{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:Wq(i)?Vq(i.visibility):Vq(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class $$ extends f${constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,i){return new _$(e,t,i)}}new gc("isMac",K,v(0,"Whether the operating system is macOS")),new gc("isLinux",j,v(0,"Whether the operating system is Linux"));const G$=new gc("isWindows",U,v(0,"Whether the operating system is Windows")),Z$=new gc("isWeb",$,v(0,"Whether the platform is a web browser")),Y$=(new gc("isMacNative",K&&!$,v(0,"Whether the operating system is macOS on a non-browser platform")),new gc("isIOS",Z,v(0,"Whether the operating system is iOS")),new gc("isMobile",Y,v(0,"Whether the platform is a mobile web browser")),new gc("isDevelopment",!1,!0),new gc("productQualityType","",v(0,"Quality type of VS Code")),"inputFocus"),Q$=new gc(Y$,!1,v(0,"Whether keyboard focus is inside an input box"));var X$=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},J$=function(e,t){return function(i,n){t(i,n,e)}};const eG=vd("listService"),tG=new gc("listScrollAtBoundary","none"),iG=($d.or(tG.isEqualTo("top"),tG.isEqualTo("both")),$d.or(tG.isEqualTo("bottom"),tG.isEqualTo("both")),new gc("listFocus",!0)),nG=new gc("treestickyScrollFocused",!1),oG=new gc("listSupportsMultiselect",!0),sG=$d.and(iG,$d.not(Y$),nG.negate()),rG=new gc("listHasSelectionOrFocus",!1),aG=new gc("listDoubleSelection",!1),lG=new gc("listMultiSelection",!1),dG=new gc("listSelectionNavigation",!1),cG=new gc("listSupportsFind",!0),hG=new gc("treeElementCanCollapse",!1),uG=new gc("treeElementHasParent",!1),gG=new gc("treeElementCanExpand",!1),pG=new gc("treeElementHasChild",!1),mG=new gc("treeFindOpen",!1),fG="listTypeNavigationMode",_G="listAutomaticKeyboardNavigation";function vG(e,t){const i=e.createScoped(t.getHTMLElement());return iG.bindTo(i),i}function bG(e,t){const i=tG.bindTo(e),n=()=>{const e=0===t.scrollTop,n=t.scrollHeight-t.renderHeight-t.scrollTop<1;e&&n?i.set("both"):e?i.set("top"):n?i.set("bottom"):i.set("none")};return n(),t.onDidScroll(n)}const wG="workbench.list.multiSelectModifier",CG="workbench.list.openMode",yG="workbench.list.horizontalScrolling",SG="workbench.list.defaultFindMode",kG="workbench.list.typeNavigationMode",xG="workbench.list.keyboardNavigation",LG="workbench.list.scrollByPage",DG="workbench.list.defaultFindMatchType",EG="workbench.tree.indent",NG="workbench.tree.renderIndentGuides",IG="workbench.list.smoothScrolling",TG="workbench.list.mouseWheelScrollSensitivity",MG="workbench.list.fastScrollSensitivity",AG="workbench.tree.expandMode",RG="workbench.tree.enableStickyScroll",PG="workbench.tree.stickyScrollMaxItemCount";function OG(e){return"alt"===e.getValue(wG)}class FG extends lt{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=OG(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(wG)&&(this.useAltAsMultipleSelectionModifier=OG(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:nT(e)}isSelectionRangeChangeEvent(e){return oT(e)}}function BG(e,t){var i;const n=e.get(Cg),o=e.get(uD),s=new at;return[{...t,keyboardNavigationDelegate:{mightProducePrintableCharacter(e){return o.mightProducePrintableCharacter(e)}},smoothScrolling:Boolean(n.getValue(IG)),mouseWheelScrollSensitivity:n.getValue(TG),fastScrollSensitivity:n.getValue(MG),multipleSelectionController:null!==(i=t.multipleSelectionController)&&void 0!==i?i:s.add(new FG(n)),keyboardNavigationEventFilter:qG(o),scrollByPage:Boolean(n.getValue(LG))},s]}let WG=class extends mT{constructor(e,t,i,n,o,s,r,a,l){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(a.getValue(yG)),[c,h]=l.invokeFunction(BG,o);super(e,t,i,n,{keyboardSupport:!1,...c,horizontalScrolling:d}),this.disposables.add(h),this.contextKeyService=vG(s,this),this.disposables.add(bG(this.contextKeyService,this)),this.listSupportsMultiSelect=oG.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),dG.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=rG.bindTo(this.contextKeyService),this.listDoubleSelection=aG.bindTo(this.contextKeyService),this.listMultiSelection=lG.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=OG(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(wG)&&(this._useAltAsMultipleSelectionModifier=OG(a));let t={};if(e.affectsConfiguration(yG)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(yG));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(LG)){const e=Boolean(a.getValue(LG));t={...t,scrollByPage:e}}if(e.affectsConfiguration(IG)){const e=Boolean(a.getValue(IG));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(TG)){const e=a.getValue(TG);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(MG)){const e=a.getValue(MG);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new UG(this,{configurationService:a,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?JT(e):XT)}};WG=X$([J$(5,pc),J$(6,eG),J$(7,Cg),J$(8,_d)],WG);let VG=class extends eq{constructor(e,t,i,n,o,s,r,a,l){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(a.getValue(yG)),[c,h]=l.invokeFunction(BG,o);super(e,t,i,n,{keyboardSupport:!1,...c,horizontalScrolling:d}),this.disposables=new at,this.disposables.add(h),this.contextKeyService=vG(s,this),this.disposables.add(bG(this.contextKeyService,this.widget)),this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=oG.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport),dG.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=OG(a),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),this.updateStyles(o.overrideStyles),this.disposables.add(a.onDidChangeConfiguration((e=>{e.affectsConfiguration(wG)&&(this._useAltAsMultipleSelectionModifier=OG(a));let t={};if(e.affectsConfiguration(yG)&&void 0===this.horizontalScrolling){const e=Boolean(a.getValue(yG));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(LG)){const e=Boolean(a.getValue(LG));t={...t,scrollByPage:e}}if(e.affectsConfiguration(IG)){const e=Boolean(a.getValue(IG));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(TG)){const e=a.getValue(TG);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(MG)){const e=a.getValue(MG);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new UG(this,{configurationService:a,...o}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?JT(e):XT)}dispose(){this.disposables.dispose(),super.dispose()}};VG=X$([J$(5,pc),J$(6,eG),J$(7,Cg),J$(8,_d)],VG);let HG=class extends pq{constructor(e,t,i,n,o,s,r,a,l,d){const c=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(l.getValue(yG)),[h,u]=d.invokeFunction(BG,s);super(e,t,i,n,o,{keyboardSupport:!1,...h,horizontalScrolling:c}),this.disposables.add(u),this.contextKeyService=vG(r,this),this.disposables.add(bG(this.contextKeyService,this)),this.listSupportsMultiSelect=oG.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport),dG.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=rG.bindTo(this.contextKeyService),this.listDoubleSelection=aG.bindTo(this.contextKeyService),this.listMultiSelection=lG.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=OG(l),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(wG)&&(this._useAltAsMultipleSelectionModifier=OG(l));let t={};if(e.affectsConfiguration(yG)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(yG));t={...t,horizontalScrolling:e}}if(e.affectsConfiguration(LG)){const e=Boolean(l.getValue(LG));t={...t,scrollByPage:e}}if(e.affectsConfiguration(IG)){const e=Boolean(l.getValue(IG));t={...t,smoothScrolling:e}}if(e.affectsConfiguration(TG)){const e=l.getValue(TG);t={...t,mouseWheelScrollSensitivity:e}}if(e.affectsConfiguration(MG)){const e=l.getValue(MG);t={...t,fastScrollSensitivity:e}}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new KG(this,{configurationService:l,...s}),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),void 0!==e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){this.style(e?JT(e):XT)}dispose(){this.disposables.dispose(),super.dispose()}};HG=X$([J$(6,pc),J$(7,eG),J$(8,Cg),J$(9,_d)],HG);class zG extends lt{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new kt),this.onDidOpen=this._onDidOpen.event,this._register(_t.filter(this.widget.onDidChangeSelection,(e=>hr(e.browserEvent)))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(CG)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(CG)&&(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(CG)))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class UG extends zG{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class KG extends zG{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class jG extends zG{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function qG(e){let t=!1;return i=>{if(i.toKeyCodeChord().isModifierKey())return!1;if(t)return t=!1,!1;const n=e.softDispatch(i,i.target);return 1===n.kind?(t=!0,!1):(t=!1,0===n.kind)}}let $G=class extends D${constructor(e,t,i,n,o,s,r,a,l){const{options:d,getTypeNavigationMode:c,disposable:h}=s.invokeFunction(eZ,o);super(e,t,i,n,d),this.disposables.add(h),this.internals=new tZ(this,o,c,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};$G=X$([J$(5,_d),J$(6,pc),J$(7,eG),J$(8,Cg)],$G);let GG=class extends T${constructor(e,t,i,n,o,s,r,a,l){const{options:d,getTypeNavigationMode:c,disposable:h}=s.invokeFunction(eZ,o);super(e,t,i,n,d),this.disposables.add(h),this.internals=new tZ(this,o,c,o.overrideStyles,r,a,l),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};GG=X$([J$(5,_d),J$(6,pc),J$(7,eG),J$(8,Cg)],GG);let ZG=class extends $${constructor(e,t,i,n,o,s,r,a,l,d){const{options:c,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(eZ,s);super(e,t,i,n,o,c),this.disposables.add(u),this.internals=new tZ(this,s,h,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),void 0!==e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};ZG=X$([J$(6,_d),J$(7,pc),J$(8,eG),J$(9,Cg)],ZG);let YG=class extends U${get onDidOpen(){return this.internals.onDidOpen}constructor(e,t,i,n,o,s,r,a,l,d){const{options:c,getTypeNavigationMode:h,disposable:u}=r.invokeFunction(eZ,s);super(e,t,i,n,o,c),this.disposables.add(u),this.internals=new tZ(this,s,h,s.overrideStyles,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};YG=X$([J$(6,_d),J$(7,pc),J$(8,eG),J$(9,Cg)],YG);let QG=class extends q${constructor(e,t,i,n,o,s,r,a,l,d,c){const{options:h,getTypeNavigationMode:u,disposable:g}=a.invokeFunction(eZ,r);super(e,t,i,n,o,s,h),this.disposables.add(g),this.internals=new tZ(this,r,u,r.overrideStyles,l,d,c),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function XG(e){const t=e.getValue(SG);if("highlight"===t)return Kq.Highlight;if("filter"===t)return Kq.Filter;const i=e.getValue(xG);return"simple"===i||"highlight"===i?Kq.Highlight:"filter"===i?Kq.Filter:void 0}function JG(e){const t=e.getValue(DG);return"fuzzy"===t?jq.Fuzzy:"contiguous"===t?jq.Contiguous:void 0}function eZ(e,t){var i;const n=e.get(Cg),o=e.get(cD),s=e.get(pc),r=e.get(_d),a=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(yG)),[l,d]=r.invokeFunction(BG,t),c=t.paddingBottom,h=void 0!==t.renderIndentGuides?t.renderIndentGuides:n.getValue(NG);return{getTypeNavigationMode:()=>{const e=s.getContextKeyValue(fG);if("automatic"===e)return VI.Automatic;if("trigger"===e)return VI.Trigger;if(!1===s.getContextKeyValue(_G))return VI.Trigger;const t=n.getValue(kG);return"automatic"===t?VI.Automatic:"trigger"===t?VI.Trigger:void 0},disposable:d,options:{keyboardSupport:!1,...l,indent:"number"==typeof n.getValue(EG)?n.getValue(EG):void 0,renderIndentGuides:h,smoothScrolling:Boolean(n.getValue(IG)),defaultFindMode:XG(n),defaultFindMatchType:JG(n),horizontalScrolling:a,scrollByPage:Boolean(n.getValue(LG)),paddingBottom:c,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(i=t.expandOnlyOnTwistieClick)&&void 0!==i?i:"doubleClick"===n.getValue(AG),contextViewProvider:o,findWidgetStyles:YT,enableStickyScroll:Boolean(n.getValue(RG)),stickyScrollMaxItemCount:Number(n.getValue(PG))}}}QG=X$([J$(7,_d),J$(8,pc),J$(9,eG),J$(10,Cg)],QG);let tZ=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(e,t,i,n,o,s,r){var a;this.tree=e,this.disposables=[],this.contextKeyService=vG(o,e),this.disposables.push(bG(this.contextKeyService,e)),this.listSupportsMultiSelect=oG.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport),dG.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.listSupportFindWidget=cG.bindTo(this.contextKeyService),this.listSupportFindWidget.set(null===(a=t.findWidgetEnabled)||void 0===a||a),this.hasSelectionOrFocus=rG.bindTo(this.contextKeyService),this.hasDoubleSelection=aG.bindTo(this.contextKeyService),this.hasMultiSelection=lG.bindTo(this.contextKeyService),this.treeElementCanCollapse=hG.bindTo(this.contextKeyService),this.treeElementHasParent=uG.bindTo(this.contextKeyService),this.treeElementCanExpand=gG.bindTo(this.contextKeyService),this.treeElementHasChild=pG.bindTo(this.contextKeyService),this.treeFindOpen=mG.bindTo(this.contextKeyService),this.treeStickyScrollFocused=nG.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=OG(r),this.updateStyleOverrides(n);const l=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))},d=new Set;d.add(fG),d.add(_G),this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),l()})),e.onDidChangeCollapseState(l),e.onDidChangeModel(l),e.onDidChangeFindOpenState((e=>this.treeFindOpen.set(e))),e.onDidChangeStickyScrollFocused((e=>this.treeStickyScrollFocused.set(e))),r.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(wG)&&(this._useAltAsMultipleSelectionModifier=OG(r)),n.affectsConfiguration(EG)){const e=r.getValue(EG);o={...o,indent:e}}if(n.affectsConfiguration(NG)&&void 0===t.renderIndentGuides){const e=r.getValue(NG);o={...o,renderIndentGuides:e}}if(n.affectsConfiguration(IG)){const e=Boolean(r.getValue(IG));o={...o,smoothScrolling:e}}if(n.affectsConfiguration(SG)||n.affectsConfiguration(xG)){const e=XG(r);o={...o,defaultFindMode:e}}if(n.affectsConfiguration(kG)||n.affectsConfiguration(xG)){const e=i();o={...o,typeNavigationMode:e}}if(n.affectsConfiguration(DG)){const e=JG(r);o={...o,defaultFindMatchType:e}}if(n.affectsConfiguration(yG)&&void 0===t.horizontalScrolling){const e=Boolean(r.getValue(yG));o={...o,horizontalScrolling:e}}if(n.affectsConfiguration(LG)){const e=Boolean(r.getValue(LG));o={...o,scrollByPage:e}}if(n.affectsConfiguration(AG)&&void 0===t.expandOnlyOnTwistieClick&&(o={...o,expandOnlyOnTwistieClick:"doubleClick"===r.getValue(AG)}),n.affectsConfiguration(RG)){const e=r.getValue(RG);o={...o,enableStickyScroll:e}}if(n.affectsConfiguration(PG)){const e=Math.max(1,r.getValue(PG));o={...o,stickyScrollMaxItemCount:e}}if(n.affectsConfiguration(TG)){const e=r.getValue(TG);o={...o,mouseWheelScrollSensitivity:e}}if(n.affectsConfiguration(MG)){const e=r.getValue(MG);o={...o,fastScrollSensitivity:e}}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(d)&&e.updateOptions({typeNavigationMode:i()})}))),this.navigator=new jG(e,{configurationService:r,...t}),this.disposables.push(this.navigator)}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){this.tree.style(e?JT(e):XT)}dispose(){this.disposables=ot(this.disposables)}};tZ=X$([J$(4,pc),J$(5,eG),J$(6,Cg)],tZ),xc.as(Rg).registerConfiguration({id:"workbench",order:7,title:v(0,"Workbench"),type:"object",properties:{[wG]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[v(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),v(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:v(0,"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[CG]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:v(0,"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[yG]:{type:"boolean",default:!1,description:v(0,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[LG]:{type:"boolean",default:!1,description:v(0,"Controls whether clicks in the scrollbar scroll page by page.")},[EG]:{type:"number",default:8,minimum:4,maximum:40,description:v(0,"Controls tree indentation in pixels.")},[NG]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:v(0,"Controls whether the tree should render indent guides.")},[IG]:{type:"boolean",default:!1,description:v(0,"Controls whether lists and trees have smooth scrolling.")},[TG]:{type:"number",default:1,markdownDescription:v(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[MG]:{type:"number",default:5,markdownDescription:v(0,"Scrolling speed multiplier when pressing `Alt`.")},[SG]:{type:"string",enum:["highlight","filter"],enumDescriptions:[v(0,"Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),v(0,"Filter elements when searching.")],default:"highlight",description:v(0,"Controls the default find mode for lists and trees in the workbench.")},[xG]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[v(0,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),v(0,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),v(0,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:v(0,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:!0,deprecationMessage:v(0,"Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[DG]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[v(0,"Use fuzzy matching when searching."),v(0,"Use contiguous matching when searching.")],default:"fuzzy",description:v(0,"Controls the type of matching used when searching lists and trees in the workbench.")},[AG]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:v(0,"Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[RG]:{type:"boolean",default:!0,description:v(0,"Controls whether sticky scrolling is enabled in trees.")},[PG]:{type:"number",minimum:1,default:7,markdownDescription:v(0,"Controls the number of sticky elements displayed in the tree when `#workbench.tree.enableStickyScroll#` is enabled.")},[kG]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:v(0,"Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run.")}}});class iZ{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=Fx.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?v(0,"{0} in {1} on line {2} at column {3}",t.value,Jl(this.uri),this.range.startLineNumber,this.range.startColumn):v(0,"in {0} on line {1} at column {2}",Jl(this.uri),this.range.startLineNumber,this.range.startColumn)}}class nZ{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new hh(n,a.startColumn,n,o),d=new hh(s,r,s,1073741824),c=i.getValueInRange(l).replace(/^\s+/,""),h=i.getValueInRange(e);return{value:c+h+i.getValueInRange(d).replace(/\s+$/,""),highlight:{start:c.length,end:c.length+h.length}}}}class oZ{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new da}dispose(){ot(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?v(0,"1 symbol in {0}, full path {1}",Jl(this.uri),this.uri.fsPath):v(0,"{0} symbols in {1}, full path {2}",e,Jl(this.uri),this.uri.fsPath)}async resolve(e){if(0!==this._previews.size)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new nZ(i))}catch(e){xe(e)}return this}}class sZ{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new kt,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(sZ._compareReferences);for(const t of e)if(n&&Yl.isEqual(n.uri,t.uri,!0)||(n=new oZ(this,t.uri),this.groups.push(n)),0===n.children.length||0!==sZ._compareReferences(t,n.children[n.children.length-1])){const e=new iZ(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){ot(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new sZ(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?v(0,"No results found"):1===this.references.length?v(0,"Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?v(0,"Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):v(0,"Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+10?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:Nn(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.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()&&hh.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 Yl.compare(e.uri,t.uri)||hh.compareRangesUsingStarts(e.range,t.range)}}var rZ=i(5982),aZ={};aZ.styleTagTransform=Gr(),aZ.setAttributes=Kr(),aZ.insert=zr().bind(null,"head"),aZ.domAPI=Vr(),aZ.insertStyleElement=qr(),Br()(rZ.Z,aZ),rZ.Z&&rZ.Z.locals&&rZ.Z.locals;var lZ=i(5202),dZ={};dZ.styleTagTransform=Gr(),dZ.setAttributes=Kr(),dZ.insert=zr().bind(null,"head"),dZ.domAPI=Vr(),dZ.insertStyleElement=qr(),Br()(lZ.Z,dZ),lZ.Z&&lZ.Z.locals&&lZ.Z.locals;class cZ{constructor(e,t,i){this.options=t,this.styles=i,this.count=0,this.element=_r(e,Sr(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){var e,t;this.element.textContent=dn(this.countFormat,this.count),this.element.title=dn(this.titleFormat,this.count),this.element.style.backgroundColor=null!==(e=this.styles.badgeBackground)&&void 0!==e?e:"",this.element.style.color=null!==(t=this.styles.badgeForeground)&&void 0!==t?t:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}class hZ extends lt{constructor(e,t){var i;super(),this.options=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=_r(e,Sr("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=hZ.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&Lh(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){var e,t,i,n;const o=[];let s=0;for(const e of this.highlights){if(e.end===e.start)continue;if(s{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}var uZ=i(8429),gZ={};gZ.styleTagTransform=Gr(),gZ.setAttributes=Kr(),gZ.insert=zr().bind(null,"head"),gZ.domAPI=Vr(),gZ.insertStyleElement=qr(),Br()(uZ.Z,gZ),uZ.Z&&uZ.Z.locals&&uZ.Z.locals;class pZ{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class mZ extends lt{constructor(e,t){var i;super(),this.customHovers=new Map,this.creationOptions=t,this.domNode=this._register(new pZ(_r(e,Sr(".monaco-icon-label")))),this.labelContainer=_r(this.domNode.element,Sr(".monaco-icon-label-container")),this.nameContainer=_r(this.labelContainer,Sr("span.monaco-icon-name-container")),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=this._register(new _Z(this.nameContainer,!!t.supportIcons)):this.nameNode=new fZ(this.nameContainer),this.hoverDelegate=null!==(i=null==t?void 0:t.hoverDelegate)&&void 0!==i?i:QL("mouse")}get element(){return this.domNode.element}setLabel(e,t,i){var n;const o=["monaco-icon-label"],s=["monaco-icon-label-container"];let r="";i&&(i.extraClasses&&o.push(...i.extraClasses),i.italic&&o.push("italic"),i.strikethrough&&o.push("strikethrough"),i.disabledCommand&&s.push("disabled"),i.title&&("string"==typeof i.title?r+=i.title:r+=e));const a=this.domNode.element.querySelector(".monaco-icon-label-iconpath");if(null==i?void 0:i.iconPath){let e;a&&lr(a)?e=a:(e=Sr(".monaco-icon-label-iconpath"),this.domNode.element.prepend(e)),e.style.backgroundImage=Er(null==i?void 0:i.iconPath)}else a&&a.remove();if(this.domNode.className=o.join(" "),this.domNode.element.setAttribute("aria-label",r),this.labelContainer.className=s.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),t||this.descriptionNode){const e=this.getOrCreateDescriptionNode();e instanceof hZ?(e.set(t||"",i?i.descriptionMatches:void 0,void 0,null==i?void 0:i.labelEscapeNewLines),this.setupHover(e.element,null==i?void 0:i.descriptionTitle)):(e.textContent=t&&(null==i?void 0:i.labelEscapeNewLines)?hZ.escapeNewLines(t,[]):t||"",this.setupHover(e.element,(null==i?void 0:i.descriptionTitle)||""),e.empty=!t)}((null==i?void 0:i.suffix)||this.suffixNode)&&(this.getOrCreateSuffixNode().textContent=null!==(n=null==i?void 0:i.suffix)&&void 0!==n?n:"")}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate.showNativeHover){function n(e,t){fl(t)?e.title=Wl(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}n(e,t)}else{const o=iD().setupUpdatableHover(this.hoverDelegate,e,t);o&&this.customHovers.set(e,o)}else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const i=this._register(new pZ((e=this.nameContainer,t=Sr("span.monaco-icon-suffix-container"),e.after(t),t)));this.suffixNode=this._register(new pZ(_r(i.element,Sr("span.label-suffix"))))}var e,t;return this.suffixNode}getOrCreateDescriptionNode(){var e;if(!this.descriptionNode){const t=this._register(new pZ(_r(this.labelContainer,Sr("span.monaco-icon-description-container"))));(null===(e=this.creationOptions)||void 0===e?void 0:e.supportDescriptionHighlights)?this.descriptionNode=this._register(new hZ(_r(t.element,Sr("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})):this.descriptionNode=this._register(new pZ(_r(t.element,Sr("span.label-description"))))}return this.descriptionNode}}class fZ{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Lh(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=_r(this.container,Sr("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const o={start:n,end:n+e.length},s=i.map((e=>DN.intersect(o,e))).filter((e=>!DN.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}(e,i,null==t?void 0:t.matches);for(let o=0;o=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},CZ=function(e,t){return function(i,n){t(i,n,e)}};let yZ=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof sZ||e instanceof oZ}getChildren(e){if(e instanceof sZ)return e.groups;if(e instanceof oZ)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};yZ=wZ([CZ(0,yd)],yZ);class SZ{getHeight(){return 23}getTemplateId(e){return e instanceof oZ?DZ.id:NZ.id}}let kZ=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof iZ){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return Jl(e.uri)}};kZ=wZ([CZ(0,uD)],kZ);class xZ{getId(e){return e instanceof iZ?e.id:e.uri}}let LZ=class extends lt{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new mZ(i,{supportHighlights:!0})),this.badge=new cZ(_r(i,Sr(".count")),{},QT),e.appendChild(i)}set(e,t){const i=td(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 n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(v(0,"{0} references",n)):this.badge.setTitleFormat(v(0,"{0} reference",n))}};LZ=wZ([CZ(1,vZ)],LZ);let DZ=bZ=class{constructor(e){this._instantiationService=e,this.templateId=bZ.id}renderTemplate(e){return this._instantiationService.createInstance(LZ,e)}renderElement(e,t,i){i.set(e.element,Ya(e.filterData))}disposeTemplate(e){e.dispose()}};DZ.id="FileReferencesRenderer",DZ=bZ=wZ([CZ(0,_d)],DZ);class EZ extends lt{constructor(e){super(),this.label=this._register(new hZ(e))}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!cl.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,Ya(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${Jl(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class NZ{constructor(){this.templateId=NZ.id}renderTemplate(e){return new EZ(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(e){e.dispose()}}NZ.id="OneReferenceRenderer";class IZ{getWidgetAriaLabel(){return v(0,"References")}getAriaLabel(e){return e.ariaMessage}}var TZ=function(e,t){return function(i,n){t(i,n,e)}};class MZ{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new at,this._callOnModelChange=new at,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())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n{const o=n.deltaDecorations([],t);for(let t=0;t{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(RZ,"ReferencesWidget",this._treeContainer,new SZ,[this._instantiationService.createInstance(DZ),this._instantiationService.createInstance(NZ)],this._instantiationService.createInstance(yZ),t),this._splitView.addView({onDidChange:_t.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},lq.Distribute),this._splitView.addView({onDidChange:_t.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},lq.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));const i=(e,t)=>{e instanceof iZ&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),xr(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Ms(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=v(0,"No results"),kr(this._messageContainer),Promise.resolve(void 0)):(xr(this._messageContainer),this._decorationsManager=new MZ(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(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),kr(this._treeContainer),kr(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof iZ?e:e instanceof oZ&&e.children.length>0?e.children[0]:void 0}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==qo.inMemory?this.setTitle(Xl(e.uri),this._uriLabel.getUriLabel(td(e.uri))):this.setTitle(v(0,"References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent)),this._tree.reveal(e);const n=await i;if(!this._model)return void n.dispose();ot(this._previewModelReference);const o=n.object;if(o){const t=this._preview.getModel()===o.textEditorModel?0:1,i=hh.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(o.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};PZ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([TZ(3,Vv),TZ(4,yd),TZ(5,_d),TZ(6,Hj),TZ(7,vZ),TZ(8,yy),TZ(9,uD),TZ(10,Mu),TZ(11,sp)],PZ);var OZ,FZ=function(e,t){return function(i,n){t(i,n,e)}};const BZ=new gc("referenceSearchVisible",!1,v(0,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let WZ=OZ=class{static get(e){return e.getContribution(OZ.ID)}constructor(e,t,i,n,o,s,r,a){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=r,this._configurationService=a,this._disposables=new at,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=BZ.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))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=AZ.fromJSON(this._storageService.get(o,0,"{}"));this._widget=this._instantiationService.createInstance(PZ,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(v(0,"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((e=>{const{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t,!0):this.openReference(t,!1,!0)}})));const r=++this._requestIdPool;t.then((t=>{var i;if(r===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v(0,"{0} ({1})",this._model.title,this._model.references.length));const t=this._editor.getModel().uri,i=new wd(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(87)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){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 n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}async revealReference(e){this._editor.hasModel()&&this._model&&this._widget&&await this._widget.revealReference(e)}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||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;null===(i=this._widget)||void 0===i||i.hide(),this._ignoreModelChangeEvent=!0;const n=hh.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then((e=>{var t;if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(n),this._widget.focusOnReferenceTree();else{const i=OZ.get(e),o=this._model.clone();this.closeWidget(),e.focus(),null==i||i.toggleWidget(n,Wt((e=>Promise.resolve(o))),null!==(t=this._peekMode)&&void 0!==t&&t)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,xe(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function VZ(e,t){const i=function(e){const t=e.get(bd).getFocusedCodeEditor();return t instanceof Ej?t.getParentEditor():t}(e);if(!i)return;const n=WZ.get(i);n&&t(n)}WZ.ID="editor.contrib.referencesController",WZ=OZ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([FZ(2,pc),FZ(3,bd),FZ(4,fD),FZ(5,_d),FZ(6,vW),FZ(7,Cg)],WZ),Dc.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Se(2089,60),when:$d.or(BZ,zj.inPeekEditor),handler(e){VZ(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),Dc.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:$d.or(BZ,zj.inPeekEditor),handler(e){VZ(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),Dc.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:$d.or(BZ,zj.inPeekEditor),handler(e){VZ(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),Id.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),Id.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),Id.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),Id.registerCommand("closeReferenceSearch",(e=>VZ(e,(e=>e.closeWidget())))),Dc.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:$d.and(zj.inPeekEditor,$d.not("config.editor.stablePeek"))}),Dc.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:$d.and(BZ,$d.not("config.editor.stablePeek"),$d.or(gh.editorTextFocus,Q$.negate()))}),Dc.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:$d.and(BZ,sG,hG.negate(),gG.negate()),handler(e){var t;const i=null===(t=e.get(eG).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof iZ&&VZ(e,(e=>e.revealReference(i[0])))}}),Dc.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:$d.and(BZ,sG,hG.negate(),gG.negate()),handler(e){var t;const i=null===(t=e.get(eG).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof iZ&&VZ(e,(e=>e.openReference(i[0],!0,!0)))}}),Id.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(eG).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof iZ&&VZ(e,(e=>e.openReference(i[0],!1,!0)))}));var HZ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},zZ=function(e,t){return function(i,n){t(i,n,e)}};const UZ=new gc("hasSymbols",!1,v(0,"Whether there are symbol locations that can be navigated via keyboard-only.")),KZ=vd("ISymbolNavigationService");let jZ=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=UZ.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new qZ(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const e of t.references)if(Ql(e.uri,n.uri))s=!0,r=r||hh.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=st(i,n)}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:hh.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?v(0,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):v(0,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};jZ=HZ([zZ(0,pc),zZ(1,bd),zZ(2,fD),zZ(3,uD)],jZ),Ng(KZ,jZ,1),th(new class extends Yc{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:UZ,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(KZ).revealNext(t)}}),Dc.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:UZ,primary:9,handler(e){e.get(KZ).reset()}});let qZ=class{constructor(e){this._listener=new Map,this._disposables=new at,this._onDidChange=new kt,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(),ot(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,st(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};function $Z(e,t){return t.uri.scheme===e.uri.scheme||!Go(t.uri,qo.walkThroughSnippet,qo.vscodeChatCodeBlock,qo.vscodeChatCodeCompareBlock,qo.vscodeCopilotBackingChatCodeBlock)}async function GZ(e,t,i,n){const o=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{Le(e)}))));return jh((await Promise.all(o)).flat()).filter((t=>$Z(e,t)))}function ZZ(e,t,i,n){return GZ(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function YZ(e,t,i,n){return GZ(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function QZ(e,t,i,n){return GZ(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function XZ(e,t,i,n){return GZ(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function JZ(e,t,i,n,o){return GZ(t,i,e,(async(e,t,i)=>{var s,r;const a=null===(s=await e.provideReferences(t,i,{includeDeclaration:!0},o))||void 0===s?void 0:s.filter((e=>$Z(t,e)));if(!n||!a||2!==a.length)return a;const l=null===(r=await e.provideReferences(t,i,{includeDeclaration:!1},o))||void 0===r?void 0:r.filter((e=>$Z(t,e)));return l&&1===l.length?l:a}))}async function eY(e){const t=await e(),i=new sZ(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}var tY,iY,nY,oY,sY,rY,aY,lY;qZ=HZ([zZ(0,bd)],qZ),eh("_executeDefinitionProvider",((e,t,i)=>{const n=ZZ(e.get(Pk).definitionProvider,t,i,At.None);return eY((()=>n))})),eh("_executeTypeDefinitionProvider",((e,t,i)=>{const n=XZ(e.get(Pk).typeDefinitionProvider,t,i,At.None);return eY((()=>n))})),eh("_executeDeclarationProvider",((e,t,i)=>{const n=YZ(e.get(Pk).declarationProvider,t,i,At.None);return eY((()=>n))})),eh("_executeReferenceProvider",((e,t,i)=>{const n=JZ(e.get(Pk).referenceProvider,t,i,!1,At.None);return eY((()=>n))})),eh("_executeImplementationProvider",((e,t,i)=>{const n=QZ(e.get(Pk).implementationProvider,t,i,At.None);return eY((()=>n))})),Pc.appendMenuItem(Mc.EditorContext,{submenu:Mc.EditorContextPeek,title:v(0,"Peek"),group:"navigation",order:100});class dY{static is(e){return!(!e||"object"!=typeof e)&&(e instanceof dY||!(!wd.isIPosition(e.position)||!e.model))}constructor(e,t){this.model=e,this.position=t}}class cY extends Jc{static all(){return cY._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of Qe.wrap(t.menu))i.id!==Mc.EditorContext&&i.id!==Mc.EditorContextPeek||(i.when=$d.and(e.precondition,i.when));return t}constructor(e,t){super(cY._patchConfig(t)),this.configuration=e,cY._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const o=e.get(fD),s=e.get(bd),r=e.get(WL),a=e.get(KZ),l=e.get(Pk),d=e.get(_d),c=t.getModel(),h=t.getPosition(),u=dY.is(i)?i:new dY(c,h),g=new Cx(t,5),p=Vt(this._getLocationModel(l,u.model,u.position,g.token),g.token).then((async e=>{var o;if(!e||g.token.isCancellationRequested)return;let r;if(na(e.ariaMessage),e.referenceAt(c.uri,h)){const e=this._getAlternativeCommand(t);!cY._activeAlternativeCommands.has(e)&&cY._allSymbolNavigationCommands.has(e)&&(r=cY._allSymbolNavigationCommands.get(e))}const l=e.references.length;if(0===l){if(!this.configuration.muteMessage){const e=c.getWordAtPosition(h);null===(o=RL.get(t))||void 0===o||o.showMessage(this._getNoResultFoundMessage(e),h)}}else{if(1!==l||!r)return this._onResult(s,a,t,e,n);cY._activeAlternativeCommands.add(this.desc.id),d.invokeFunction((e=>r.runEditorCommand(e,t,i,n).finally((()=>{cY._activeAlternativeCommands.delete(this.desc.id)}))))}}),(e=>{o.error(e)})).finally((()=>{g.dispose()}));return r.showWhile(p,250),p}async _onResult(e,t,i,n,o){const s=this._getGoToPreference(i);if(i instanceof Ej||!(this.configuration.openInPeek||"peek"===s&&n.references.length>1)){const r=n.firstReference(),a=n.references.length>1&&"gotoAndPeek"===s,l=await this._openReference(i,e,r,this.configuration.openToSide,!a);a&&l?this._openInPeek(l,n,o):n.dispose(),"goto"===s&&t.put(r)}else this._openInPeek(i,n,o)}async _openReference(e,t,i,n,o){let s;var r;if((r=i)&&Po.isUri(r.uri)&&hh.isIRange(r.range)&&(hh.isIRange(r.originSelectionRange)||hh.isIRange(r.targetSelectionRange))&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const a=await t.openCodeEditor({resource:i.uri,options:{selection:hh.collapseToStart(s),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(o){const e=a.getModel(),t=a.createDecorationsCollection([{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{a.getModel()===e&&t.clear()}),350)}return a}}_openInPeek(e,t,i){const n=WZ.get(e);n&&e.hasModel()?n.toggleWidget(null!=i?i:e.getSelection(),Wt((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}cY._allSymbolNavigationCommands=new Map,cY._activeAlternativeCommands=new Set;class hY extends cY{async _getLocationModel(e,t,i,n){return new sZ(await ZZ(e.definitionProvider,t,i,n),v(0,"Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?v(0,"No definition found for '{0}'",e.word):v(0,"No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}Wc(((tY=class extends hY{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:tY.id,title:{...b(0,"Go to Definition"),mnemonicTitle:v(0,"Go to &&Definition")},precondition:gh.hasDefinitionProvider,keybinding:[{when:gh.editorTextFocus,primary:70,weight:100},{when:$d.and(gh.editorTextFocus,Z$),primary:2118,weight:100}],menu:[{id:Mc.EditorContext,group:"navigation",order:1.1},{id:Mc.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),Id.registerCommandAlias("editor.action.goToDeclaration",tY.id)}}).id="editor.action.revealDefinition",tY)),Wc(((iY=class extends hY{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:iY.id,title:b(0,"Open Definition to the Side"),precondition:$d.and(gh.hasDefinitionProvider,gh.isInEmbeddedEditor.toNegated()),keybinding:[{when:gh.editorTextFocus,primary:Se(2089,70),weight:100},{when:$d.and(gh.editorTextFocus,Z$),primary:Se(2089,2118),weight:100}]}),Id.registerCommandAlias("editor.action.openDeclarationToTheSide",iY.id)}}).id="editor.action.revealDefinitionAside",iY)),Wc(((nY=class extends hY{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:nY.id,title:b(0,"Peek Definition"),precondition:$d.and(gh.hasDefinitionProvider,zj.notInPeekEditor,gh.isInEmbeddedEditor.toNegated()),keybinding:{when:gh.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:Mc.EditorContextPeek,group:"peek",order:2}}),Id.registerCommandAlias("editor.action.previewDeclaration",nY.id)}}).id="editor.action.peekDefinition",nY));class uY extends cY{async _getLocationModel(e,t,i,n){return new sZ(await YZ(e.declarationProvider,t,i,n),v(0,"Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?v(0,"No declaration found for '{0}'",e.word):v(0,"No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}Wc(((oY=class extends uY{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:oY.id,title:{...b(0,"Go to Declaration"),mnemonicTitle:v(0,"Go to &&Declaration")},precondition:$d.and(gh.hasDeclarationProvider,gh.isInEmbeddedEditor.toNegated()),menu:[{id:Mc.EditorContext,group:"navigation",order:1.3},{id:Mc.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?v(0,"No declaration found for '{0}'",e.word):v(0,"No declaration found")}}).id="editor.action.revealDeclaration",oY)),Wc(class extends uY{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:b(0,"Peek Declaration"),precondition:$d.and(gh.hasDeclarationProvider,zj.notInPeekEditor,gh.isInEmbeddedEditor.toNegated()),menu:{id:Mc.EditorContextPeek,group:"peek",order:3}})}});class gY extends cY{async _getLocationModel(e,t,i,n){return new sZ(await XZ(e.typeDefinitionProvider,t,i,n),v(0,"Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?v(0,"No type definition found for '{0}'",e.word):v(0,"No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}Wc(((sY=class extends gY{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:sY.ID,title:{...b(0,"Go to Type Definition"),mnemonicTitle:v(0,"Go to &&Type Definition")},precondition:gh.hasTypeDefinitionProvider,keybinding:{when:gh.editorTextFocus,primary:0,weight:100},menu:[{id:Mc.EditorContext,group:"navigation",order:1.4},{id:Mc.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}}).ID="editor.action.goToTypeDefinition",sY)),Wc(((rY=class extends gY{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:rY.ID,title:b(0,"Peek Type Definition"),precondition:$d.and(gh.hasTypeDefinitionProvider,zj.notInPeekEditor,gh.isInEmbeddedEditor.toNegated()),menu:{id:Mc.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",rY));class pY extends cY{async _getLocationModel(e,t,i,n){return new sZ(await QZ(e.implementationProvider,t,i,n),v(0,"Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?v(0,"No implementation found for '{0}'",e.word):v(0,"No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}Wc(((aY=class extends pY{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:aY.ID,title:{...b(0,"Go to Implementations"),mnemonicTitle:v(0,"Go to &&Implementations")},precondition:gh.hasImplementationProvider,keybinding:{when:gh.editorTextFocus,primary:2118,weight:100},menu:[{id:Mc.EditorContext,group:"navigation",order:1.45},{id:Mc.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}}).ID="editor.action.goToImplementation",aY)),Wc(((lY=class extends pY{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:lY.ID,title:b(0,"Peek Implementations"),precondition:$d.and(gh.hasImplementationProvider,zj.notInPeekEditor,gh.isInEmbeddedEditor.toNegated()),keybinding:{when:gh.editorTextFocus,primary:3142,weight:100},menu:{id:Mc.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",lY));class mY extends cY{_getNoResultFoundMessage(e){return e?v(0,"No references found for '{0}'",e.word):v(0,"No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}Wc(class extends mY{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...b(0,"Go to References"),mnemonicTitle:v(0,"Go to &&References")},precondition:$d.and(gh.hasReferenceProvider,zj.notInPeekEditor,gh.isInEmbeddedEditor.toNegated()),keybinding:{when:gh.editorTextFocus,primary:1094,weight:100},menu:[{id:Mc.EditorContext,group:"navigation",order:1.45},{id:Mc.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new sZ(await JZ(e.referenceProvider,t,i,!0,n),v(0,"References"))}}),Wc(class extends mY{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:b(0,"Peek References"),precondition:$d.and(gh.hasReferenceProvider,zj.notInPeekEditor,gh.isInEmbeddedEditor.toNegated()),menu:{id:Mc.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new sZ(await JZ(e.referenceProvider,t,i,!1,n),v(0,"References"))}});class fY extends cY{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:b(0,"Go to Any Symbol"),precondition:$d.and(zj.notInPeekEditor,gh.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new sZ(this._references,v(0,"Locations"))}_getNoResultFoundMessage(e){return e&&v(0,"No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}async function _Y(e,t,i,n){var o;const s=e.get(yd),r=e.get(hD),a=e.get(Nd),l=e.get(_d),d=e.get(fD);if(await n.item.resolve(At.None),!n.part.location)return;const c=n.part.location,h=[],u=new Set(Pc.getMenuItems(Mc.EditorContext).map((e=>Tc(e)?e.command.id:_k())));for(const e of cY.all())u.has(e.desc.id)&&h.push(new Sd(e.desc.id,Fc.label(e.desc,{renderShortTitle:!0}),void 0,!0,(async()=>{const i=await s.createModelReference(c.uri);try{const o=new dY(i.object.textEditorModel,hh.getStartPosition(c.range)),s=n.item.anchor.range;await l.invokeFunction(e.runEditorCommand.bind(e),t,o,s)}finally{i.dispose()}})));if(n.part.command){const{command:e}=n.part;h.push(new xd),h.push(new Sd(e.id,e.title,void 0,!0,(async()=>{var t;try{await a.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}catch(e){d.notify({severity:mD.Error,source:n.item.provider.displayName,message:e})}})))}const g=t.getOption(127);r.showContextMenu({domForShadowRoot:g&&null!==(o=t.getDomNode())&&void 0!==o?o:void 0,getAnchor:()=>{const e=Rs(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>h,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}async function vY(e,t,i,n){const o=e.get(yd),s=await o.createModelReference(n.uri);await i.invokeWithinContext((async e=>{const o=t.hasSideBySideModifier,r=e.get(pc),a=zj.inPeekEditor.getValue(r),l=!o&&i.getOption(88)&&!a;return new hY({openToSide:o,openInPeek:l,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e,new dY(s.object.textEditorModel,hh.getStartPosition(n.range)),hh.lift(n.range))})),s.dispose()}Id.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Po},{name:"position",description:"The position at which to start",constraint:wd.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:async(e,t,i,n,o,s,r)=>{xl(Po.isUri(t)),xl(wd.isIPosition(i)),xl(Array.isArray(n)),xl(void 0===o||"string"==typeof o),xl(void 0===r||"boolean"==typeof r);const a=e.get(bd),l=await a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if(kj(l))return l.setPosition(i),l.revealPositionInCenterIfOutsideViewport(i,0),l.invokeWithinContext((e=>{const t=new class extends fY{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(r),openToSide:!1},n,o);e.get(_d).invokeFunction(t.run.bind(t),l)}))}}),Id.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Po},{name:"position",description:"The position at which to start",constraint:wd.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:async(e,t,i,n,o)=>{e.get(Nd).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}}),Id.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{xl(Po.isUri(t)),xl(wd.isIPosition(i));const n=e.get(Pk),o=e.get(bd);return o.openCodeEditor({resource:t},o.getFocusedCodeEditor()).then((e=>{if(!kj(e)||!e.hasModel())return;const t=WZ.get(e);if(!t)return;const o=Wt((t=>JZ(n.referenceProvider,e.getModel(),wd.lift(i),!1,t).then((e=>new sZ(e,v(0,"References")))))),s=new hh(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(s,o,!1))}))}}),Id.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var bY,wY=function(e,t){return function(i,n){t(i,n,e)}};class CY{constructor(){this._entries=new ua(50)}get(e){const t=CY._key(e);return this._entries.get(t)}set(e,t){const i=CY._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const yY=vd("IInlayHintsCache");Ng(yY,CY,1);class SY{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"==typeof e?{label:e}:e[this.index]}}class kY{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let xY=bY=class{static get(e){var t;return null!==(t=e.getContribution(bY.ID))&&void 0!==t?t:void 0}constructor(e,t,i,n,o,s,r){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=o,this._notificationService=s,this._instaService=r,this._disposables=new at,this._sessionDisposables=new at,this._decorationsMetadata=new Map,this._ruleFactory=new vA(this._editor),this._activeRenderMode=0,this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(141)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const e=this._editor.getOption(141);if("off"===e.enabled)return;const t=this._editor.getModel();if(!t||!this._languageFeaturesService.inlayHintsProvider.has(t))return;if("on"===e.enabled)this._activeRenderMode=0;else{let t,i;"onUnlessPressed"===e.enabled?(t=0,i=1):(t=1,i=0),this._activeRenderMode=t,this._sessionDisposables.add(Mr.getInstance().event((e=>{if(!this._editor.hasModel())return;const n=e.altKey&&e.ctrlKey&&!e.shiftKey&&!e.metaKey?i:t;if(n!==this._activeRenderMode){this._activeRenderMode=n;const e=this._editor.getModel(),t=this._copyInlayHintsWithCurrentAnchor(e);this._updateHintsDecorators([e.getFullModelRange()],t),s.schedule(0)}})))}const i=this._inlayHintsCache.get(t);let n;i&&this._updateHintsDecorators([t.getFullModelRange()],i),this._sessionDisposables.add(rt((()=>{t.isDisposed()||this._cacheHintsForFastRestore(t)})));const o=new Set,s=new Zt((async()=>{const e=Date.now();null==n||n.dispose(!0),n=new Pt;const i=t.onWillDispose((()=>null==n?void 0:n.cancel()));try{const i=n.token,r=await Sj.create(this._languageFeaturesService.inlayHintsProvider,t,this._getHintsRanges(),i);if(s.delay=this._debounceInfo.update(t,Date.now()-e),i.isCancellationRequested)return void r.dispose();for(const e of r.provider)"function"!=typeof e.onDidChangeInlayHints||o.has(e)||(o.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{s.isScheduled()||s.schedule()}))));this._sessionDisposables.add(r),this._updateHintsDecorators(r.ranges,r.items),this._cacheHintsForFastRestore(t)}catch(e){xe(e)}finally{n.dispose(),i.dispose()}}),this._debounceInfo.get(t));this._sessionDisposables.add(s),this._sessionDisposables.add(rt((()=>null==n?void 0:n.dispose(!0)))),s.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&s.isScheduled()||s.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{null==n||n.cancel();const t=Math.max(s.delay,1250);s.schedule(t)}))),this._sessionDisposables.add(this._installDblClickGesture((()=>s.schedule(0)))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new at,t=e.add(new wj(this._editor)),i=new at;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),o=this._editor.getModel();if(!n||!o)return void i.clear();const s=new Pt;i.add(rt((()=>s.dispose(!0)))),n.item.resolve(s.token),this._activeInlayHintPart=n.part.command||n.part.location?new kY(n,t.hasTriggerModifier):void 0;const r=o.validatePosition(n.item.hint.position).lineNumber,a=new hh(r,1,r,o.getLineMaxColumn(r)),l=this._getInlineHintsForRange(a);this._updateHintsDecorators([a],l),i.add(rt((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([a],l)})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((async e=>{const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(vY,e,this._editor,i.location):FC.is(i.command)&&await this._invokeCommand(i.command,t.item)}}))),e}_getInlineHintsForRange(e){const t=new Set;for(const i of this._decorationsMetadata.values())e.containsRange(i.item.anchor.range)&&t.add(i.item);return Array.from(t)}_installDblClickGesture(e){return this._editor.onMouseUp((async t=>{if(2!==t.event.detail)return;const i=this._getInlayHintLabelPart(t);if(i&&(t.event.preventDefault(),await i.item.resolve(At.None),Gh(i.item.hint.textEdits))){const t=i.item.hint.textEdits.map((e=>pj.replace(hh.lift(e.range),e.text)));this._editor.executeEdits("inlayHint.default",t),e()}}))}_installContextMenu(){return this._editor.onContextMenu((async e=>{if(!lr(e.event.target))return;const t=this._getInlayHintLabelPart(e);t&&await this._instaService.invokeFunction(_Y,this._editor,e.event.target,t)}))}_getInlayHintLabelPart(e){var t;if(6!==e.target.type)return;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof Hy&&(null==i?void 0:i.attachedData)instanceof SY?i.attachedData:void 0}async _invokeCommand(e,t){var i;try{await this._commandService.executeCommand(e.id,...null!==(i=e.arguments)&&void 0!==i?i:[])}catch(e){this._notificationService.notify({severity:mD.Error,source:t.provider.displayName,message:e})}}_cacheHintsForFastRestore(e){const t=this._copyInlayHintsWithCurrentAnchor(e);this._inlayHintsCache.set(e,t)}_copyInlayHintsWithCurrentAnchor(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;const o=e.getDecorationRange(i);if(o){const e=new Cj(o,n.item.anchor.direction),i=n.item.with({anchor:e});t.set(n.item,i)}}return Array.from(t.values())}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(hh.compareRangesUsingStarts)){const t=e.validateRange(new hh(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&hh.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=hh.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(e,t){var i,n;const o=[],s=(e,t,i,n,s)=>{const r={content:i,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:n,attachedData:s};o.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:0===this._activeRenderMode?r:void 0}}})},r=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(a/3|0)+"px",display:"inline-block"});s(e,i," ",t?Ih.Right:Ih.None)},{fontSize:a,fontFamily:l,padding:d,isUniform:c}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,l);let u={line:0,totalLen:0};for(const e of t){if(u.line!==e.anchor.range.startLineNumber&&(u={line:e.anchor.range.startLineNumber,totalLen:0}),u.totalLen>bY._MAX_LABEL_LEN)continue;e.hint.paddingLeft&&r(e,!1);const t="string"==typeof e.hint.label?[{label:e.hint.label}]:e.hint.label;for(let n=0;n0&&(p=p.slice(0,-f)+"…",m=!0),s(e,this._ruleFactory.createClassNameRef(g),p.replace(/[ \t]/g," "),l&&!e.hint.paddingRight?Ih.Right:Ih.None,new SY(e,n)),m)break}if(e.hint.paddingRight&&r(e,!0),o.length>bY._MAX_DECORATORS)break}const g=[];for(const[t,i]of this._decorationsMetadata){const o=null===(n=this._editor.getModel())||void 0===n?void 0:n.getDecorationRange(t);o&&e.some((e=>e.containsRange(o)))&&(g.push(t),i.classNameRef.dispose(),this._decorationsMetadata.delete(t))}const p=cW.capture(this._editor);this._editor.changeDecorations((e=>{const t=e.deltaDecorations(g,o.map((e=>e.decoration)));for(let e=0;ei)&&(o=i);const s=e.fontFamily||n;return{fontSize:o,fontFamily:s,padding:t,isUniform:!t&&s===n&&o===i}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};xY.ID="editor.contrib.InlayHints",xY._MAX_DECORATORS=1500,xY._MAX_LABEL_LEN=43,xY=bY=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([wY(1,Pk),wY(2,AW),wY(3,yY),wY(4,Nd),wY(5,fD),wY(6,_d)],xY),Id.registerCommand("_executeInlayHintProvider",(async(e,...t)=>{const[i,n]=t;xl(Po.isUri(i)),xl(hh.isIRange(n));const{inlayHintsProvider:o}=e.get(Pk),s=await e.get(yd).createModelReference(i);try{const e=await Sj.create(o,s.object.textEditorModel,[hh.lift(n)],At.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{s.dispose()}}));var LY=function(e,t){return function(i,n){t(i,n,e)}};class DY extends XK{constructor(e,t,i,n){super(10,t,e.item.anchor.range,i,n,!0),this.part=e}}let EY=class extends hj{constructor(e,t,i,n,o,s,r,a){super(e,t,i,s,a,n,o),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!xY.get(this._editor))return null;if(6!==e.target.type)return null;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof Hy&&i.attachedData instanceof SY?new DY(i.attachedData,this,e.event.posx,e.event.posy):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof DY?new ii((async t=>{const{part:n}=e;if(await n.item.resolve(i),i.isCancellationRequested)return;let o,s;if("string"==typeof n.item.hint.tooltip?o=(new dd).appendText(n.item.hint.tooltip):n.item.hint.tooltip&&(o=n.item.hint.tooltip),o&&t.emitOne(new dj(this,e.range,[o],!1,0)),Gh(n.item.hint.textEdits)&&t.emitOne(new dj(this,e.range,[(new dd).appendText(v(0,"Double-click to insert"))],!1,10001)),"string"==typeof n.part.tooltip?s=(new dd).appendText(n.part.tooltip):n.part.tooltip&&(s=n.part.tooltip),s&&t.emitOne(new dj(this,e.range,[s],!1,1)),n.part.location||n.part.command){let i;const o=v(0,"altKey"===this._editor.getOption(78)?K?"cmd + click":"ctrl + click":K?"option + click":"alt + click");n.part.location&&n.part.command?i=(new dd).appendText(v(0,"Go to Definition ({0}), right click for more",o)):n.part.location?i=(new dd).appendText(v(0,"Go to Definition ({0})",o)):n.part.command&&(i=new dd(`[${v(0,"Execute Command")}](${r=n.part.command,Po.from({scheme:qo.command,path:r.id,query:r.arguments&&encodeURIComponent(JSON.stringify(r.arguments))}).toString()} "${n.part.command.title}") (${o})`,{isTrusted:!0})),i&&t.emitOne(new dj(this,e.range,[i],!1,1e4))}var r;const a=await this._resolveInlayHintLabelPartHover(n,i);for await(const e of a)t.emitOne(e)})):ii.EMPTY}async _resolveInlayHintLabelPartHover(e,t){if(!e.part.location)return ii.EMPTY;const{uri:i,range:n}=e.part.location,o=await this._resolverService.createModelReference(i);try{const i=o.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?oj(this._languageFeaturesService.hoverProvider,i,new wd(n.startLineNumber,n.startColumn),t).filter((e=>!cd(e.hover.contents))).map((t=>new dj(this,e.item.anchor.range,t.hover.contents,!1,2+t.ordinal))):ii.EMPTY}finally{o.dispose()}}};EY=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([LY(1,Mu),LY(2,LL),LY(3,uD),LY(4,tj),LY(5,Cg),LY(6,yd),LY(7,Pk)],EY);class NY{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(1!==t.type&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,s=e.range.endLineNumber===n?e.range.endColumn:o;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>s)return!1}else if(i>t.range.startColumn||t.range.endColumn>s)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return ii.EMPTY;const i=NY._getLineDecorations(this._editor,t);return ii.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):ii.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=NY._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return jh(t)}}class IY{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter((t=>t.isValidForHoverAnchor(e)));return t.length===this.messages.length?this:new TY(this,this.anchor,t,this.isComplete)}}class TY extends IY{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class MY{constructor(e,t,i,n,o,s,r,a,l,d){this.initialMousePosX=e,this.initialMousePosY=t,this.colorPicker=i,this.showAtPosition=n,this.showAtSecondaryPosition=o,this.preferAbove=s,this.stoleFocus=r,this.source=a,this.isBeforeContent=l,this.disposables=d,this.closestMouseDistance=void 0}}const AY=Sr;let RY=class extends lt{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=AY("div.hover-row.status-bar"),this.hoverElement.tabIndex=0,this.actionsElement=_r(this.hoverElement,AY("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(HK.render(this.actionsElement,e,i))}append(e){const t=_r(this.actionsElement,e);return this._hasContent=!0,t}};RY=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,uD)],RY);var PY,OY=function(e,t){return function(i,n){t(i,n,e)}};let FY=PY=class extends lt{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._onContentsChanged=this._register(new kt),this.onContentsChanged=this._onContentsChanged.event,this._widget=this._register(this._instantiationService.createInstance($K,this._editor)),this._participants=[];for(const e of JK.getAll()){const t=this._instantiationService.createInstance(e,this._editor);t instanceof hj&&!(t instanceof EY)&&(this._markdownHoverParticipant=t),this._participants.push(t)}this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new NY(this._editor,this._participants),this._hoverOperation=this._register(new YK(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{if(!this._computer.anchor)return;const t=e.hasLoadingMessage?this._addLoadingMessage(e.value):e.value;this._withResult(new IY(this._computer.anchor,t,e.isComplete))}))),this._register(ys(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(HC.onDidChange((()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)})))}_startShowingOrUpdateHover(e,t,i,n,o){return this._widget.position&&this._currentResult?this._editor.getOption(60).sticky&&o&&this._widget.isMouseGettingCloser(o.event.posx,o.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?!(!e||!this._currentResult.anchor.equals(e))||(e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)):(this._setCurrentResult(null),!1):!!e&&(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0)}_startHoverOperationIfNecessary(e,t,i,n,o){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=o,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&0===e.messages.length&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}_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){if(this._widget.position&&this._currentResult&&this._currentResult.isComplete){if(!e.isComplete)return;if(this._computer.insistOnKeepingHoverVisible&&0===e.messages.length)return}this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:o}=PY.computeHoverRanges(this._editor,e.range,t),s=new at,r=s.add(new RY(this._keybindingService)),a=document.createDocumentFragment();let l=null;const d={fragment:a,statusBar:r,setColorPicker:e=>l=e,onContentsChanged:()=>this._doOnContentsChanged(),setMinimumDimensions:e=>this._widget.setMinimumDimensions(e),hide:()=>this.hide()};for(const e of this._participants){const i=t.filter((t=>t.owner===e));i.length>0&&s.add(e.renderHoverParts(d,i))}const c=t.some((e=>e.isBeforeContent));if(r.hasContent&&a.appendChild(r.hoverElement),a.hasChildNodes()){if(o){const e=this._editor.createDecorationsCollection();e.set([{range:o,options:PY._DECORATION_OPTIONS}]),s.add(rt((()=>{e.clear()})))}this._widget.showAt(a,new MY(e.initialMousePosX,e.initialMousePosY,l,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,c,s))}else s.dispose()}_doOnContentsChanged(){this._onContentsChanged.fire(),this._widget.onContentsChanged()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const i=e._getViewModel(),o=i.coordinatesConverter,s=o.convertModelRangeToViewRange(t),r=new wd(s.startLineNumber,i.getLineMinColumn(s.startLineNumber));n=o.convertViewPositionToModelPosition(r).column}const o=t.startLineNumber;let s=t.startColumn,r=i[0].range,a=null;for(const e of i)r=hh.plusRange(r,e.range),e.range.startLineNumber===o&&e.range.endLineNumber===o&&(s=Math.max(Math.min(s,e.range.startColumn),n)),e.forceShowAtRange&&(a=e.range);return{showAtPosition:a?a.getStartPosition():new wd(o,t.startColumn),showAtSecondaryPosition:a?a.getStartPosition():new wd(o,s),highlightRange:r}}showsOrWillShow(e){if(this._widget.isResizing)return!0;const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const n=i.suggestHoverAnchor(e);n&&t.push(n)}const i=e.target;if(6===i.type&&t.push(new QK(0,i.range,e.event.posx,e.event.posy)),7===i.type){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new QK(0,e,void 0,void 0),t,i,n,null)}async updateMarkdownHoverVerbosityLevel(e,t,i){var n;null===(n=this._markdownHoverParticipant)||void 0===n||n.updateMarkdownHoverVerbosityLevel(e,t,i)}markdownHoverContentAtIndex(e){var t,i;return null!==(i=null===(t=this._markdownHoverParticipant)||void 0===t?void 0:t.markdownHoverContentAtIndex(e))&&void 0!==i?i:""}doesMarkdownHoverAtIndexSupportVerbosityAction(e,t){var i,n;return null!==(n=null===(i=this._markdownHoverParticipant)||void 0===i?void 0:i.doesMarkdownHoverAtIndexSupportVerbosityAction(e,t))&&void 0!==n&&n}containsNode(e){return!!e&&this._widget.getDomNode().contains(e)}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()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}get widget(){return this._widget}};FY._DECORATION_OPTIONS=zy.register({description:"content-hover-highlight",className:"hoverHighlight"}),FY=PY=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([OY(1,_d),OY(2,uD)],FY);var BY=i(8737),WY={};WY.styleTagTransform=Gr(),WY.setAttributes=Kr(),WY.insert=zr().bind(null,"head"),WY.domAPI=Vr(),WY.insertStyleElement=qr(),Br()(BY.Z,WY),BY.Z&&BY.Z.locals&&BY.Z.locals;class VY{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=Nh.Center}computeSync(){var e,t;const i=e=>({value:e}),n=this._editor.getLineDecorations(this._lineNumber),o=[],s="lineNo"===this._laneOrLine;if(!n)return o;for(const r of n){const n=null!==(t=null===(e=r.options.glyphMargin)||void 0===e?void 0:e.position)&&void 0!==t?t:Nh.Center;if(!s&&n!==this._laneOrLine)continue;const a=s?r.options.lineNumberHoverMessage:r.options.glyphMarginHoverMessage;a&&!cd(a)&&o.push(...iu(a).map(i))}return o}}const HY=Sr;class zY extends lt{constructor(e,t,i){super(),this._renderDisposeables=this._register(new at),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new VK),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new NL({editor:this._editor},t,i)),this._computer=new VY(this._editor),this._hoverOperation=this._register(new YK(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return zY.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}showsOrWillShow(e){const t=e.target;return 2===t.type&&t.detail.glyphMarginLane?(this._startShowingAt(t.position.lineNumber,t.detail.glyphMarginLane),!0):3===t.type&&(this._startShowingAt(t.position.lineNumber,"lineNo"),!0)}_startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,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 e of t){const t=HY("div.hover-row.markdown-hover"),n=_r(t,HY("div.hover-contents")),o=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(o.element),i.appendChild(t)}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),n=this._editor.getScrollTop(),o=this._editor.getOption(67),s=i-n-(this._hover.containerDomNode.clientHeight-o)/2,r=t.glyphMarginLeft+t.glyphMarginWidth+("lineNo"===this._computer.lane?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${r}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(s),0)}px`}}zY.ID="editor.contrib.modesGlyphHoverWidget";var UY,KY=function(e,t){return function(i,n){t(i,n,e)}};let jY=UY=class extends lt{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._onHoverContentsChanged=this._register(new kt),this.shouldKeepOpenOnEditorMouseMoveOrLeave=!1,this._listenersStore=new at,this._hoverState={mouseDown:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new Zt((()=>this._reactToEditorMouseMove(this._mouseMoveEvent)),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())})))}static get(e){return e.getContribution(UY.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.delay},e.enabled?(this._listenersStore.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._listenersStore.add(this._editor.onMouseUp((()=>this._onEditorMouseUp()))),this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._listenersStore.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._listenersStore.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._listenersStore.add(this._editor.onMouseLeave((e=>this._onEditorMouseLeave(e)))),this._listenersStore.add(this._editor.onDidChangeModel((()=>{this._cancelScheduler(),this._hideWidgets()}))),this._listenersStore.add(this._editor.onDidChangeModelContent((()=>this._cancelScheduler()))),this._listenersStore.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._hoverState.mouseDown=!0,this._shouldNotHideCurrentHoverWidget(e)||this._hideWidgets()}_shouldNotHideCurrentHoverWidget(e){return!!(this._isMouseOnContentHoverWidget(e)||this._isMouseOnMarginHoverWidget(e)||this._isContentWidgetResizing())}_isMouseOnMarginHoverWidget(e){const t=e.target;return!!t&&12===t.type&&t.detail===zY.ID}_isMouseOnContentHoverWidget(e){const t=e.target;return!!t&&9===t.type&&t.detail===$K.ID}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){this.shouldKeepOpenOnEditorMouseMoveOrLeave||(this._cancelScheduler(),this._shouldNotHideCurrentHoverWidget(e)||this._hideWidgets())}_shouldNotRecomputeCurrentHoverWidget(e){const t=this._hoverSettings.sticky;return!!(((e,t)=>{const i=this._isMouseOnMarginHoverWidget(e);return t&&i})(e,t)||((e,t)=>{const i=this._isMouseOnContentHoverWidget(e);return t&&i})(e,t)||(e=>{var t;const i=this._isMouseOnContentHoverWidget(e),n=null===(t=this._contentWidget)||void 0===t?void 0:t.isColorPickerVisible;return i&&n})(e)||((e,t)=>{var i,n,o,s;return t&&(null===(i=this._contentWidget)||void 0===i?void 0:i.containsNode(null===(n=e.event.browserEvent.view)||void 0===n?void 0:n.document.activeElement))&&!(null===(s=null===(o=e.event.browserEvent.view)||void 0===o?void 0:o.getSelection())||void 0===s?void 0:s.isCollapsed)})(e,t))}_onEditorMouseMove(e){var t,i,n,o;if(this.shouldKeepOpenOnEditorMouseMoveOrLeave)return;if(this._mouseMoveEvent=e,(null===(t=this._contentWidget)||void 0===t?void 0:t.isFocused)||(null===(i=this._contentWidget)||void 0===i?void 0:i.isResizing))return;const s=this._hoverSettings.sticky;if(s&&(null===(n=this._contentWidget)||void 0===n?void 0:n.isVisibleFromKeyboard))return;if(this._shouldNotRecomputeCurrentHoverWidget(e))return void this._reactToEditorMouseMoveRunner.cancel();const r=this._hoverSettings.hidingDelay;(null===(o=this._contentWidget)||void 0===o?void 0:o.isVisible)&&s&&r>0?this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(r):this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t;if(!e)return;const i=null===(t=e.target.element)||void 0===t?void 0:t.classList.contains("colorpicker-color-decoration"),n=this._editor.getOption(148),o=this._hoverSettings.enabled,s=this._hoverState.activatedByDecoratorClick;i&&("click"===n&&!s||"hover"===n&&!o||"clickAndHover"===n&&!o&&!s)||!(i||o||s)?this._hideWidgets():this._tryShowHoverWidget(e,0)||this._tryShowHoverWidget(e,1)||this._hideWidgets()}_tryShowHoverWidget(e,t){const i=this._getOrCreateContentWidget(),n=this._getOrCreateGlyphWidget();let o,s;switch(t){case 0:o=i,s=n;break;case 1:o=n,s=i;break;default:throw new Error(`HoverWidgetType ${t} is unrecognized`)}const r=o.showsOrWillShow(e);return r&&s.hide(),r}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=1===i.kind||2===i.kind&&(i.commandId===kU||i.commandId===xU||i.commandId===DU)&&(null===(t=this._contentWidget)||void 0===t?void 0:t.isVisible);5===e.keyCode||6===e.keyCode||57===e.keyCode||4===e.keyCode||n||this._hideWidgets()}_hideWidgets(){var e,t,i;this._hoverState.mouseDown&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible)||wK.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(FY,this._editor),this._listenersStore.add(this._contentWidget.onContentsChanged((()=>this._onHoverContentsChanged.fire())))),this._contentWidget}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=this._instantiationService.createInstance(zY,this._editor)),this._glyphWidget}showContentHover(e,t,i,n,o=!1){this._hoverState.activatedByDecoratorClick=o,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}_isContentWidgetResizing(){var e;return(null===(e=this._contentWidget)||void 0===e?void 0:e.widget.isResizing)||!1}markdownHoverContentAtIndex(e){return this._getOrCreateContentWidget().markdownHoverContentAtIndex(e)}doesMarkdownHoverAtIndexSupportVerbosityAction(e,t){return this._getOrCreateContentWidget().doesMarkdownHoverAtIndexSupportVerbosityAction(e,t)}updateMarkdownHoverVerbosityLevel(e,t,i){this._getOrCreateContentWidget().updateMarkdownHoverVerbosityLevel(e,t,i)}focus(){var e;null===(e=this._contentWidget)||void 0===e||e.focus()}scrollUp(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollUp()}scrollDown(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollDown()}scrollLeft(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollLeft()}scrollRight(){var e;null===(e=this._contentWidget)||void 0===e||e.scrollRight()}pageUp(){var e;null===(e=this._contentWidget)||void 0===e||e.pageUp()}pageDown(){var e;null===(e=this._contentWidget)||void 0===e||e.pageDown()}goToTop(){var e;null===(e=this._contentWidget)||void 0===e||e.goToTop()}goToBottom(){var e;null===(e=this._contentWidget)||void 0===e||e.goToBottom()}get isColorPickerVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return null===(e=this._contentWidget)||void 0===e?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};jY.ID="editor.contrib.hover",jY=UY=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([KY(1,_d),KY(2,uD)],jY);class qY extends lt{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(148);if("click"!==t&&"clickAndHover"!==t)return;const i=e.target;if(6!==i.type)return;if(!i.detail.injectedText)return;if(i.detail.injectedText.options.attachedData!==Uz)return;if(!i.range)return;const n=this._editor.getContribution(jY.ID);if(n&&!n.isColorPickerVisible){const e=new hh(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(e,1,0,!1,!0)}}}qY.ID="editor.contrib.colorContribution",oh(qY.ID,qY,2),JK.register(_U);var $Y,GY,ZY=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},YY=function(e,t){return function(i,n){t(i,n,e)}};let QY=$Y=class extends lt{constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=o,this._languageFeatureService=s,this._languageConfigurationService=r,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=gh.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=gh.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||null===(e=this._standaloneColorPickerWidget)||void 0===e||e.focus():this._standaloneColorPickerWidget=new XY(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),null===(e=this._standaloneColorPickerWidget)||void 0===e||e.hide(),this._editor.focus()}insertColor(){var e;null===(e=this._standaloneColorPickerWidget)||void 0===e||e.updateEditor(),this.hide()}static get(e){return e.getContribution($Y.ID)}};QY.ID="editor.contrib.standaloneColorPickerController",QY=$Y=ZY([YY(1,pc),YY(2,Cd),YY(3,uD),YY(4,_d),YY(5,Pk),YY(6,sp)],QY),oh(QY.ID,QY,1);let XY=GY=class extends lt{constructor(e,t,i,n,o,s,r,a){var l;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=o,this._keybindingService=s,this._languageFeaturesService=r,this._languageConfigurationService=a,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new kt),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(bU,this._editor),this._position=null===(l=this._editor._getViewModel())||void 0===l?void 0:l.getPrimaryCursorState().modelState.position;const d=this._editor.getSelection(),c=d?{startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},h=this._register(fr(this._body));this._register(h.onDidBlur((e=>{this.hide()}))),this._register(h.onDidFocus((e=>{this.focus()}))),this._register(this._editor.onDidChangeCursorPosition((()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()}))),this._register(this._editor.onMouseMove((e=>{var t;const i=null===(t=e.target.element)||void 0===t?void 0:t.classList;i&&i.contains("colorpicker-color-decoration")&&this.hide()}))),this._register(this.onResult((e=>{this._render(e.value,e.foundInEditor)}))),this._start(c),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return GY.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).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()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new JY(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new Mz(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment();let n;const o={fragment:i,statusBar:this._register(new RY(this._keybindingService)),setColorPicker:e=>n=e,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(o,[e])),void 0===n)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(.66*this._editor.getLayoutInfo().width,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),n.layout();const s=n.body,r=s.saturationBox.domNode.clientWidth,a=s.domNode.clientWidth-r-22-8,l=n.body.enterButton;null==l||l.onClicked((()=>{this.updateEditor(),this.hide()}));const d=n.header;d.pickedColorNode.style.width=r+8+"px",d.originalColorNode.style.width=a+"px";const c=n.header.closeButton;null==c||c.onClicked((()=>{this.hide()})),t&&(l&&(l.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};XY.ID="editor.contrib.standaloneColorPickerWidget",XY=GY=ZY([YY(3,_d),YY(4,Cd),YY(5,uD),YY(6,Pk),YY(7,sp)],XY);class JY{constructor(e,t){this.value=e,this.foundInEditor=t}}ih(class extends Qc{constructor(){super({id:"editor.action.hideColorPicker",label:v(0,"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:gh.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100},metadata:{description:b(0,"Hide the standalone color picker.")}})}run(e,t){var i;null===(i=QY.get(t))||void 0===i||i.hide()}}),ih(class extends Qc{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:v(0,"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:gh.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100},metadata:{description:b(0,"Insert hex/rgb/hsl colors with the focused standalone color picker.")}})}run(e,t){var i;null===(i=QY.get(t))||void 0===i||i.insertColor()}}),Wc(class extends Jc{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...b(0,"Show or Focus Standalone Color Picker"),mnemonicTitle:v(0,"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:Mc.CommandPalette}],metadata:{description:b(0,"Show or focus a standalone color picker which uses the default color provider. It displays hex/rgb/hsl colors.")}})}runEditorCommand(e,t){var i;null===(i=QY.get(t))||void 0===i||i.showOrFocus()}});class eQ{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 n=t.length;if(i+n>e.length)return!1;for(let o=0;o=65&&n<=90&&n+32===s||s>=65&&s<=90&&s+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,s){const r=e.startLineNumber,a=e.startColumn,l=e.endLineNumber,d=e.endColumn,c=o.getLineContent(r),h=o.getLineContent(l);let u,g=c.lastIndexOf(t,a-1+t.length),p=h.indexOf(i,d-1-i.length);if(-1!==g&&-1!==p)if(r===l)c.substring(g+t.length,p).indexOf(i)>=0&&(g=-1,p=-1);else{const e=c.substring(g+t.length),n=h.substring(0,p);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(g=-1,p=-1)}-1!==g&&-1!==p?(n&&g+t.length0&&32===h.charCodeAt(p-1)&&(i=" "+i,p-=1),u=eQ._createRemoveBlockCommentOperations(new hh(r,g+t.length+1,l,p+1),t,i)):(u=eQ._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===u.length?i:null);for(const e of u)s.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return hh.isEmpty(e)?n.push(pj.delete(new hh(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(pj.delete(new hh(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(pj.delete(new hh(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const o=[];return hh.isEmpty(e)?o.push(pj.replace(new hh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(pj.insert(new wd(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(pj.insert(new wd(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),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(2===i.length){const e=i[0],t=i[1];return new uh(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new uh(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}class tQ{constructor(e,t,i,n,o,s,r){this.languageConfigurationService=e,this._selection=t,this._indentSize=i,this._type=n,this._insertSpace=o,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const o=e.getLanguageIdAtPosition(t,1),s=n.getLanguageConfiguration(o).comments,r=s?s.lineCommentToken:null;if(!r)return null;const a=[];for(let e=0,n=i-t+1;er?o-1:o}}}class iQ extends Qc{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(sp);if(!t.hasModel())return;const n=[],o=t.getModel().getOptions(),s=t.getOption(23),r=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));r.sort(((e,t)=>hh.compareRangesUsingStarts(e.selection,t.selection)));let a=r[0];for(let e=1;ethis._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&Ks(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{this._editor.getOption(24)&&58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),11===e.target.type)return this._showScrollbarContextMenu(e.event);if(6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24))return;if(!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.contextMenuId);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.dispose();for(const t of o){const[,n]=t;let o=0;for(const t of n)if(t instanceof Oc){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new Ld(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new xd)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),t=Rs(this._editor.getDomNode()),i=t.left+e.left,o=t.top+e.top+e.height;n={x:i,y:o}}const o=this._editor.getOption(127)&&!Z;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:o?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new NT(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new NT(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel())return;if(this._workspaceContextService.getWorkspace().id===qk)return;const t=this._editor.getOption(73);let i=0;const n=e=>({id:"menu-action-"+ ++i,label:e.label,tooltip:"",class:void 0,enabled:void 0===e.enabled||e.enabled,checked:e.checked,run:e.run}),o=(e,t,o,s,r)=>{if(!t)return n({label:e,enabled:t,run:()=>{}});const a=e=>()=>{this._configurationService.updateValue(o,e)},l=[];for(const e of r)l.push(n({label:e.label,checked:s===e.value,run:a(e.value)}));return((e,t)=>new Ld("menu-action-"+ ++i,e,t,void 0))(e,l)},s=[];s.push(n({label:v(0,"Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),s.push(new xd),s.push(n({label:v(0,"Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),s.push(o(v(0,"Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:v(0,"Proportional"),value:"proportional"},{label:v(0,"Fill"),value:"fill"},{label:v(0,"Fit"),value:"fit"}])),s.push(o(v(0,"Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:v(0,"Mouse Over"),value:"mouseover"},{label:v(0,"Always"),value:"always"}]));const r=this._editor.getOption(127)&&!Z;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:r?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>s,onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};sQ.ID="editor.contrib.contextmenu",sQ=nQ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([oQ(1,hD),oQ(2,cD),oQ(3,pc),oQ(4,uD),oQ(5,Ac),oQ(6,Cg),oQ(7,zk)],sQ),oh(sQ.ID,sQ,2),ih(class extends Qc{constructor(){super({id:"editor.action.showContextMenu",label:v(0,"Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:gh.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;null===(i=sQ.get(t))||void 0===i||i.showContextMenu()}});class rQ{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new rQ(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new aQ(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new aQ(new rQ(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new aQ(new rQ(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}}lQ.ID="editor.contrib.cursorUndoRedoController",oh(lQ.ID,lQ,0),ih(class extends Qc{constructor(){super({id:"cursorUndo",label:v(0,"Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:gh.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;null===(n=lQ.get(t))||void 0===n||n.cursorUndo()}}),ih(class extends Qc{constructor(){super({id:"cursorRedo",label:v(0,"Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;null===(n=lQ.get(t))||void 0===n||n.cursorRedo()}});var dQ=i(2347),cQ={};function hQ(){return oo&&!!oo.VSCODE_DEV}function uQ(e){if(hQ()){const t=function(){gQ||(gQ=new Set);const e=globalThis;return e.$hotReload_applyNewExports||(e.$hotReload_applyNewExports=e=>{const t={config:{mode:void 0},...e};for(const e of gQ){const i=e(t);if(i)return i}}),gQ}();return t.add(e),{dispose(){t.delete(e)}}}return{dispose(){}}}let gQ;function pQ(e,t){const i=new at,n=e.createDecorationsCollection();return i.add(kI({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function mQ(e,t){return e.appendChild(t),rt((()=>{e.removeChild(t)}))}cQ.styleTagTransform=Gr(),cQ.setAttributes=Kr(),cQ.insert=zr().bind(null,"head"),cQ.domAPI=Vr(),cQ.insertStyleElement=qr(),Br()(dQ.Z,cQ),dQ.Z&&dQ.Z.locals&&dQ.Z.locals,hQ()&&uQ((({oldExports:e,newSrc:t,config:i})=>{if("patch-prototype"===i.mode)return t=>{var i,n;for(const o in t){const s=t[o];if(console.log(`[hot-reload] Patching prototype methods of '${o}'`,{exportedItem:s}),"function"==typeof s&&s.prototype){const r=e[o];if(r){for(const e of Object.getOwnPropertyNames(s.prototype)){const t=Object.getOwnPropertyDescriptor(s.prototype,e),a=Object.getOwnPropertyDescriptor(r.prototype,e);(null===(i=null==t?void 0:t.value)||void 0===i?void 0:i.toString())!==(null===(n=null==a?void 0:a.value)||void 0===n?void 0:n.toString())&&console.log(`[hot-reload] Patching prototype method '${o}.${e}'`),Object.defineProperty(r.prototype,e,t)}t[o]=r}}}return!0}}));class fQ extends lt{get width(){return this._width}get height(){return this._height}get automaticLayout(){return this._automaticLayout}constructor(e,t){super(),this._automaticLayout=!1,this.elementSizeObserver=this._register(new WM(e,t)),this._width=uI(this,this.elementSizeObserver.getWidth()),this._height=uI(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange((e=>lI((e=>{this._width.set(this.elementSizeObserver.getWidth(),e),this._height.set(this.elementSizeObserver.getHeight(),e)})))))}observe(e){this.elementSizeObserver.observe(e)}setAutomaticLayout(e){this._automaticLayout=e,e?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}function _Q(e,t,i){let n=t.get(),o=n,s=n;const r=uI("animatedValue",n);let a,l=-1;function d(){const t=Date.now()-l;var i,c,h;s=Math.floor((c=o,h=n-o,(i=t)===300?c+h:h*(1-Math.pow(2,-10*i/300))+c)),t<300?a=e.requestAnimationFrame(d):s=n,r.set(s,void 0)}return i.add(xI({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(e,i)=>(e.didChange(t)&&(i.animate=i.animate||e.change),!0)},((i,r)=>{void 0!==a&&(e.cancelAnimationFrame(a),a=void 0),o=s,n=t.read(i),l=Date.now()-(r.animate?0:300),d()}))),r}class vQ extends lt{constructor(e,t,i){super(),this._register(new wQ(e,i)),this._register(CQ(i,{height:t.actualHeight,top:t.actualTop}))}}class bQ{get afterLineNumber(){return this._afterLineNumber.get()}constructor(e,t){this._afterLineNumber=e,this.heightInPx=t,this.domNode=document.createElement("div"),this._actualTop=uI(this,void 0),this._actualHeight=uI(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=e=>{this._actualTop.set(e,void 0)},this.onComputedHeight=e=>{this._actualHeight.set(e,void 0)}}}class wQ{constructor(e,t){this._editor=e,this._domElement=t,this._overlayWidgetId="managedOverlayWidget-"+wQ._counter++,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}function CQ(e,t){return SI((i=>{for(let[n,o]of Object.entries(t))o&&"object"==typeof o&&"read"in o&&(o=o.read(i)),"number"==typeof o&&(o=`${o}px`),n=n.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e.style[n]=o}))}function yQ(e,t){return function(e,t){hQ()&&MI("reload",(t=>uQ((({oldExports:i})=>{if([...Object.values(i)].some((t=>e.includes(t))))return e=>(t(void 0),!0)})))).read(t)}([e],t),e}function SQ(e,t,i,n){const o=new at,s=[];return o.add(LI(((o,r)=>{const a=t.read(o),l=new Map,d=new Map;i&&i(!0),e.changeViewZones((e=>{for(const t of s)e.removeZone(t),null==n||n.delete(t);s.length=0;for(const t of a){const i=e.addZone(t);t.setZoneId&&t.setZoneId(i),s.push(i),null==n||n.add(i),l.set(t,i)}})),i&&i(!1),r.add(xI({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(e,t){const i=d.get(e.changedObservable);return void 0!==i&&t.zoneIds.push(i),!0}},((t,n)=>{for(const e of a)e.onChange&&(d.set(e.onChange,l.get(e)),e.onChange.read(t));i&&i(!0),e.changeViewZones((e=>{for(const t of n.zoneIds)e.layoutZone(t)})),i&&i(!1)})))}))),o.add({dispose(){i&&i(!0),e.changeViewZones((e=>{for(const t of s)e.removeZone(t)})),null==n||n.clear(),i&&i(!1)}}),o}wQ._counter=0;class kQ extends Pt{dispose(){super.dispose(!0)}}function xQ(e,t){const i=yu(t,(t=>t.original.startLineNumber<=e.lineNumber));if(!i)return hh.fromPositions(e);if(i.original.endLineNumberExclusive<=e.lineNumber){const t=e.lineNumber-i.original.endLineNumberExclusive+i.modified.endLineNumberExclusive;return hh.fromPositions(new wd(t,e.column))}if(!i.innerChanges)return hh.fromPositions(new wd(i.modified.startLineNumber,1));const n=yu(i.innerChanges,(t=>t.originalRange.getStartPosition().isBeforeOrEqual(e)));if(!n){const t=e.lineNumber-i.original.startLineNumber+i.modified.startLineNumber;return hh.fromPositions(new wd(t,e.column))}if(n.originalRange.containsPosition(e))return n.modifiedRange;{const t=(o=n.originalRange.getEndPosition(),s=e,o.lineNumber===s.lineNumber?new bp(0,s.column-o.column):new bp(s.lineNumber-o.lineNumber,s.column-1));return hh.fromPositions(t.addToPosition(n.modifiedRange.getEndPosition()))}var o,s}const LQ=vd("accessibilitySignalService");Symbol("AcknowledgeDocCommentsToken");class DQ{static register(e){return new DQ(e.fileName)}constructor(e){this.fileName=e}}DQ.error=DQ.register({fileName:"error.mp3"}),DQ.warning=DQ.register({fileName:"warning.mp3"}),DQ.success=DQ.register({fileName:"success.mp3"}),DQ.foldedArea=DQ.register({fileName:"foldedAreas.mp3"}),DQ.break=DQ.register({fileName:"break.mp3"}),DQ.quickFixes=DQ.register({fileName:"quickFixes.mp3"}),DQ.taskCompleted=DQ.register({fileName:"taskCompleted.mp3"}),DQ.taskFailed=DQ.register({fileName:"taskFailed.mp3"}),DQ.terminalBell=DQ.register({fileName:"terminalBell.mp3"}),DQ.diffLineInserted=DQ.register({fileName:"diffLineInserted.mp3"}),DQ.diffLineDeleted=DQ.register({fileName:"diffLineDeleted.mp3"}),DQ.diffLineModified=DQ.register({fileName:"diffLineModified.mp3"}),DQ.chatRequestSent=DQ.register({fileName:"chatRequestSent.mp3"}),DQ.chatResponseReceived1=DQ.register({fileName:"chatResponseReceived1.mp3"}),DQ.chatResponseReceived2=DQ.register({fileName:"chatResponseReceived2.mp3"}),DQ.chatResponseReceived3=DQ.register({fileName:"chatResponseReceived3.mp3"}),DQ.chatResponseReceived4=DQ.register({fileName:"chatResponseReceived4.mp3"}),DQ.clear=DQ.register({fileName:"clear.mp3"}),DQ.save=DQ.register({fileName:"save.mp3"}),DQ.format=DQ.register({fileName:"format.mp3"}),DQ.voiceRecordingStarted=DQ.register({fileName:"voiceRecordingStarted.mp3"}),DQ.voiceRecordingStopped=DQ.register({fileName:"voiceRecordingStopped.mp3"}),DQ.progress=DQ.register({fileName:"progress.mp3"});class EQ{constructor(e){this.randomOneOf=e}}class NQ{constructor(e,t,i,n,o,s,r){this.sound=e,this.name=t,this.legacySoundSettingsKey=i,this.settingsKey=n,this.legacyAnnouncementSettingsKey=o,this.announcementMessage=s,this.delaySettingsKey=r}static register(e){const t=new EQ("randomOneOf"in e.sound?e.sound.randomOneOf:[e.sound]),i=new NQ(t,e.name,e.legacySoundSettingsKey,e.settingsKey,e.legacyAnnouncementSettingsKey,e.announcementMessage,e.delaySettingsKey);return NQ._signals.add(i),i}}NQ._signals=new Set,NQ.errorAtPosition=NQ.register({name:v(0,"Error at Position"),sound:DQ.error,announcementMessage:v(0,"Error"),settingsKey:"accessibility.signals.positionHasError",delaySettingsKey:"accessibility.signalOptions.delays.errorAtPosition"}),NQ.warningAtPosition=NQ.register({name:v(0,"Warning at Position"),sound:DQ.warning,announcementMessage:v(0,"Warning"),settingsKey:"accessibility.signals.positionHasWarning",delaySettingsKey:"accessibility.signalOptions.delays.warningAtPosition"}),NQ.errorOnLine=NQ.register({name:v(0,"Error on Line"),sound:DQ.error,legacySoundSettingsKey:"audioCues.lineHasError",legacyAnnouncementSettingsKey:"accessibility.alert.error",announcementMessage:v(0,"Error on Line"),settingsKey:"accessibility.signals.lineHasError"}),NQ.warningOnLine=NQ.register({name:v(0,"Warning on Line"),sound:DQ.warning,legacySoundSettingsKey:"audioCues.lineHasWarning",legacyAnnouncementSettingsKey:"accessibility.alert.warning",announcementMessage:v(0,"Warning on Line"),settingsKey:"accessibility.signals.lineHasWarning"}),NQ.foldedArea=NQ.register({name:v(0,"Folded Area on Line"),sound:DQ.foldedArea,legacySoundSettingsKey:"audioCues.lineHasFoldedArea",legacyAnnouncementSettingsKey:"accessibility.alert.foldedArea",announcementMessage:v(0,"Folded"),settingsKey:"accessibility.signals.lineHasFoldedArea"}),NQ.break=NQ.register({name:v(0,"Breakpoint on Line"),sound:DQ.break,legacySoundSettingsKey:"audioCues.lineHasBreakpoint",legacyAnnouncementSettingsKey:"accessibility.alert.breakpoint",announcementMessage:v(0,"Breakpoint"),settingsKey:"accessibility.signals.lineHasBreakpoint"}),NQ.inlineSuggestion=NQ.register({name:v(0,"Inline Suggestion on Line"),sound:DQ.quickFixes,legacySoundSettingsKey:"audioCues.lineHasInlineSuggestion",settingsKey:"accessibility.signals.lineHasInlineSuggestion"}),NQ.terminalQuickFix=NQ.register({name:v(0,"Terminal Quick Fix"),sound:DQ.quickFixes,legacySoundSettingsKey:"audioCues.terminalQuickFix",legacyAnnouncementSettingsKey:"accessibility.alert.terminalQuickFix",announcementMessage:v(0,"Quick Fix"),settingsKey:"accessibility.signals.terminalQuickFix"}),NQ.onDebugBreak=NQ.register({name:v(0,"Debugger Stopped on Breakpoint"),sound:DQ.break,legacySoundSettingsKey:"audioCues.onDebugBreak",legacyAnnouncementSettingsKey:"accessibility.alert.onDebugBreak",announcementMessage:v(0,"Breakpoint"),settingsKey:"accessibility.signals.onDebugBreak"}),NQ.noInlayHints=NQ.register({name:v(0,"No Inlay Hints on Line"),sound:DQ.error,legacySoundSettingsKey:"audioCues.noInlayHints",legacyAnnouncementSettingsKey:"accessibility.alert.noInlayHints",announcementMessage:v(0,"No Inlay Hints"),settingsKey:"accessibility.signals.noInlayHints"}),NQ.taskCompleted=NQ.register({name:v(0,"Task Completed"),sound:DQ.taskCompleted,legacySoundSettingsKey:"audioCues.taskCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.taskCompleted",announcementMessage:v(0,"Task Completed"),settingsKey:"accessibility.signals.taskCompleted"}),NQ.taskFailed=NQ.register({name:v(0,"Task Failed"),sound:DQ.taskFailed,legacySoundSettingsKey:"audioCues.taskFailed",legacyAnnouncementSettingsKey:"accessibility.alert.taskFailed",announcementMessage:v(0,"Task Failed"),settingsKey:"accessibility.signals.taskFailed"}),NQ.terminalCommandFailed=NQ.register({name:v(0,"Terminal Command Failed"),sound:DQ.error,legacySoundSettingsKey:"audioCues.terminalCommandFailed",legacyAnnouncementSettingsKey:"accessibility.alert.terminalCommandFailed",announcementMessage:v(0,"Command Failed"),settingsKey:"accessibility.signals.terminalCommandFailed"}),NQ.terminalCommandSucceeded=NQ.register({name:v(0,"Terminal Command Succeeded"),sound:DQ.success,announcementMessage:v(0,"Command Succeeded"),settingsKey:"accessibility.signals.terminalCommandSucceeded"}),NQ.terminalBell=NQ.register({name:v(0,"Terminal Bell"),sound:DQ.terminalBell,legacySoundSettingsKey:"audioCues.terminalBell",legacyAnnouncementSettingsKey:"accessibility.alert.terminalBell",announcementMessage:v(0,"Terminal Bell"),settingsKey:"accessibility.signals.terminalBell"}),NQ.notebookCellCompleted=NQ.register({name:v(0,"Notebook Cell Completed"),sound:DQ.taskCompleted,legacySoundSettingsKey:"audioCues.notebookCellCompleted",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellCompleted",announcementMessage:v(0,"Notebook Cell Completed"),settingsKey:"accessibility.signals.notebookCellCompleted"}),NQ.notebookCellFailed=NQ.register({name:v(0,"Notebook Cell Failed"),sound:DQ.taskFailed,legacySoundSettingsKey:"audioCues.notebookCellFailed",legacyAnnouncementSettingsKey:"accessibility.alert.notebookCellFailed",announcementMessage:v(0,"Notebook Cell Failed"),settingsKey:"accessibility.signals.notebookCellFailed"}),NQ.diffLineInserted=NQ.register({name:v(0,"Diff Line Inserted"),sound:DQ.diffLineInserted,legacySoundSettingsKey:"audioCues.diffLineInserted",settingsKey:"accessibility.signals.diffLineInserted"}),NQ.diffLineDeleted=NQ.register({name:v(0,"Diff Line Deleted"),sound:DQ.diffLineDeleted,legacySoundSettingsKey:"audioCues.diffLineDeleted",settingsKey:"accessibility.signals.diffLineDeleted"}),NQ.diffLineModified=NQ.register({name:v(0,"Diff Line Modified"),sound:DQ.diffLineModified,legacySoundSettingsKey:"audioCues.diffLineModified",settingsKey:"accessibility.signals.diffLineModified"}),NQ.chatRequestSent=NQ.register({name:v(0,"Chat Request Sent"),sound:DQ.chatRequestSent,legacySoundSettingsKey:"audioCues.chatRequestSent",legacyAnnouncementSettingsKey:"accessibility.alert.chatRequestSent",announcementMessage:v(0,"Chat Request Sent"),settingsKey:"accessibility.signals.chatRequestSent"}),NQ.chatResponseReceived=NQ.register({name:v(0,"Chat Response Received"),legacySoundSettingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[DQ.chatResponseReceived1,DQ.chatResponseReceived2,DQ.chatResponseReceived3,DQ.chatResponseReceived4]},settingsKey:"accessibility.signals.chatResponseReceived"}),NQ.progress=NQ.register({name:v(0,"Progress"),sound:DQ.progress,legacySoundSettingsKey:"audioCues.chatResponsePending",legacyAnnouncementSettingsKey:"accessibility.alert.progress",announcementMessage:v(0,"Progress"),settingsKey:"accessibility.signals.progress"}),NQ.clear=NQ.register({name:v(0,"Clear"),sound:DQ.clear,legacySoundSettingsKey:"audioCues.clear",legacyAnnouncementSettingsKey:"accessibility.alert.clear",announcementMessage:v(0,"Clear"),settingsKey:"accessibility.signals.clear"}),NQ.save=NQ.register({name:v(0,"Save"),sound:DQ.save,legacySoundSettingsKey:"audioCues.save",legacyAnnouncementSettingsKey:"accessibility.alert.save",announcementMessage:v(0,"Save"),settingsKey:"accessibility.signals.save"}),NQ.format=NQ.register({name:v(0,"Format"),sound:DQ.format,legacySoundSettingsKey:"audioCues.format",legacyAnnouncementSettingsKey:"accessibility.alert.format",announcementMessage:v(0,"Format"),settingsKey:"accessibility.signals.format"}),NQ.voiceRecordingStarted=NQ.register({name:v(0,"Voice Recording Started"),sound:DQ.voiceRecordingStarted,legacySoundSettingsKey:"audioCues.voiceRecordingStarted",settingsKey:"accessibility.signals.voiceRecordingStarted"}),NQ.voiceRecordingStopped=NQ.register({name:v(0,"Voice Recording Stopped"),sound:DQ.voiceRecordingStopped,legacySoundSettingsKey:"audioCues.voiceRecordingStopped",settingsKey:"accessibility.signals.voiceRecordingStopped"});var IQ=i(7754),TQ={};TQ.styleTagTransform=Gr(),TQ.setAttributes=Kr(),TQ.insert=zr().bind(null,"head"),TQ.domAPI=Vr(),TQ.insertStyleElement=qr(),Br()(IQ.Z,TQ),IQ.Z&&IQ.Z.locals&&IQ.Z.locals;var MQ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},AQ=function(e,t){return function(i,n){t(i,n,e)}};const RQ=Xz("diff-review-insert",Ml.add,v(0,"Icon for 'Insert' in accessible diff viewer.")),PQ=Xz("diff-review-remove",Ml.remove,v(0,"Icon for 'Remove' in accessible diff viewer.")),OQ=Xz("diff-review-close",Ml.close,v(0,"Icon for 'Close' in accessible diff viewer."));let FQ=class extends lt{constructor(e,t,i,n,o,s,r,a,l){super(),this._parentNode=e,this._visible=t,this._setVisible=i,this._canClose=n,this._width=o,this._height=s,this._diffs=r,this._models=a,this._instantiationService=l,this._state=bI(this,((e,t)=>{const i=this._visible.read(e);if(this._parentNode.style.visibility=i?"visible":"hidden",!i)return null;const n=t.add(this._instantiationService.createInstance(BQ,this._diffs,this._models,this._setVisible,this._canClose));return{model:n,view:t.add(this._instantiationService.createInstance(qQ,this._parentNode,n,this._width,this._height,this._models))}})).recomputeInitiallyAndOnChange(this._store)}next(){lI((e=>{const t=this._visible.get();this._setVisible(!0,e),t&&this._state.get().model.nextGroup(e)}))}prev(){lI((e=>{this._setVisible(!0,e),this._state.get().model.previousGroup(e)}))}close(){lI((e=>{this._setVisible(!1,e)}))}};FQ._ttPolicy=fL("diffReview",{createHTML:e=>e}),FQ=MQ([AQ(8,_d)],FQ);let BQ=class extends lt{constructor(e,t,i,n,o){super(),this._diffs=e,this._models=t,this._setVisible=i,this.canClose=n,this._accessibilitySignalService=o,this._groups=uI(this,[]),this._currentGroupIdx=uI(this,0),this._currentElementIdx=uI(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map(((e,t)=>this._groups.read(t)[e])),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map(((e,t)=>{var i;return null===(i=this.currentGroup.read(t))||void 0===i?void 0:i.lines[e]})),this._register(SI((e=>{const t=this._diffs.read(e);if(!t)return void this._groups.set([],void 0);const i=function(e,t,i){const n=[];for(const o of Uh(e,((e,t)=>t.modified.startLineNumber-e.modified.endLineNumberExclusive<2*WQ))){const e=[];e.push(new zQ);const s=new Nu(Math.max(1,o[0].original.startLineNumber-WQ),Math.min(o[o.length-1].original.endLineNumberExclusive+WQ,t+1)),r=new Nu(Math.max(1,o[0].modified.startLineNumber-WQ),Math.min(o[o.length-1].modified.endLineNumberExclusive+WQ,i+1));Kh(o,((t,i)=>{const n=new Nu(t?t.original.endLineNumberExclusive:s.startLineNumber,i?i.original.startLineNumber:s.endLineNumberExclusive),o=new Nu(t?t.modified.endLineNumberExclusive:r.startLineNumber,i?i.modified.startLineNumber:r.endLineNumberExclusive);n.forEach((t=>{e.push(new jQ(t,o.startLineNumber+(t-n.startLineNumber)))})),i&&(i.original.forEach((t=>{e.push(new UQ(i,t))})),i.modified.forEach((t=>{e.push(new KQ(i,t))})))}));const a=o[0].modified.join(o[o.length-1].modified),l=o[0].original.join(o[o.length-1].original);n.push(new HQ(new bH(a,l),e))}return n}(t,this._models.getOriginalModel().getLineCount(),this._models.getModifiedModel().getLineCount());lI((e=>{const t=this._models.getModifiedPosition();if(t){const n=i.findIndex((e=>(null==t?void 0:t.lineNumber){const t=this.currentElement.read(e);(null==t?void 0:t.type)===VQ.Deleted?this._accessibilitySignalService.playSignal(NQ.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):(null==t?void 0:t.type)===VQ.Added&&this._accessibilitySignalService.playSignal(NQ.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}))),this._register(SI((e=>{var t;const i=this.currentElement.read(e);if(i&&i.type!==VQ.Header){const e=null!==(t=i.modifiedLineNumber)&&void 0!==t?t:i.diff.modified.startLineNumber;this._models.modifiedSetSelection(hh.fromPositions(new wd(e,1)))}})))}_goToGroupDelta(e,t){const i=this.groups.get();!i||i.length<=1||cI(t,(t=>{this._currentGroupIdx.set(wu.ofLength(i.length).clipCyclic(this._currentGroupIdx.get()+e),t),this._currentElementIdx.set(0,t)}))}nextGroup(e){this._goToGroupDelta(1,e)}previousGroup(e){this._goToGroupDelta(-1,e)}_goToLineDelta(e){const t=this.currentGroup.get();!t||t.lines.length<=1||lI((i=>{this._currentElementIdx.set(wu.ofLength(t.lines.length).clip(this._currentElementIdx.get()+e),i)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(e){const t=this.currentGroup.get();if(!t)return;const i=t.lines.indexOf(e);-1!==i&&lI((e=>{this._currentElementIdx.set(i,e)}))}revealCurrentElementInEditor(){if(!this.canClose.get())return;this._setVisible(!1,void 0);const e=this.currentElement.get();e&&(e.type===VQ.Deleted?this._models.originalReveal(hh.fromPositions(new wd(e.originalLineNumber,1))):this._models.modifiedReveal(e.type!==VQ.Header?hh.fromPositions(new wd(e.modifiedLineNumber,1)):void 0))}close(){this.canClose.get()&&(this._setVisible(!1,void 0),this._models.modifiedFocus())}};BQ=MQ([AQ(4,LQ)],BQ);const WQ=3;var VQ;!function(e){e[e.Header=0]="Header",e[e.Unchanged=1]="Unchanged",e[e.Deleted=2]="Deleted",e[e.Added=3]="Added"}(VQ||(VQ={}));class HQ{constructor(e,t){this.range=e,this.lines=t}}class zQ{constructor(){this.type=VQ.Header}}class UQ{constructor(e,t){this.diff=e,this.originalLineNumber=t,this.type=VQ.Deleted,this.modifiedLineNumber=void 0}}class KQ{constructor(e,t){this.diff=e,this.modifiedLineNumber=t,this.type=VQ.Added,this.originalLineNumber=void 0}}class jQ{constructor(e,t){this.originalLineNumber=e,this.modifiedLineNumber=t,this.type=VQ.Unchanged}}let qQ=class extends lt{constructor(e,t,i,n,o,s){super(),this._element=e,this._model=t,this._width=i,this._height=n,this._models=o,this._languageService=s,this.domNode=this._element,this.domNode.className="monaco-component diff-review monaco-editor-background";const r=document.createElement("div");r.className="diff-review-actions",this._actionBar=this._register(new TT(r)),this._register(SI((e=>{this._actionBar.clear(),this._model.canClose.read(e)&&this._actionBar.push(new Sd("diffreview.close",v(0,"Close"),"close-diff-review "+Rl.asClassName(OQ),!0,(async()=>t.close())),{label:!1,icon:!0})}))),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new PN(this._content,{})),br(this.domNode,this._scrollbar.getDomNode(),r),this._register(SI((e=>{this._height.read(e),this._width.read(e),this._scrollbar.scanDomNode()}))),this._register(rt((()=>{br(this.domNode)}))),this._register(CQ(this.domNode,{width:this._width,height:this._height})),this._register(CQ(this._content,{width:this._width,height:this._height})),this._register(LI(((e,t)=>{this._model.currentGroup.read(e),this._render(t)}))),this._register(ys(this.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._model.goToNextLine()),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._model.goToPreviousLine()),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this._model.close()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this._model.revealCurrentElementInEditor())})))}_render(e){const t=this._models.getOriginalOptions(),i=this._models.getModifiedOptions(),n=document.createElement("div");n.className="diff-review-table",n.setAttribute("role","list"),n.setAttribute("aria-label",v(0,"Accessible Diff Viewer. Use arrow up and down to navigate.")),yL(n,i.get(50)),br(this._content,n);const o=this._models.getOriginalModel(),s=this._models.getModifiedModel();if(!o||!s)return;const r=o.getOptions(),a=s.getOptions(),l=i.get(67),d=this._model.currentGroup.get();for(const c of(null==d?void 0:d.lines)||[]){if(!d)break;let h;if(c.type===VQ.Header){const e=document.createElement("div");e.className="diff-review-row",e.setAttribute("role","listitem");const t=d.range,i=this._model.currentGroupIndex.get(),n=this._model.groups.get().length,o=e=>0===e?v(0,"no lines changed"):1===e?v(0,"1 line changed"):v(0,"{0} lines changed",e),s=o(t.original.length),r=o(t.modified.length);e.setAttribute("aria-label",v(0,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",i+1,n,t.original.startLineNumber,s,t.modified.startLineNumber,r));const a=document.createElement("div");a.className="diff-review-cell diff-review-summary",a.appendChild(document.createTextNode(`${i+1}/${n}: @@ -${t.original.startLineNumber},${t.original.length} +${t.modified.startLineNumber},${t.modified.length} @@`)),e.appendChild(a),h=e}else h=this._createRow(c,l,this._width.get(),t,o,r,i,s,a);n.appendChild(h);const u=fI((e=>this._model.currentElement.read(e)===c));e.add(SI((e=>{const t=u.read(e);h.tabIndex=t?0:-1,t&&h.focus()}))),e.add(ws(h,"focus",(()=>{this._model.goToLine(c)})))}this._scrollbar.scanDomNode()}_createRow(e,t,i,n,o,s,r,a,l){const d=n.get(145),c=d.glyphMarginWidth+d.lineNumbersWidth,h=r.get(145),u=10+h.glyphMarginWidth+h.lineNumbersWidth;let g="diff-review-row",p="",m=null;switch(e.type){case VQ.Added:g="diff-review-row line-insert",p=" char-insert",m=RQ;break;case VQ.Deleted:g="diff-review-row line-delete",p=" char-delete",m=PQ}const f=document.createElement("div");f.style.minWidth=i+"px",f.className=g,f.setAttribute("role","listitem"),f.ariaLevel="";const _=document.createElement("div");_.className="diff-review-cell",_.style.height=`${t}px`,f.appendChild(_);const b=document.createElement("span");b.style.width=c+"px",b.style.minWidth=c+"px",b.className="diff-review-line-number"+p,void 0!==e.originalLineNumber?b.appendChild(document.createTextNode(String(e.originalLineNumber))):b.innerText=" ",_.appendChild(b);const w=document.createElement("span");w.style.width=u+"px",w.style.minWidth=u+"px",w.style.paddingRight="10px",w.className="diff-review-line-number"+p,void 0!==e.modifiedLineNumber?w.appendChild(document.createTextNode(String(e.modifiedLineNumber))):w.innerText=" ",_.appendChild(w);const C=document.createElement("span");if(C.className="diff-review-spacer",m){const e=document.createElement("span");e.className=Rl.asClassName(m),e.innerText="  ",C.appendChild(e)}else C.innerText="  ";let y;if(_.appendChild(C),void 0!==e.modifiedLineNumber){let t=this._getLineHtml(a,r,l.tabSize,e.modifiedLineNumber,this._languageService.languageIdCodec);FQ._ttPolicy&&(t=FQ._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),y=a.getLineContent(e.modifiedLineNumber)}else{let t=this._getLineHtml(o,n,s.tabSize,e.originalLineNumber,this._languageService.languageIdCodec);FQ._ttPolicy&&(t=FQ._ttPolicy.createHTML(t)),_.insertAdjacentHTML("beforeend",t),y=o.getLineContent(e.originalLineNumber)}0===y.length&&(y=v(0,"blank"));let S="";switch(e.type){case VQ.Unchanged:S=e.originalLineNumber===e.modifiedLineNumber?v(0,"{0} unchanged line {1}",y,e.originalLineNumber):v(0,"{0} original line {1} modified line {2}",y,e.originalLineNumber,e.modifiedLineNumber);break;case VQ.Added:S=v(0,"+ {0} modified line {1}",y,e.modifiedLineNumber);break;case VQ.Deleted:S=v(0,"- {0} original line {1}",y,e.originalLineNumber)}return f.setAttribute("aria-label",S),f}_getLineHtml(e,t,i,n,o){const s=e.getLineContent(n),r=t.get(50),a=ZC.createEmpty(s,o),l=$P.isBasicASCII(s,e.mightContainNonBasicASCII()),d=$P.containsRTL(s,l,e.mightContainRTL());return KA(new BA(r.isMonospace&&!t.get(33),r.canUseHalfwidthRightwardsArrow,s,!1,l,d,0,a,[],i,0,r.spaceWidth,r.middotWidth,r.wsmiddotWidth,t.get(117),t.get(99),t.get(94),t.get(51)!==nE.OFF,null)).html}};qQ=MQ([AQ(5,Mu)],qQ);class $Q{constructor(e){this.editors=e}getOriginalModel(){return this.editors.original.getModel()}getOriginalOptions(){return this.editors.original.getOptions()}originalReveal(e){this.editors.original.revealRange(e),this.editors.original.setSelection(e),this.editors.original.focus()}getModifiedModel(){return this.editors.modified.getModel()}getModifiedOptions(){return this.editors.modified.getOptions()}modifiedReveal(e){e&&(this.editors.modified.revealRange(e),this.editors.modified.setSelection(e)),this.editors.modified.focus()}modifiedSetSelection(e){this.editors.modified.setSelection(e)}modifiedFocus(){this.editors.modified.focus()}getModifiedPosition(){var e;return null!==(e=this.editors.modified.getPosition())&&void 0!==e?e:void 0}}class GQ extends lt{constructor(e,t,i,n,o){super(),this._rootElement=e,this._diffModel=t,this._originalEditorLayoutInfo=i,this._modifiedEditorLayoutInfo=n,this._editors=o,this._originalScrollTop=II(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=II(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._viewZonesChanged=MI("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=uI(this,0),this._modifiedViewZonesChangedSignal=MI("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=MI("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=bI(this,((e,t)=>{var i;this._element.replaceChildren();const n=this._diffModel.read(e),o=null===(i=null==n?void 0:n.diff.read(e))||void 0===i?void 0:i.movedTexts;if(!o||0===o.length)return void this.width.set(0,void 0);this._viewZonesChanged.read(e);const s=this._originalEditorLayoutInfo.read(e),r=this._modifiedEditorLayoutInfo.read(e);if(!s||!r)return void this.width.set(0,void 0);this._modifiedViewZonesChangedSignal.read(e),this._originalViewZonesChangedSignal.read(e);const a=o.map((t=>{function i(e,t){return(t.getTopForLineNumber(e.startLineNumber,!0)+t.getTopForLineNumber(e.endLineNumberExclusive,!0))/2}const n=i(t.lineRangeMapping.original,this._editors.original),o=this._originalScrollTop.read(e),s=i(t.lineRangeMapping.modified,this._editors.modified),r=n-o,a=s-this._modifiedScrollTop.read(e),l=Math.min(n,s),d=Math.max(n,s);return{range:new wu(l,d),from:r,to:a,fromWithoutScroll:n,toWithoutScroll:s,move:t}}));a.sort(function(...e){return(t,i)=>{for(const n of e){const e=n(t,i);if(!Th.isNeitherLessOrGreaterThan(e))return e}return Th.neitherLessOrGreaterThan}}(su((e=>e.fromWithoutScroll>e.toWithoutScroll),au),su((e=>e.fromWithoutScroll>e.toWithoutScroll?e.fromWithoutScroll:-e.toWithoutScroll),ru)));const l=ZQ.compute(a.map((e=>e.range))),d=s.verticalScrollbarWidth,c=10*(l.getTrackCount()-1)+20,h=d+c+(r.contentLeft-GQ.movedCodeBlockPadding);let u=0;for(const e of a){const i=d+10+10*l.getTrack(u),o=15,s=15,a=h,c=r.glyphMarginWidth+r.lineNumbersWidth,g=18,p=document.createElementNS("http://www.w3.org/2000/svg","rect");p.classList.add("arrow-rectangle"),p.setAttribute("x",""+(a-c)),p.setAttribute("y",""+(e.to-g/2)),p.setAttribute("width",`${c}`),p.setAttribute("height",`${g}`),this._element.appendChild(p);const m=document.createElementNS("http://www.w3.org/2000/svg","g"),f=document.createElementNS("http://www.w3.org/2000/svg","path");f.setAttribute("d",`M 0 ${e.from} L ${i} ${e.from} L ${i} ${e.to} L ${a-s} ${e.to}`),f.setAttribute("fill","none"),m.appendChild(f);const _=document.createElementNS("http://www.w3.org/2000/svg","polygon");_.classList.add("arrow"),t.add(SI((t=>{f.classList.toggle("currentMove",e.move===n.activeMovedText.read(t)),_.classList.toggle("currentMove",e.move===n.activeMovedText.read(t))}))),_.setAttribute("points",`${a-s},${e.to-o/2} ${a},${e.to} ${a-s},${e.to+o/2}`),m.appendChild(_),this._element.appendChild(m),u++}this.width.set(c,void 0)})),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register(rt((()=>this._element.remove()))),this._register(SI((e=>{const t=this._originalEditorLayoutInfo.read(e),i=this._modifiedEditorLayoutInfo.read(e);t&&i&&(this._element.style.left=t.width-t.verticalScrollbarWidth+"px",this._element.style.height=`${t.height}px`,this._element.style.width=`${t.verticalScrollbarWidth+t.contentLeft-GQ.movedCodeBlockPadding+this.width.read(e)}px`)}))),this._register(OI(this._state));const s=fI((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);return i?i.movedTexts.map((e=>({move:e,original:new bQ(EI(e.lineRangeMapping.original.startLineNumber-1),18),modified:new bQ(EI(e.lineRangeMapping.modified.startLineNumber-1),18)}))):[]}));this._register(SQ(this._editors.original,s.map((e=>e.map((e=>e.original)))))),this._register(SQ(this._editors.modified,s.map((e=>e.map((e=>e.modified)))))),this._register(LI(((e,t)=>{const i=s.read(e);for(const e of i)t.add(new YQ(this._editors.original,e.original,e.move,"original",this._diffModel.get())),t.add(new YQ(this._editors.modified,e.modified,e.move,"modified",this._diffModel.get()))})));const r=MI("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0))))),a=MI("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let l="modified";this._register(xI({createEmptyChangeSummary:()=>{},handleChange:(e,t)=>(e.didChange(r)&&(l="original"),e.didChange(a)&&(l="modified"),!0)},(e=>{r.read(e),a.read(e);const t=this._diffModel.read(e);if(!t)return;const i=t.diff.read(e);let n;if(i&&"original"===l){const t=this._editors.originalCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.original.contains(t.lineNumber))))}if(i&&"modified"===l){const t=this._editors.modifiedCursor.read(e);t&&(n=i.movedTexts.find((e=>e.lineRangeMapping.modified.contains(t.lineNumber))))}n!==t.movedTextToCompare.get()&&t.movedTextToCompare.set(void 0,void 0),t.setActiveMovedText(n)})))}}GQ.movedCodeBlockPadding=4;class ZQ{static compute(e){const t=[],i=[];for(const n of e){let e=t.findIndex((e=>!e.intersectsStrict(n)));if(-1===e){const i=6;t.length>=i?e=Eu(t,su((e=>e.intersectWithRangeLength(n)),ru)):(e=t.length,t.push(new Cu))}t[e].addRange(n),i.push(e)}return new ZQ(t.length,i)}constructor(e,t){this._trackCount=e,this.trackPerLineIdx=t}getTrack(e){return this.trackPerLineIdx[e]}getTrackCount(){return this._trackCount}}class YQ extends vQ{constructor(e,t,i,n,o){const s=Pr("div.diff-hidden-lines-widget");super(e,t,s.root),this._editor=e,this._move=i,this._kind=n,this._diffModel=o,this._nodes=Pr("div.diff-moved-code-block",{style:{marginRight:"4px"}},[Pr("div.text-content@textContent"),Pr("div.action-bar@actionBar")]),s.root.appendChild(this._nodes.root);const r=II(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));let a;this._register(CQ(this._nodes.root,{paddingRight:r.map((e=>e.verticalScrollbarWidth))})),a=i.changes.length>0?"original"===this._kind?v(0,"Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):v(0,"Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):"original"===this._kind?v(0,"Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):v(0,"Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const l=this._register(new TT(this._nodes.actionBar,{highlightToggledItems:!0})),d=new Sd("",a,"",!1);l.push(d,{icon:!1,label:!0});const c=new Sd("","Compare",Rl.asClassName(Ml.compareChanges),!0,(()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===i?void 0:this._move,void 0)}));this._register(SI((e=>{const t=this._diffModel.movedTextToCompare.read(e)===i;c.checked=t}))),l.push(c,{icon:!1,label:!0})}}Tm("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},v(0,"The border color for text that got moved in the diff editor.")),Tm("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},v(0,"The active border color for text that got moved in the diff editor.")),Tm("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},v(0,"The color of the shadow around unchanged region widgets."));const QQ=Xz("diff-insert",Ml.add,v(0,"Line decoration for inserts in the diff editor.")),XQ=Xz("diff-remove",Ml.remove,v(0,"Line decoration for removals in the diff editor.")),JQ=zy.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+Rl.asClassName(QQ),marginClassName:"gutter-insert"}),eX=zy.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+Rl.asClassName(XQ),marginClassName:"gutter-delete"}),tX=zy.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),iX=zy.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),nX=zy.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),oX=zy.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),sX=zy.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),rX=zy.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),aX=zy.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),lX=zy.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"});class dX extends lt{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._decorations=fI(this,(e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e);if(!i)return null;const n=this._diffModel.read(e).movedTextToCompare.read(e),o=this._options.renderIndicators.read(e),s=this._options.showEmptyDecorations.read(e),r=[],a=[];if(!n)for(const e of i.mappings)if(e.lineRangeMapping.original.isEmpty||r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:o?eX:iX}),e.lineRangeMapping.modified.isEmpty||a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:o?JQ:tX}),e.lineRangeMapping.modified.isEmpty||e.lineRangeMapping.original.isEmpty)e.lineRangeMapping.original.isEmpty||r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:aX}),e.lineRangeMapping.modified.isEmpty||a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:oX});else for(const t of e.lineRangeMapping.innerChanges||[])e.lineRangeMapping.original.contains(t.originalRange.startLineNumber)&&r.push({range:t.originalRange,options:t.originalRange.isEmpty()&&s?lX:rX}),e.lineRangeMapping.modified.contains(t.modifiedRange.startLineNumber)&&a.push({range:t.modifiedRange,options:t.modifiedRange.isEmpty()&&s?sX:nX});if(n)for(const e of n.changes){const t=e.original.toInclusiveRange();t&&r.push({range:t,options:o?eX:iX});const i=e.modified.toInclusiveRange();i&&a.push({range:i,options:o?JQ:tX});for(const t of e.innerChanges||[])r.push({range:t.originalRange,options:rX}),a.push({range:t.modifiedRange,options:nX})}const l=this._diffModel.read(e).activeMovedText.read(e);for(const e of i.movedTexts)r.push({range:e.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(e===l?" currentMove":""),blockPadding:[GQ.movedCodeBlockPadding,0,GQ.movedCodeBlockPadding,GQ.movedCodeBlockPadding]}}),a.push({range:e.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(e===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:r,modifiedDecorations:a}})),this._register(pQ(this._editors.original,this._decorations.map((e=>(null==e?void 0:e.originalDecorations)||[])))),this._register(pQ(this._editors.modified,this._decorations.map((e=>(null==e?void 0:e.modifiedDecorations)||[]))))}}class cX{resetSash(){this._sashRatio.set(void 0,void 0)}constructor(e,t){this._options=e,this.dimensions=t,this.sashLeft=_I(this,(e=>{var t;const i=null!==(t=this._sashRatio.read(e))&&void 0!==t?t:this._options.splitViewDefaultRatio.read(e);return this._computeSashLeft(i,e)}),((e,t)=>{const i=this.dimensions.width.get();this._sashRatio.set(e/i,t)})),this._sashRatio=uI(this,void 0)}_computeSashLeft(e,t){const i=this.dimensions.width.read(t),n=Math.floor(this._options.splitViewDefaultRatio.read(t)*i),o=this._options.enableSplitViewResizing.read(t)?Math.floor(e*i):n,s=100;return i<=200?n:oi-s?i-s:o}}class hX extends lt{constructor(e,t,i,n,o,s){super(),this._domNode=e,this._dimensions=t,this._enabled=i,this._boundarySashes=n,this.sashLeft=o,this._resetSash=s,this._sash=this._register(new RK(this._domNode,{getVerticalSashTop:e=>0,getVerticalSashLeft:e=>this.sashLeft.get(),getVerticalSashHeight:e=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()}))),this._register(this._sash.onDidChange((e=>{this.sashLeft.set(this._startSashPosition+(e.currentX-e.startX),void 0)}))),this._register(this._sash.onDidEnd((()=>this._sash.layout()))),this._register(this._sash.onDidReset((()=>this._resetSash()))),this._register(SI((e=>{const t=this._boundarySashes.read(e);t&&(this._sash.orthogonalEndSash=t.bottom)}))),this._register(SI((e=>{const t=this._enabled.read(e);this._sash.state=t?3:0,this.sashLeft.read(e),this._dimensions.height.read(e),this._sash.layout()})))}}const uX=vd("editorWorkerService");var gX,pX=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},mX=function(e,t){return function(i,n){t(i,n,e)}};const fX=vd("diffProviderFactoryService");let _X=class{constructor(e){this.instantiationService=e}createDiffProvider(e){return this.instantiationService.createInstance(vX,e)}};_X=pX([mX(0,_d)],_X),Ng(fX,_X,1);let vX=gX=class{constructor(e,t,i){this.editorWorkerService=t,this.telemetryService=i,this.onDidChangeEventEmitter=new kt,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(e)}dispose(){var e;null===(e=this.diffAlgorithmOnDidChangeSubscription)||void 0===e||e.dispose()}async computeDiff(e,t,i,n){var o,s;if("string"!=typeof this.diffAlgorithm)return this.diffAlgorithm.computeDiff(e,t,i,n);if(e.isDisposed()||t.isDisposed())return{changes:[],identical:!0,quitEarly:!1,moves:[]};if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return 1===t.getLineCount()&&1===t.getLineMaxColumn(1)?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new wH(new Nu(1,2),new Nu(1,t.getLineCount()+1),[new CH(e.getFullModelRange(),t.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const r=JSON.stringify([e.uri.toString(),t.uri.toString()]),a=JSON.stringify([e.id,t.id,e.getAlternativeVersionId(),t.getAlternativeVersionId(),JSON.stringify(i)]),l=gX.diffCache.get(r);if(l&&l.context===a)return l.result;const d=ft.create(),c=await this.editorWorkerService.computeDiff(e.uri,t.uri,i,this.diffAlgorithm),h=d.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:h,timedOut:null===(o=null==c?void 0:c.quitEarly)||void 0===o||o,detectedMoves:i.computeMoves?null!==(s=null==c?void 0:c.moves.length)&&void 0!==s?s:0:-1}),n.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!c)throw new Error("no diff result available");return gX.diffCache.size>10&&gX.diffCache.delete(gX.diffCache.keys().next().value),gX.diffCache.set(r,{result:c,context:a}),c}setOptions(e){var t;let i=!1;e.diffAlgorithm&&this.diffAlgorithm!==e.diffAlgorithm&&(null===(t=this.diffAlgorithmOnDidChangeSubscription)||void 0===t||t.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=e.diffAlgorithm,"string"!=typeof e.diffAlgorithm&&(this.diffAlgorithmOnDidChangeSubscription=e.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))),i=!0),i&&this.onDidChangeEventEmitter.fire()}};vX.diffCache=new Map,vX=gX=pX([mX(1,uX),mX(2,Vc)],vX);let bX=class extends lt{setActiveMovedText(e){this._activeMovedText.set(e,void 0)}constructor(e,t,i){super(),this.model=e,this._options=t,this._diffProviderFactoryService=i,this._isDiffUpToDate=uI(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=uI(this,void 0),this.diff=this._diff,this._unchangedRegions=uI(this,void 0),this.unchangedRegions=fI(this,(e=>{var t,i;return this._options.hideUnchangedRegions.read(e)?null!==(i=null===(t=this._unchangedRegions.read(e))||void 0===t?void 0:t.regions)&&void 0!==i?i:[]:(lI((e=>{var t;for(const i of(null===(t=this._unchangedRegions.get())||void 0===t?void 0:t.regions)||[])i.collapseAll(e)})),[])})),this.movedTextToCompare=uI(this,void 0),this._activeMovedText=uI(this,void 0),this._hoveredMovedText=uI(this,void 0),this.activeMovedText=fI(this,(e=>{var t,i;return null!==(i=null!==(t=this.movedTextToCompare.read(e))&&void 0!==t?t:this._hoveredMovedText.read(e))&&void 0!==i?i:this._activeMovedText.read(e)})),this._cancellationTokenSource=new Pt,this._diffProvider=fI(this,(e=>{const t=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(e)});return{diffProvider:t,onChangeSignal:MI("onDidChange",t.onDidChange)}})),this._register(rt((()=>this._cancellationTokenSource.cancel())));const n=RI("contentChangedSignal"),o=this._register(new Zt((()=>n.trigger(void 0)),200));this._register(SI((t=>{const i=this._unchangedRegions.read(t);if(!i||i.regions.some((e=>e.isDragged.read(t))))return;const n=i.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?Nu.fromRangeInclusive(e):void 0)),o=i.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?Nu.fromRangeInclusive(e):void 0)),s=i.regions.map(((e,i)=>n[i]&&o[i]?new yX(n[i].startLineNumber,o[i].startLineNumber,n[i].length,e.visibleLineCountTop.read(t),e.visibleLineCountBottom.read(t)):void 0)).filter(Sl),r=[];let a=!1;for(const e of Uh(s,((e,i)=>e.getHiddenModifiedRange(t).endLineNumberExclusive===i.getHiddenModifiedRange(t).startLineNumber)))if(e.length>1){a=!0;const t=e.reduce(((e,t)=>e+t.lineCount),0),i=new yX(e[0].originalLineNumber,e[0].modifiedLineNumber,t,e[0].visibleLineCountTop.get(),e[e.length-1].visibleLineCountBottom.get());r.push(i)}else r.push(e[0]);if(a){const t=e.original.deltaDecorations(i.originalDecorationIds,r.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),n=e.modified.deltaDecorations(i.modifiedDecorationIds,r.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));lI((e=>{this._unchangedRegions.set({regions:r,originalDecorationIds:t,modifiedDecorationIds:n},e)}))}})));const s=(t,i,n)=>{const o=yX.fromDiffs(t.changes,e.original.getLineCount(),e.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(n),this._options.hideUnchangedRegionsContextLineCount.read(n));let s;const r=this._unchangedRegions.get();if(r){const t=r.originalDecorationIds.map((t=>e.original.getDecorationRange(t))).map((e=>e?Nu.fromRangeInclusive(e):void 0)),i=r.modifiedDecorationIds.map((t=>e.modified.getDecorationRange(t))).map((e=>e?Nu.fromRangeInclusive(e):void 0)),o=function(e,t){let i;return e.filter((e=>{const t=((e,t)=>!t||e.modifiedLineNumber>=t.modifiedLineNumber+t.lineCount&&e.originalLineNumber>=t.originalLineNumber+t.lineCount)(e,i);return i=e,t}))}(r.regions.map(((e,n)=>{if(!t[n]||!i[n])return;const o=t[n].length;return new yX(t[n].startLineNumber,i[n].startLineNumber,o,Math.min(e.visibleLineCountTop.get(),o),Math.min(e.visibleLineCountBottom.get(),o-e.visibleLineCountTop.get()))})).filter(Sl));let a=o.map((e=>new bH(e.getHiddenOriginalRange(n),e.getHiddenModifiedRange(n))));a=bH.clip(a,Nu.ofLength(1,e.original.getLineCount()),Nu.ofLength(1,e.modified.getLineCount())),s=bH.inverse(a,e.original.getLineCount(),e.modified.getLineCount())}const a=[];if(s)for(const e of o){const t=s.filter((t=>t.original.intersectsStrict(e.originalUnchangedRange)&&t.modified.intersectsStrict(e.modifiedUnchangedRange)));a.push(...e.setVisibleRanges(t,i))}else a.push(...o);const l=e.original.deltaDecorations((null==r?void 0:r.originalDecorationIds)||[],a.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})))),d=e.modified.deltaDecorations((null==r?void 0:r.modifiedDecorationIds)||[],a.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))));this._unchangedRegions.set({regions:a,originalDecorationIds:l,modifiedDecorationIds:d},i)};this._register(e.modified.onDidChangeContent((t=>{if(this._diff.get()){Rp.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,lI((e=>{this._diff.set(wX.fromDiffResult(this._lastDiff),e),s(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),o.schedule()}))),this._register(e.original.onDidChangeContent((t=>{if(this._diff.get()){Rp.fromModelContentChanges(t.changes);const i=(this._lastDiff,e.original,void e.modified);i&&(this._lastDiff=i,lI((e=>{this._diff.set(wX.fromDiffResult(this._lastDiff),e),s(i,e);const t=this.movedTextToCompare.get();this.movedTextToCompare.set(t?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(t.lineRangeMapping.modified))):void 0,e)})))}this._isDiffUpToDate.set(!1,void 0),o.schedule()}))),this._register(LI((async(t,i)=>{var r,a;this._options.hideUnchangedRegionsMinimumLineCount.read(t),this._options.hideUnchangedRegionsContextLineCount.read(t),o.cancel(),n.read(t);const l=this._diffProvider.read(t);l.onChangeSignal.read(t),yQ(iz,t),yQ(QH,t),this._isDiffUpToDate.set(!1,void 0);let d=[];i.add(e.original.onDidChangeContent((e=>{const t=Rp.fromModelContentChanges(e.changes);d=pm(d,t)})));let c=[];i.add(e.modified.onDidChangeContent((e=>{const t=Rp.fromModelContentChanges(e.changes);c=pm(c,t)})));let h=await l.diffProvider.computeDiff(e.original,e.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(t),maxComputationTimeMs:this._options.maxComputationTimeMs.read(t),computeMoves:this._options.showMoves.read(t)},this._cancellationTokenSource.token);var u,g,p;this._cancellationTokenSource.token.isCancellationRequested||e.original.isDisposed()||e.modified.isDisposed()||(u=h,g=e.original,p=e.modified,h={changes:u.changes.map((e=>new wH(e.original,e.modified,e.innerChanges?e.innerChanges.map((e=>function(e,t,i){let n=e.originalRange,o=e.modifiedRange;return(1!==n.endColumn||1!==o.endColumn)&&n.endColumn===t.getLineMaxColumn(n.endLineNumber)&&o.endColumn===i.getLineMaxColumn(o.endLineNumber)&&n.endLineNumber{s(h,e),this._lastDiff=h;const t=wX.fromDiffResult(h);this._diff.set(t,e),this._isDiffUpToDate.set(!0,e);const i=this.movedTextToCompare.get();this.movedTextToCompare.set(i?this._lastDiff.moves.find((e=>e.lineRangeMapping.modified.intersect(i.lineRangeMapping.modified))):void 0,e)})))})))}ensureModifiedLineIsVisible(e,t,i){var n,o;if(0===(null===(n=this.diff.get())||void 0===n?void 0:n.mappings.length))return;const s=(null===(o=this._unchangedRegions.get())||void 0===o?void 0:o.regions)||[];for(const n of s)if(n.getHiddenModifiedRange(void 0).contains(e))return void n.showModifiedLine(e,t,i)}ensureOriginalLineIsVisible(e,t,i){var n,o;if(0===(null===(n=this.diff.get())||void 0===n?void 0:n.mappings.length))return;const s=(null===(o=this._unchangedRegions.get())||void 0===o?void 0:o.regions)||[];for(const n of s)if(n.getHiddenOriginalRange(void 0).contains(e))return void n.showOriginalLine(e,t,i)}async waitForDiff(){await WI(this.isDiffUpToDate,(e=>e))}serializeState(){const e=this._unchangedRegions.get();return{collapsedRegions:null==e?void 0:e.regions.map((e=>({range:e.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(e){var t;const i=null===(t=e.collapsedRegions)||void 0===t?void 0:t.map((e=>Nu.deserialize(e.range))),n=this._unchangedRegions.get();n&&i&&lI((e=>{for(const t of n.regions)for(const n of i)if(t.modifiedUnchangedRange.intersect(n)){t.setHiddenModifiedRange(n,e);break}}))}};bX=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,fX)],bX);class wX{static fromDiffResult(e){return new wX(e.changes.map((e=>new CX(e))),e.moves||[],e.identical,e.quitEarly)}constructor(e,t,i,n){this.mappings=e,this.movedTexts=t,this.identical=i,this.quitEarly=n}}class CX{constructor(e){this.lineRangeMapping=e}}class yX{static fromDiffs(e,t,i,n,o){const s=wH.inverse(e,t,i),r=[];for(const e of s){let s=e.original.startLineNumber,a=e.modified.startLineNumber,l=e.original.length;const d=1===s&&1===a,c=s+l===t+1&&a+l===i+1;(d||c)&&l>=o+n?(d&&!c&&(l-=o),c&&!d&&(s+=o,a+=o,l-=o),r.push(new yX(s,a,l,0,0))):l>=2*o+n&&(s+=o,a+=o,l-=2*o,r.push(new yX(s,a,l,0,0)))}return r}get originalUnchangedRange(){return Nu.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return Nu.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(e,t,i,n,o){this.originalLineNumber=e,this.modifiedLineNumber=t,this.lineCount=i,this._visibleLineCountTop=uI(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=uI(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=fI(this,(e=>this.visibleLineCountTop.read(e)+this.visibleLineCountBottom.read(e)===this.lineCount&&!this.isDragged.read(e))),this.isDragged=uI(this,void 0);const s=Math.max(Math.min(n,this.lineCount),0),r=Math.max(Math.min(o,this.lineCount-n),0);yc(n===s),yc(o===r),this._visibleLineCountTop.set(s,void 0),this._visibleLineCountBottom.set(r,void 0)}setVisibleRanges(e,t){const i=[],n=new Iu(e.map((e=>e.modified))).subtractFrom(this.modifiedUnchangedRange);let o=this.originalLineNumber,s=this.modifiedLineNumber;const r=this.modifiedLineNumber+this.lineCount;if(0===n.ranges.length)this.showAll(t),i.push(this);else{let e=0;for(const a of n.ranges){const l=e===n.ranges.length-1;e++;const d=(l?r:a.endLineNumberExclusive)-s,c=new yX(o,s,d,0,0);c.setHiddenModifiedRange(a,t),i.push(c),o=c.originalUnchangedRange.endLineNumberExclusive,s=c.modifiedUnchangedRange.endLineNumberExclusive}}return i}shouldHideControls(e){return this._shouldHideControls.read(e)}getHiddenOriginalRange(e){return Nu.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}getHiddenModifiedRange(e){return Nu.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(e),this.lineCount-this._visibleLineCountTop.read(e)-this._visibleLineCountBottom.read(e))}setHiddenModifiedRange(e,t){const i=e.startLineNumber-this.modifiedLineNumber,n=this.modifiedLineNumber+this.lineCount-e.endLineNumberExclusive;this.setState(i,n,t)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(e=10,t){const i=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+e,i),t)}showMoreBelow(e=10,t){const i=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+e,i),t)}showAll(e){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),e)}showModifiedLine(e,t,i){const n=e+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),o=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-e;0===t&&n{var o;this._contextMenuService.showContextMenu({domForShadowRoot:h&&null!==(o=i.getDomNode())&&void 0!==o?o:void 0,getAnchor:()=>({x:e,y:t}),getActions:()=>{const e=[],t=n.modified.isEmpty;return e.push(new Sd("diff.clipboard.copyDeletedContent",t?n.original.length>1?v(0,"Copy deleted lines"):v(0,"Copy deleted line"):n.original.length>1?v(0,"Copy changed lines"):v(0,"Copy changed line"),void 0,!0,(async()=>{const e=this._originalTextModel.getValueInRange(n.original.toExclusiveRange());await this._clipboardService.writeText(e)}))),n.original.length>1&&e.push(new Sd("diff.clipboard.copyDeletedLineContent",v(0,t?"Copy deleted line ({0})":"Copy changed line ({0})",n.original.startLineNumber+c),void 0,!0,(async()=>{let e=this._originalTextModel.getLineContent(n.original.startLineNumber+c);""===e&&(e=0===this._originalTextModel.getEndOfLineSequence()?"\n":"\r\n"),await this._clipboardService.writeText(e)}))),i.getOption(91)||e.push(new Sd("diff.inline.revertChange",v(0,"Revert this change"),void 0,!0,(async()=>{this._editor.revert(this._diff)}))),e},autoSelectFirstItem:!0})};this._register(ys(this._diffActions,"mousedown",(e=>{if(!e.leftButton)return;const{top:t,height:i}=Rs(this._diffActions),n=Math.floor(d/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId!==this._getViewZoneId()?this.visibility=!1:(c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),this.visibility=!0)}))),this._register(i.onMouseDown((e=>{!e.event.leftButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._getViewZoneId()&&(e.event.preventDefault(),c=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,d),u(e.event.posx,e.event.posy+d))})))}_updateLightBulbPosition(e,t,i){const{top:n}=Rs(e),o=t-n,s=Math.floor(o/i),r=s*i;if(this._diffActions.style.top=`${r}px`,this._viewLineCounts){let e=0;for(let t=0;te});function xX(e,t,i,n){yL(n,t.fontInfo);const o=i.length>0,s=new ag(1e4);let r=0,a=0;const l=[];for(let n=0;n');const l=t.getLineContent(),d=$P.isBasicASCII(l,o),c=$P.containsRTL(l,d,s),h=zA(new BA(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,l,!1,d,c,0,t,i,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==nE.OFF,null),a);return a.appendString(""),h.characterMapping.getHorizontalOffset(h.characterMapping.length)}var NX=function(e,t){return function(i,n){t(i,n,e)}};let IX=class extends lt{constructor(e,t,i,n,o,s,r,a,l,d){super(),this._targetWindow=e,this._editors=t,this._diffModel=i,this._options=n,this._diffEditorWidget=o,this._canIgnoreViewZoneUpdateEvent=s,this._origViewZonesToIgnore=r,this._modViewZonesToIgnore=a,this._clipboardService=l,this._contextMenuService=d,this._originalTopPadding=uI(this,0),this._originalScrollOffset=uI(this,0),this._originalScrollOffsetAnimated=_Q(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=uI(this,0),this._modifiedScrollOffset=uI(this,0),this._modifiedScrollOffsetAnimated=_Q(this._targetWindow,this._modifiedScrollOffset,this._store);const c=uI("invalidateAlignmentsState",0),h=this._register(new Zt((()=>{c.set(c.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()}))),this._register(this._editors.modified.onDidChangeViewZones((e=>{this._canIgnoreViewZoneUpdateEvent()||h.schedule()}))),this._register(this._editors.original.onDidChangeConfiguration((e=>{(e.hasChanged(146)||e.hasChanged(67))&&h.schedule()}))),this._register(this._editors.modified.onDidChangeConfiguration((e=>{(e.hasChanged(146)||e.hasChanged(67))&&h.schedule()})));const u=this._diffModel.map((e=>e?II(e.model.original.onDidChangeTokens,(()=>2===e.model.original.tokenization.backgroundTokenizationState)):void 0)).map(((e,t)=>null==e?void 0:e.read(t))),g=fI((e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);if(!t||!i)return null;c.read(e);const n=this._options.renderSideBySide.read(e);return TX(this._editors.original,this._editors.modified,i.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,n)})),p=fI((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);if(!i)return null;c.read(e);const n=i.changes.map((e=>new CX(e)));return TX(this._editors.original,this._editors.modified,n,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)}));function m(){const e=document.createElement("div");return e.className="diagonal-fill",e}const f=this._register(new at);this.viewZones=bI(this,((e,t)=>{var i,n,s,r,a,l,d,c;f.clear();const h=g.read(e)||[],_=[],v=[],b=this._modifiedTopPadding.read(e);b>0&&v.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:b,showInHiddenAreas:!0,suppressMouseDown:!0});const w=this._originalTopPadding.read(e);w>0&&_.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:w,showInHiddenAreas:!0,suppressMouseDown:!0});const C=this._options.renderSideBySide.read(e),y=C||null===(i=this._editors.modified._getViewModel())||void 0===i?void 0:i.createLineBreaksComputer();if(y){const I=this._editors.original.getModel();for(const T of h)if(T.diff)for(let M=T.originalRange.startLineNumber;MI.getLineCount())return{orig:_,mod:v};null==y||y.addRequest(I.getLineContent(M),null,null)}}const S=null!==(n=null==y?void 0:y.finalize())&&void 0!==n?n:[];let k=0;const x=this._editors.modified.getOption(67),L=null===(s=this._diffModel.read(e))||void 0===s?void 0:s.movedTextToCompare.read(e),D=null!==(a=null===(r=this._editors.original.getModel())||void 0===r?void 0:r.mightContainNonBasicASCII())&&void 0!==a&&a,E=null!==(d=null===(l=this._editors.original.getModel())||void 0===l?void 0:l.mightContainRTL())&&void 0!==d&&d,N=DX.fromEditor(this._editors.modified);for(const A of h)if(A.diff&&!C){if(!A.originalRange.isEmpty){u.read(e);const P=document.createElement("div");P.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const O=this._editors.original.getModel();if(A.originalRange.endLineNumberExclusive-1>O.getLineCount())return{orig:_,mod:v};const F=new LX(A.originalRange.mapToLineArray((e=>O.tokenization.getLineTokens(e))),A.originalRange.mapToLineArray((e=>S[k++])),D,E),B=[];for(const z of A.diff.innerChanges||[])B.push(new GP(z.originalRange.delta(-(A.diff.original.startLineNumber-1)),rX.className,0));const W=xX(F,N,B,P),V=document.createElement("div");if(V.className="inline-deleted-margin-view-zone",yL(V,N.fontInfo),this._options.renderIndicators.read(e))for(let U=0;ULl(H)),V,this._editors.modified,A.diff,this._diffEditorWidget,W.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let j=0;j1&&_.push({afterLineNumber:A.originalRange.startLineNumber+j,domNode:m(),heightInPx:(q-1)*x,showInHiddenAreas:!0,suppressMouseDown:!0})}v.push({afterLineNumber:A.modifiedRange.startLineNumber-1,domNode:P,heightInPx:W.heightInLines*x,minWidthInPx:W.minWidthInPx,marginDomNode:V,setZoneId(e){H=e},showInHiddenAreas:!0,suppressMouseDown:!0})}const R=document.createElement("div");R.className="gutter-delete",_.push({afterLineNumber:A.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:A.modifiedHeightInPx,marginDomNode:R,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const $=A.modifiedHeightInPx-A.originalHeightInPx;if($>0){if(null==L?void 0:L.lineRangeMapping.original.delta(-1).deltaLength(2).contains(A.originalRange.endLineNumberExclusive-1))continue;_.push({afterLineNumber:A.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:$,showInHiddenAreas:!0,suppressMouseDown:!0})}else{if(null==L?void 0:L.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(A.modifiedRange.endLineNumberExclusive-1))continue;function G(){const e=document.createElement("div");return e.className="arrow-revert-change "+Rl.asClassName(Ml.arrowRight),t.add(ws(e,"mousedown",(e=>e.stopPropagation()))),t.add(ws(e,"click",(e=>{e.stopPropagation(),o.revert(A.diff)}))),Sr("div",{},e)}let Z;A.diff&&A.diff.modified.isEmpty&&this._options.shouldRenderOldRevertArrows.read(e)&&(Z=G()),v.push({afterLineNumber:A.modifiedRange.endLineNumberExclusive-1,domNode:m(),heightInPx:-$,marginDomNode:Z,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const Y of null!==(c=p.read(e))&&void 0!==c?c:[]){if(!(null==L?void 0:L.lineRangeMapping.original.intersect(Y.originalRange))||!(null==L?void 0:L.lineRangeMapping.modified.intersect(Y.modifiedRange)))continue;const Q=Y.modifiedHeightInPx-Y.originalHeightInPx;Q>0?_.push({afterLineNumber:Y.originalRange.endLineNumberExclusive-1,domNode:m(),heightInPx:Q,showInHiddenAreas:!0,suppressMouseDown:!0}):v.push({afterLineNumber:Y.modifiedRange.endLineNumberExclusive-1,domNode:m(),heightInPx:-Q,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:_,mod:v}}));let _=!1;this._register(this._editors.original.onDidScrollChange((e=>{e.scrollLeftChanged&&!_&&(_=!0,this._editors.modified.setScrollLeft(e.scrollLeft),_=!1)}))),this._register(this._editors.modified.onDidScrollChange((e=>{e.scrollLeftChanged&&!_&&(_=!0,this._editors.original.setScrollLeft(e.scrollLeft),_=!1)}))),this._originalScrollTop=II(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop())),this._modifiedScrollTop=II(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop())),this._register(SI((e=>{const t=this._originalScrollTop.read(e)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(e))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(e));t!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(t,1)}))),this._register(SI((e=>{const t=this._modifiedScrollTop.read(e)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(e))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(e));t!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(t,1)}))),this._register(SI((e=>{var t;const i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e);let n=0;if(i){const e=this._editors.original.getTopForLineNumber(i.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();n=this._editors.modified.getTopForLineNumber(i.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-e}n>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(n,void 0)):n<0?(this._modifiedTopPadding.set(-n,void 0),this._originalTopPadding.set(0,void 0)):setTimeout((()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)}),400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-n,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+n,void 0,!0)})))}};function TX(e,t,i,n,o,s){const r=new du(MX(e,n)),a=new du(MX(t,o)),l=e.getOption(67),d=t.getOption(67),c=[];let h=0,u=0;function g(e,t){for(;;){let i=r.peek(),n=a.peek();if(i&&i.lineNumber>=e&&(i=void 0),n&&n.lineNumber>=t&&(n=void 0),!i&&!n)break;const o=i?i.lineNumber-h:Number.MAX_VALUE,s=n?n.lineNumber-u:Number.MAX_VALUE;os?(a.dequeue(),i={lineNumber:n.lineNumber-u+h,heightInPx:0}):(r.dequeue(),a.dequeue()),c.push({originalRange:Nu.ofLength(i.lineNumber,1),modifiedRange:Nu.ofLength(n.lineNumber,1),originalHeightInPx:l+i.heightInPx,modifiedHeightInPx:d+n.heightInPx,diff:void 0})}}for(const p of i){const m=p.lineRangeMapping;g(m.original.startLineNumber,m.modified.startLineNumber);let f=!0,_=m.modified.startLineNumber,v=m.original.startLineNumber;function b(e,t){var i,n,o,s;if(et.lineNumbere+t.heightInPx),0))&&void 0!==n?n:0,m=null!==(s=null===(o=a.takeWhile((e=>e.lineNumbere+t.heightInPx),0))&&void 0!==s?s:0;c.push({originalRange:h,modifiedRange:u,originalHeightInPx:h.length*l+g,modifiedHeightInPx:u.length*d+m,diff:p.lineRangeMapping}),v=e,_=t}if(s)for(const w of m.innerChanges||[]){w.originalRange.startColumn>1&&w.modifiedRange.startColumn>1&&b(w.originalRange.startLineNumber,w.modifiedRange.startLineNumber);const C=e.getModel(),y=w.originalRange.endLineNumber<=C.getLineCount()?C.getLineMaxColumn(w.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;w.originalRange.endColumn1&&n.push({lineNumber:t,heightInPx:r*(e-1)})}for(const n of e.getWhitespaces()){if(t.has(n.id))continue;const e=0===n.afterLineNumber?0:s.convertViewPositionToModelPosition(new wd(n.afterLineNumber,1)).lineNumber;i.push({lineNumber:e,heightInPx:n.height})}return function(e,t,i,n){if(0===e.length)return t;if(0===t.length)return e;const o=[];let s=0,r=0;for(;sh?(o.push(d),r++):(o.push((l=d,{lineNumber:(a=n).lineNumber,heightInPx:a.heightInPx+l.heightInPx})),s++,r++)}for(var a,l;se.lineNumber))}IX=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([NX(8,OL),NX(9,hD)],IX);class AX extends lt{constructor(e,t,i){super(),this._editor=e,this._domNode=t,this.itemProvider=i,this.scrollTop=II(this._editor.onDidScrollChange,(e=>this._editor.getScrollTop())),this.isScrollTopZero=this.scrollTop.map((e=>0===e)),this.modelAttached=II(this._editor.onDidChangeModel,(e=>this._editor.hasModel())),this.editorOnDidChangeViewZones=MI("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=MI("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=RI("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const n=this._domNode.appendChild(Pr("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),o=new ResizeObserver((()=>{lI((e=>{this.domNodeSizeChanged.trigger(e)}))}));o.observe(this._domNode),this._register(rt((()=>o.disconnect()))),this._register(SI((e=>{n.className=this.isScrollTopZero.read(e)?"":"scroll-decoration"}))),this._register(SI((e=>this.render(e))))}dispose(){super.dispose(),br(this._domNode)}render(e){if(!this.modelAttached.read(e))return;this.domNodeSizeChanged.read(e),this.editorOnDidChangeViewZones.read(e),this.editorOnDidContentSizeChange.read(e);const t=this.scrollTop.read(e),i=this._editor.getVisibleRanges(),n=new Set(this.views.keys()),o=wu.ofStartAndLength(0,this._domNode.clientHeight);if(!o.isEmpty)for(const s of i){const i=new Nu(s.startLineNumber,s.endLineNumber+1),r=this.itemProvider.getIntersectingGutterItems(i,e);lI((e=>{for(const s of r){if(!s.range.intersect(i))continue;n.delete(s.id);let r=this.views.get(s.id);if(r)r.item.set(s,e);else{const e=document.createElement("div");this._domNode.appendChild(e);const t=uI("item",s),i=this.itemProvider.createView(t,e);r=new RX(t,i,e),this.views.set(s.id,r)}const a=s.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(s.range.startLineNumber,!0)-t:this._editor.getBottomForLineNumber(s.range.startLineNumber-1,!1)-t,l=(s.range.isEmpty?a:this._editor.getBottomForLineNumber(s.range.endLineNumberExclusive-1,!0)-t)-a;r.domNode.style.top=`${a}px`,r.domNode.style.height=`${l}px`,r.gutterItemView.layout(wu.ofStartAndLength(a,l),o)}}))}for(const e of n){const t=this.views.get(e);t.gutterItemView.dispose(),this._domNode.removeChild(t.domNode),this.views.delete(e)}}}class RX{constructor(e,t,i){this.item=e,this.gutterItemView=t,this.domNode=i}}class PX extends kd{constructor(e){super(),this._getContext=e}runAction(e,t){const i=this._getContext();return super.runAction(e,i)}}class OX extends _H{constructor(e){super(),this._textModel=e}getValueOfRange(e){return this._textModel.getValueInRange(e)}get length(){const e=this._textModel.getLineCount(),t=this._textModel.getLineLength(e);return new bp(e-1,t)}}var FX=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},BX=function(e,t){return function(i,n){t(i,n,e)}};const WX=[];let VX=class extends lt{constructor(e,t,i,n,o,s,r,a,l){var d,c;super(),this._diffModel=t,this._editors=i,this._options=n,this._sashLayout=o,this._boundarySashes=s,this._instantiationService=r,this._contextKeyService=a,this._menuService=l,this._menu=this._register(this._menuService.createMenu(Mc.DiffEditorHunkToolbar,this._contextKeyService)),this._actions=II(this._menu.onDidChange,(()=>this._menu.getActions())),this._hasActions=this._actions.map((e=>e.length>0)),this._showSash=fI(this,(e=>this._options.renderSideBySide.read(e)&&this._hasActions.read(e))),this.width=fI(this,(e=>this._hasActions.read(e)?35:0)),this.elements=Pr("div.gutter@gutter",{style:{position:"absolute",height:"100%",width:"35px"}},[]),this._currentDiff=fI(this,(e=>{var t;const i=this._diffModel.read(e);if(!i)return;const n=null===(t=i.diff.read(e))||void 0===t?void 0:t.mappings,o=this._editors.modifiedCursor.read(e);return o?null==n?void 0:n.find((e=>e.lineRangeMapping.modified.contains(o.lineNumber))):void 0})),this._selectedDiffs=fI(this,(e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);if(!i)return WX;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return WX;const o=new Iu(n.map((e=>Nu.fromRangeInclusive(e)))),s=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&o.intersects(e.lineRangeMapping.modified))).map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>hh.areIntersecting(e.modifiedRange,t)))))})));return 0===s.length||s.every((e=>0===e.rangeMappings.length))?WX:s})),this._register((d=e,c=this.elements.root,d.prepend(c),rt((()=>{d.removeChild(c)})))),this._register(ws(this.elements.root,"click",(()=>{this._editors.modified.focus()}))),this._register(CQ(this.elements.root,{display:this._hasActions.map((e=>e?"block":"none"))})),wI(this,(t=>this._showSash.read(t)?new hX(e,this._sashLayout.dimensions,this._options.enableSplitViewResizing,this._boundarySashes,_I(this,(e=>this._sashLayout.sashLeft.read(e)-35),((e,t)=>this._sashLayout.sashLeft.set(e+35,t))),(()=>this._sashLayout.resetSash())):void 0)).recomputeInitiallyAndOnChange(this._store),this._register(new AX(this._editors.modified,this.elements.root,{getIntersectingGutterItems:(e,t)=>{const i=this._diffModel.read(t);if(!i)return[];const n=i.diff.read(t);if(!n)return[];const o=this._selectedDiffs.read(t);if(o.length>0){const e=wH.fromRangeMappings(o.flatMap((e=>e.rangeMappings)));return[new HX(e,!0,Mc.DiffEditorSelectionToolbar,void 0,i.model.original.uri,i.model.modified.uri)]}const s=this._currentDiff.read(t);return n.mappings.map((e=>new HX(e.lineRangeMapping.withInnerChangesFromLineRanges(),e.lineRangeMapping===(null==s?void 0:s.lineRangeMapping),Mc.DiffEditorHunkToolbar,void 0,i.model.original.uri,i.model.modified.uri)))},createView:(e,t)=>this._instantiationService.createInstance(zX,e,t,this)})),this._register(ws(this.elements.gutter,ur.MOUSE_WHEEL,(e=>{this._editors.modified.getOption(103).handleMouseWheel&&this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1}))}computeStagedValue(e){var t;const i=null!==(t=e.innerChanges)&&void 0!==t?t:[],n=new OX(this._editors.modifiedModel.get()),o=new OX(this._editors.original.getModel()),s=new pH(i.map((e=>e.toTextEdit(n))));return s.apply(o)}layout(e){this.elements.gutter.style.left=e+"px"}};VX=FX([BX(6,_d),BX(7,pc),BX(8,Ac)],VX);class HX{constructor(e,t,i,n,o,s){this.mapping=e,this.showAlways=t,this.menuId=i,this.rangeOverride=n,this.originalUri=o,this.modifiedUri=s}get id(){return this.mapping.modified.toString()}get range(){var e;return null!==(e=this.rangeOverride)&&void 0!==e?e:this.mapping.modified}}let zX=class extends lt{constructor(e,t,i,n){super(),this._item=e,this._elements=Pr("div.gutterItem",{style:{height:"20px",width:"34px"}},[Pr("div.background@background",{},[]),Pr("div.buttons@buttons",{},[])]),this._showAlways=this._item.map(this,(e=>e.showAlways)),this._menuId=this._item.map(this,(e=>e.menuId)),this._isSmall=uI(this,!1),this._lastItemRange=void 0,this._lastViewRange=void 0;const o=this._register(n.createInstance(ij,"element",!0,{position:{hoverPosition:1}}));this._register(mQ(t,this._elements.root)),this._register(SI((e=>{const t=this._showAlways.read(e);this._elements.root.classList.toggle("noTransition",!0),this._elements.root.classList.toggle("showAlways",t),setTimeout((()=>{this._elements.root.classList.toggle("noTransition",!1)}),0)}))),this._register(LI(((e,t)=>{this._elements.buttons.replaceChildren();const s=t.add(n.createInstance(gK,this._elements.buttons,this._menuId.read(e),{orientation:1,hoverDelegate:o,toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},overflowBehavior:{maxItems:this._isSmall.read(e)?1:3},hiddenItemStrategy:0,actionRunner:new PX((()=>{const e=this._item.get(),t=e.mapping;return{mapping:t,originalWithModifiedChanges:i.computeStagedValue(t),originalUri:e.originalUri,modifiedUri:e.modifiedUri}})),menuOptions:{shouldForwardArgs:!0}}));t.add(s.onDidChangeMenuItems((()=>{this._lastItemRange&&this.layout(this._lastItemRange,this._lastViewRange)})))})))}layout(e,t){this._lastItemRange=e,this._lastViewRange=t;let i=this._elements.buttons.clientHeight;this._isSmall.set(1===this._item.get().mapping.original.startLineNumber&&e.length<30,void 0),i=this._elements.buttons.clientHeight;const n=e.length/2-i/2,o=i;let s=e.start+n;const r=wu.tryCreate(o,t.endExclusive-o-i),a=wu.tryCreate(e.start+o,e.endExclusive-i-o);a&&r&&a.start{const t=this._editors.modifiedModel.read(e),i=UX._breadcrumbsSourceFactory.read(e);return t&&i?i(t,this._instantiationService):void 0})),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();lI((e=>{for(const i of this._editors.original.getSelections()||[])null==t||t.ensureOriginalLineIsVisible(i.getStartPosition().lineNumber,0,e),null==t||t.ensureOriginalLineIsVisible(i.getEndPosition().lineNumber,0,e)}))}))),this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(1===e.reason)return;const t=this._diffModel.get();lI((e=>{for(const i of this._editors.modified.getSelections()||[])null==t||t.ensureModifiedLineIsVisible(i.getStartPosition().lineNumber,0,e),null==t||t.ensureModifiedLineIsVisible(i.getEndPosition().lineNumber,0,e)}))})));const o=this._diffModel.map(((e,t)=>{var i,n;const o=null!==(i=null==e?void 0:e.unchangedRegions.read(t))&&void 0!==i?i:[];return 1===o.length&&1===o[0].modifiedLineNumber&&o[0].lineCount===(null===(n=this._editors.modifiedModel.read(t))||void 0===n?void 0:n.getLineCount())?[]:o}));this.viewZones=bI(this,((e,t)=>{const i=this._modifiedOutlineSource.read(e);if(!i)return{origViewZones:[],modViewZones:[]};const n=[],s=[],r=this._options.renderSideBySide.read(e),a=o.read(e);for(const o of a)if(!o.shouldHideControls(e)){{const e=fI(this,(e=>o.getHiddenOriginalRange(e).startLineNumber-1)),s=new bQ(e,24);n.push(s),t.add(new jX(this._editors.original,s,o,o.originalUnchangedRange,!r,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}{const e=fI(this,(e=>o.getHiddenModifiedRange(e).startLineNumber-1)),n=new bQ(e,24);s.push(n),t.add(new jX(this._editors.modified,n,o,o.modifiedUnchangedRange,!1,i,(e=>this._diffModel.get().ensureModifiedLineIsVisible(e,2,void 0)),this._options))}}return{origViewZones:n,modViewZones:s}}));const s={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},r={description:"Fold Unchanged",glyphMarginHoverMessage:new dd(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(v(0,"Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+Rl.asClassName(Ml.fold),zIndex:10001};this._register(pQ(this._editors.original,fI(this,(e=>{const t=o.read(e),i=t.map((e=>({range:e.originalUnchangedRange.toInclusiveRange(),options:s})));for(const n of t)n.shouldHideControls(e)&&i.push({range:hh.fromPositions(new wd(n.originalLineNumber,1)),options:r});return i})))),this._register(pQ(this._editors.modified,fI(this,(e=>{const t=o.read(e),i=t.map((e=>({range:e.modifiedUnchangedRange.toInclusiveRange(),options:s})));for(const n of t)n.shouldHideControls(e)&&i.push({range:Nu.ofLength(n.modifiedLineNumber,1).toInclusiveRange(),options:r});return i})))),this._register(SI((e=>{const t=o.read(e);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(t.map((t=>t.getHiddenOriginalRange(e).toInclusiveRange())).filter(Sl)),this._editors.modified.setHiddenAreas(t.map((t=>t.getHiddenModifiedRange(e).toInclusiveRange())).filter(Sl))}finally{this._isUpdatingHiddenAreas=!1}}))),this._register(this._editors.modified.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.modifiedUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}}))),this._register(this._editors.original.onMouseUp((e=>{var t;if(!e.event.rightButton&&e.target.position&&(null===(t=e.target.element)||void 0===t?void 0:t.className.includes("fold-unchanged"))){const t=e.target.position.lineNumber,i=this._diffModel.get();if(!i)return;const n=i.unchangedRegions.get().find((e=>e.originalUnchangedRange.includes(t)));if(!n)return;n.collapseAll(void 0),e.event.stopPropagation(),e.event.preventDefault()}})))}};KX._breadcrumbsSourceFactory=uI("breadcrumbsSourceFactory",void 0),KX=UX=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,_d)],KX);class jX extends vQ{constructor(e,t,i,n,o,s,r,a){const l=Pr("div.diff-hidden-lines-widget");super(e,t,l.root),this._editor=e,this._unchangedRegion=i,this._unchangedRegionRange=n,this._hide=o,this._modifiedOutlineSource=s,this._revealModifiedHiddenLine=r,this._options=a,this._nodes=Pr("div.diff-hidden-lines",[Pr("div.top@top",{title:v(0,"Click or drag to show more above")}),Pr("div.center@content",{style:{display:"flex"}},[Pr("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[Sr("a",{title:v(0,"Show Unchanged Region"),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...Rx("$(unfold)"))]),Pr("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),Pr("div.bottom@bottom",{title:v(0,"Click or drag to show more below"),role:"button"})]),l.root.appendChild(this._nodes.root);const d=II(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));this._hide?br(this._nodes.first):this._register(CQ(this._nodes.first,{width:d.map((e=>e.contentLeft))})),this._register(SI((e=>{const t=this._unchangedRegion.visibleLineCountTop.read(e)+this._unchangedRegion.visibleLineCountBottom.read(e)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!t),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),this._nodes.top.classList.toggle("canMoveBottom",!t);const i=this._unchangedRegion.isDragged.read(e),n=this._editor.getDomNode();n&&(n.classList.toggle("draggingUnchangedRegion",!!i),"top"===i?(n.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(e)>0),n.classList.toggle("canMoveBottom",!t)):"bottom"===i?(n.classList.toggle("canMoveTop",!t),n.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(e)>0)):(n.classList.toggle("canMoveTop",!1),n.classList.toggle("canMoveBottom",!1)))})));const c=this._editor;this._register(ws(this._nodes.top,"mousedown",(e=>{if(0!==e.button)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const o=ls(this._nodes.top),s=ws(o,"mousemove",(e=>{const o=e.clientY-t;i=i||Math.abs(o)>2;const s=Math.round(o/c.getOption(67)),r=Math.max(0,Math.min(n+s,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(r,void 0)})),r=ws(o,"mouseup",(e=>{i||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),s.dispose(),r.dispose()}))}))),this._register(ws(this._nodes.bottom,"mousedown",(e=>{if(0!==e.button)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),e.preventDefault();const t=e.clientY;let i=!1;const n=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const o=ls(this._nodes.bottom),s=ws(o,"mousemove",(e=>{const o=e.clientY-t;i=i||Math.abs(o)>2;const s=Math.round(o/c.getOption(67)),r=Math.max(0,Math.min(n-s,this._unchangedRegion.getMaxVisibleLineCountBottom())),a=this._unchangedRegionRange.endLineNumberExclusive>c.getModel().getLineCount()?c.getContentHeight():c.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(r,void 0);const l=this._unchangedRegionRange.endLineNumberExclusive>c.getModel().getLineCount()?c.getContentHeight():c.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);c.setScrollTop(c.getScrollTop()+(l-a))})),r=ws(o,"mouseup",(e=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!i){const e=c.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const t=c.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);c.setScrollTop(c.getScrollTop()+(t-e))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),s.dispose(),r.dispose()}))}))),this._register(SI((e=>{const t=[];if(!this._hide){const n=v(0,"{0} hidden lines",i.getHiddenModifiedRange(e).length),o=Sr("span",{title:v(0,"Double click to unfold")},n);o.addEventListener("dblclick",(e=>{0===e.button&&(e.preventDefault(),this._unchangedRegion.showAll(void 0))})),t.push(o);const s=this._unchangedRegion.getHiddenModifiedRange(e),r=this._modifiedOutlineSource.getBreadcrumbItems(s,e);if(r.length>0){t.push(Sr("span",void 0,"  |  "));for(let e=0;e{this._revealModifiedHiddenLine(i.startLineNumber)}}}}br(this._nodes.others,...t)})))}}var qX;let $X=qX=class extends lt{constructor(e,t,i,n,o,s,r){super(),this._editors=e,this._rootElement=t,this._diffModel=i,this._rootWidth=n,this._rootHeight=o,this._modifiedEditorLayoutInfo=s,this._themeService=r,this.width=qX.ENTIRE_DIFF_OVERVIEW_WIDTH;const a=II(this._themeService.onDidColorThemeChange,(()=>this._themeService.getColorTheme())),l=fI((e=>{const t=a.read(e);return{insertColor:t.getColor(Ff)||(t.getColor(Pf)||Af).transparent(2),removeColor:t.getColor(Bf)||(t.getColor(Of)||Rf).transparent(2)}})),d=CL(document.createElement("div"));d.setClassName("diffViewport"),d.setPosition("absolute");const c=Pr("div.diffOverview",{style:{position:"absolute",top:"0px",width:qX.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register(mQ(c,d.domNode)),this._register(ys(c,ur.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)}))),this._register(ws(c,ur.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:!1})),this._register(mQ(this._rootElement,c)),this._register(LI(((e,t)=>{const i=this._diffModel.read(e),n=this._editors.original.createOverviewRuler("original diffOverviewRuler");n&&(t.add(n),t.add(mQ(c,n.getDomNode())));const o=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(o&&(t.add(o),t.add(mQ(c,o.getDomNode()))),!n||!o)return;const s=MI("viewZoneChanged",this._editors.original.onDidChangeViewZones),r=MI("viewZoneChanged",this._editors.modified.onDidChangeViewZones),a=MI("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),h=MI("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);t.add(SI((e=>{var t;s.read(e),r.read(e),a.read(e),h.read(e);const d=l.read(e),c=null===(t=null==i?void 0:i.diff.read(e))||void 0===t?void 0:t.mappings;function u(e,t,i){const n=i._getViewModel();return n?e.filter((e=>e.length>0)).map((e=>{const i=n.coordinatesConverter.convertModelPositionToViewPosition(new wd(e.startLineNumber,1)),o=n.coordinatesConverter.convertModelPositionToViewPosition(new wd(e.endLineNumberExclusive,1)),s=o.lineNumber-i.lineNumber;return new wO(i.lineNumber,o.lineNumber,s,t.toString())})):[]}const g=u((c||[]).map((e=>e.lineRangeMapping.original)),d.removeColor,this._editors.original),p=u((c||[]).map((e=>e.lineRangeMapping.modified)),d.insertColor,this._editors.modified);null==n||n.setZones(g),null==o||o.setZones(p)}))),t.add(SI((e=>{const t=this._rootHeight.read(e),i=this._rootWidth.read(e),s=this._modifiedEditorLayoutInfo.read(e);if(s){const i=qX.ENTIRE_DIFF_OVERVIEW_WIDTH-2*qX.ONE_OVERVIEW_WIDTH;n.setLayout({top:0,height:t,right:i+qX.ONE_OVERVIEW_WIDTH,width:qX.ONE_OVERVIEW_WIDTH}),o.setLayout({top:0,height:t,right:0,width:qX.ONE_OVERVIEW_WIDTH});const r=this._editors.modifiedScrollTop.read(e),a=this._editors.modifiedScrollHeight.read(e),l=this._editors.modified.getOption(103),c=new bN(l.verticalHasArrows?l.arrowSize:0,l.verticalScrollbarSize,0,s.height,a,r);d.setTop(c.getSliderPosition()),d.setHeight(c.getSliderSize())}else d.setTop(0),d.setHeight(0);c.style.height=t+"px",c.style.left=i-qX.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",d.setWidth(qX.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))}};$X.ONE_OVERVIEW_WIDTH=15,$X.ENTIRE_DIFF_OVERVIEW_WIDTH=2*qX.ONE_OVERVIEW_WIDTH,$X=qX=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(6,Vv)],$X);const GX=[];class ZX extends lt{constructor(e,t,i,n){super(),this._editors=e,this._diffModel=t,this._options=i,this._widget=n,this._selectedDiffs=fI(this,(e=>{const t=this._diffModel.read(e),i=null==t?void 0:t.diff.read(e);if(!i)return GX;const n=this._editors.modifiedSelections.read(e);if(n.every((e=>e.isEmpty())))return GX;const o=new Iu(n.map((e=>Nu.fromRangeInclusive(e)))),s=i.mappings.filter((e=>e.lineRangeMapping.innerChanges&&o.intersects(e.lineRangeMapping.modified))).map((e=>({mapping:e,rangeMappings:e.lineRangeMapping.innerChanges.filter((e=>n.some((t=>hh.areIntersecting(e.modifiedRange,t)))))})));return 0===s.length||s.every((e=>0===e.rangeMappings.length))?GX:s})),this._register(LI(((e,t)=>{if(!this._options.shouldRenderOldRevertArrows.read(e))return;const i=this._diffModel.read(e),n=null==i?void 0:i.diff.read(e);if(!i||!n)return;if(i.movedTextToCompare.read(e))return;const o=[],s=this._selectedDiffs.read(e),r=new Set(s.map((e=>e.mapping)));if(s.length>0){const i=this._editors.modifiedSelections.read(e),n=t.add(new YX(i[i.length-1].positionLineNumber,this._widget,s.flatMap((e=>e.rangeMappings)),!0));this._editors.modified.addGlyphMarginWidget(n),o.push(n)}for(const e of n.mappings)if(!r.has(e)&&!e.lineRangeMapping.modified.isEmpty&&e.lineRangeMapping.innerChanges){const i=t.add(new YX(e.lineRangeMapping.modified.startLineNumber,this._widget,e.lineRangeMapping,!1));this._editors.modified.addGlyphMarginWidget(i),o.push(i)}t.add(rt((()=>{for(const e of o)this._editors.modified.removeGlyphMarginWidget(e)})))})))}}class YX extends lt{getId(){return this._id}constructor(e,t,i,n){super(),this._lineNumber=e,this._widget=t,this._diffs=i,this._revertSelection=n,this._id="revertButton"+YX.counter++,this._domNode=Pr("div.revertButton",{title:this._revertSelection?v(0,"Revert Selected Changes"):v(0,"Revert Change")},[Px(Ml.arrowRight)]).root,this._register(ws(this._domNode,ur.MOUSE_DOWN,(e=>{2!==e.button&&(e.stopPropagation(),e.preventDefault())}))),this._register(ws(this._domNode,ur.MOUSE_UP,(e=>{e.stopPropagation(),e.preventDefault()}))),this._register(ws(this._domNode,ur.CLICK,(e=>{this._diffs instanceof bH?this._widget.revert(this._diffs):this._widget.revertRangeMappings(this._diffs),e.stopPropagation(),e.preventDefault()})))}getDomNode(){return this._domNode}getPosition(){return{lane:Nh.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}function QX(e,t,i){const n=e.bindTo(t);return kI({debugName:()=>`Set Context Key "${e.key}"`},(e=>{n.set(i(e))}))}YX.counter=0;class XX{static get(e){let t=XX._map.get(e);if(!t){t=new XX(e),XX._map.set(e,t);const i=e.onDidDispose((()=>{XX._map.delete(e),i.dispose()}))}return t}constructor(e){this.editor=e,this.model=II(this.editor.onDidChangeModel,(()=>this.editor.getModel()))}}XX._map=new Map;var JX=function(e,t){return function(i,n){t(i,n,e)}};let eJ=class extends lt{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(e,t,i,n,o,s,r){super(),this.originalEditorElement=e,this.modifiedEditorElement=t,this._options=i,this._argCodeEditorWidgetOptions=n,this._createInnerEditor=o,this._instantiationService=s,this._keybindingService=r,this.original=this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(this._options.editorOptions.get(),this._argCodeEditorWidgetOptions.modifiedEditor||{})),this._onDidContentSizeChange=this._register(new kt),this.modifiedScrollTop=II(this.modified.onDidScrollChange,(()=>this.modified.getScrollTop())),this.modifiedScrollHeight=II(this.modified.onDidScrollChange,(()=>this.modified.getScrollHeight())),this.modifiedModel=function(e){return XX.get(e)}(this.modified).model,this.modifiedSelections=II(this.modified.onDidChangeCursorSelection,(()=>{var e;return null!==(e=this.modified.getSelections())&&void 0!==e?e:[]})),this.modifiedCursor=vI({owner:this,equalsFn:wd.equals},(e=>{var t,i;return null!==(i=null===(t=this.modifiedSelections.read(e)[0])||void 0===t?void 0:t.getPosition())&&void 0!==i?i:new wd(1,1)})),this.originalCursor=II(this.original.onDidChangeCursorPosition,(()=>{var e;return null!==(e=this.original.getPosition())&&void 0!==e?e:new wd(1,1)})),this._argCodeEditorWidgetOptions=null,this._register(xI({createEmptyChangeSummary:()=>({}),handleChange:(e,t)=>(e.didChange(i.editorOptions)&&Object.assign(t,e.change.changedOptions),!0)},((e,t)=>{i.editorOptions.read(e),this._options.renderSideBySide.read(e),this.modified.updateOptions(this._adjustOptionsForRightHandSide(e,t)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(e,t))})))}_createLeftHandSideEditor(e,t){const i=this._adjustOptionsForLeftHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,i,t);return n.setContextValue("isInDiffLeftEditor",!0),n}_createRightHandSideEditor(e,t){const i=this._adjustOptionsForRightHandSide(void 0,e),n=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,i,t);return n.setContextValue("isInDiffRightEditor",!0),n}_constructInnerEditor(e,t,i,n){const o=this._createInnerEditor(e,t,i,n);return this._register(o.onDidContentSizeChange((e=>{const t=this.original.getContentWidth()+this.modified.getContentWidth()+$X.ENTIRE_DIFF_OVERVIEW_WIDTH,i=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:i,contentWidth:t,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),o}_adjustOptionsForLeftHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(i.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},i.wordWrapOverride1=this._options.diffWordWrap.get()):(i.wordWrapOverride1="off",i.wordWrapOverride2="off",i.stickyScroll={enabled:!1},i.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),i.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(i.ariaLabel=t.originalAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.readOnly=!this._options.originalEditable.get(),i.dropIntoEditor={enabled:!i.readOnly},i.extraEditorClassName="original-in-monaco-diff-editor",i}_adjustOptionsForRightHandSide(e,t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.ariaLabel=this._updateAriaLabel(i.ariaLabel),i.wordWrapOverride1=this._options.diffWordWrap.get(),i.revealHorizontalRightPadding=CE.revealHorizontalRightPadding.defaultValue+$X.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",i}_adjustOptionsForSubEditor(e){const t={...e,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(e){var t;e||(e="");const i=v(0," use {0} to open the accessibility help.",null===(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))||void 0===t?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?e+i:e?e.replaceAll(i,""):""}};eJ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([JX(5,_d),JX(6,uD)],eJ);class tJ extends lt{constructor(){super(...arguments),this._id=++tJ.idCounter,this._onDidDispose=this._register(new kt),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(e){return this._targetEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._targetEditor.getPosition()}setPosition(e,t="api"){this._targetEditor.setPosition(e,t)}revealLine(e,t=0){this._targetEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._targetEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._targetEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._targetEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._targetEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._targetEditor.revealPositionNearTop(e,t)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(e,t="api"){this._targetEditor.setSelection(e,t)}setSelections(e,t="api"){this._targetEditor.setSelections(e,t)}revealLines(e,t,i=0){this._targetEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._targetEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._targetEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._targetEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._targetEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._targetEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._targetEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(e,t,i){this._targetEditor.trigger(e,t,i)}createDecorationsCollection(e){return this._targetEditor.createDecorationsCollection(e)}changeDecorations(e){return this._targetEditor.changeDecorations(e)}}tJ.idCounter=0;let iJ=class{get editorOptions(){return this._options}constructor(e,t){this._accessibilityService=t,this._diffEditorWidth=uI(this,0),this._screenReaderMode=II(this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this.couldShowInlineViewBecauseOfSize=fI(this,(e=>this._options.read(e).renderSideBySide&&this._diffEditorWidth.read(e)<=this._options.read(e).renderSideBySideInlineBreakpoint)),this.renderOverviewRuler=fI(this,(e=>this._options.read(e).renderOverviewRuler)),this.renderSideBySide=fI(this,(e=>this._options.read(e).renderSideBySide&&!(this._options.read(e).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(e)&&!this._screenReaderMode.read(e)))),this.readOnly=fI(this,(e=>this._options.read(e).readOnly)),this.shouldRenderOldRevertArrows=fI(this,(e=>!(!this._options.read(e).renderMarginRevertIcon||!this.renderSideBySide.read(e)||this.readOnly.read(e)||this.shouldRenderGutterMenu.read(e)))),this.shouldRenderGutterMenu=fI(this,(e=>this._options.read(e).renderGutterMenu)),this.renderIndicators=fI(this,(e=>this._options.read(e).renderIndicators)),this.enableSplitViewResizing=fI(this,(e=>this._options.read(e).enableSplitViewResizing)),this.splitViewDefaultRatio=fI(this,(e=>this._options.read(e).splitViewDefaultRatio)),this.ignoreTrimWhitespace=fI(this,(e=>this._options.read(e).ignoreTrimWhitespace)),this.maxComputationTimeMs=fI(this,(e=>this._options.read(e).maxComputationTime)),this.showMoves=fI(this,(e=>this._options.read(e).experimental.showMoves&&this.renderSideBySide.read(e))),this.isInEmbeddedEditor=fI(this,(e=>this._options.read(e).isInEmbeddedEditor)),this.diffWordWrap=fI(this,(e=>this._options.read(e).diffWordWrap)),this.originalEditable=fI(this,(e=>this._options.read(e).originalEditable)),this.diffCodeLens=fI(this,(e=>this._options.read(e).diffCodeLens)),this.accessibilityVerbose=fI(this,(e=>this._options.read(e).accessibilityVerbose)),this.diffAlgorithm=fI(this,(e=>this._options.read(e).diffAlgorithm)),this.showEmptyDecorations=fI(this,(e=>this._options.read(e).experimental.showEmptyDecorations)),this.onlyShowAccessibleDiffViewer=fI(this,(e=>this._options.read(e).onlyShowAccessibleDiffViewer)),this.hideUnchangedRegions=fI(this,(e=>this._options.read(e).hideUnchangedRegions.enabled)),this.hideUnchangedRegionsRevealLineCount=fI(this,(e=>this._options.read(e).hideUnchangedRegions.revealLineCount)),this.hideUnchangedRegionsContextLineCount=fI(this,(e=>this._options.read(e).hideUnchangedRegions.contextLineCount)),this.hideUnchangedRegionsMinimumLineCount=fI(this,(e=>this._options.read(e).hideUnchangedRegions.minimumLineCount));const i={...e,...nJ(e,FD)};this._options=uI(this,i)}updateOptions(e){const t=nJ(e,this._options.get()),i={...this._options.get(),...e,...t};this._options.set(i,void 0,{changedOptions:e})}setWidth(e){this._diffEditorWidth.set(e,void 0)}};function nJ(e,t){var i,n,o,s,r,a,l,d;return{enableSplitViewResizing:jD(e.enableSplitViewResizing,t.enableSplitViewResizing),splitViewDefaultRatio:ZD(e.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:jD(e.renderSideBySide,t.renderSideBySide),renderMarginRevertIcon:jD(e.renderMarginRevertIcon,t.renderMarginRevertIcon),maxComputationTime:$D(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:$D(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:jD(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:jD(e.renderIndicators,t.renderIndicators),originalEditable:jD(e.originalEditable,t.originalEditable),diffCodeLens:jD(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:jD(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:XD(e.diffWordWrap,t.diffWordWrap,["off","on","inherit"]),diffAlgorithm:XD(e.diffAlgorithm,t.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:jD(e.accessibilityVerbose,t.accessibilityVerbose),experimental:{showMoves:jD(null===(i=e.experimental)||void 0===i?void 0:i.showMoves,t.experimental.showMoves),showEmptyDecorations:jD(null===(n=e.experimental)||void 0===n?void 0:n.showEmptyDecorations,t.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:jD(null!==(s=null===(o=e.hideUnchangedRegions)||void 0===o?void 0:o.enabled)&&void 0!==s?s:null===(r=e.experimental)||void 0===r?void 0:r.collapseUnchangedRegions,t.hideUnchangedRegions.enabled),contextLineCount:$D(null===(a=e.hideUnchangedRegions)||void 0===a?void 0:a.contextLineCount,t.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:$D(null===(l=e.hideUnchangedRegions)||void 0===l?void 0:l.minimumLineCount,t.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:$D(null===(d=e.hideUnchangedRegions)||void 0===d?void 0:d.revealLineCount,t.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:jD(e.isInEmbeddedEditor,t.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:jD(e.onlyShowAccessibleDiffViewer,t.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:$D(e.renderSideBySideInlineBreakpoint,t.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:jD(e.useInlineViewWhenSpaceIsLimited,t.useInlineViewWhenSpaceIsLimited),renderGutterMenu:jD(e.renderGutterMenu,t.renderGutterMenu)}}iJ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,ak)],iJ);var oJ=function(e,t){return function(i,n){t(i,n,e)}};let sJ=class extends tJ{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(e,t,i,n,o,s,r,a){var l;super(),this._domElement=e,this._parentContextKeyService=n,this._parentInstantiationService=o,this._accessibilitySignalService=r,this._editorProgressService=a,this.elements=Pr("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[Pr("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),Pr("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),Pr("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=uI(this,void 0),this._shouldDisposeDiffModel=!1,this.onDidChangeModel=_t.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new $B([pc,this._contextKeyService]))),this._boundarySashes=uI(this,void 0),this._accessibleDiffViewerShouldBeVisible=uI(this,!1),this._accessibleDiffViewerVisible=fI(this,(e=>!!this._options.onlyShowAccessibleDiffViewer.read(e)||this._accessibleDiffViewerShouldBeVisible.read(e))),this._movedBlocksLinesPart=uI(this,void 0),this._layoutInfo=fI(this,(e=>{var t,i,n,o,s;const r=this._rootSizeObserver.width.read(e),a=this._rootSizeObserver.height.read(e);this._rootSizeObserver.automaticLayout?this.elements.root.style.height="100%":this.elements.root.style.height=a+"px";const l=this._sash.read(e),d=this._gutter.read(e),c=null!==(t=null==d?void 0:d.width.read(e))&&void 0!==t?t:0,h=null!==(n=null===(i=this._overviewRulerPart.read(e))||void 0===i?void 0:i.width)&&void 0!==n?n:0;let u,g,p,m,f;if(l){const t=l.sashLeft.read(e);u=0,g=t-c-(null!==(s=null===(o=this._movedBlocksLinesPart.read(e))||void 0===o?void 0:o.width.read(e))&&void 0!==s?s:0),f=t-c,p=t,m=r-p-h}else f=0,u=c,g=Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),p=c+g,m=r-p-h;return this.elements.original.style.left=u+"px",this.elements.original.style.width=g+"px",this._editors.original.layout({width:g,height:a},!0),null==d||d.layout(f),this.elements.modified.style.left=p+"px",this.elements.modified.style.width=m+"px",this._editors.modified.layout({width:m,height:a},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}})),this._diffValue=this._diffModel.map(((e,t)=>null==e?void 0:e.diff.read(t))),this.onDidUpdateDiff=_t.fromObservableLight(this._diffValue),s.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register(rt((()=>this._domElement.removeChild(this.elements.root)))),this._rootSizeObserver=this._register(new fQ(this.elements.root,t.dimension)),this._rootSizeObserver.setAutomaticLayout(null!==(l=t.automaticLayout)&&void 0!==l&&l),this._options=this._instantiationService.createInstance(iJ,t),this._register(SI((e=>{this._options.setWidth(this._rootSizeObserver.width.read(e))}))),this._contextKeyService.createKey(gh.isEmbeddedDiffEditor.key,!1),this._register(QX(gh.isEmbeddedDiffEditor,this._contextKeyService,(e=>this._options.isInEmbeddedEditor.read(e)))),this._register(QX(gh.comparingMovedCode,this._contextKeyService,(e=>{var t;return!!(null===(t=this._diffModel.read(e))||void 0===t?void 0:t.movedTextToCompare.read(e))}))),this._register(QX(gh.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,(e=>this._options.couldShowInlineViewBecauseOfSize.read(e)))),this._register(QX(gh.diffEditorInlineMode,this._contextKeyService,(e=>!this._options.renderSideBySide.read(e)))),this._register(QX(gh.hasChanges,this._contextKeyService,(e=>{var t,i,n;return(null!==(n=null===(i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.diff.read(e))||void 0===i?void 0:i.mappings.length)&&void 0!==n?n:0)>0}))),this._editors=this._register(this._instantiationService.createInstance(eJ,this.elements.original,this.elements.modified,this._options,i,((e,t,i,n)=>this._createInnerEditor(e,t,i,n)))),this._register(QX(gh.diffEditorOriginalWritable,this._contextKeyService,(e=>this._options.originalEditable.read(e)))),this._register(QX(gh.diffEditorModifiedWritable,this._contextKeyService,(e=>!this._options.readOnly.read(e)))),this._register(QX(gh.diffEditorOriginalUri,this._contextKeyService,(e=>{var t,i;return null!==(i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.model.original.uri.toString())&&void 0!==i?i:""}))),this._register(QX(gh.diffEditorModifiedUri,this._contextKeyService,(e=>{var t,i;return null!==(i=null===(t=this._diffModel.read(e))||void 0===t?void 0:t.model.modified.uri.toString())&&void 0!==i?i:""}))),this._overviewRulerPart=wI(this,(e=>this._options.renderOverviewRuler.read(e)?this._instantiationService.createInstance(yQ($X,e),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((e=>e.modifiedEditor))):void 0)).recomputeInitiallyAndOnChange(this._store);const d={height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((e,t)=>{var i,n;return e-(null!==(n=null===(i=this._overviewRulerPart.read(t))||void 0===i?void 0:i.width)&&void 0!==n?n:0)}))};this._sashLayout=new cX(this._options,d),this._sash=wI(this,(e=>{const t=this._options.renderSideBySide.read(e);return this.elements.root.classList.toggle("side-by-side",t),t?new hX(this.elements.root,d,this._options.enableSplitViewResizing,this._boundarySashes,this._sashLayout.sashLeft,(()=>this._sashLayout.resetSash())):void 0})).recomputeInitiallyAndOnChange(this._store);const c=wI(this,(e=>this._instantiationService.createInstance(yQ(KX,e),this._editors,this._diffModel,this._options))).recomputeInitiallyAndOnChange(this._store);wI(this,(e=>this._instantiationService.createInstance(yQ(dX,e),this._editors,this._diffModel,this._options,this))).recomputeInitiallyAndOnChange(this._store);const h=new Set,u=new Set;let g=!1;const p=wI(this,(e=>this._instantiationService.createInstance(yQ(IX,e),ls(this._domElement),this._editors,this._diffModel,this._options,this,(()=>g||c.get().isUpdatingHiddenAreas),h,u))).recomputeInitiallyAndOnChange(this._store),m=fI(this,(e=>{const t=p.read(e).viewZones.read(e).orig,i=c.read(e).viewZones.read(e).origViewZones;return t.concat(i)})),f=fI(this,(e=>{const t=p.read(e).viewZones.read(e).mod,i=c.read(e).viewZones.read(e).modViewZones;return t.concat(i)}));let _;this._register(SQ(this._editors.original,m,(e=>{g=e}),h)),this._register(SQ(this._editors.modified,f,(e=>{g=e,g?_=cW.capture(this._editors.modified):(null==_||_.restore(this._editors.modified),_=void 0)}),u)),this._accessibleDiffViewer=wI(this,(e=>this._instantiationService.createInstance(yQ(FQ,e),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((e,t)=>this._accessibleDiffViewerShouldBeVisible.set(e,t)),this._options.onlyShowAccessibleDiffViewer.map((e=>!e)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((e,t)=>{var i;return null===(i=null==e?void 0:e.diff.read(t))||void 0===i?void 0:i.mappings.map((e=>e.lineRangeMapping))})),new $Q(this._editors)))).recomputeInitiallyAndOnChange(this._store);const v=this._accessibleDiffViewerVisible.map((e=>e?"hidden":"visible"));this._register(CQ(this.elements.modified,{visibility:v})),this._register(CQ(this.elements.original,{visibility:v})),this._createDiffEditorContributions(),s.addDiffEditor(this),this._gutter=wI(this,(e=>this._options.shouldRenderGutterMenu.read(e)?this._instantiationService.createInstance(yQ(VX,e),this.elements.root,this._diffModel,this._editors,this._options,this._sashLayout,this._boundarySashes):void 0)),this._register(OI(this._layoutInfo)),wI(this,(e=>new(yQ(GQ,e))(this.elements.root,this._diffModel,this._layoutInfo.map((e=>e.originalEditor)),this._layoutInfo.map((e=>e.modifiedEditor)),this._editors))).recomputeInitiallyAndOnChange(this._store,(e=>{this._movedBlocksLinesPart.set(e,void 0)})),this._register(_t.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!0)))),this._register(_t.runAndSubscribe(this._editors.original.onDidChangeCursorPosition,(e=>this._handleCursorPositionChange(e,!1))));const b=this._diffModel.map(this,((e,t)=>{if(e)return void 0===e.diff.read(t)&&!e.isDiffUpToDate.read(t)}));this._register(LI(((e,t)=>{if(!0===b.read(e)){const e=this._editorProgressService.show(!0,1e3);t.add(rt((()=>e.done())))}}))),this._register(rt((()=>{var e;this._shouldDisposeDiffModel&&(null===(e=this._diffModel.get())||void 0===e||e.dispose())}))),this._register(LI(((e,t)=>{t.add(new(yQ(ZX,e))(this._editors,this._diffModel,this._options,this))})))}_createInnerEditor(e,t,i,n){return e.createInstance(YB,t,i,n)}_createDiffEditorContributions(){const e=sh.getDiffEditorContributions();for(const t of e)try{this._register(this._instantiationService.createInstance(t.ctor,this))}catch(e){xe(e)}}get _targetEditor(){return this._editors.modified}getEditorType(){return gF.IDiffEditor}layout(e){this._rootSizeObserver.observe(e)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var e;return{original:this._editors.original.saveViewState(),modified:this._editors.modified.saveViewState(),modelState:null===(e=this._diffModel.get())||void 0===e?void 0:e.serializeState()}}restoreViewState(e){var t;if(e&&e.original&&e.modified){const i=e;this._editors.original.restoreViewState(i.original),this._editors.modified.restoreViewState(i.modified),i.modelState&&(null===(t=this._diffModel.get())||void 0===t||t.restoreSerializedState(i.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(e){return this._instantiationService.createInstance(bX,e,this._options)}getModel(){var e,t;return null!==(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.model)&&void 0!==t?t:null}setModel(e,t){!e&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();const i=e?"model"in e?{model:e,shouldDispose:!1}:{model:this.createViewModel(e),shouldDispose:!0}:void 0;this._diffModel.get()!==(null==i?void 0:i.model)&&cI(t,(e=>{var t;II.batchEventsGlobally(e,(()=>{this._editors.original.setModel(i?i.model.model.original:null),this._editors.modified.setModel(i?i.model.model.modified:null)}));const n=this._diffModel.get(),o=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=null!==(t=null==i?void 0:i.shouldDispose)&&void 0!==t&&t,this._diffModel.set(null==i?void 0:i.model,e),o&&(null==n||n.dispose())}))}updateOptions(e){this._options.updateOptions(e)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get();return t?t.mappings.map((e=>{const t=e.lineRangeMapping;let i,n,o,s,r=t.innerChanges;return t.original.isEmpty?(i=t.original.startLineNumber-1,n=0,r=void 0):(i=t.original.startLineNumber,n=t.original.endLineNumberExclusive-1),t.modified.isEmpty?(o=t.modified.startLineNumber-1,s=0,r=void 0):(o=t.modified.startLineNumber,s=t.modified.endLineNumberExclusive-1),{originalStartLineNumber:i,originalEndLineNumber:n,modifiedStartLineNumber:o,modifiedEndLineNumber:s,charChanges:null==r?void 0:r.map((e=>({originalStartLineNumber:e.originalRange.startLineNumber,originalStartColumn:e.originalRange.startColumn,originalEndLineNumber:e.originalRange.endLineNumber,originalEndColumn:e.originalRange.endColumn,modifiedStartLineNumber:e.modifiedRange.startLineNumber,modifiedStartColumn:e.modifiedRange.startColumn,modifiedEndLineNumber:e.modifiedRange.endLineNumber,modifiedEndColumn:e.modifiedRange.endColumn})))}})):null}revert(e){const t=this._diffModel.get();t&&t.isDiffUpToDate.get()&&this._editors.modified.executeEdits("diffEditor",[{range:e.modified.toExclusiveRange(),text:t.model.original.getValueInRange(e.original.toExclusiveRange())}])}revertRangeMappings(e){const t=this._diffModel.get();if(!t||!t.isDiffUpToDate.get())return;const i=e.map((e=>({range:e.modifiedRange,text:t.model.original.getValueInRange(e.originalRange)})));this._editors.modified.executeEdits("diffEditor",i)}_goTo(e){this._editors.modified.setPosition(new wd(e.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(e.lineRangeMapping.modified.toExclusiveRange())}goToDiff(e){var t,i,n,o;const s=null===(i=null===(t=this._diffModel.get())||void 0===t?void 0:t.diff.get())||void 0===i?void 0:i.mappings;if(!s||0===s.length)return;const r=this._editors.modified.getPosition().lineNumber;let a;a="next"===e?null!==(n=s.find((e=>e.lineRangeMapping.modified.startLineNumber>r)))&&void 0!==n?n:s[0]:null!==(o=yu(s,(e=>e.lineRangeMapping.modified.startLineNumber{var t;const i=null===(t=e.diff.get())||void 0===t?void 0:t.mappings;i&&0!==i.length&&this._goTo(i[0])}))}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const e=this._diffModel.get();e&&await e.waitForDiff()}mapToOtherSide(){var e,t;const i=this._editors.modified.hasWidgetFocus(),n=i?this._editors.modified:this._editors.original,o=i?this._editors.original:this._editors.modified;let s;const r=n.getSelection();if(r){const n=null===(t=null===(e=this._diffModel.get())||void 0===e?void 0:e.diff.get())||void 0===t?void 0:t.mappings.map((e=>i?e.lineRangeMapping.flip():e.lineRangeMapping));if(n){const e=xQ(r.getStartPosition(),n),t=xQ(r.getEndPosition(),n);s=hh.plusRange(e,t)}}return{destination:o,destinationSelection:s}}switchSide(){const{destination:e,destinationSelection:t}=this.mapToOtherSide();e.focus(),t&&e.setSelection(t)}exitCompareMove(){const e=this._diffModel.get();e&&e.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.unchangedRegions.get();t&&lI((e=>{for(const i of t)i.collapseAll(e)}))}showAllUnchangedRegions(){var e;const t=null===(e=this._diffModel.get())||void 0===e?void 0:e.unchangedRegions.get();t&&lI((e=>{for(const i of t)i.showAll(e)}))}_handleCursorPositionChange(e,t){var i,n;if(3===(null==e?void 0:e.reason)){const o=null===(n=null===(i=this._diffModel.get())||void 0===i?void 0:i.diff.get())||void 0===n?void 0:n.mappings.find((i=>t?i.lineRangeMapping.modified.contains(e.position.lineNumber):i.lineRangeMapping.original.contains(e.position.lineNumber)));(null==o?void 0:o.lineRangeMapping.modified.isEmpty)?this._accessibilitySignalService.playSignal(NQ.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):(null==o?void 0:o.lineRangeMapping.original.isEmpty)?this._accessibilitySignalService.playSignal(NQ.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):o&&this._accessibilitySignalService.playSignal(NQ.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}};sJ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([oJ(3,pc),oJ(4,_d),oJ(5,bd),oJ(6,LQ),oJ(7,WL)],sJ);class rJ extends Bc{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:b(0,"Toggle Show Moved Code Blocks"),precondition:$d.has("isInDiffEditor")})}run(e,...t){const i=e.get(Cg),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}class aJ extends Bc{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:b(0,"Toggle Use Inline View When Space Is Limited"),precondition:$d.has("isInDiffEditor")})}run(e,...t){const i=e.get(Cg),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}const lJ=b(0,"Diff Editor");class dJ extends Bc{constructor(){super({id:"diffEditor.revert",title:b(0,"Revert"),f1:!1,category:lJ})}run(e,t){var i;const n=function(e,t,i){return e.get(bd).listDiffEditors().find((e=>{var n,o;const s=e.getModifiedEditor(),r=e.getOriginalEditor();return s&&(null===(n=s.getModel())||void 0===n?void 0:n.uri.toString())===i.toString()&&r&&(null===(o=r.getModel())||void 0===o?void 0:o.uri.toString())===t.toString()}))||null}(e,t.originalUri,t.modifiedUri);n instanceof sJ&&n.revertRangeMappings(null!==(i=t.mapping.innerChanges)&&void 0!==i?i:[])}}const cJ=b(0,"Accessible Diff Viewer");class hJ extends Bc{constructor(){super({id:hJ.id,title:b(0,"Go to Next Difference"),category:cJ,precondition:$d.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=gJ(e);null==t||t.accessibleDiffViewerNext()}}hJ.id="editor.action.accessibleDiffViewer.next";class uJ extends Bc{constructor(){super({id:uJ.id,title:b(0,"Go to Previous Difference"),category:cJ,precondition:$d.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=gJ(e);null==t||t.accessibleDiffViewerPrev()}}function gJ(e){const t=e.get(bd).listDiffEditors(),i=js();if(i)for(const e of t)if(pJ(e.getContainerDomNode(),i))return e;return null}function pJ(e,t){let i=t;for(;i;){if(i===e)return!0;i=i.parentElement}return!1}uJ.id="editor.action.accessibleDiffViewer.prev",Wc(class extends Bc{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:b(0,"Toggle Collapse Unchanged Regions"),icon:Ml.map,toggled:$d.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:$d.has("isInDiffEditor"),menu:{when:$d.has("isInDiffEditor"),id:Mc.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Cg),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}),Wc(rJ),Wc(aJ),Pc.appendMenuItem(Mc.EditorTitle,{command:{id:(new aJ).desc.id,title:v(0,"Use Inline View When Space Is Limited"),toggled:$d.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:$d.has("isInDiffEditor")},order:11,group:"1_diff",when:$d.and(gh.diffEditorRenderSideBySideInlineBreakpointReached,$d.has("isInDiffEditor"))}),Pc.appendMenuItem(Mc.EditorTitle,{command:{id:(new rJ).desc.id,title:v(0,"Show Moved Code Blocks"),icon:Ml.move,toggled:Xd.create("config.diffEditor.experimental.showMoves",!0),precondition:$d.has("isInDiffEditor")},order:10,group:"1_diff",when:$d.has("isInDiffEditor")}),Wc(dJ);for(const e of[{icon:Ml.arrowRight,key:gh.diffEditorInlineMode.toNegated()},{icon:Ml.discard,key:gh.diffEditorInlineMode}])Pc.appendMenuItem(Mc.DiffEditorHunkToolbar,{command:{id:(new dJ).desc.id,title:v(0,"Revert Block"),icon:e.icon},when:$d.and(gh.diffEditorModifiedWritable,e.key),order:5,group:"primary"}),Pc.appendMenuItem(Mc.DiffEditorSelectionToolbar,{command:{id:(new dJ).desc.id,title:v(0,"Revert Selection"),icon:e.icon},when:$d.and(gh.diffEditorModifiedWritable,e.key),order:5,group:"primary"});Wc(class extends Jc{constructor(){super({id:"diffEditor.switchSide",title:b(0,"Switch Side"),icon:Ml.arrowSwap,precondition:$d.has("isInDiffEditor"),f1:!0,category:lJ})}runEditorCommand(e,t,i){const n=gJ(e);if(n instanceof sJ){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}),Wc(class extends Jc{constructor(){super({id:"diffEditor.exitCompareMove",title:b(0,"Exit Compare Move"),icon:Ml.close,precondition:gh.comparingMovedCode,f1:!1,category:lJ,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=gJ(e);n instanceof sJ&&n.exitCompareMove()}}),Wc(class extends Jc{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:b(0,"Collapse All Unchanged Regions"),icon:Ml.fold,precondition:$d.has("isInDiffEditor"),f1:!0,category:lJ})}runEditorCommand(e,t,...i){const n=gJ(e);n instanceof sJ&&n.collapseAllUnchangedRegions()}}),Wc(class extends Jc{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:b(0,"Show All Unchanged Regions"),icon:Ml.unfold,precondition:$d.has("isInDiffEditor"),f1:!0,category:lJ})}runEditorCommand(e,t,...i){const n=gJ(e);n instanceof sJ&&n.showAllUnchangedRegions()}}),Pc.appendMenuItem(Mc.EditorTitle,{command:{id:hJ.id,title:v(0,"Open Accessible Diff Viewer"),precondition:$d.has("isInDiffEditor")},order:10,group:"2_diff",when:$d.and(gh.accessibleDiffViewerVisible.negate(),$d.has("isInDiffEditor"))}),Id.registerCommandAlias("editor.action.diffReview.next",hJ.id),Wc(hJ),Id.registerCommandAlias("editor.action.diffReview.prev",uJ.id),Wc(uJ);var mJ=function(e,t){return function(i,n){t(i,n,e)}};class fJ{remove(){var e;null===(e=this.parent)||void 0===e||e.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class _J extends fJ{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class vJ extends fJ{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class bJ extends fJ{static create(e,t,i){const n=new Pt(i),o=new bJ(t.uri),s=e.ordered(t),r=s.map(((e,i)=>{var s;const r=fJ.findId(`provider_${i}`,o),a=new vJ(r,o,null!==(s=e.displayName)&&void 0!==s?s:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,n.token)).then((e=>{for(const t of e||[])bJ._makeOutlineElement(t,a);return a}),(e=>(Le(e),a))).then((e=>{fJ.empty(e)?e.remove():o._groups.set(r,e)}))})),a=e.onDidChange((()=>{Wh(e.ordered(t),s)||n.cancel()}));return Promise.all(r).then((()=>n.token.isCancellationRequested&&!i.isCancellationRequested?bJ.create(e,t,i):o._compact())).finally((()=>{n.dispose(),a.dispose(),n.dispose()}))}static _makeOutlineElement(e,t){const i=fJ.findId(e,t),n=new _J(i,t,e);if(e.children)for(const t of e.children)bJ._makeOutlineElement(t,n);t.children.set(n.id,n)}constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{const e=Qe.first(this._groups.values());for(const[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof _J?e.push(t.symbol):e.push(...Qe.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>hh.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return bJ._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>wd.compare(hh.getStartPosition(e.range),hh.getStartPosition(t.range))||wd.compare(hh.getEndPosition(t.range),hh.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&bJ._flattenDocumentSymbols(e,n.children,n.name)}}const wJ=vd("IOutlineModelService");let CJ=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new at,this._cache=new ua(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}async getOrCreate(e,t){const i=this._languageFeaturesService.documentSymbolProvider,n=i.ordered(e);let o=this._cache.get(e.id);if(!o||o.versionId!==e.getVersionId()||!Wh(o.provider,n)){const t=new Pt;o={versionId:e.getVersionId(),provider:n,promiseCnt:0,source:t,promise:bJ.create(i,e,t.token),model:void 0},this._cache.set(e.id,o);const s=Date.now();o.promise.then((t=>{o.model=t,this._debounceInformation.update(e,Date.now()-s)})).catch((t=>{this._cache.delete(e.id)}))}if(o.model)return o.model;o.promiseCnt+=1;const s=t.onCancellationRequested((()=>{0==--o.promiseCnt&&(o.source.cancel(),this._cache.delete(e.id))}));try{return await o.promise}finally{s.dispose()}}};CJ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([mJ(0,Pk),mJ(1,AW),mJ(2,Cd)],CJ),Ng(wJ,CJ,1);var yJ=function(e,t){return function(i,n){t(i,n,e)}};let SJ=class extends lt{constructor(e,t,i){super(),this._textModel=e,this._languageFeaturesService=t,this._outlineModelService=i,this._currentModel=uI(this,void 0);const n=MI("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),o=MI("_textModel.onDidChangeContent",_t.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>{}),100));this._register(LI((async(e,t)=>{n.read(e),o.read(e);const i=t.add(new kQ),s=await this._outlineModelService.getOrCreate(this._textModel,i.token);t.isDisposed||this._currentModel.set(s,void 0)})))}getBreadcrumbItems(e,t){const i=this._currentModel.read(t);if(!i)return[];const n=i.asListOfDocumentSymbols().filter((t=>e.contains(t.range.startLineNumber)&&!e.contains(t.range.endLineNumber)));return n.sort(lu(su((e=>e.range.endLineNumber-e.range.startLineNumber),ru))),n.map((e=>({name:e.name,kind:e.kind,startLineNumber:e.range.startLineNumber})))}};SJ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([yJ(1,Pk),yJ(2,wJ)],SJ),KX.setBreadcrumbsSourceFactory(((e,t)=>t.createInstance(SJ,e)));var kJ,xJ=i(7538),LJ={};LJ.styleTagTransform=Gr(),LJ.setAttributes=Kr(),LJ.insert=zr().bind(null,"head"),LJ.domAPI=Vr(),LJ.insertStyleElement=qr(),Br()(xJ.Z,LJ),xJ.Z&&xJ.Z.locals&&xJ.Z.locals;class DJ{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);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new hh(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.copy?this.targetSelection=new uh(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):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new uh(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):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),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(35)&&!this._editor.getOption(22)&&(EJ(e)&&(this._modifierPressed=!0),this._mouseDown&&EJ(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(35)&&!this._editor.getOption(22)&&(EJ(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===NJ.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(null===this._dragSelection){const e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}EJ(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 wd(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){const e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new uh(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new uh(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(EJ(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(NJ.ID,new DJ(this._dragSelection,t,EJ(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 hh(e.lineNumber,e.column,e.lineNumber,e.column),options:NJ._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}NJ.ID="editor.contrib.dragAndDrop",NJ.TRIGGER_KEY_VALUE=K?6:5,NJ._DECORATION_OPTIONS=zy.register({description:"dnd-target",className:"dnd-target"}),oh(NJ.ID,NJ,2),Id.registerCommand("_executeDocumentSymbolProvider",(async function(e,...t){const[i]=t;xl(Po.isUri(i));const n=e.get(wJ),o=e.get(yd),s=await o.createModelReference(i);try{return(await n.getOrCreate(s.object.textEditorModel,At.None)).getTopLevelSymbols()}finally{s.dispose()}})),oh(DD.ID,DD,0),Nz(ix),th(new class extends Yc{constructor(){super({id:kD,precondition:xD,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t){var i;return null===(i=DD.get(t))||void 0===i?void 0:i.changePasteType()}}),th(new class extends Yc{constructor(){super({id:"editor.hidePasteWidget",precondition:xD,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t){var i;null===(i=DD.get(t))||void 0===i||i.clearWidgets()}}),ih((kJ=class extends Qc{constructor(){super({id:"editor.action.pasteAs",label:v(0,"Paste As..."),alias:"Paste As...",precondition:gh.writable,metadata:{description:"Paste as",args:[{name:"args",schema:kJ.argsSchema}]}})}run(e,t,i){var n;let o="string"==typeof(null==i?void 0:i.kind)?i.kind:void 0;return!o&&i&&(o="string"==typeof i.id?i.id:void 0),null===(n=DD.get(t))||void 0===n?void 0:n.pasteAs(o?new kk(o):void 0)}},kJ.argsSchema={type:"object",properties:{kind:{type:"string",description:v(0,"The kind of the paste edit to try applying. If not provided or there are multiple edits for this kind, the editor will show a picker.")}}},kJ)),ih(class extends Qc{constructor(){super({id:"editor.action.pasteAsText",label:v(0,"Paste as Text"),alias:"Paste as Text",precondition:gh.writable})}run(e,t){var i;return null===(i=DD.get(t))||void 0===i?void 0:i.pasteAs({providerId:Yk.id})}});class IJ{constructor(e){this.identifier=e}}const TJ=vd("treeViewsDndService");Ng(TJ,class{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}}},1);var MJ,AJ=function(e,t){return function(i,n){t(i,n,e)}};const RJ="editor.experimental.dropIntoEditor.defaultProvider",PJ="editor.changeDropType",OJ=new gc("dropWidgetVisible",!1,v(0,"Whether the drop widget is showing"));let FJ=MJ=class extends lt{static get(e){return e.getContribution(MJ.ID)}constructor(e,t,i,n,o){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=o,this.treeItemsTransfer=Lk.getInstance(),this._dropProgressManager=this._register(t.createInstance(Dx,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(CD,"dropIntoEditor",e,OJ,{id:PJ,label:v(0,"Show drop options...")})),this._register(e.onDropIntoEditor((t=>this.onDropIntoEditor(e,t.position,t.event))))}clearWidgets(){this._postDropWidgetManager.clear()}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){var n;if(!i.dataTransfer||!e.hasModel())return;null===(n=this._currentOperation)||void 0===n||n.cancel(),e.focus(),e.setPosition(t);const o=Wt((async n=>{const s=new Cx(e,1,void 0,n);try{const o=await this.extractDataTransferData(i);if(0===o.size||s.token.isCancellationRequested)return;const r=e.getModel();if(!r)return;const a=this._languageFeaturesService.documentDropEditProvider.ordered(r).filter((e=>!e.dropMimeTypes||e.dropMimeTypes.some((e=>o.matches(e))))),l=await this.getDropEdits(a,r,t,o,s);if(s.token.isCancellationRequested)return;if(l.length){const i=this.getInitialActiveEditIndex(r,l),o="afterDrop"===e.getOption(36).showDropSelector;await this._postDropWidgetManager.applyEditAndShowIfNeeded([hh.fromPositions(t)],{activeEditIndex:i,allEdits:l},o,(async e=>e),n)}}finally{s.dispose(),this._currentOperation===o&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(t,v(0,"Running drop handlers. Click to cancel"),o),this._currentOperation=o}async getDropEdits(e,t,i,n,o){const s=await Vt(Promise.all(e.map((async e=>{try{const s=await e.provideDocumentDropEdits(t,i,n,o.token);return null==s?void 0:s.map((t=>({...t,providerId:e.id})))}catch(e){console.error(e)}}))),o.token);return fx(jh(null!=s?s:[]).flat())}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(RJ,{resource:e.uri});for(const[e,n]of Object.entries(i)){const i=new kk(n),o=t.findIndex((t=>i.value===t.providerId&&t.handledMimeType&&Ck(e,[t.handledMimeType])));if(o>=0)return o}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new bk;const t=Ik(e.dataTransfer);if(this.treeItemsTransfer.hasData(IJ.prototype)){const e=this.treeItemsTransfer.getData(IJ.prototype);if(Array.isArray(e))for(const i of e){const e=await this._treeViewsDragAndDropService.removeDragOperationTransfer(i.identifier);if(e)for(const[i,n]of e)t.replace(i,n)}}return t}};FJ.ID="editor.contrib.dropIntoEditorController",FJ=MJ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([AJ(1,_d),AJ(2,Cg),AJ(3,Pk),AJ(4,TJ)],FJ),oh(FJ.ID,FJ,2),Nz(tx),th(new class extends Yc{constructor(){super({id:PJ,precondition:OJ,kbOpts:{weight:100,primary:2137}})}runEditorCommand(e,t,i){var n;null===(n=FJ.get(t))||void 0===n||n.changeDropType()}}),th(new class extends Yc{constructor(){super({id:"editor.hideDropWidget",precondition:OJ,kbOpts:{weight:100,primary:9}})}runEditorCommand(e,t,i){var n;null===(n=FJ.get(t))||void 0===n||n.clearWidgets()}}),xc.as(Rg).registerConfiguration({...yE,properties:{[RJ]:{type:"object",scope:5,description:v(0,"Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}});class BJ{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((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));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(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,BJ._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,BJ._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){const e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new hh(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,BJ._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=BJ._FIND_MATCH_DECORATION;const o=[];if(e.length>1e3){n=BJ._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,s=Math.max(2,Math.ceil(3/i));let r=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(o.push({range:new hh(r,1,a,1),options:BJ._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),r=i.startLineNumber,a=i.endLineNumber)}o.push({range:new hh(r,1,a,1),options:BJ._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const s=new Array(e.length);for(let t=0,i=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,BJ._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){const i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){const e=[];for(let t=0;thh.compareRangesUsingStarts(e.range,t.range)));const i=[];let n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function HJ(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function zJ(e,t,i){const n=t.split(i),o=e[0].split(i);let s="";return n.forEach(((e,t)=>{s+=VJ([o[t]],e)+i})),s.slice(0,-1)}class UJ{constructor(e){this.staticValue=e,this.kind=0}}class KJ{constructor(e){this.pieces=e,this.kind=1}}class jJ{static fromStaticValue(e){return new jJ([qJ.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new UJ(e[0].staticValue):this._state=new KJ(e):this._state=new UJ("")}buildReplaceString(e,t){if(0===this._state.kind)return t?VJ(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t0){const e=[],t=n.caseOps.length;let i=0;for(let s=0,r=o.length;s=t){e.push(o.slice(s));break}switch(n.caseOps[i]){case"U":e.push(o[s].toUpperCase());break;case"u":e.push(o[s].toUpperCase()),i++;break;case"L":e.push(o[s].toLowerCase());break;case"l":e.push(o[s].toLowerCase()),i++;break;default:e.push(o[s])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(ethis.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,ot(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new hh(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));const n=this._findMatches(i,!1,u0);this._decorations.set(n,i);const o=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(o);if(0===s&&n.length>0){const e=xu(n.map((e=>e.range)),(e=>hh.compareRangesUsingStarts(e,o)>=0));s=e>0?e-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),e&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){const t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){const t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new wd(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:i,column:n}=e;const o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new wd(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=o)break;const s=e.charCodeAt(n);if(36===s){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===s||38===s){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=s&&s<=57){let r=s-48;if(n+1=o)break;const s=e.charCodeAt(n);switch(s){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(s))}}}return i.finalize()}(this._state.replaceString):jJ.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){const n=e.buildReplaceString(i.matches,this._state.preserveCase),o=new dS(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new wd(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>g0._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(131):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=u0?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new nC(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(131):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),o=i.getFullModelRange(),s=this._getReplacePattern();let r;const a=this._state.preserveCase;r=s.hasReplacementPatterns||a?n.replace(t,(function(){return s.buildReplaceString(arguments,a)})):n.replace(t,s.buildReplaceString(null,a));const l=new gS(o,r,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern(),i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;ee.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();let t=this._findMatches(e,!1,1073741824).map((e=>new uh(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)));const i=this._editor.getSelection();for(let e=0,n=t.length;ethis._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const n={inputActiveOptionBorder:Em(f_),inputActiveOptionForeground:Em(v_),inputActiveOptionBackground:Em(__)},o=this._register(XL());this.caseSensitive=this._register(new Cq({appendTitle:this._keybindingLabelFor(s0),isChecked:this._state.matchCase,hoverDelegate:o,...n})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new yq({appendTitle:this._keybindingLabelFor(r0),isChecked:this._state.wholeWord,hoverDelegate:o,...n})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new Sq({appendTitle:this._keybindingLabelFor(a0),isChecked:this._state.isRegex,hoverDelegate:o,...n})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(ws(this._domNode,ur.MOUSE_LEAVE,(e=>this._onMouseLeave()))),this._register(ws(this._domNode,"mouseover",(e=>this._onMouseOver())))}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return f0.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}function _0(e,t){return 1===e||2!==e&&t}f0.ID="editor.contrib.findOptionsWidget";class v0 extends lt{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return _0(this._isRegexOverride,this._isRegex)}get wholeWord(){return _0(this._wholeWordOverride,this._wholeWord)}get matchCase(){return _0(this._matchCaseOverride,this._matchCase)}get preserveCase(){return _0(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new kt),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(e,t,i){const n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),void 0!==i&&(hh.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;const o={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let s=!1;const r=this.isRegex,a=this.wholeWord,l=this.matchCase,d=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,s=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,s=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,s=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,s=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!hh.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,o.searchScope=!0,s=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,s=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,o.isSearching=!0,s=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,o.filters=!0,s=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(s=!0,o.isRegex=!0),a!==this.wholeWord&&(s=!0,o.wholeWord=!0),l!==this.matchCase&&(s=!0,o.matchCase=!0),d!==this.preserveCase&&(s=!0,o.preserveCase=!0),s&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=u0}}var b0=i(2348),w0={};w0.styleTagTransform=Gr(),w0.setAttributes=Kr(),w0.insert=zr().bind(null,"head"),w0.domAPI=Vr(),w0.insertStyleElement=qr(),Br()(b0.Z,w0),b0.Z&&b0.Z.locals&&b0.Z.locals;const C0=v(0,"input"),y0=v(0,"Preserve Case");class S0 extends _q{constructor(e){var t;super({icon:Ml.preserveCase,title:y0+e.appendTitle,isChecked:e.isChecked,hoverDelegate:null!==(t=e.hoverDelegate)&&void 0!==t?t:QL("element"),inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class k0 extends mN{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new kt),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new kt),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new kt),this._onInput=this._register(new kt),this._onKeyUp=this._register(new kt),this._onPreserveCaseKeyDown=this._register(new kt),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||C0;const o=n.appendPreserveCaseLabel||"",s=n.history||[],r=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Iq(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:s,showHistoryHint:n.showHistoryHint,flexibleHeight:r,flexibleWidth:a,flexibleMaxHeight:l,inputBoxStyles:n.inputBoxStyles})),this.preserveCase=this._register(new S0({appendTitle:o,isChecked:!1,...n.toggleStyles})),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const d=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){const t=d.indexOf(this.domNode.ownerDocument.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%d.length:e.equals(15)&&(i=0===t?d.length-1:t-1),e.equals(9)?(d[t].blur(),this.inputBox.focus()):i>=0&&d[i].focus(),pr(e,!0)}}}));const c=document.createElement("div");c.className="controls",c.style.display=this._showOptionButtons?"block":"none",c.appendChild(this.preserveCase.domNode),this.domNode.appendChild(c),null==e||e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}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;null===(e=this.inputBox)||void 0===e||e.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var x0=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L0=function(e,t){return function(i,n){t(i,n,e)}};const D0=new gc("suggestWidgetVisible",!1,v(0,"Whether suggestion are visible")),E0="historyNavigationWidgetFocus",N0="historyNavigationForwardsEnabled",I0="historyNavigationBackwardsEnabled";let T0;const M0=[];function A0(e,t){if(M0.includes(t))throw new Error("Cannot register the same widget multiple times");M0.push(t);const i=new at,n=new gc(E0,!1).bindTo(e),o=new gc(N0,!0).bindTo(e),s=new gc(I0,!0).bindTo(e),r=()=>{n.set(!0),T0=t},a=()=>{n.set(!1),T0===t&&(T0=void 0)};return qs(t.element)&&r(),i.add(t.onDidFocus((()=>r()))),i.add(t.onDidBlur((()=>a()))),i.add(rt((()=>{M0.splice(M0.indexOf(t),1),a()}))),{historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:s,dispose(){i.dispose()}}}let R0=class extends Rq{constructor(e,t,i,n){super(e,t,i);const o=this._register(n.createScoped(this.inputBox.element));this._register(A0(o,this.inputBox))}};R0=x0([L0(3,pc)],R0);let P0=class extends k0{constructor(e,t,i,n,o=!1){super(e,t,o,i);const s=this._register(n.createScoped(this.inputBox.element));this._register(A0(s,this.inputBox))}};function O0(e){var t,i;return"Up"===(null===(t=e.lookupKeybinding("history.showPrevious"))||void 0===t?void 0:t.getElectronAccelerator())&&"Down"===(null===(i=e.lookupKeybinding("history.showNext"))||void 0===i?void 0:i.getElectronAccelerator())}P0=x0([L0(3,pc)],P0),Dc.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:$d.and($d.has(E0),$d.equals(I0,!0),$d.not("isComposing"),D0.isEqualTo(!1)),primary:16,secondary:[528],handler:e=>{null==T0||T0.showPreviousValue()}}),Dc.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:$d.and($d.has(E0),$d.equals(N0,!0),$d.not("isComposing"),D0.isEqualTo(!1)),primary:18,secondary:[530],handler:e=>{null==T0||T0.showNextValue()}});const F0=Xz("find-collapsed",Ml.chevronRight,v(0,"Icon to indicate that the editor find widget is collapsed.")),B0=Xz("find-expanded",Ml.chevronDown,v(0,"Icon to indicate that the editor find widget is expanded.")),W0=Xz("find-selection",Ml.selection,v(0,"Icon for 'Find in Selection' in the editor find widget.")),V0=Xz("find-replace",Ml.replace,v(0,"Icon for 'Replace' in the editor find widget.")),H0=Xz("find-replace-all",Ml.replaceAll,v(0,"Icon for 'Replace All' in the editor find widget.")),z0=Xz("find-previous-match",Ml.arrowUp,v(0,"Icon for 'Find Previous' in the editor find widget.")),U0=Xz("find-next-match",Ml.arrowDown,v(0,"Icon for 'Find Next' in the editor find widget.")),K0=v(0,"Find / Replace"),j0=v(0,"Find"),q0=v(0,"Find"),$0=v(0,"Previous Match"),G0=v(0,"Next Match"),Z0=v(0,"Find in Selection"),Y0=v(0,"Close"),Q0=v(0,"Replace"),X0=v(0,"Replace"),J0=v(0,"Replace"),e1=v(0,"Replace All"),t1=v(0,"Toggle Replace"),i1=v(0,"Only the first {0} results are highlighted, but all find operations work on the entire text.",u0),n1=v(0,"{0} of {1}"),o1=v(0,"No results"),s1=419;let r1=69;const a1="ctrlEnterReplaceAll.windows.donotask",l1=K?256:2048;class d1{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function c1(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function h1(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(91)&&(this._codeEditor.getOption(91)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(145)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(41)){const e=this._codeEditor.getOption(41).loop;this._state.change({loop:e},!1);const t=this._codeEditor.getOption(41).addExtraSpaceOnTop;t&&!this._viewZone&&(this._viewZone=new d1(0),this._showViewZone()),!t&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((async()=>{if(this._isVisible){const e=await this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}}))),this._findInputFocused=ZJ.bindTo(s),this._findFocusTracker=this._register(fr(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=YJ.bindTo(s),this._replaceFocusTracker=this._register(fr(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new d1(0)),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return u1.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(91)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Os(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){const e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,xe)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=r1+"px",this._state.matchesCount>=u0?this._matchesCount.title=i1:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=u0&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=dn(n1,i,t)}else e=o1;this._matchesCount.appendChild(document.createTextNode(e)),na(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),r1=Math.max(r1,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===o1)return""===i?v(0,"{0} found",e):v(0,"{0} found for '{1}'",e,i);if(t){const n=v(0,"{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();return o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1?`${o.getLineContent(t.startLineNumber)}, ${n}`:n}return v(0,"{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){const e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const i=!this._codeEditor.getOption(91);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Rs(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),s=n.left+(o?o.left:0),r=o?o.top:0;if(this._viewZone&&re.startLineNumber&&(t=!1);const i=As(this._domNode).left;s>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(o?o.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new d1(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;const o=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(84).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!this._domNode.isConnected)return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,o=!1,s=!1;if(this._resized&&Os(this._domNode)>s1)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Os(this._findInput.domNode));if(447+i>=t&&(o=!0),447+i-r1>=t&&(s=!0),447+i-r1>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",s),this._domNode.classList.toggle("reduced-find-widget",o),s||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._findInput.layout({collapsedFindWidget:n,narrowFindWidget:s,reducedFindWidget:o}),this._resized){const e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Os(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||hh.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|l1)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?c1(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?h1(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|l1)?(this._keybindingService.dispatchEvent(e,e.target)||(U&&q&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(v(0,"Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(a1,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?c1(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?h1(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){const t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new R0(null,this._contextViewProvider,{width:221,label:j0,placeholder:q0,appendCaseSensitiveLabel:this._keybindingLabelFor(s0),appendWholeWordsLabel:this._keybindingLabelFor(r0),appendRegexLabel:this._keybindingLabelFor(a0),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>O0(this._keybindingService),inputBoxStyles:ZT,toggleStyles:GT},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),j&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount();const e=this._register(XL());this._prevBtn=this._register(new g1({label:$0+this._keybindingLabelFor(n0),icon:z0,hoverDelegate:e,onTrigger:()=>{Ll(this._codeEditor.getAction(n0)).run().then(void 0,xe)}},this._hoverService)),this._nextBtn=this._register(new g1({label:G0+this._keybindingLabelFor(i0),icon:U0,hoverDelegate:e,onTrigger:()=>{Ll(this._codeEditor.getAction(i0)).run().then(void 0,xe)}},this._hoverService));const t=document.createElement("div");t.className="find-part",t.appendChild(this._findInput.domNode);const i=document.createElement("div");i.className="find-actions",t.appendChild(i),i.appendChild(this._matchesCount),i.appendChild(this._prevBtn.domNode),i.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new _q({icon:W0,title:Z0+this._keybindingLabelFor(l0),isChecked:!1,hoverDelegate:e,inputActiveOptionBackground:Em(__),inputActiveOptionBorder:Em(f_),inputActiveOptionForeground:Em(v_)})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),i.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new g1({label:Y0+this._keybindingLabelFor(o0),icon:nU,hoverDelegate:e,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}},this._hoverService)),this._replaceInput=this._register(new P0(null,void 0,{label:Q0,placeholder:X0,appendPreserveCaseLabel:this._keybindingLabelFor(d0),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>O0(this._keybindingService),inputBoxStyles:ZT,toggleStyles:GT},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())})));const n=this._register(XL());this._replaceBtn=this._register(new g1({label:J0+this._keybindingLabelFor(c0),icon:V0,hoverDelegate:n,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}},this._hoverService)),this._replaceAllBtn=this._register(new g1({label:e1+this._keybindingLabelFor(h0),icon:H0,hoverDelegate:n,onTrigger:()=>{this._controller.replaceAll()}},this._hoverService));const o=document.createElement("div");o.className="replace-part",o.appendChild(this._replaceInput.domNode);const s=document.createElement("div");s.className="replace-actions",o.appendChild(s),s.appendChild(this._replaceBtn.domNode),s.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new g1({label:t1,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Os(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}},this._hoverService)),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.ariaLabel=K0,this._domNode.role="dialog",this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(o),this._resizeSash=this._register(new RK(this._domNode,this,{orientation:0,size:2})),this._resized=!1;let r=s1;this._register(this._resizeSash.onDidStart((()=>{r=Os(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;const t=r+e.startX-e.currentX;t(parseFloat(Ns(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Os(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Os(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{var t,i;if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();null===(i=(t=this._opts).onKeyDown)||void 0===i||i.call(t,e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(...Rl.asClassNameArray(F0)),this._domNode.classList.add(...Rl.asClassNameArray(B0))):(this._domNode.classList.remove(...Rl.asClassNameArray(B0)),this._domNode.classList.add(...Rl.asClassNameArray(F0)))}}jv(((e,t)=>{const i=e.getColor(yf);i&&t.addRule(`.monaco-editor .findMatch { border: 1px ${Bv(e.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`);const n=e.getColor(Sf);n&&t.addRule(`.monaco-editor .findScope { border: 1px ${Bv(e.type)?"dashed":"solid"} ${n}; }`);const o=e.getColor(Km);o&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${o}; }`);const s=e.getColor(bf);s&&t.addRule(`.monaco-editor .findMatchInline { color: ${s}; }`);const r=e.getColor(Cf);r&&t.addRule(`.monaco-editor .currentFindMatchInline { color: ${r}; }`)}));var p1,m1=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},f1=function(e,t){return function(i,n){t(i,n,e)}};function _1(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let v1=p1=class extends lt{get editor(){return this._editor}static get(e){return e.getContribution(p1.ID)}constructor(e,t,i,n,o,s){super(),this._editor=e,this._findWidgetVisible=GJ.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._notificationService=o,this._hoverService=s,this._updateHistoryDelayer=new zt(500),this._state=this._register(new v0),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{const e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})})))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!ZJ.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e=e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=hn(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}async _start(e,t){if(this.disposeModel(),!this._editor.hasModel())return;const i={...t,isRevealed:!0};if("single"===e.seedSearchStringFromSelection){const t=_1(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=hn(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){const t=_1(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){const e=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){const e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new g0(this._editor,this._state))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}goToMatch(e){return!!this._model&&(this._model.moveToMatch(e),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){var e;return!!this._model&&((null===(e=this._editor.getModel())||void 0===e?void 0:e.isTooLargeForHeapOperation())?(this._notificationService.warn(v(0,"The file is too large to perform a replace all operation.")),!1):(this._model.replaceAll(),!0))}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(e){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};v1.ID="editor.contrib.findController",v1=p1=m1([f1(1,pc),f1(2,vW),f1(3,OL),f1(4,fD),f1(5,tj)],v1);let b1=class extends v1{constructor(e,t,i,n,o,s,r,a,l){super(e,i,r,a,s,l),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._widget=null,this._findOptionsWidget=null}async _start(e,t){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber}e.updateSearchScope=e.updateSearchScope||n,await super._start(e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new u1(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService,this._hoverService)),this._findOptionsWidget=this._register(new f0(this._editor,this._state,this._keybindingService))}};b1=m1([f1(1,cD),f1(2,pc),f1(3,uD),f1(4,Vv),f1(5,fD),f1(6,vW),f1(7,OL),f1(8,tj)],b1),nh(new Xc({id:"actions.find",label:v(0,"Find"),alias:"Find",precondition:$d.or(gh.focus,$d.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Mc.MenubarEditMenu,group:"3_find",title:v(0,"&&Find"),order:1}})).addImplementation(0,((e,t,i)=>{const n=v1.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})}));const w1={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class C1 extends Qc{async run(e,t){const i=v1.get(t);i&&!this._run(i)&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===i.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}class y1 extends Qc{async run(e,t){const i=v1.get(t);if(!i)return;const n=_1(t,"single",!1);n&&i.setSearchString(n),this._run(i)||(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),this._run(i))}}nh(new Xc({id:"editor.action.startFindReplaceAction",label:v(0,"Replace"),alias:"Replace",precondition:$d.or(gh.focus,$d.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Mc.MenubarEditMenu,group:"3_find",title:v(0,"&&Replace"),order:2}})).addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(91))return!1;const n=v1.get(t);if(!n)return!1;const o=t.getSelection(),s=n.isFindInputFocused(),r=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&"never"!==t.getOption(41).seedSearchStringFromSelection&&!s,a=s||r?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:r?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(41).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop})})),oh(v1.ID,b1,0),ih(class extends Qc{constructor(){super({id:"editor.actions.findWithArgs",label:v(0,"Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:w1})}async run(e,t,i){const n=v1.get(t);if(n){const e=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};await n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&"never"!==t.getOption(41).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(41).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(null==i?void 0:i.findInSelection)||!1,loop:t.getOption(41).loop},e),n.setGlobalBufferTerm(n.getState().searchString)}}}),ih(class extends Qc{constructor(){super({id:"actions.findWithSelection",label:v(0,"Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(e,t){const i=v1.get(t);i&&(await i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(41).loop}),i.setGlobalBufferTerm(i.getState().searchString))}}),ih(class extends C1{constructor(){super({id:i0,label:v(0,"Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:gh.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:$d.and(gh.focus,ZJ),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}),ih(class extends C1{constructor(){super({id:n0,label:v(0,"Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:gh.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:$d.and(gh.focus,ZJ),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}),ih(class extends Qc{constructor(){super({id:"editor.action.goToMatchFindAction",label:v(0,"Go to Match..."),alias:"Go to Match...",precondition:GJ}),this._highlightDecorations=[]}run(e,t,i){const n=v1.get(t);if(!n)return;const o=n.getState().matchesCount;if(o<1)return void e.get(fD).notify({severity:mD.Warning,message:v(0,"No matches. Try searching for something else.")});const s=e.get(KL).createInputBox();s.placeholder=v(0,"Type a number to go to a specific match (between 1 and {0})",o);const r=e=>{const t=parseInt(e);if(isNaN(t))return;const i=n.getState().matchesCount;return t>0&&t<=i?t-1:t<0&&t>=-i?i+t:void 0},a=e=>{const i=r(e);if("number"==typeof i){s.validationMessage=void 0,n.goToMatch(i);const e=n.getState().currentMatch;e&&this.addDecorations(t,e)}else s.validationMessage=v(0,"Please type a number between 1 and {0}",n.getState().matchesCount),this.clearDecorations(t)};s.onDidChangeValue((e=>{a(e)})),s.onDidAccept((()=>{const e=r(s.value);"number"==typeof e?(n.goToMatch(e),s.hide()):s.validationMessage=v(0,"Please type a number between 1 and {0}",n.getState().matchesCount)})),s.onDidHide((()=>{this.clearDecorations(t),s.dispose()})),s.show()}clearDecorations(e){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[])}))}addDecorations(e,t){e.changeDecorations((e=>{this._highlightDecorations=e.deltaDecorations(this._highlightDecorations,[{range:t,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:Hv(Sb),position:Eh.Full}}}])}))}}),ih(class extends y1{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:v(0,"Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}),ih(class extends y1{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:v(0,"Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}});const S1=Yc.bindToContribution(v1.get);th(new S1({id:o0,precondition:GJ,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:$d.and(gh.focus,$d.not("isComposing")),primary:9,secondary:[1033]}})),th(new S1({id:s0,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:gh.focus,primary:QJ.primary,mac:QJ.mac,win:QJ.win,linux:QJ.linux}})),th(new S1({id:r0,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:gh.focus,primary:XJ.primary,mac:XJ.mac,win:XJ.win,linux:XJ.linux}})),th(new S1({id:a0,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:gh.focus,primary:JJ.primary,mac:JJ.mac,win:JJ.win,linux:JJ.linux}})),th(new S1({id:l0,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:gh.focus,primary:e0.primary,mac:e0.mac,win:e0.win,linux:e0.linux}})),th(new S1({id:d0,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:gh.focus,primary:t0.primary,mac:t0.mac,win:t0.win,linux:t0.linux}})),th(new S1({id:c0,precondition:GJ,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:gh.focus,primary:3094}})),th(new S1({id:c0,precondition:GJ,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:$d.and(gh.focus,YJ),primary:3}})),th(new S1({id:h0,precondition:GJ,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:gh.focus,primary:2563}})),th(new S1({id:h0,precondition:GJ,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:$d.and(gh.focus,YJ),primary:void 0,mac:{primary:2051}}})),th(new S1({id:"editor.action.selectAllMatches",precondition:GJ,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:gh.focus,primary:515}}));var k1=i(7159),x1={};x1.styleTagTransform=Gr(),x1.setAttributes=Kr(),x1.insert=zr().bind(null,"head"),x1.domAPI=Vr(),x1.insertStyleElement=qr(),Br()(k1.Z,x1),k1.Z&&k1.Z.locals&&k1.Z.locals;const L1={0:" ",1:"u",2:"r"},D1=16777215,E1=4278190080;class N1{constructor(e){const t=Math.ceil(e/32);this._states=new Uint32Array(t)}get(e){const t=e/32|0,i=e%32;return 0!=(this._states[t]&1<65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new N1(e.length),this._userDefinedStates=new N1(e.length),this._recoveredStates=new N1(e.length),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const e=[],t=(t,i)=>{const n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;iD1||o>D1)throw new Error("startLineNumber or endLineNumber must not exceed "+D1);for(;e.length>0&&!t(n,o);)e.pop();const s=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&s)<<24),this._endIndexes[i]=o+((65280&s)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&D1}getEndLineNumber(e){return this._endIndexes[e]&D1}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){return this._collapseStates.get(e)}setCollapsed(e,t){this._collapseStates.set(e,t)}isUserDefined(e){return this._userDefinedStates.get(e)}setUserDefined(e,t){return this._userDefinedStates.set(e,t)}isRecovered(e){return this._recoveredStates.get(e)}setRecovered(e,t){return this._recoveredStates.set(e,t)}getSource(e){return this.isUserDefined(e)?1:this.isRecovered(e)?2:0}setSource(e,t){1===t?(this.setUserDefined(e,!0),this.setRecovered(e,!1)):2===t?(this.setUserDefined(e,!1),this.setRecovered(e,!0)):(this.setUserDefined(e,!1),this.setRecovered(e,!1))}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n>>24)+((this._endIndexes[e]&E1)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){const e=[];for(let t=0;tArray.isArray(e)?i=>ii=d.startLineNumber))l&&l.startLineNumber===d.startLineNumber?(1===d.source?e=d:(e=l,e.isCollapsed=d.isCollapsed&&l.endLineNumber===d.endLineNumber,e.source=0),l=o(++r)):(e=d,d.isCollapsed&&0===d.source&&(e.source=2)),d=s(++a);else{let t=a,i=d;for(;;){if(!i||i.startLineNumber>l.endLineNumber){e=l;break}if(1===i.source&&i.endLineNumber>l.endLineNumber)break;i=s(++t)}l=o(++r)}if(e){for(;h&&h.endLineNumbere.startLineNumber&&e.startLineNumber>u&&e.endLineNumber<=i&&(!h||h.endLineNumber>=e.endLineNumber)&&(g.push(e),u=e.startLineNumber,h&&c.push(h),h=e)}}return g}}class T1{constructor(e,t){this.ranges=e,this.index=t}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(e){return e.startLineNumber<=this.startLineNumber&&e.endLineNumber>=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class M1{get regions(){return this._regions}get textModel(){return this._textModel}constructor(e,t){this._updateEventEmitter=new kt,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new I1(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,s=-1;const r=e=>{for(;ns&&(s=e),n++}};for(const i of e){const e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,r(e);const i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}r(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}removeManualRanges(e){const t=new Array,i=t=>{for(const i of e)if(!(i.startLineNumber>t.endLineNumber||t.startLineNumber>i.endLineNumber))return!0;return!1};for(let e=0;ei&&(i=s)}this._decorationProvider.changeDecorations((e=>this._editorDecorationIds=e.deltaDecorations(this._editorDecorationIds,t))),this._regions=e,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(e=[]){const t=(t,i)=>{for(const n of e)if(t=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>i)continue;const s=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);t.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:s})}return t.length>0?t:void 0}applyMemento(e){var t,i;if(!Array.isArray(e))return;const n=[],o=this._textModel.getLineCount();for(const s of e){if(s.startLineNumber>=s.endLineNumber||s.startLineNumber<1||s.endLineNumber>o)continue;const e=this._getLinesChecksum(s.startLineNumber+1,s.endLineNumber);s.checksum&&e!==s.checksum||n.push({startLineNumber:s.startLineNumber,endLineNumber:s.endLineNumber,type:void 0,isCollapsed:null===(t=s.isCollapsed)||void 0===t||t,source:null!==(i=s.source)&&void 0!==i?i:0})}const s=I1.sanitizeAndMerge(this._regions,n,o);this.updatePost(I1.fromFoldRanges(s))}_getLinesChecksum(e,t){return Jo(this._textModel.getLineContent(e)+this._textModel.getLineContent(t))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(e,t){const i=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){const e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){const t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){const i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let s=n,r=this._regions.length;s0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,s=this._regions.length;e1){const s=e.getRegionsInside(i,((e,i)=>e.isCollapsed!==o&&i0)for(const s of n){const n=e.getRegionAtLine(s);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){const s=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function O1(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,void 0);i.length>0&&n.push(i[0])}const o=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(o)}function F1(e,t,i){const n=e.textModel,o=e.regions,s=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){const i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&s.push(o.toRegion(e))}e.toggleCollapseState(s)}function B1(e,t,i){const n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}class W1{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(e){this._updateEventEmitter=new kt,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==_u(e.text)[0])))}updateHiddenRanges(){let e=!1;const t=[];let i=0,n=0,o=Number.MAX_VALUE,s=-1;const r=this._foldingModel.regions;for(;i0}isHidden(e){return null!==V1(this._hiddenRanges,e)}adjustSelections(e){let t=!1;const i=this._foldingModel.textModel;let n=null;const o=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=V1(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,s=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function V1(e,t){const i=xu(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}class H1{constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.foldingRangesLimit=i,this.id="indent"}dispose(){}compute(e){const t=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(function(e,t,i,n=U1){const o=e.getOptions().tabSize,s=new z1(n);let r;i&&(r=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let i=e.getLineCount();i>0;i--){const n=e.getLineContent(i),l=sw(n,o);let d,c=a[a.length-1];if(-1!==l){if(r&&(d=n.match(r))){if(!d[1]){a.push({indent:-2,endAbove:i,line:i});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,c=a[e],s.insertFirst(i,c.line,l),c.line=i,c.indent=l,c.endAbove=i;continue}}}if(c.indent>l){do{a.pop(),c=a[a.length-1]}while(c.indent>l);const e=c.endAbove-1;e-i>=1&&s.insertFirst(i,e,l)}c.indent===l?c.endAbove=i:a.push({indent:l,endAbove:i,line:i})}else t&&(c.endAbove=i)}return s.toIndentRanges(e)}(this.editorModel,i,n,this.foldingRangesLimit))}}class z1{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>D1||t>D1)return;const n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){const t=this._foldingRangesLimit.limit;if(this._length<=t){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new I1(e,t)}{this._foldingRangesLimit.update(this._length,t);let i=0,n=this._indentOccurrences.length;for(let e=0;et){n=e;break}i+=o}}const o=e.getOptions().tabSize,s=new Uint32Array(t),r=new Uint32Array(t);for(let a=this._length-1,l=0;a>=0;a--){const d=this._startIndexes[a],c=sw(e.getLineContent(d),o);(c{}},K1=Tm("editor.foldBackground",{light:Rm(mf,.3),dark:Rm(mf,.3),hcDark:null,hcLight:null},v(0,"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0);Tm("editorGutter.foldingControlForeground",{dark:zm,light:zm,hcDark:zm,hcLight:zm},v(0,"Color of the folding control in the editor gutter."));const j1=Xz("folding-expanded",Ml.chevronDown,v(0,"Icon for expanded ranges in the editor glyph margin.")),q1=Xz("folding-collapsed",Ml.chevronRight,v(0,"Icon for collapsed ranges in the editor glyph margin.")),$1=Xz("folding-manual-collapsed",q1,v(0,"Icon for manually collapsed ranges in the editor glyph margin.")),G1=Xz("folding-manual-expanded",j1,v(0,"Icon for manually expanded ranges in the editor glyph margin.")),Z1={color:Hv(K1),position:1},Y1=v(0,"Click to expand the range."),Q1=v(0,"Click to collapse the range.");class X1{constructor(e){this.editor=e,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(e,t,i){return t?X1.HIDDEN_RANGE_DECORATION:"never"===this.showFoldingControls?e?this.showFoldingHighlights?X1.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:X1.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:X1.NO_CONTROLS_EXPANDED_RANGE_DECORATION:e?i?this.showFoldingHighlights?X1.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:X1.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?X1.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:X1.COLLAPSED_VISUAL_DECORATION:"mouseover"===this.showFoldingControls?i?X1.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:X1.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i?X1.MANUALLY_EXPANDED_VISUAL_DECORATION:X1.EXPANDED_VISUAL_DECORATION}changeDecorations(e){return this.editor.changeDecorations(e)}removeDecorations(e){this.editor.removeDecorations(e)}}X1.COLLAPSED_VISUAL_DECORATION=zy.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Y1,firstLineDecorationClassName:Rl.asClassName(q1)}),X1.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=zy.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:Z1,isWholeLine:!0,linesDecorationsTooltip:Y1,firstLineDecorationClassName:Rl.asClassName(q1)}),X1.MANUALLY_COLLAPSED_VISUAL_DECORATION=zy.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Y1,firstLineDecorationClassName:Rl.asClassName($1)}),X1.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=zy.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:Z1,isWholeLine:!0,linesDecorationsTooltip:Y1,firstLineDecorationClassName:Rl.asClassName($1)}),X1.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=zy.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:Y1}),X1.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=zy.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:Z1,isWholeLine:!0,linesDecorationsTooltip:Y1}),X1.EXPANDED_VISUAL_DECORATION=zy.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Rl.asClassName(j1),linesDecorationsTooltip:Q1}),X1.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=zy.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Rl.asClassName(j1),linesDecorationsTooltip:Q1}),X1.MANUALLY_EXPANDED_VISUAL_DECORATION=zy.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Rl.asClassName(G1),linesDecorationsTooltip:Q1}),X1.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=zy.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:Rl.asClassName(G1),linesDecorationsTooltip:Q1}),X1.NO_CONTROLS_EXPANDED_RANGE_DECORATION=zy.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),X1.HIDDEN_RANGE_DECORATION=zy.register({description:"folding-hidden-range-decoration",stickiness:1});const J1={};class e2{constructor(e,t,i,n,o){this.editorModel=e,this.providers=t,this.handleFoldingRangesChange=i,this.foldingRangesLimit=n,this.fallbackRangeProvider=o,this.id="syntax",this.disposables=new at,o&&this.disposables.add(o);for(const e of t)"function"==typeof e.onDidChange&&this.disposables.add(e.onDidChange(i))}compute(e){return function(e,t,i){let n=null;const o=e.map(((e,o)=>Promise.resolve(e.provideFoldingRanges(t,J1,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(n)||(n=[]);const i=t.getLineCount();for(const t of e)t.start>0&&t.end>t.start&&t.end<=i&&n.push({start:t.start,end:t.end,rank:o,kind:t.kind})}}),Le)));return Promise.all(o).then((e=>n))}(this.providers,this.editorModel,e).then((t=>{var i,n;return t?function(e,t){const i=e.sort(((e,t)=>{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),n=new t2(t);let o;const s=[];for(const e of i)if(o){if(e.start>o.start)if(e.end<=o.end)s.push(o),o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);else{if(e.start>o.end){do{o=s.pop()}while(o&&e.start>o.end);o&&s.push(o),o=e}n.add(e.start,e.end,e.kind&&e.kind.value,s.length)}}else o=e,n.add(e.start,e.end,e.kind&&e.kind.value,s.length);return n.toIndentRanges()}(t,this.foldingRangesLimit):null!==(n=null===(i=this.fallbackRangeProvider)||void 0===i?void 0:i.compute(e))&&void 0!==n?n:null}))}dispose(){this.disposables.dispose()}}class t2{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>D1||t>D1)return;const o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){const e=this._foldingRangesLimit.limit;if(this._length<=e){this._foldingRangesLimit.update(this._length,!1);const e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ie){i=n;break}t+=o}}const n=new Uint32Array(e),o=new Uint32Array(e),s=[];for(let r=0,a=0;rthis.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(47)&&this.onModelChanged(),e.hasChanged(110)||e.hasChanged(45)){const e=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=e.get(110),this.foldingDecorationProvider.showFoldingHighlights=e.get(45),this.triggerFoldingModelChanged()}e.hasChanged(44)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(44),this.onFoldingStrategyChanged()),e.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),e.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))}))),this.onModelChanged()}saveViewState(){const e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){const t=this.foldingModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){const t=this.editor.getModel();if(t&&this._isEnabled&&!t.isTooLargeForTokenization()&&this.hiddenRangeModel&&e&&(this._currentModelHasFoldedImports=!!e.foldedImports,e.collapsedRegions&&e.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(e.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new M1(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new W1(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new zt(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new Zt((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{var e,t;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),null===(e=this.updateScheduler)||void 0===e||e.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,null===(t=this.rangeProvider)||void 0===t||t.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var e;null===(e=this.rangeProvider)||void 0===e||e.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;const t=new H1(e,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=t,this._useFoldingProviders&&this.foldingModel){const i=i2.getFoldingRangeProviders(this.languageFeaturesService,e);i.length>0&&(this.rangeProvider=new e2(e,i,(()=>this.triggerFoldingModelChanged()),this._foldingLimitReporter,t))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;null===(t=this.hiddenRangeModel)||void 0===t||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new ft,i=this.getRangeProvider(e.textModel),n=this.foldingRegionPromise=Wt((e=>i.compute(e)));return n.then((i=>{if(i&&n===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(WC.Imports.value,!0);e&&(n=cW.capture(this.editor),this._currentModelHasFoldedImports=e)}const o=this.editor.getSelections(),s=o?o.map((e=>e.startLineNumber)):[];e.update(i,s),null==n||n.restore(this.editor);const r=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=r)}return e}))})).then(void 0,(e=>(xe(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){const e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){const t=this.editor.getSelections();if(t&&t.length>0){const i=[];for(const n of t){const t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,xe)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<4)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){const e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.foldingModel;if(!t||!this.mouseDownInfo||!e.target)return;const i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(!o||o.startLineNumber!==i)return;if(n){if(4!==e.target.type)return}else{const e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}const s=t.getRegionAtLine(i);if(s&&s.startLineNumber===i){const o=s.isCollapsed;if(n||o){let n=[];if(e.event.altKey){const e=e=>!e.containedBy(s)&&!s.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{const i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(s))e.isCollapsed===o&&n.push(e);!o&&i&&0!==n.length||n.push(s)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};s2.ID="editor.contrib.folding",s2=i2=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([n2(1,pc),n2(2,sp),n2(3,fD),n2(4,AW),n2(5,Pk)],s2);class r2{constructor(e){this.editor=e,this._onDidChange=new kt,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(e,t){e===this._computed&&t===this._limited||(this._computed=e,this._limited=t,this._onDidChange.fire())}}class a2 extends Qc{runEditorCommand(e,t,i){const n=e.get(sp),o=s2.get(t);if(!o)return;const s=o.getFoldingModel();return s?(this.reportTelemetry(e,t),s.then((e=>{if(e){this.invoke(o,e,t,i,n);const s=t.getSelection();s&&o.reveal(s.getStartPosition())}}))):void 0}getSelectedLines(e){const t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function l2(e){if(!yl(e)){if(!_l(e))return!1;const t=e;if(!yl(t.levels)&&!bl(t.levels))return!1;if(!yl(t.direction)&&!fl(t.direction))return!1;if(!(yl(t.selectionLines)||Array.isArray(t.selectionLines)&&t.selectionLines.every(bl)))return!1}return!0}class d2 extends a2{getFoldingLevel(){return parseInt(this.id.substr(d2.ID_PREFIX.length))}invoke(e,t,i){!function(e,t,i,n){const o=e.getRegionsInside(null,((e,i)=>i===t&&true!==e.isCollapsed&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(o)}(t,this.getFoldingLevel(),0,this.getSelectedLines(i))}}d2.ID_PREFIX="editor.foldLevel",d2.ID=e=>d2.ID_PREFIX+e,oh(s2.ID,s2,0),ih(class extends a2{constructor(){super({id:"editor.unfold",label:v(0,"Unfold"),alias:"Unfold",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:l2,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=n&&n.levels||1,s=this.getLineNumbers(n,i);n&&"up"===n.direction?P1(t,!1,o,s):R1(t,!1,o,s)}}),ih(class extends a2{constructor(){super({id:"editor.unfoldRecursively",label:v(0,"Unfold Recursively"),alias:"Unfold Recursively",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2142),weight:100}})}invoke(e,t,i,n){R1(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),ih(class extends a2{constructor(){super({id:"editor.fold",label:v(0,"Fold"),alias:"Fold",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': Array of the start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:l2,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){const o=this.getLineNumbers(n,i),s=n&&n.levels,r=n&&n.direction;"number"!=typeof s&&"string"!=typeof r?function(e,t,i){const n=[];for(const t of i){const i=e.getAllRegionsAtLine(t,(e=>true!==e.isCollapsed));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}(t,0,o):"up"===r?P1(t,!0,s||1,o):R1(t,!0,s||1,o)}}),ih(class extends a2{constructor(){super({id:"editor.foldRecursively",label:v(0,"Fold Recursively"),alias:"Fold Recursively",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2140),weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);R1(t,!0,Number.MAX_VALUE,n)}}),ih(class extends a2{constructor(){super({id:"editor.foldAll",label:v(0,"Fold All"),alias:"Fold All",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2069),weight:100}})}invoke(e,t,i){R1(t,!0)}}),ih(class extends a2{constructor(){super({id:"editor.unfoldAll",label:v(0,"Unfold All"),alias:"Unfold All",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2088),weight:100}})}invoke(e,t,i){R1(t,!1)}}),ih(class extends a2{constructor(){super({id:"editor.foldAllBlockComments",label:v(0,"Fold All Block Comments"),alias:"Fold All Block Comments",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2138),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())B1(t,WC.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).comments;n&&n.blockCommentStartToken&&F1(t,new RegExp("^\\s*"+hn(n.blockCommentStartToken)),!0)}}}),ih(class extends a2{constructor(){super({id:"editor.foldAllMarkerRegions",label:v(0,"Fold All Regions"),alias:"Fold All Regions",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2077),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())B1(t,WC.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;n&&n.markers&&n.markers.start&&F1(t,new RegExp(n.markers.start),!0)}}}),ih(class extends a2{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:v(0,"Unfold All Regions"),alias:"Unfold All Regions",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2078),weight:100}})}invoke(e,t,i,n,o){if(t.regions.hasTypes())B1(t,WC.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=o.getLanguageConfiguration(e.getLanguageId()).foldingRules;n&&n.markers&&n.markers.start&&F1(t,new RegExp(n.markers.start),!1)}}}),ih(class extends a2{constructor(){super({id:"editor.foldAllExcept",label:v(0,"Fold All Except Selected"),alias:"Fold All Except Selected",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2136),weight:100}})}invoke(e,t,i){O1(t,!0,this.getSelectedLines(i))}}),ih(class extends a2{constructor(){super({id:"editor.unfoldAllExcept",label:v(0,"Unfold All Except Selected"),alias:"Unfold All Except Selected",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2134),weight:100}})}invoke(e,t,i){O1(t,!1,this.getSelectedLines(i))}}),ih(class extends a2{constructor(){super({id:"editor.toggleFold",label:v(0,"Toggle Fold"),alias:"Toggle Fold",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2090),weight:100}})}invoke(e,t,i){A1(t,1,this.getSelectedLines(i))}}),ih(class extends a2{constructor(){super({id:"editor.gotoParentFold",label:v(0,"Go to Parent Fold"),alias:"Go to Parent Fold",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=null;const n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){const e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),ih(class extends a2{constructor(){super({id:"editor.gotoPreviousFold",label:v(0,"Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{const e=i.parentIndex;let n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}return null}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),ih(class extends a2{constructor(){super({id:"editor.gotoNextFold",label:v(0,"Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,weight:100}})}invoke(e,t,i){const n=this.getSelectedLines(i);if(n.length>0){const e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){const e=i.parentIndex;let n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndexe.startLineNumber&&(o.push({startLineNumber:e.startLineNumber,endLineNumber:t,type:void 0,isCollapsed:!0,source:1}),i.setSelection({startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.startLineNumber,endColumn:1}))}if(o.length>0){o.sort(((e,t)=>e.startLineNumber-t.startLineNumber));const e=I1.sanitizeAndMerge(t.regions,o,null===(n=i.getModel())||void 0===n?void 0:n.getLineCount());t.updatePost(I1.fromFoldRanges(e))}}}}),ih(class extends a2{constructor(){super({id:"editor.removeManualFoldingRanges",label:v(0,"Remove Manual Folding Ranges"),alias:"Remove Manual Folding Ranges",precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2137),weight:100}})}invoke(e,t,i){const n=i.getSelections();if(n){const i=[];for(const e of n){const{startLineNumber:t,endLineNumber:n}=e;i.push(n>=t?{startLineNumber:t,endLineNumber:n}:{endLineNumber:n,startLineNumber:t})}t.removeManualRanges(i),e.triggerFoldingModelChanged()}}});for(let e=1;e<=7;e++)c2=new d2({id:d2.ID(e),label:v(0,"Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:o2,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2048|21+e),weight:100}}),rh.INSTANCE.registerEditorAction(c2);var c2;Id.registerCommand("_executeFoldingRangeProvider",(async function(e,...t){const[i]=t;if(!(i instanceof Po))throw Te();const n=e.get(Pk),o=e.get(Cd).getModel(i);if(!o)throw Te();const s=e.get(Cg);if(!s.getValue("editor.folding",{resource:i}))return[];const r=e.get(sp),a=s.getValue("editor.foldingStrategy",{resource:i}),l={get limit(){return s.getValue("editor.foldingMaximumRegions",{resource:i})},update:(e,t)=>{}},d=new H1(o,r,l);let c=d;if("indentation"!==a){const e=s2.getFoldingRangeProviders(n,o);e.length&&(c=new e2(o,e,(()=>{}),l,d))}const h=await c.compute(At.None),u=[];try{if(h)for(let e=0;epj.replace(hh.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",o.map((e=>pj.replaceMove(hh.lift(e.range),e.text)))),i&&e.pushUndoStop(),n.restoreRelativeVerticalPositionOfCursor(e)}}class u2{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}class g2{constructor(e){if(this._set=new Set,e)for(const t of e)this.add(t)}add(e){this._set.add(u2.toKey(e))}has(e){return this._set.has(u2.toKey(e))}}function p2(e,t,i){const n=[],o=new g2,s=e.ordered(i);for(const e of s)n.push(e),e.extensionId&&o.add(e.extensionId);const r=t.ordered(i);for(const e of r){if(e.extensionId){if(o.has(e.extensionId))continue;o.add(e.extensionId)}n.push({displayName:e.displayName,extensionId:e.extensionId,provideDocumentFormattingEdits(t,i,n){return e.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)}})}return n}class m2{static setFormatterSelector(e){return{dispose:m2._selectors.unshift(e)}}static async select(e,t,i,n){if(0===e.length)return;const o=Qe.first(m2._selectors);return o?await o(e,t,i,n):void 0}}async function f2(e,t,i,n,o,s,r){const a=e.get(_d),{documentRangeFormattingEditProvider:l}=e.get(Pk),d=kj(t)?t.getModel():t,c=l.ordered(d),h=await m2.select(c,d,n,2);h&&(o.report(h),await a.invokeFunction(_2,h,t,i,s,r))}async function _2(e,t,i,n,o,s){var r,a;const l=e.get(uX),d=e.get(Hc),c=e.get(LQ);let h,u;kj(i)?(h=i.getModel(),u=new Cx(i,5,void 0,o)):(h=i,u=new yx(i,o));const g=[];let p=0;for(const e of iu(n).sort(hh.compareRangesUsingStarts))p>0&&hh.areIntersectingOrTouching(g[p-1],e)?g[p-1]=hh.fromPositions(g[p-1].getStartPosition(),e.getEndPosition()):p=g.push(e);const m=async e=>{var i,n;d.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(i=t.extensionId)||void 0===i?void 0:i.value,e);const o=await t.provideDocumentRangeFormattingEdits(h,e,h.getFormattingOptions(),u.token)||[];return d.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(n=t.extensionId)||void 0===n?void 0:n.value,o),o},f=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>hh.plusRange(e,t.range)),e[0].range);if(!t.some((e=>hh.intersectRanges(i,e.range))))return!1;for(const i of e)for(const e of t)if(hh.intersectRanges(i.range,e.range))return!0;return!1},_=[],v=[];try{if("function"==typeof t.provideDocumentRangesFormattingEdits){d.trace("[format][provideDocumentRangeFormattingEdits] (request)",null===(r=t.extensionId)||void 0===r?void 0:r.value,g);const e=await t.provideDocumentRangesFormattingEdits(h,g,h.getFormattingOptions(),u.token)||[];d.trace("[format][provideDocumentRangeFormattingEdits] (response)",null===(a=t.extensionId)||void 0===a?void 0:a.value,e),v.push(e)}else{for(const e of g){if(u.token.isCancellationRequested)return!0;v.push(await m(e))}for(let e=0;e({text:e.text,range:hh.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(hh.areIntersectingOrTouching(i,t))return[new uh(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return c.playSignal(NQ.format,{userGesture:s}),!0}async function v2(e,t,i,n,o,s){const r=e.get(_d),a=e.get(Pk),l=kj(t)?t.getModel():t,d=p2(a.documentFormattingEditProvider,a.documentRangeFormattingEditProvider,l),c=await m2.select(d,l,i,1);c&&(n.report(c),await r.invokeFunction(b2,c,t,i,o,s))}async function b2(e,t,i,n,o,s){const r=e.get(uX),a=e.get(LQ);let l,d,c;kj(i)?(l=i.getModel(),d=new Cx(i,5,void 0,o)):(l=i,d=new yx(i,o));try{const e=await t.provideDocumentFormattingEdits(l,l.getFormattingOptions(),d.token);if(c=await r.computeMoreMinimalEdits(l.uri,e),d.token.isCancellationRequested)return!0}finally{d.dispose()}if(!c||0===c.length)return!1;if(kj(i))h2.execute(i,c,2!==n),2!==n&&i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=c,t=new uh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);l.pushEditOperations([t],c.map((e=>({text:e.text,range:hh.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(hh.areIntersectingOrTouching(i,t))return[new uh(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return a.playSignal(NQ.format,{userGesture:s}),!0}function w2(e,t,i,n,o,s,r){const a=t.onTypeFormattingEditProvider.ordered(i);return 0===a.length||a[0].autoFormatTriggerCharacters.indexOf(o)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(i,n,o,s,r)).catch(Le).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}m2._selectors=new pt,Id.registerCommand("_executeFormatRangeProvider",(async function(e,...t){const[i,n,o]=t;xl(Po.isUri(i)),xl(hh.isIRange(n));const s=e.get(yd),r=e.get(uX),a=e.get(Pk),l=await s.createModelReference(i);try{return async function(e,t,i,n,o,s){const r=t.documentRangeFormattingEditProvider.ordered(i);for(const t of r){const r=await Promise.resolve(t.provideDocumentRangeFormattingEdits(i,n,o,s)).catch(Le);if(Gh(r))return await e.computeMoreMinimalEdits(i.uri,r)}}(r,a,l.object.textEditorModel,hh.lift(n),o,At.None)}finally{l.dispose()}})),Id.registerCommand("_executeFormatDocumentProvider",(async function(e,...t){const[i,n]=t;xl(Po.isUri(i));const o=e.get(yd),s=e.get(uX),r=e.get(Pk),a=await o.createModelReference(i);try{return async function(e,t,i,n,o){const s=p2(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of s){const s=await Promise.resolve(t.provideDocumentFormattingEdits(i,n,o)).catch(Le);if(Gh(s))return await e.computeMoreMinimalEdits(i.uri,s)}}(s,r,a.object.textEditorModel,n,At.None)}finally{a.dispose()}})),Id.registerCommand("_executeFormatOnTypeProvider",(async function(e,...t){const[i,n,o,s]=t;xl(Po.isUri(i)),xl(wd.isIPosition(n)),xl("string"==typeof o);const r=e.get(yd),a=e.get(uX),l=e.get(Pk),d=await r.createModelReference(i);try{return w2(a,l,d.object.textEditorModel,wd.lift(n),o,s,At.None)}finally{d.dispose()}}));var C2=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y2=function(e,t){return function(i,n){t(i,n,e)}};let S2=class{constructor(e,t,i,n){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._accessibilitySignalService=n,this._disposables=new at,this._sessionDisposables=new at,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(56)&&this._update()}))),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;const i=new Jw;for(const e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{const t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),n=new Pt,o=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return n.cancel(),void o.dispose();for(let t=0,s=e.changes.length;t{n.token.isCancellationRequested||Gh(e)&&(this._accessibilitySignalService.playSignal(NQ.format,{userGesture:!1}),h2.execute(this._editor,e,!0))})).finally((()=>{o.dispose()}))}};S2.ID="editor.contrib.autoFormat",S2=C2([y2(1,Pk),y2(2,uX),y2(3,LQ)],S2);let k2=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new at,this._callOnModel=new at,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(f2,this.editor,e,2,BL.None,At.None,!1).catch(xe))}};k2.ID="editor.contrib.formatOnPaste",k2=C2([y2(1,Pk),y2(2,_d)],k2),oh(S2.ID,S2,2),oh(k2.ID,k2,2),ih(class extends Qc{constructor(){super({id:"editor.action.formatDocument",label:v(0,"Format Document"),alias:"Format Document",precondition:$d.and(gh.notInCompositeEditor,gh.writable,gh.hasDocumentFormattingProvider),kbOpts:{kbExpr:gh.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(e,t){if(t.hasModel()){const i=e.get(_d),n=e.get(WL);await n.showWhile(i.invokeFunction(v2,t,1,BL.None,At.None,!0),250)}}}),ih(class extends Qc{constructor(){super({id:"editor.action.formatSelection",label:v(0,"Format Selection"),alias:"Format Selection",precondition:$d.and(gh.writable,gh.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2084),weight:100},contextMenuOpts:{when:gh.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(e,t){if(!t.hasModel())return;const i=e.get(_d),n=t.getModel(),o=t.getSelections().map((e=>e.isEmpty()?new hh(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),s=e.get(WL);await s.showWhile(i.invokeFunction(f2,t,o,1,BL.None,At.None,!0),250)}}),Id.registerCommand("editor.action.format",(async e=>{const t=e.get(bd).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(Nd);t.getSelection().isEmpty()?await i.executeCommand("editor.action.formatDocument"):await i.executeCommand("editor.action.formatSelection")}));var x2=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},L2=function(e,t){return function(i,n){t(i,n,e)}};class D2{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let E2=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new kt,this.onDidChange=this._onDidChange.event,this._dispoables=new at,this._markers=[],this._nextIdx=-1,Po.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),o=(e,t)=>{let i=wn(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?hh.compareRangesUsingStarts(e,t)||wM.compare(e.severity,t.severity):wM.compare(e.severity,t.severity)||hh.compareRangesUsingStarts(e,t)),i},s=()=>{this._markers=this._markerService.read({resource:Po.isUri(e)?e:void 0,severities:wM.Error|wM.Warning|wM.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(s(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new D2(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=Vh(this._markers,{resource:e.uri},((e,t)=>wn(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let i=o;it.resource.toString()===e.toString()));if(!(i<0))for(;i{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new AN(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{s.style.left=`-${e.scrollLeft}px`,s.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){ot(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let s=((null==t?void 0:t.length)||0)+2;o&&(s+="string"==typeof o?o.length:o.value.length);const r=fn(i);this._lines=r.length,this._longestLineLength=0;for(const e of r)this._longestLineLength=Math.max(e.length+s,this._longestLineLength);vs(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of r)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"==typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=Sr("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},_r(this._codeLink,Sr("span")).innerText=o.value,e.appendChild(this._codeLink)}if(vs(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Gh(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(67))}px`,this._lines+=1;for(const t of n){const i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${this._labelService.getUriBasenameLabel(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);const o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(50),d=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),c=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:c})}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 wM.Error:t=v(0,"Error");break;case wM.Warning:t=v(0,"Warning");break;case wM.Info:t=v(0,"Info");break;case wM.Hint:t=v(0,"Hint")}let i=v(0,"{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let W2=O2=class extends jj{constructor(e,t,i,n,o,s,r){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=s,this._labelService=r,this._callOnDispose=new at,this._onDidSelectRelatedInformation=new kt,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=wM.Warning,this._backgroundColor=fu.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Z2);let t=U2,i=K2;this._severity===wM.Warning?(t=j2,i=q2):this._severity===wM.Info&&(t=$2,i=G2);const n=e.getColor(t),o=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:o,primaryHeadingColor:e.getColor($j),secondaryHeadingColor:e.getColor(Gj)})}_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((e=>this.editor.focus())));const t=[],i=this._menuService.createMenu(O2.TitleMenu,this._contextKeyService);UU(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=_r(e,Sr(""))}_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 B2(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),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 n=hh.lift(e),o=this.editor.getPosition(),s=o&&n.containsPosition(o)?o:n.getStartPosition();super.show(s,this.computeRequiredHeight());const r=this.editor.getModel();if(r){const e=v(0,i>1?"{0} of {1} problems":"{0} of {1} problem",t,i);this.setTitle(Jl(r.uri),e)}this._icon.className=`codicon ${A2.className(wM.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()}};W2.TitleMenu=new Mc("gotoErrorTitleMenu"),W2=O2=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([F2(1,Vv),F2(2,LL),F2(3,Ac),F2(4,_d),F2(5,pc),F2(6,vZ)],W2);const V2=Pm(rf,af),H2=Pm(df,cf),z2=Pm(hf,uf),U2=Tm("editorMarkerNavigationError.background",{dark:V2,light:V2,hcDark:Km,hcLight:Km},v(0,"Editor marker navigation widget error color.")),K2=Tm("editorMarkerNavigationError.headerBackground",{dark:Rm(U2,.1),light:Rm(U2,.1),hcDark:null,hcLight:null},v(0,"Editor marker navigation widget error heading background.")),j2=Tm("editorMarkerNavigationWarning.background",{dark:H2,light:H2,hcDark:Km,hcLight:Km},v(0,"Editor marker navigation widget warning color.")),q2=Tm("editorMarkerNavigationWarning.headerBackground",{dark:Rm(j2,.1),light:Rm(j2,.1),hcDark:"#0C141F",hcLight:Rm(j2,.2)},v(0,"Editor marker navigation widget warning heading background.")),$2=Tm("editorMarkerNavigationInfo.background",{dark:z2,light:z2,hcDark:Km,hcLight:Km},v(0,"Editor marker navigation widget info color.")),G2=Tm("editorMarkerNavigationInfo.headerBackground",{dark:Rm($2,.1),light:Rm($2,.1),hcDark:null,hcLight:null},v(0,"Editor marker navigation widget info heading background.")),Z2=Tm("editorMarkerNavigation.background",{dark:ef,light:ef,hcDark:ef,hcLight:ef},v(0,"Editor marker navigation widget background."));var Y2,Q2=function(e,t){return function(i,n){t(i,n,e)}};let X2=Y2=class{static get(e){return e.getContribution(Y2.ID)}constructor(e,t,i,n,o){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=o,this._sessionDispoables=new at,this._editor=e,this._widgetVisible=i4.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(W2,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((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&hh.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:hh.lift(e).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 wd(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){var i,n;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=await this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&(null===(i=Y2.get(s))||void 0===i||i.close(),null===(n=Y2.get(s))||void 0===n||n.nagivate(e,t))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}}};X2.ID="editor.contrib.markerController",X2=Y2=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Q2(1,N2),Q2(2,pc),Q2(3,bd),Q2(4,_d)],X2);class J2 extends Qc{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){var i;t.hasModel()&&(null===(i=X2.get(t))||void 0===i||i.nagivate(this._next,this._multiFile))}}class e4 extends J2{constructor(){super(!0,!1,{id:e4.ID,label:e4.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:578,weight:100},menuOpts:{menuId:W2.TitleMenu,title:e4.LABEL,icon:Xz("marker-navigation-next",Ml.arrowDown,v(0,"Icon for goto next marker.")),group:"navigation",order:1}})}}e4.ID="editor.action.marker.next",e4.LABEL=v(0,"Go to Next Problem (Error, Warning, Info)");class t4 extends J2{constructor(){super(!1,!1,{id:t4.ID,label:t4.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:1602,weight:100},menuOpts:{menuId:W2.TitleMenu,title:t4.LABEL,icon:Xz("marker-navigation-previous",Ml.arrowUp,v(0,"Icon for goto previous marker.")),group:"navigation",order:2}})}}t4.ID="editor.action.marker.prev",t4.LABEL=v(0,"Go to Previous Problem (Error, Warning, Info)"),oh(X2.ID,X2,4),ih(e4),ih(t4),ih(class extends J2{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:v(0,"Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:66,weight:100},menuOpts:{menuId:Mc.MenubarGoMenu,title:v(0,"Next &&Problem"),group:"6_problem_nav",order:1}})}}),ih(class extends J2{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:v(0,"Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:1090,weight:100},menuOpts:{menuId:Mc.MenubarGoMenu,title:v(0,"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const i4=new gc("markersNavigationVisible",!1);th(new(Yc.bindToContribution(X2.get))({id:"closeMarkersNavigation",precondition:i4,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:gh.focus,primary:9,secondary:[1033]}}));class n4{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t,i){var n;const o=new at;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=o.add(new dt);return s.value=this.doProvide(e,t,i),o.add(this.onDidActiveTextEditorControlChange((()=>{s.value=void 0,s.value=this.doProvide(e,t)}))),o}doProvide(e,t,i){var n;const o=new at,s=this.activeTextEditorControl;if(s&&this.canProvideWithTextEditor(s)){const r={editor:s},a=Lj(s);if(a){let e=null!==(n=s.saveViewState())&&void 0!==n?n:void 0;o.add(a.onDidChangeCursorPosition((()=>{var t;e=null!==(t=s.saveViewState())&&void 0!==t?t:void 0}))),r.restoreViewState=()=>{e&&s===this.activeTextEditorControl&&s.restoreViewState(e)},o.add(Ye(t.onCancellationRequested)((()=>{var e;return null===(e=r.restoreViewState)||void 0===e?void 0:e.call(r)})))}o.add(rt((()=>this.clearDecorations(s)))),o.add(this.provideWithTextEditor(r,e,t,i))}else o.add(this.provideWithoutTextEditor(e,t));return o}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range,"code.jump"),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus();const i=e.getModel();i&&"getLineContent"in i&&oa(`${i.getLineContent(t.range.startLineNumber)}`)}getModel(e){var t;return xj(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const n=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Hv(Sb),position:Eh.Full}}}],[o,s]=e.deltaDecorations(i,n);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:s}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}class o4 extends n4{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=v(0,"Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,lt.None}provideWithTextEditor(e,t,i){const n=e.editor,o=new at;o.add(t.onDidAccept((i=>{const[o]=t.selectedItems;if(o){if(!this.isValidLineNumber(n,o.lineNumber))return;this.gotoLocation(e,{range:this.toRange(o.lineNumber,o.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const s=()=>{const e=this.parsePosition(n,t.value.trim().substr(o4.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);const o=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(o,0),this.addDecorations(n,o)};s(),o.add(t.onDidChangeValue((()=>s())));const r=Lj(n);return r&&2===r.getOptions().get(68).renderType&&(r.updateOptions({lineNumbers:"on"}),o.add(rt((()=>r.updateOptions({lineNumbers:"relative"}))))),o}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?v(0,"Go to line {0} and character {1}.",t,i):v(0,"Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},o=this.lineCount(e);return o>1?v(0,"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,o):v(0,"Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}var s4;o4.PREFIX=":",function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(s4||(s4={}));const r4="workbench.contributions.quickaccess";var a4,l4,d4,c4,h4,u4,g4,p4;xc.add(r4,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),rt((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return jh([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}}),function(e){e.inspectTokensAction=v(0,"Developer: Inspect Tokens")}(a4||(a4={})),function(e){e.gotoLineActionLabel=v(0,"Go to Line/Column...")}(l4||(l4={})),function(e){e.helpQuickAccessActionLabel=v(0,"Show all Quick Access Providers")}(d4||(d4={})),function(e){e.quickCommandActionLabel=v(0,"Command Palette"),e.quickCommandHelp=v(0,"Show And Run Commands")}(c4||(c4={})),function(e){e.quickOutlineActionLabel=v(0,"Go to Symbol..."),e.quickOutlineByCategoryActionLabel=v(0,"Go to Symbol by Category...")}(h4||(h4={})),function(e){e.editorViewAccessibleLabel=v(0,"Editor content"),e.accessibilityHelpMessage=v(0,"Press Alt+F1 for Accessibility Options.")}(u4||(u4={})),function(e){e.toggleHighContrast=v(0,"Toggle High Contrast Theme")}(g4||(g4={})),function(e){e.bulkEditServiceSummary=v(0,"Made {0} edits in {1} files")}(p4||(p4={}));let m4=class extends o4{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=_t.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};m4=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,bd)],m4);class f4 extends Qc{constructor(){super({id:f4.ID,label:l4.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(KL).quickAccess.show(m4.PREFIX)}}f4.ID="editor.action.gotoLine",ih(f4),xc.as(r4).registerQuickAccessProvider({ctor:m4,prefix:m4.PREFIX,helpEntries:[{description:l4.gotoLineActionLabel,commandId:f4.ID}]});var _4=i(8979),v4={};v4.styleTagTransform=Gr(),v4.setAttributes=Kr(),v4.insert=zr().bind(null,"head"),v4.domAPI=Vr(),v4.insertStyleElement=qr(),Br()(_4.Z,v4),_4.Z&&_4.Z.locals&&_4.Z.locals;var b4,w4=function(e,t){return function(i,n){t(i,n,e)}};let C4=b4=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new at,this.toUnhookForKeyboard=new at,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const o=new wj(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,null!=t?t:void 0)}))),this.toUnhook.add(o.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).catch((e=>{xe(e)})).finally((()=>{this.removeLinkDecorations()}))}))),this.toUnhook.add(o.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(b4.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,void this.removeLinkDecorations();if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new wx(this.editor,15);let o;this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Wt((t=>this.findDefinition(e,t)));try{o=await this.previousPromise}catch(e){return void xe(e)}if(!o||!o.length||!n.validate(this.editor))return void this.removeLinkDecorations();const s=o[0].originSelectionRange?hh.lift(o[0].originSelectionRange):new hh(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(o.length>1){let e=s;for(const{originSelectionRange:t}of o)t&&(e=hh.plusRange(e,t));this.addDecoration(e,(new dd).appendText(v(0,"Click to show {0} definitions.",o.length)))}else{const e=o[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:i}}=t,{startLineNumber:n}=e.range;if(n<1||n>i.getLineCount())return void t.dispose();const o=this.getPreviewValue(i,n,e),r=this.languageService.guessLanguageIdByFilepathOrFirstLine(i.uri);this.addDecoration(s,o?(new dd).appendCodeblock(r||"",o):void 0),t.dispose()}))}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=b4.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;o{const i=!t&&this.editor.getOption(88)&&!this.isInPeekEditor(e);return new hY({openToSide:t,openInPeek:i,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(e)}))}isInPeekEditor(e){const t=e.get(pc);return zj.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};var y4;C4.ID="editor.contrib.gotodefinitionatposition",C4.MAX_SOURCE_PREVIEW_LINES=8,C4=b4=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([w4(1,yd),w4(2,Mu),w4(3,Pk)],C4),oh(C4.ID,C4,2),function(e){e.NoAutoFocus="noAutoFocus",e.FocusIfVisible="focusIfVisible",e.AutoFocusImmediately="autoFocusImmediately"}(y4||(y4={}));var S4=function(e,t){return function(i,n){t(i,n,e)}};const k4=Sr;class x4{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const L4={type:1,filter:{include:DE.QuickFix},triggerAction:EE.QuickFixHover};let D4=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type&&!e.supportsMarkerHover)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),s=[];for(const r of t){const t=r.range.startLineNumber===n?r.range.startColumn:1,a=r.range.endLineNumber===n?r.range.endColumn:o,l=this._markerDecorationsService.getMarker(i.uri,r);if(!l)continue;const d=new hh(e.range.startLineNumber,t,e.range.startLineNumber,a);s.push(new x4(this,d,l))}return s}renderHoverParts(e,t){if(!t.length)return lt.None;const i=new at;t.forEach((t=>e.fragment.appendChild(this.renderMarkerHover(t,i))));const n=1===t.length?t[0]:t.sort(((e,t)=>wM.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=k4("div.hover-row");i.tabIndex=0;const n=_r(i,k4("div.marker.hover-contents")),{source:o,message:s,code:r,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=_r(n,k4("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=s,o||r)if(r&&"string"!=typeof r){const e=k4("span");o&&(_r(e,k4("span")).innerText=o);const i=_r(e,k4("a.code-link"));i.setAttribute("href",r.target.toString()),t.add(ws(i,"click",(e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),_r(i,k4("span")).innerText=r.value;const s=_r(n,e);s.style.opacity="0.6",s.style.paddingLeft="6px"}else{const e=_r(n,k4("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&r?`${o}(${r})`:o||`(${r})`}if(Gh(a))for(const{message:e,resource:i,startLineNumber:o,startColumn:s}of a){const r=_r(n,k4("div"));r.style.marginTop="8px";const a=_r(r,k4("a"));a.innerText=`${Jl(i)}(${o}, ${s}): `,a.style.cursor="pointer",t.add(ws(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(i,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:s}}}).catch(xe)})));const l=_r(r,k4("span"));l.innerText=e,this._editor.applyFontInfo(l)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity===wM.Error||t.marker.severity===wM.Warning||t.marker.severity===wM.Info){const i=X2.get(this._editor);i&&e.statusBar.addAction({label:v(0,"View Problem"),commandId:e4.ID,run:()=>{e.hide(),i.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(91)){const n=e.statusBar.append(k4("div"));this.recentMarkerCodeActionsInfo&&(CM.makeKey(this.recentMarkerCodeActionsInfo.marker)===CM.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=v(0,"No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?lt.None:jt((()=>n.textContent=v(0,"Checking for quick fixes...")),200,i);n.textContent||(n.textContent=String.fromCharCode(160));const s=this.getCodeActions(t.marker);i.add(rt((()=>s.cancel()))),s.then((s=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:s.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return s.dispose(),void(n.textContent=v(0,"No quick fixes available"));n.style.display="none";let r=!1;i.add(rt((()=>{r||s.dispose()}))),e.statusBar.addAction({label:v(0,"Quick Fix..."),commandId:AE,run:t=>{r=!0;const i=TM.get(this._editor),n=Rs(t);e.hide(),null==i||i.showCodeActions(L4,s,{x:n.left,y:n.top,width:n.width,height:n.height})}})}),xe)}}getCodeActions(e){return Wt((t=>HE(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new hh(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),L4,BL.None,t)))}};D4=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([S4(1,PM),S4(2,LL),S4(3,Pk)],D4);const E4=new class{constructor(){this._implementations=[]}register(e){return this._implementations.push(e),{dispose:()=>{const t=this._implementations.indexOf(e);-1!==t&&this._implementations.splice(t,1),e.dispose()}}}getImplementations(){return this._implementations}};var N4;!function(e){e.intro=v(0,"Focus on the hover widget to cycle through the hover parts with the Tab key."),e.increaseVerbosity=v(0,"- The focused hover part verbosity level can be increased with the Increase Hover Verbosity command.",xU),e.decreaseVerbosity=v(0,"- The focused hover part verbosity level can be decreased with the Decrease Hover Verbosity command.",DU),e.hoverContent=v(0,"The last focused hover content is the following.")}(N4||(N4={})),oh(jY.ID,jY,2),ih(class extends Qc{constructor(){super({id:kU,label:v(0,"Show or Focus Hover"),metadata:{description:b(0,"Show or focus the editor hover which shows documentation, references, and other content for a symbol at the current cursor position."),args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[y4.NoAutoFocus,y4.FocusIfVisible,y4.AutoFocusImmediately],enumDescriptions:[v(0,"The hover will not automatically take focus."),v(0,"The hover will take focus only if it is already visible."),v(0,"The hover will automatically take focus when it appears.")],default:y4.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:gh.editorTextFocus,primary:Se(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=jY.get(t);if(!n)return;const o=null==i?void 0:i.focus;let s=y4.FocusIfVisible;Object.values(y4).includes(o)?s=o:"boolean"==typeof o&&o&&(s=y4.AutoFocusImmediately);const r=e=>{const i=t.getPosition(),o=new hh(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(o,1,1,e)},a=2===t.getOption(2);n.isHoverVisible?s!==y4.NoAutoFocus?n.focus():r(a):r(a||s===y4.AutoFocusImmediately)}}),ih(class extends Qc{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:v(0,"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0,metadata:{description:b(0,"Show the definition preview hover in the editor.")}})}run(e,t){const i=jY.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new hh(n.lineNumber,n.column,n.lineNumber,n.column),s=C4.get(t);s&&s.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(o,1,1,!0)}))}}),ih(class extends Qc{constructor(){super({id:"editor.action.scrollUpHover",label:v(0,"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:gh.hoverFocused,kbOpts:{kbExpr:gh.hoverFocused,primary:16,weight:100},metadata:{description:b(0,"Scroll up the editor hover.")}})}run(e,t){const i=jY.get(t);i&&i.scrollUp()}}),ih(class extends Qc{constructor(){super({id:"editor.action.scrollDownHover",label:v(0,"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:gh.hoverFocused,kbOpts:{kbExpr:gh.hoverFocused,primary:18,weight:100},metadata:{description:b(0,"Scroll down the editor hover.")}})}run(e,t){const i=jY.get(t);i&&i.scrollDown()}}),ih(class extends Qc{constructor(){super({id:"editor.action.scrollLeftHover",label:v(0,"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:gh.hoverFocused,kbOpts:{kbExpr:gh.hoverFocused,primary:15,weight:100},metadata:{description:b(0,"Scroll left the editor hover.")}})}run(e,t){const i=jY.get(t);i&&i.scrollLeft()}}),ih(class extends Qc{constructor(){super({id:"editor.action.scrollRightHover",label:v(0,"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:gh.hoverFocused,kbOpts:{kbExpr:gh.hoverFocused,primary:17,weight:100},metadata:{description:b(0,"Scroll right the editor hover.")}})}run(e,t){const i=jY.get(t);i&&i.scrollRight()}}),ih(class extends Qc{constructor(){super({id:"editor.action.pageUpHover",label:v(0,"Page Up Hover"),alias:"Page Up Hover",precondition:gh.hoverFocused,kbOpts:{kbExpr:gh.hoverFocused,primary:11,secondary:[528],weight:100},metadata:{description:b(0,"Page up the editor hover.")}})}run(e,t){const i=jY.get(t);i&&i.pageUp()}}),ih(class extends Qc{constructor(){super({id:"editor.action.pageDownHover",label:v(0,"Page Down Hover"),alias:"Page Down Hover",precondition:gh.hoverFocused,kbOpts:{kbExpr:gh.hoverFocused,primary:12,secondary:[530],weight:100},metadata:{description:b(0,"Page down the editor hover.")}})}run(e,t){const i=jY.get(t);i&&i.pageDown()}}),ih(class extends Qc{constructor(){super({id:"editor.action.goToTopHover",label:v(0,"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:gh.hoverFocused,kbOpts:{kbExpr:gh.hoverFocused,primary:14,secondary:[2064],weight:100},metadata:{description:b(0,"Go to the top of the editor hover.")}})}run(e,t){const i=jY.get(t);i&&i.goToTop()}}),ih(class extends Qc{constructor(){super({id:"editor.action.goToBottomHover",label:v(0,"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:gh.hoverFocused,kbOpts:{kbExpr:gh.hoverFocused,primary:13,secondary:[2066],weight:100},metadata:{description:b(0,"Go to the bottom of the editor hover.")}})}run(e,t){const i=jY.get(t);i&&i.goToBottom()}}),ih(class extends Qc{constructor(){super({id:xU,label:LU,alias:"Increase Hover Verbosity Level",precondition:gh.hoverVisible})}run(e,t,i){var n;null===(n=jY.get(t))||void 0===n||n.updateMarkdownHoverVerbosityLevel(xC.Increase,null==i?void 0:i.index,null==i?void 0:i.focus)}}),ih(class extends Qc{constructor(){super({id:DU,label:EU,alias:"Decrease Hover Verbosity Level",precondition:gh.hoverVisible})}run(e,t,i){var n;null===(n=jY.get(t))||void 0===n||n.updateMarkdownHoverVerbosityLevel(xC.Decrease,null==i?void 0:i.index,null==i?void 0:i.focus)}}),JK.register(hj),JK.register(D4),jv(((e,t)=>{const i=e.getColor(xf);i&&(t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${i.transparent(.5)}; }`))})),E4.register(new class{dispose(){var e;null===(e=this._provider)||void 0===e||e.dispose()}}),E4.register(new class{dispose(){var e;null===(e=this._provider)||void 0===e||e.dispose()}}),E4.register(new class{dispose(){}});var I4=i(5795),T4={};T4.styleTagTransform=Gr(),T4.setAttributes=Kr(),T4.insert=zr().bind(null,"head"),T4.domAPI=Vr(),T4.insertStyleElement=qr(),Br()(I4.Z,T4),I4.Z&&I4.Z.locals&&I4.Z.locals;class M4 extends lt{constructor(e){super(),this.editor=e,this.widget=null,Z&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(91);!this.widget&&e?this.widget=new A4(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}M4.ID="editor.contrib.iPadShowKeyboard";class A4 extends lt{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(ws(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(ws(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return A4.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}A4.ID="editor.contrib.ShowKeyboardWidget",oh(M4.ID,M4,3);class R4{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new uh(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new uh(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var P4=i(330),O4={};O4.styleTagTransform=Gr(),O4.setAttributes=Kr(),O4.insert=zr().bind(null,"head"),O4.domAPI=Vr(),O4.insertStyleElement=qr(),Br()(P4.Z,O4),P4.Z&&P4.Z.locals&&P4.Z.locals;var F4;let B4=F4=class{static get(e){return e.getContribution(F4.ID)}constructor(e,t){this.editor=e,this.editorWorkerService=t,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(e,t){var i;null===(i=this.currentRequest)||void 0===i||i.cancel();const n=this.editor.getSelection(),o=this.editor.getModel();if(!o||!n)return;let s=n;if(s.startLineNumber!==s.endLineNumber)return;const r=new wx(this.editor,5),a=o.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=Wt((e=>this.editorWorkerService.navigateValueSet(a,s,t))),this.currentRequest.then((t=>{var i;if(!t||!t.range||!t.value)return;if(!r.validate(this.editor))return;const n=hh.lift(t.range);let o=t.range;const a=t.value.length-(s.endColumn-s.startColumn);o={startLineNumber:o.startLineNumber,startColumn:o.startColumn,endLineNumber:o.endLineNumber,endColumn:o.startColumn+t.value.length},a>1&&(s=new uh(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+a-1));const l=new R4(n,s,t.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,l),this.editor.pushUndoStop(),this.decorations.set([{range:o,options:F4.DECORATION}]),null===(i=this.decorationRemover)||void 0===i||i.cancel(),this.decorationRemover=Kt(350),this.decorationRemover.then((()=>this.decorations.clear())).catch(xe)})).catch(xe)):Promise.resolve(void 0)}};function W4(e,t){let i=0;for(let n=0;nn-1)return[];const{tabSize:r,indentSize:a,insertSpaces:l}=e.getOptions(),d=(e,t)=>(t=t||1,TS.shiftIndent(e,e.length+t,r,a,l)),c=(e,t)=>(t=t||1,TS.unshiftIndent(e,e.length+t,r,a,l)),h=[];let u=vn(e.getLineContent(i)),g=u;s.shouldIncrease(i)?(g=d(g),u=d(u)):s.shouldIndentNextLine(i)&&(g=d(g));for(let t=++i;t<=n;t++){if(z4(e,t))continue;const i=vn(e.getLineContent(t)),n=g;s.shouldDecrease(t,n)&&(g=c(g),u=c(u)),i!==g&&h.push(pj.replaceMove(new uh(t,1,t,i.length+1),bu(g,a,l))),s.shouldIgnore(t)||(s.shouldIncrease(t,n)?(u=d(u),g=u):g=s.shouldIndentNextLine(t,n)?d(g):u)}return h}function z4(e,t){return!!e.tokenization.isCheapToTokenize(t)&&2===e.tokenization.getLineTokens(t).getStandardTokenType(0)}B4.ID="editor.contrib.inPlaceReplaceController",B4.DECORATION=zy.register({description:"in-place-replace",className:"valueSetReplacement"}),B4=F4=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,uX)],B4),oh(B4.ID,B4,4),ih(class extends Qc{constructor(){super({id:"editor.action.inPlaceReplace.up",label:v(0,"Replace with Previous Value"),alias:"Replace with Previous Value",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:3159,weight:100}})}run(e,t){const i=B4.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}),ih(class extends Qc{constructor(){super({id:"editor.action.inPlaceReplace.down",label:v(0,"Replace with Next Value"),alias:"Replace with Next Value",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:3161,weight:100}})}run(e,t){const i=B4.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}});class U4 extends Qc{constructor(){super({id:U4.ID,label:v(0,"Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:gh.writable,metadata:{description:b(0,"Convert the tab indentation to spaces.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new J4(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}U4.ID="editor.action.indentationToSpaces";class K4 extends Qc{constructor(){super({id:K4.ID,label:v(0,"Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:gh.writable,metadata:{description:b(0,"Convert the spaces indentation to tabs.")}})}run(e,t){const i=t.getModel();if(!i)return;const n=i.getOptions(),o=t.getSelection();if(!o)return;const s=new e5(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}K4.ID="editor.action.indentationToTabs";class j4 extends Qc{constructor(e,t,i){super(i),this.insertSpaces=e,this.displaySizeOnly=t}run(e,t){const i=e.get(KL),n=e.get(Cd),o=t.getModel();if(!o)return;const s=n.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),r=o.getOptions(),a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize&&e===r.tabSize?v(0,"Configured Tab Size"):e===s.tabSize?v(0,"Default Tab Size"):e===r.tabSize?v(0,"Current Tab Size"):void 0}))),l=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:v(0,"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{if(e&&o&&!o.isDisposed()){const t=parseInt(e.label,10);this.displaySizeOnly?o.updateOptions({tabSize:t}):o.updateOptions({tabSize:t,indentSize:t,insertSpaces:this.insertSpaces})}}))}),50)}}class q4 extends j4{constructor(){super(!1,!1,{id:q4.ID,label:v(0,"Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0,metadata:{description:b(0,"Use indentation with tabs.")}})}}q4.ID="editor.action.indentUsingTabs";class $4 extends j4{constructor(){super(!0,!1,{id:$4.ID,label:v(0,"Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0,metadata:{description:b(0,"Use indentation with spaces.")}})}}$4.ID="editor.action.indentUsingSpaces";class G4 extends j4{constructor(){super(!0,!0,{id:G4.ID,label:v(0,"Change Tab Display Size"),alias:"Change Tab Display Size",precondition:void 0,metadata:{description:b(0,"Change the space size equivalent of the tab.")}})}}G4.ID="editor.action.changeTabDisplaySize";class Z4 extends Qc{constructor(){super({id:Z4.ID,label:v(0,"Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0,metadata:{description:b(0,"Detect the indentation from content.")}})}run(e,t){const i=e.get(Cd),n=t.getModel();if(!n)return;const o=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}Z4.ID="editor.action.detectIndentation";class Y4{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(const t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(const e of this._edits)t.addEditOperation(hh.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}let Q4=class{constructor(e,t){this.editor=e,this._languageConfigurationService=t,this.callOnDispose=new at,this.callOnModel=new at,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(12)<4||this.editor.getOption(55)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){const t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(function(e,t){const i=t=>{const i=function(e,t){const i=t.lineNumber;if(!e.tokenization.isCheapToTokenize(i))return;e.tokenization.forceTokenization(i);const n=e.tokenization.getLineTokens(i),o=n.findTokenIndexAtOffset(t.column-1);return n.getStandardTokenType(o)}(e,t);return 2===i};return i(t.getStartPosition())||i(t.getEndPosition())}(i,e))return;if(!i.tokenization.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(12),{tabSize:o,indentSize:s,insertSpaces:r}=i.getOptions(),a=[],l={shiftIndent:e=>TS.shiftIndent(e,e.length+1,o,s,r),unshiftIndent:e=>TS.unshiftIndent(e,e.length+1,o,s,r)};let d=e.startLineNumber;for(;d<=e.endLineNumber&&this.shouldIgnoreLine(i,d);)d++;if(d>e.endLineNumber)return;let c=i.getLineContent(d);if(!/\S/.test(c.substring(0,e.startColumn-1))){const e=PS(n,i,i.getLanguageId(),d,l,this._languageConfigurationService);if(null!==e){const t=vn(c),n=W4(e,o);if(n!==W4(t,o)){const e=V4(n,o,r);a.push({range:new hh(d,1,d,t.length+1),text:e}),c=e+c.substr(t.length)}else{const e=OS(i,d,this._languageConfigurationService);if(0===e||8===e)return}}}const h=d;for(;di.tokenization.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t)},getLineContent:e=>e===h?c:i.getLineContent(e)},i.getLanguageId(),d+1,l,this._languageConfigurationService);if(null!==t){const n=W4(t,o),s=W4(vn(i.getLineContent(d+1)),o);if(n!==s){const t=n-s;for(let n=d+1;n<=e.endLineNumber;n++){const e=vn(i.getLineContent(n)),s=V4(W4(e,o)+t,o,r);s!==e&&a.push({range:new hh(n,1,n,e.length+1),text:s})}}}}if(a.length>0){this.editor.pushUndoStop();const e=new Y4(a,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.tokenization.forceTokenization(t);const i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;const n=e.tokenization.getLineTokens(t);if(n.getCount()>0){const e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};function X4(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,sp)],Q4);class J4{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),X4(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class e5{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),X4(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}oh(Q4.ID,Q4,2),ih(U4),ih(K4),ih(q4),ih($4),ih(G4),ih(Z4),ih(class extends Qc{constructor(){super({id:"editor.action.reindentlines",label:v(0,"Reindent Lines"),alias:"Reindent Lines",precondition:gh.writable,metadata:{description:b(0,"Reindent the lines of the editor.")}})}run(e,t){const i=e.get(sp),n=t.getModel();if(!n)return;const o=H4(n,i,1,n.getLineCount());o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}),ih(class extends Qc{constructor(){super({id:"editor.action.reindentselectedlines",label:v(0,"Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:gh.writable,metadata:{description:b(0,"Reindent the selected lines of the editor.")}})}run(e,t){const i=e.get(sp),n=t.getModel();if(!n)return;const o=t.getSelections();if(null===o)return;const s=[];for(const e of o){let t=e.startLineNumber,o=e.endLineNumber;if(t!==o&&1===e.endColumn&&o--,1===t){if(t===o)continue}else t--;const r=H4(n,i,t,o);s.push(...r)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}),oh(xY.ID,xY,1),JK.register(EY);class t5 extends lt{constructor(e,t){super(),this.contextKeyService=e,this.model=t,this.inlineCompletionVisible=t5.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=t5.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=t5.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=t5.suppressSuggestions.bindTo(this.contextKeyService),this._register(SI((e=>{const t=this.model.read(e),i=null==t?void 0:t.state.read(e),n=!!(null==i?void 0:i.inlineCompletion)&&void 0!==(null==i?void 0:i.primaryGhostText)&&!(null==i?void 0:i.primaryGhostText.isEmpty());this.inlineCompletionVisible.set(n),(null==i?void 0:i.primaryGhostText)&&(null==i?void 0:i.inlineCompletion)&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)}))),this._register(SI((e=>{const t=this.model.read(e);let i=!1,n=!0;const o=null==t?void 0:t.primaryGhostText.read(e);if((null==t?void 0:t.selectedSuggestItem)&&o&&o.parts.length>0){const{column:e,lines:s}=o.parts[0],r=s[0];if(e<=t.textModel.getLineIndentColumn(o.lineNumber)){let e=_n(r);-1===e&&(e=r.length-1),i=e>0;const o=t.textModel.getOptions().tabSize;n=vu.visibleColumnFromColumn(r,e+1,o)t.equals(e.parts[i])))}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return new pH([...this.parts.map((e=>new mH(hh.fromPositions(new wd(1,e.column)),e.lines.join("\n"))))]).applyToString(i).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every((e=>0===e.lines.length))}get lineCount(){return 1+this.parts.reduce(((e,t)=>e+t.lines.length-1),0)}}class s5{constructor(e,t,i){this.column=e,this.text=t,this.preview=i,this.lines=fn(this.text)}equals(e){return this.column===e.column&&this.lines.length===e.lines.length&&this.lines.every(((t,i)=>t===e.lines[i]))}}class r5{constructor(e,t,i,n=0){this.lineNumber=e,this.columnRange=t,this.text=i,this.additionalReservedLineCount=n,this.parts=[new s5(this.columnRange.endColumnExclusive,this.text,!1)],this.newLines=fn(this.text)}renderForScreenReader(e){return this.newLines.join("\n")}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every((e=>0===e.lines.length))}equals(e){return this.lineNumber===e.lineNumber&&this.columnRange.equals(e.columnRange)&&this.newLines.length===e.newLines.length&&this.newLines.every(((t,i)=>t===e.newLines[i]))&&this.additionalReservedLineCount===e.additionalReservedLineCount}}function a5(e,t){return Wh(e,t,l5)}function l5(e,t){return e===t||!(!e||!t)&&(e instanceof o5&&t instanceof o5||e instanceof r5&&t instanceof r5)&&e.equals(t)}const d5=[];class c5{constructor(e,t){if(this.startColumn=e,this.endColumnExclusive=t,e>t)throw new Pe(`startColumn ${e} cannot be after endColumnExclusive ${t}`)}toRange(e){return new hh(e,this.startColumn,e,this.endColumnExclusive)}equals(e){return this.startColumn===e.startColumn&&this.endColumnExclusive===e.endColumnExclusive}}function h5(e,t){const i=new at,n=e.createDecorationsCollection();return i.add(kI({debugName:()=>`Apply decorations from ${t.debugName}`},(e=>{const i=t.read(e);n.set(i)}))),i.add({dispose:()=>{n.clear()}}),i}function u5(e,t){return new wd(e.lineNumber-t.lineNumber+1,e.lineNumber-t.lineNumber==0?e.column-t.column+1:e.column)}const g5="ghost-text";let p5=class extends lt{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=uI(this,!1),this.currentTextModel=II(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=fI(this,(e=>{if(this.isDisposed.read(e))return;const t=this.currentTextModel.read(e);if(t!==this.model.targetTextModel.read(e))return;const i=this.model.ghostText.read(e);if(!i)return;const n=i instanceof r5?i.columnRange:void 0,o=[],s=[];function r(e,t){if(s.length>0){const i=s[s.length-1];t&&i.decorations.push(new MA(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)s.push({content:i,decorations:t?[new MA(1,i.length+1,t,0)]:[]})}const a=t.getLineContent(i.lineNumber);let l,d=0;for(const e of i.parts){let t=e.lines;void 0===l?(o.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):r([a.substring(d,e.column-1)],void 0),t.length>0&&(r(t,g5),void 0===l&&e.column<=a.length&&(l=e.column)),d=e.column-1}void 0!==l&&r([a.substring(d)],void 0);const c=void 0!==l?new c5(l,a.length+1):void 0;return{replacedRange:n,inlineTexts:o,additionalLines:s,hiddenRange:c,lineNumber:i.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:t}})),this.decorations=fI(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];t.replacedRange&&i.push({range:t.replacedRange.toRange(t.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const e of t.inlineTexts)i.push({range:hh.fromPositions(new wd(t.lineNumber,e.column)),options:{description:g5,after:{content:e.text,inlineClassName:e.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:Ih.Left},showIfCollapsed:!0}});return i})),this.additionalLinesWidget=this._register(new m5(this.editor,this.languageService.languageIdCodec,fI((e=>{const t=this.uiState.read(e);return t?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register(rt((()=>{this.isDisposed.set(!0,void 0)}))),this._register(h5(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};p5=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,Mu)],p5);class m5 extends lt{get viewZoneId(){return this._viewZoneId}constructor(e,t,i){super(),this.editor=e,this.languageIdCodec=t,this.lines=i,this._viewZoneId=void 0,this.editorOptionsChanged=MI("editorOptionChanged",_t.filter(this.editor.onDidChangeConfiguration,(e=>e.hasChanged(33)||e.hasChanged(117)||e.hasChanged(99)||e.hasChanged(94)||e.hasChanged(51)||e.hasChanged(50)||e.hasChanged(67)))),this._register(SI((e=>{const t=this.lines.read(e);this.editorOptionsChanged.read(e),t?this.updateLines(t.lineNumber,t.additionalLines,t.minReservedLineCount):this.clear()})))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");!function(e,t,i,n,o){const s=n.get(33),r=n.get(117),a=n.get(94),l=n.get(51),d=n.get(50),c=n.get(67),h=new ag(1e4);h.appendString('
    ');for(let e=0,n=i.length;e');const g=zn(u),p=Vn(u),m=ZC.createEmpty(u,o);zA(new BA(d.isMonospace&&!s,d.canUseHalfwidthRightwardsArrow,u,!1,g,p,0,m,n.decorations,t,0,d.spaceWidth,d.middotWidth,d.wsmiddotWidth,r,"none",a,l!==nE.OFF,null),h),h.appendString("
    ")}h.appendString(""),yL(e,d);const u=h.build(),g=f5?f5.createHTML(u):u;e.innerHTML=g}(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i,afterColumnAffinity:1})}}))}}const f5=fL("editorGhostText",{createHTML:e=>e});class _5{constructor(e){this.lines=e,this.tokenization={getLineTokens:e=>this.lines[e-1]}}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}}async function v5(e,t,i,n,o=At.None,s){const r=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new hh(e.lineNumber,i.startColumn,e.lineNumber,n):hh.fromPositions(e,e.with(void 0,n))}(t,i),a=e.all(i),l=new pa;for(const e of a)e.groupId&&l.add(e.groupId,e);function d(e){if(!e.yieldsToGroupIds)return[];const t=[];for(const i of e.yieldsToGroupIds||[]){const e=l.get(i);for(const i of e)t.push(i)}return t}const c=new Map,h=new Set;function u(e,t){if(t=[...t,e],h.has(e))return t;h.add(e);try{const i=d(e);for(const e of i){const i=u(e,t);if(i)return i}}finally{h.delete(e)}}function g(e){const s=c.get(e);if(s)return s;const r=u(e,[]);r&&Le(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${r.map((e=>e.toString?e.toString():""+e)).join(" -> ")}`));const a=new ei;return c.set(e,a.p),(async()=>{if(!r){const t=d(e);for(const e of t){const t=await g(e);if(t&&t.items.length>0)return}}try{return await e.provideInlineCompletions(i,t,n,o)}catch(e){return void Le(e)}})().then((e=>a.complete(e)),(e=>a.error(e))),a.p}const p=await Promise.all(a.map((async e=>({provider:e,completions:await g(e)})))),m=new Map,f=[];for(const e of p){const t=e.completions;if(!t)continue;const n=new w5(t,e.provider);f.push(n);for(const e of t.items){const t=C5.from(e,n,r,i,s);m.set(t.hash(),t)}}return new b5(Array.from(m.values()),new Set(m.keys()),f)}class b5{constructor(e,t,i){this.completions=e,this.hashs=t,this.providerResults=i}has(e){return this.hashs.has(e.hash())}dispose(){for(const e of this.providerResults)e.removeRef()}}class w5{constructor(e,t){this.inlineCompletions=e,this.provider=t,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,0===this.refCount&&this.provider.freeInlineCompletions(this.inlineCompletions)}}class C5{static from(e,t,i,n,o){let s,r,a=e.range?hh.lift(e.range):i;if("string"==typeof e.insertText){if(s=e.insertText,o&&e.completeBracketPairs){s=y5(s,a.getStartPosition(),n,o);const t=s.length-e.insertText.length;0!==t&&(a=new hh(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+t))}r=void 0}else if("snippet"in e.insertText){const t=e.insertText.snippet.length;if(o&&e.completeBracketPairs){e.insertText.snippet=y5(e.insertText.snippet,a.getStartPosition(),n,o);const i=e.insertText.snippet.length-t;0!==i&&(a=new hh(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+i))}const i=(new px).parse(e.insertText.snippet);1===i.children.length&&i.children[0]instanceof sx?(s=i.children[0].value,r=void 0):(s=i.toString(),r={snippet:e.insertText.snippet,range:a})}else Cc(e.insertText);return new C5(s,e.command,a,s,r,e.additionalTextEdits||d5,e,t)}constructor(e,t,i,n,o,s,r,a){this.filterText=e,this.command=t,this.range=i,this.insertText=n,this.snippetInfo=o,this.additionalTextEdits=s,this.sourceInlineCompletion=r,this.source=a,n=(e=e.replace(/\r\n|\r/g,"\n")).replace(/\r\n|\r/g,"\n")}withRange(e){return new C5(this.filterText,this.command,e,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}function y5(e,t,i,n){const o=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,s=i.tokenization.tokenizeLineWithEdit(t,o.length-(t.column-1),e),r=null==s?void 0:s.sliceAndInflate(t.column-1,o.length,0);if(!r)return e;const a=function(e,t){const i=new Vp,n=new sm(i,(e=>t.getLanguageConfiguration(e))),o=um(new tm(new _5([e]),n),[],void 0,!0);let s="";const r=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=xp(i,t.openingBracket.length),t.child&&(e(t.child,i),i=xp(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=xp(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);s+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)s+=r.substring(i,xp(i,t.length));else if(4===t.kind)for(const n of t.children)e(n,i),i=xp(i,n.length)}(o,wp),s}(r,n);return a}function S5(e,t,i){const n=i?e.range.intersectRanges(i):e.range;if(!n)return e;const o=t.getValueInRange(n,1),s=Nn(o,e.text),r=bp.ofText(o.substring(0,s)).addToPosition(e.range.getStartPosition()),a=e.text.substring(s),l=hh.fromPositions(r,e.range.getEndPosition());return new mH(l,a)}function k5(e,t){return e.text.startsWith(t.text)&&(i=e.range,(n=t.range).getStartPosition().equals(i.getStartPosition())&&n.getEndPosition().isBeforeOrEqual(i.getEndPosition()));var i,n}function x5(e,t,i,n,o=0){let s=S5(e,t);if(s.range.endLineNumber!==s.range.startLineNumber)return;const r=t.getLineContent(s.range.startLineNumber),a=vn(r).length;if(s.range.startColumn-1<=a){const e=vn(s.text).length,t=r.substring(s.range.startColumn-1,a),[i,n]=[s.range.getStartPosition(),s.range.getEndPosition()],o=i.column+t.length<=n.column?i.delta(0,t.length):n,l=hh.fromPositions(o,n),d=s.text.startsWith(t)?s.text.substring(t.length):s.text.substring(e);s=new mH(l,d)}const l=t.getValueInRange(s.range),d=function(e,t){if((null==L5?void 0:L5.originalValue)===e&&(null==L5?void 0:L5.newValue)===t)return null==L5?void 0:L5.changes;{let i=E5(e,t,!0);if(i){const n=D5(i);if(n>0){const o=E5(e,t,!1);o&&D5(o)0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==l.length)return}const u=s.text.length-o;for(const e of d){const t=s.range.startColumn+e.originalStart+e.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===s.range.startLineNumber&&t0)return;if(0===e.modifiedLength)continue;const o=e.modifiedStart+e.modifiedLength,r=Math.max(e.modifiedStart,Math.min(o,u)),a=s.text.substring(e.modifiedStart,r),l=s.text.substring(r,Math.max(e.modifiedStart,o));a.length>0&&h.push(new s5(t,a,!1)),l.length>0&&h.push(new s5(t,l,!0))}return new o5(c,h)}let L5;function D5(e){let t=0;for(const i of e)t+=i.originalLength;return t}function E5(e,t,i){if(e.length>5e3||t.length>5e3)return;function n(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const o=Math.max(n(e),n(t));function s(e){if(e<0)throw new Error("unexpected");return o+e+1}function r(e){let t=0,n=0;const o=new Int32Array(e.length);for(let r=0,a=e.length;ra},{getElements:()=>l}).ComputeDiff(!1).changes}var N5=function(e,t){return function(i,n){t(i,n,e)}};let I5=class extends lt{constructor(e,t,i,n,o){super(),this.textModel=e,this.versionId=t,this._debounceValue=i,this.languageFeaturesService=n,this.languageConfigurationService=o,this._updateOperation=this._register(new dt),this.inlineCompletions=pI("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=pI("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent((()=>{this._updateOperation.clear()})))}fetch(e,t,i){var n,o;const s=new T5(e,t,this.textModel.getVersionId()),r=t.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(null===(n=this._updateOperation.value)||void 0===n?void 0:n.request.satisfies(s))return this._updateOperation.value.promise;if(null===(o=r.get())||void 0===o?void 0:o.request.satisfies(s))return Promise.resolve(!0);const a=!!this._updateOperation.value;this._updateOperation.clear();const l=new Pt,d=(async()=>{var n,o;if((a||t.triggerKind===DC.Automatic)&&await(n=this._debounceValue.get(this.textModel),o=l.token,new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),n);o&&(t=o.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))}))),l.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;const d=new Date,c=await v5(this.languageFeaturesService.inlineCompletionsProvider,e,this.textModel,t,l.token,this.languageConfigurationService);if(l.token.isCancellationRequested||this.textModel.getVersionId()!==s.versionId)return!1;const h=new Date;this._debounceValue.update(this.textModel,h.getTime()-d.getTime());const u=new A5(c,s,this.textModel,this.versionId);if(i){const t=i.toInlineCompletion(void 0);i.canBeReused(this.textModel,e)&&!c.has(t)&&u.prepend(i.inlineCompletion,t.range,!0)}return this._updateOperation.clear(),lI((e=>{r.set(u,e)})),!0})(),c=new M5(s,l,d);return this._updateOperation.value=c,d}clear(e){this._updateOperation.clear(),this.inlineCompletions.set(void 0,e),this.suggestWidgetInlineCompletions.set(void 0,e)}clearSuggestWidgetInlineCompletions(e){var t;(null===(t=this._updateOperation.value)||void 0===t?void 0:t.request.context.selectedSuggestionInfo)&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,e)}cancelUpdate(){this._updateOperation.clear()}};I5=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([N5(3,Pk),N5(4,sp)],I5);class T5{constructor(e,t,i){this.position=e,this.context=t,this.versionId=i}satisfies(e){return this.position.equals(e.position)&&(t=this.context.selectedSuggestionInfo,i=e.context.selectedSuggestionInfo,t&&i?(n=i,t.equals(n)):t===i)&&(e.context.triggerKind===DC.Automatic||this.context.triggerKind===DC.Explicit)&&this.versionId===e.versionId;var t,i,n}}class M5{constructor(e,t,i){this.request=e,this.cancellationTokenSource=t,this.promise=i}dispose(){this.cancellationTokenSource.cancel()}}class A5{get inlineCompletions(){return this._inlineCompletions}constructor(e,t,i,n){this.inlineCompletionProviderResult=e,this.request=t,this._textModel=i,this._versionId=n,this._refCount=1,this._prependedInlineCompletionItems=[];const o=i.deltaDecorations([],e.completions.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._inlineCompletions=e.completions.map(((e,t)=>new R5(e,o[t],this._textModel,this._versionId)))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,0===this._refCount){setTimeout((()=>{this._textModel.isDisposed()||this._textModel.deltaDecorations(this._inlineCompletions.map((e=>e.decorationId)),[])}),0),this.inlineCompletionProviderResult.dispose();for(const e of this._prependedInlineCompletionItems)e.source.removeRef()}}prepend(e,t,i){i&&e.source.addRef();const n=this._textModel.deltaDecorations([],[{range:t,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new R5(e,n,this._textModel,this._versionId)),this._prependedInlineCompletionItems.push(e)}}class R5{get forwardStable(){var e;return null!==(e=this.inlineCompletion.source.inlineCompletions.enableForwardStability)&&void 0!==e&&e}constructor(e,t,i,n){this.inlineCompletion=e,this.decorationId=t,this._textModel=i,this._modelVersion=n,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._updatedRange=vI({owner:this,equalsFn:hh.equalsRange},(e=>(this._modelVersion.read(e),this._textModel.getDecorationRange(this.decorationId))))}toInlineCompletion(e){var t;return this.inlineCompletion.withRange(null!==(t=this._updatedRange.read(e))&&void 0!==t?t:P5)}toSingleTextEdit(e){var t;return new mH(null!==(t=this._updatedRange.read(e))&&void 0!==t?t:P5,this.inlineCompletion.insertText)}isVisible(e,t,i){const n=S5(this._toFilterTextReplacement(i),e),o=this._updatedRange.read(i);if(!o||!this.inlineCompletion.range.getStartPosition().equals(o.getStartPosition())||t.lineNumber!==n.range.startLineNumber)return!1;const s=e.getValueInRange(n.range,1),r=n.text,a=Math.max(0,t.column-n.range.startColumn);let l=r.substring(0,a),d=r.substring(a),c=s.substring(0,a),h=s.substring(a);const u=e.getLineIndentColumn(n.range.startLineNumber);return n.range.startColumn<=u&&(c=c.trimStart(),0===c.length&&(h=h.trimStart()),l=l.trimStart(),0===l.length&&(d=d.trimStart())),l.startsWith(c)&&!!La(h,d)}canBeReused(e,t){const i=this._updatedRange.read(void 0);return!!i&&i.containsPosition(t)&&this.isVisible(e,t,void 0)&&bp.ofRange(i).isGreaterThanOrEqualTo(bp.ofRange(this.inlineCompletion.range))}_toFilterTextReplacement(e){var t;return new mH(null!==(t=this._updatedRange.read(e))&&void 0!==t?t:P5,this.inlineCompletion.filterText)}}const P5=new hh(1,1,1,1),O5={Visible:D0,HasFocusedSuggestion:new gc("suggestWidgetHasFocusedSuggestion",!1,v(0,"Whether any suggestion is focused")),DetailsVisible:new gc("suggestWidgetDetailsVisible",!1,v(0,"Whether suggestion details are visible")),MultipleSuggestions:new gc("suggestWidgetMultipleSuggestions",!1,v(0,"Whether there are multiple suggestions to pick from")),MakesTextEdit:new gc("suggestionMakesTextEdit",!0,v(0,"Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new gc("acceptSuggestionOnEnter",!0,v(0,"Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new gc("suggestionHasInsertAndReplaceRange",!1,v(0,"Whether the current suggestion has insert and replace behaviour")),InsertMode:new gc("suggestionInsertMode",void 0,{type:"string",description:v(0,"Whether the default behaviour is to insert or replace")}),CanResolve:new gc("suggestionCanResolve",!1,v(0,"Whether the current suggestion supports to resolve further details"))},F5=new Mc("suggestWidgetStatusBar");class B5{constructor(e,t,i,n){var o;this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=cl.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:null===(o=t.label)||void 0===o?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,hh.isIRange(t.range)?(this.editStart=new wd(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new wd(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new wd(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||hh.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new wd(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new wd(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new wd(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||hh.spansMultipleLines(t.range.insert)||hh.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return void 0!==this._resolveDuration}get resolveDuration(){return void 0!==this._resolveDuration?this._resolveDuration:-1}async resolve(e){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._resolveDuration=void 0})),i=new ft(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._resolveDuration=i.elapsed()}),(e=>{Ne(e)&&(this._resolveCache=void 0,this._resolveDuration=void 0)})).finally((()=>{t.dispose()}))}return this._resolveCache}}class W5{constructor(e=2,t=new Set,i=new Set,n=new Map,o=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.providerItemsToReuse=n,this.showDeprecated=o}}W5.default=new W5;class V5{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}async function H5(e,t,i,n=W5.default,o={triggerKind:0},s=At.None){const r=new ft;i=i.clone();const a=t.getWordAtPosition(i),l=a?new hh(i.lineNumber,a.startColumn,i.lineNumber,a.endColumn):hh.fromPositions(i),d={replace:l,insert:l.setEndPosition(i.lineNumber,i.column)},c=[],h=new at,u=[];let g=!1;const p=(e,t,o)=>{var s,r,a;let l=!1;if(!t)return l;for(const o of t.suggestions)if(!n.kindFilter.has(o.kind)){if(!n.showDeprecated&&(null===(s=null==o?void 0:o.tags)||void 0===s?void 0:s.includes(1)))continue;o.range||(o.range=d),o.sortText||(o.sortText="string"==typeof o.label?o.label:o.label.label),!g&&o.insertTextRules&&4&o.insertTextRules&&(g=px.guessNeedsClipboard(o.insertText)),c.push(new B5(i,o,t,e)),l=!0}return nt(t)&&h.add(t),u.push({providerName:null!==(r=e._debugDisplayName)&&void 0!==r?r:"unknown_provider",elapsedProvider:null!==(a=t.duration)&&void 0!==a?a:-1,elapsedOverall:o.elapsed()}),l},m=(async()=>{})();for(const r of e.orderedGroups(t)){let e=!1;if(await Promise.all(r.map((async r=>{if(n.providerItemsToReuse.has(r)){const t=n.providerItemsToReuse.get(r);return t.forEach((e=>c.push(e))),void(e=e||t.length>0)}if(!(n.providerFilter.size>0)||n.providerFilter.has(r))try{const n=new ft,a=await r.provideCompletionItems(t,i,o,s);e=p(r,a,n)||e}catch(e){Le(e)}}))),e||s.isCancellationRequested)break}return await m,s.isCancellationRequested?(h.dispose(),Promise.reject(new Ie)):new V5(c.sort((f=n.snippetSortOrder,U5.get(f))),g,{entries:u,elapsed:r.elapsed()},h);var f}function z5(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.textLabelt.textLabel?1:e.completion.kind-t.completion.kind}const U5=new Map;U5.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return z5(e,t)})),U5.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return z5(e,t)})),U5.set(1,z5),Id.registerCommand("_executeCompletionItemProvider",(async(e,...t)=>{const[i,n,o,s]=t;xl(Po.isUri(i)),xl(wd.isIPosition(n)),xl("string"==typeof o||!o),xl("number"==typeof s||!s);const{completionProvider:r}=e.get(Pk),a=await e.get(yd).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=a.object.textEditorModel.validatePosition(n),l=await H5(r,a.object.textEditorModel,i,void 0,{triggerCharacter:null!=o?o:void 0,triggerKind:o?1:0});for(const i of l.items)t.length<(null!=s?s:0)&&t.push(i.resolve(At.None)),e.incomplete=e.incomplete||i.container.incomplete,e.suggestions.push(i.completion);try{return await Promise.all(t),e}finally{setTimeout((()=>l.disposable.dispose()),100)}}finally{a.dispose()}}));class K5{static isAllOff(e){return"off"===e.other&&"off"===e.comments&&"off"===e.strings}static isAllOn(e){return"on"===e.other&&"on"===e.comments&&"on"===e.strings}static valueFor(e,t){switch(t){case 1:return e.comments;case 2:return e.strings;default:return e.other}}}var j5=i(9793),q5={};function $5(e,t=U){return function(e,t=U){return!!t&&$l(e.charCodeAt(0))&&58===e.charCodeAt(1)}(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}q5.styleTagTransform=Gr(),q5.setAttributes=Kr(),q5.insert=zr().bind(null,"head"),q5.domAPI=Vr(),q5.insertStyleElement=qr(),Br()(j5.Z,q5),j5.Z&&j5.Z.locals&&j5.Z.locals,Object.create(null);Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class G5{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){const i=t.resolve(e);if(void 0!==i)return i}}}class Z5{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=vn(this._model.getLineContent(this._selection.startLineNumber),0,this._selection.startColumn-1);let n=i;e.snippet.walk((t=>t!==e&&(t instanceof sx&&(n=vn(fn(t.value).pop())),!0)));const o=Nn(n,i);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${n.substr(o)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):"CURSOR_INDEX"===t?String(this._selectionIdx):"CURSOR_NUMBER"===t?String(this._selectionIdx+1):void 0}}class Y5{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return Lo(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=Lo(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t?"."===xo(this._model.uri.fsPath)?"":this._labelService.getUriLabel(td(this._model.uri)):"TM_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class Q5{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!an(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}let X5=class{constructor(e,t,i){this._model=e,this._selection=t,this._languageConfigurationService=i}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=this._languageConfigurationService.getLanguageConfiguration(i).comments;if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}};X5=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,sp)],X5);class J5{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if("CURRENT_YEAR"===t)return String(this._date.getFullYear());if("CURRENT_YEAR_SHORT"===t)return String(this._date.getFullYear()).slice(-2);if("CURRENT_MONTH"===t)return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if("CURRENT_DATE"===t)return String(this._date.getDate().valueOf()).padStart(2,"0");if("CURRENT_HOUR"===t)return String(this._date.getHours().valueOf()).padStart(2,"0");if("CURRENT_MINUTE"===t)return String(this._date.getMinutes().valueOf()).padStart(2,"0");if("CURRENT_SECOND"===t)return String(this._date.getSeconds().valueOf()).padStart(2,"0");if("CURRENT_DAY_NAME"===t)return J5.dayNames[this._date.getDay()];if("CURRENT_DAY_NAME_SHORT"===t)return J5.dayNamesShort[this._date.getDay()];if("CURRENT_MONTH_NAME"===t)return J5.monthNames[this._date.getMonth()];if("CURRENT_MONTH_NAME_SHORT"===t)return J5.monthNamesShort[this._date.getMonth()];if("CURRENT_SECONDS_UNIX"===t)return String(Math.floor(this._date.getTime()/1e3));if("CURRENT_TIMEZONE_OFFSET"===t){const e=this._date.getTimezoneOffset(),t=e>0?"-":"+",i=Math.trunc(Math.abs(e/60)),n=i<10?"0"+i:i,o=Math.abs(e)-60*i;return t+n+":"+(o<10?"0"+o:o)}}}J5.dayNames=[v(0,"Sunday"),v(0,"Monday"),v(0,"Tuesday"),v(0,"Wednesday"),v(0,"Thursday"),v(0,"Friday"),v(0,"Saturday")],J5.dayNamesShort=[v(0,"Sun"),v(0,"Mon"),v(0,"Tue"),v(0,"Wed"),v(0,"Thu"),v(0,"Fri"),v(0,"Sat")],J5.monthNames=[v(0,"January"),v(0,"February"),v(0,"March"),v(0,"April"),v(0,"May"),v(0,"June"),v(0,"July"),v(0,"August"),v(0,"September"),v(0,"October"),v(0,"November"),v(0,"December")],J5.monthNamesShort=[v(0,"Jan"),v(0,"Feb"),v(0,"Mar"),v(0,"Apr"),v(0,"May"),v(0,"Jun"),v(0,"Jul"),v(0,"Aug"),v(0,"Sep"),v(0,"Oct"),v(0,"Nov"),v(0,"Dec")];class e3{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=function(e,t){if("string"==typeof e||void 0===e)return"string"==typeof e?{id:Lo(e)}:Kk;const i=e;return i.configuration?{id:i.id,configPath:i.configuration}:1===i.folders.length?{id:i.id,uri:i.folders[0].uri}:{id:i.id}}(this._workspaceService.getWorkspace());return"string"!=typeof(null==(i=t)?void 0:i.id)||Uk(i)||function(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&Po.isUri(t.configPath)}(i)?"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0:void 0;var i}_resolveWorkspaceName(e){if(Uk(e))return Lo(e.uri.path);let t=Lo(e.configPath.path);return t.endsWith("code-workspace")&&(t=t.substr(0,t.length-14-1)),t}_resoveWorkspacePath(e){if(Uk(e))return $5(e.uri.fsPath);const t=Lo(e.configPath.path);let i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?$5(i):"/"}}class t3{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?_k():void 0}}var i3;class n3{constructor(e,t,i){this._editor=e,this._snippet=t,this._snippetLineLeadingWhitespace=i,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=zh(t.placeholders,ax.compareByIndex),this._placeholderGroupsIdx=-1}initialize(e){this._offset=e.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(-1===this._offset)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),s=hh.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),r=i.isFinalTabstop?n3._decor.inactiveFinal:n3._decor.inactive,a=t.addDecoration(s,r);this._placeholderDecorations.set(i,a)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),s=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const s=this._placeholderDecorations.get(o),r=this._editor.getModel().getDecorationRange(s);n.push(new uh(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(s,o.isFinalTabstop?n3._decor.activeFinal:n3._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?n3._decor.activeFinal:n3._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?n3._decor.inactiveFinal:n3._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof ax){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(0===this._snippet.placeholders.length)return!0;if(1===this._snippet.placeholders.length){const[e]=this._snippet.placeholders;if(e.isFinalTabstop&&this._snippet.rightMostDescendant===e)return!0}return!1}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get activeChoice(){if(!this._placeholderDecorations)return;const e=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!(null==e?void 0:e.choice))return;const t=this._placeholderDecorations.get(e);if(!t)return;const i=this._editor.getModel().getDecorationRange(t);return i?{range:i,choice:e.choice}:void 0}get hasChoice(){let e=!1;return this._snippet.walk((t=>(e=t instanceof lx,!e))),e}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(-1!==o._offset),console.assert(!o._placeholderDecorations);const s=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(s+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),s=o._snippet.fullLen(e),r=hh.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+s)),a=i.addDecoration(r,n3._decor.inactive);this._placeholderDecorations.set(e,a)}}this._placeholderGroups=zh(this._snippet.placeholders,ax.compareByIndex)}))}}n3._decor={active:zy.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:zy.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:zy.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:zy.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const o3={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let s3=i3=class{static adjustWhitespace(e,t,i,n,o){const s=vn(e.getLineContent(t.lineNumber),0,t.column-1);let r;return n.walk((t=>{if(!(t instanceof sx)||t.parent instanceof lx)return!0;if(o&&!o.has(t))return!0;const a=t.value.split(/\r\n|\r|\n/);if(i){const i=n.offset(t);if(0===i)a[0]=e.normalizeIndentation(a[0]);else{r=null!=r?r:n.toString();const t=r.charCodeAt(i-1);10!==t&&13!==t||(a[0]=e.normalizeIndentation(s+a[0]))}for(let t=1;te.get(zk))),g=e.invokeWithinContext((e=>new Y5(e.get(vZ),h))),p=()=>r,m=h.getValueInRange(i3.adjustSelection(h,e.getSelection(),i,0)),f=h.getValueInRange(i3.adjustSelection(h,e.getSelection(),0,n)),_=h.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber),v=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>hh.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:r,idx:b}of v){let w=i3.adjustSelection(h,r,i,0),C=i3.adjustSelection(h,r,0,n);m!==h.getValueInRange(w)&&(w=r),f!==h.getValueInRange(C)&&(C=r);const y=r.setStartPosition(w.startLineNumber,w.startColumn).setEndPosition(C.endLineNumber,C.endColumn),S=(new px).parse(t,!0,o),k=y.getStartPosition(),x=i3.adjustWhitespace(h,k,s||b>0&&_!==h.getLineFirstNonWhitespaceColumn(r.positionLineNumber),S);S.resolveVariables(new G5([g,new Q5(p,b,v.length,"spread"===e.getOption(79)),new Z5(h,r,b,a),new X5(h,r,l),new J5,new e3(u),new t3])),d[b]=pj.replace(y,S.toString()),d[b].identifier={major:b,minor:0},d[b]._isTracked=!0,c[b]=new n3(e,S,x)}return{edits:d,snippets:c}}static createEditsAndSnippetsFromEdits(e,t,i,n,o,s,r){if(!e.hasModel()||0===t.length)return{edits:[],snippets:[]};const a=[],l=e.getModel(),d=new px,c=new gx,h=new G5([e.invokeWithinContext((e=>new Y5(e.get(vZ),l))),new Q5((()=>o),0,e.getSelections().length,"spread"===e.getOption(79)),new Z5(l,e.getSelection(),0,s),new X5(l,e.getSelection(),r),new J5,new e3(e.invokeWithinContext((e=>e.get(zk)))),new t3]);t=t.sort(((e,t)=>hh.compareRangesUsingStarts(e.range,t.range)));let u=0;for(let e=0;e0){const n=t[e-1].range,o=hh.fromPositions(n.getEndPosition(),i.getStartPosition()),s=new sx(l.getValueInRange(o));c.appendChild(s),u+=s.value.length}const o=d.parseFragment(n,c);i3.adjustWhitespace(l,i.getStartPosition(),!0,c,new Set(o)),c.resolveVariables(h);const s=c.toString(),r=s.slice(u);u=s.length;const g=pj.replace(i,r);g.identifier={major:e,minor:0},g._isTracked=!0,a.push(g)}return d.ensureFinalTabstop(c,i,!0),{edits:a,snippets:[new n3(e,c,"")]}}constructor(e,t,i=o3,n){this._editor=e,this._template=t,this._options=i,this._languageConfigurationService=n,this._templateMerges=[],this._snippets=[]}dispose(){ot(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}="string"==typeof this._template?i3.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):i3.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>{const i=e.filter((e=>!!e.identifier));for(let e=0;euh.fromPositions(e.range.getEndPosition())))})),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=o3){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=i3.createEditsAndSnippetsFromSelections(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",i,(e=>{const t=e.filter((e=>!!e.identifier));for(let e=0;euh.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(hh.compareRangesUsingStarts);for(const[i,n]of t)if(n.length===e.length){n.sort(hh.compareRangesUsingStarts);for(let o=0;o0}};s3=i3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,sp)],s3);var r3,a3=function(e,t){return function(i,n){t(i,n,e)}};const l3={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let d3=r3=class{static get(e){return e.getContribution(r3.ID)}constructor(e,t,i,n,o){this._editor=e,this._logService=t,this._languageFeaturesService=i,this._languageConfigurationService=o,this._snippetListener=new at,this._modelVersionId=-1,this._inSnippet=r3.InSnippetMode.bindTo(n),this._hasNextTabstop=r3.HasNextTabstop.bindTo(n),this._hasPrevTabstop=r3.HasPrevTabstop.bindTo(n)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?l3:{...l3,...t})}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){var i;if(this._editor.hasModel()){if(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&"string"!=typeof e&&this.cancel(),this._session?(xl("string"==typeof e),this._session.merge(e,t)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new s3(this._editor,e,t,this._languageConfigurationService),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),null===(i=this._session)||void 0===i?void 0:i.hasChoice){const e={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(e,t)=>{if(!this._session||e!==this._editor.getModel()||!wd.equals(this._editor.getPosition(),t))return;const{activeChoice:i}=this._session;if(!i||0===i.choice.options.length)return;const n=e.getValueInRange(i.range),o=Boolean(i.choice.options.find((e=>e.value===n))),s=[];for(let e=0;e{null==i||i.dispose(),n=!1},s=()=>{n||(i=this._languageFeaturesService.completionProvider.register({language:t.getLanguageId(),pattern:t.uri.fsPath,scheme:t.uri.scheme,exclusive:!0},e),this._snippetListener.add(i),n=!0)};this._choiceCompletions={provider:e,enable:s,disable:o}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState())))}}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var e;if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{activeChoice:t}=this._session;if(!t||!this._choiceCompletions)return null===(e=this._choiceCompletions)||void 0===e||e.disable(),void(this._currentChoice=void 0);this._currentChoice!==t.choice&&(this._currentChoice=t.choice,this._choiceCompletions.enable(),queueMicrotask((()=>{!function(e,t){var i;null===(i=e.getContribution("editor.contrib.suggestController"))||void 0===i||i.triggerSuggest((new Set).add(t),void 0,!0)}(this._editor,this._choiceCompletions.provider)})))}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){var e;null===(e=this._session)||void 0===e||e.prev(),this._updateState()}next(){var e;null===(e=this._session)||void 0===e||e.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};d3.ID="snippetController2",d3.InSnippetMode=new gc("inSnippetMode",!1,v(0,"Whether the editor in current in snippet mode")),d3.HasNextTabstop=new gc("hasNextTabstop",!1,v(0,"Whether there is a next tab stop when in snippet mode")),d3.HasPrevTabstop=new gc("hasPrevTabstop",!1,v(0,"Whether there is a previous tab stop when in snippet mode")),d3=r3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([a3(1,Hc),a3(2,Pk),a3(3,pc),a3(4,sp)],d3),oh(d3.ID,d3,4);const c3=Yc.bindToContribution(d3.get);th(new c3({id:"jumpToNextSnippetPlaceholder",precondition:$d.and(d3.InSnippetMode,d3.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:gh.textInputFocus,primary:2}})),th(new c3({id:"jumpToPrevSnippetPlaceholder",precondition:$d.and(d3.InSnippetMode,d3.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:gh.textInputFocus,primary:1026}})),th(new c3({id:"leaveSnippet",precondition:d3.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:gh.textInputFocus,primary:9,secondary:[1033]}})),th(new c3({id:"acceptSnippet",precondition:d3.InSnippetMode,handler:e=>e.finish()}));var h3,u3=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e[e.Undo=0]="Undo",e[e.Redo=1]="Redo",e[e.AcceptWord=2]="AcceptWord",e[e.Other=3]="Other"}(h3||(h3={}));let g3=class extends lt{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(e,t,i,n,o,s,r,a,l,d,c,h){let u;super(),this.textModel=e,this.selectedSuggestItem=t,this.textModelVersionId=i,this._positions=n,this._debounceValue=o,this._suggestPreviewEnabled=s,this._suggestPreviewMode=r,this._inlineSuggestMode=a,this._enabled=l,this._instantiationService=d,this._commandService=c,this._languageConfigurationService=h,this._source=this._register(this._instantiationService.createInstance(I5,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=uI(this,!1),this._forceUpdateExplicitlySignal=RI(this),this._selectedInlineCompletionId=uI(this,void 0),this._primaryPosition=fI(this,(e=>{var t;return null!==(t=this._positions.read(e)[0])&&void 0!==t?t:new wd(1,1)})),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([h3.Redo,h3.Undo,h3.AcceptWord]),this._fetchInlineCompletionsPromise=function(e,t){var i;return new CI(new YN(e.owner,e.debugName,void 0),t,e.createEmptyChangeSummary,e.handleChange,void 0,null!==(i=e.equalityComparer)&&void 0!==i?i:GN)}({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:DC.Automatic}),handleChange:(e,t)=>(e.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(e.change)?t.preserveCurrentCompletion=!0:e.didChange(this._forceUpdateExplicitlySignal)&&(t.inlineCompletionTriggerKind=DC.Explicit),!0)},((e,t)=>{if(this._forceUpdateExplicitlySignal.read(e),!(this._enabled.read(e)&&this.selectedSuggestItem.read(e)||this._isActive.read(e)))return void this._source.cancelUpdate();this.textModelVersionId.read(e);const i=this._source.suggestWidgetInlineCompletions.get(),n=this.selectedSuggestItem.read(e);if(i&&!n){const e=this._source.inlineCompletions.get();lI((t=>{(!e||i.request.versionId>e.request.versionId)&&this._source.inlineCompletions.set(i.clone(),t),this._source.clearSuggestWidgetInlineCompletions(t)}))}const o=this._primaryPosition.read(e),s={triggerKind:t.inlineCompletionTriggerKind,selectedSuggestionInfo:null==n?void 0:n.toSelectedSuggestionInfo()},r=this.selectedInlineCompletion.get(),a=t.preserveCurrentCompletion||(null==r?void 0:r.forwardStable)?r:void 0;return this._source.fetch(o,s,a)})),this._filteredInlineCompletionItems=vI({owner:this,equalsFn:ZN()},(e=>{const t=this._source.inlineCompletions.read(e);if(!t)return[];const i=this._primaryPosition.read(e),n=t.inlineCompletions.filter((t=>t.isVisible(this.textModel,i,e)));return n})),this.selectedInlineCompletionIndex=fI(this,(e=>{const t=this._selectedInlineCompletionId.read(e),i=this._filteredInlineCompletionItems.read(e),n=void 0===this._selectedInlineCompletionId?-1:i.findIndex((e=>e.semanticId===t));return-1===n?(this._selectedInlineCompletionId.set(void 0,void 0),0):n})),this.selectedInlineCompletion=fI(this,(e=>this._filteredInlineCompletionItems.read(e)[this.selectedInlineCompletionIndex.read(e)])),this.activeCommands=vI({owner:this,equalsFn:ZN()},(e=>{var t,i;return null!==(i=null===(t=this.selectedInlineCompletion.read(e))||void 0===t?void 0:t.inlineCompletion.source.inlineCompletions.commands)&&void 0!==i?i:[]})),this.lastTriggerKind=this._source.inlineCompletions.map(this,(e=>null==e?void 0:e.request.context.triggerKind)),this.inlineCompletionsCount=fI(this,(e=>this.lastTriggerKind.read(e)===DC.Explicit?this._filteredInlineCompletionItems.read(e).length:void 0)),this.state=vI({owner:this,equalsFn:(e,t)=>e&&t?a5(e.ghostTexts,t.ghostTexts)&&e.inlineCompletion===t.inlineCompletion&&e.suggestItem===t.suggestItem:e===t},(e=>{var t,i;const n=this.textModel,o=this.selectedSuggestItem.read(e);if(o){const s=S5(o.toSingleTextEdit(),n),r=this._computeAugmentation(s,e);if(!this._suggestPreviewEnabled.read(e)&&!r)return;const a=null!==(t=null==r?void 0:r.edit)&&void 0!==t?t:s,l=r?r.edit.text.length-s.text.length:0,d=this._suggestPreviewMode.read(e),c=this._positions.read(e),h=[a,...p3(this.textModel,c,a)],u=h.map(((e,t)=>x5(e,n,d,c[t],l))).filter(Sl);return{edits:h,primaryGhostText:null!==(i=u[0])&&void 0!==i?i:new o5(a.range.endLineNumber,[]),ghostTexts:u,inlineCompletion:null==r?void 0:r.completion,suggestItem:o}}{if(!this._isActive.read(e))return;const t=this.selectedInlineCompletion.read(e);if(!t)return;const i=t.toSingleTextEdit(e),o=this._inlineSuggestMode.read(e),s=this._positions.read(e),r=[i,...p3(this.textModel,s,i)],a=r.map(((e,t)=>x5(e,n,o,s[t],0))).filter(Sl);if(!a[0])return;return{edits:r,primaryGhostText:a[0],ghostTexts:a,inlineCompletion:t,suggestItem:void 0}}})),this.ghostTexts=vI({owner:this,equalsFn:a5},(e=>{const t=this.state.read(e);if(t)return t.ghostTexts})),this.primaryGhostText=vI({owner:this,equalsFn:l5},(e=>{const t=this.state.read(e);if(t)return null==t?void 0:t.primaryGhostText})),this._register(OI(this._fetchInlineCompletionsPromise)),this._register(SI((e=>{var t,i;const n=this.state.read(e),o=null==n?void 0:n.inlineCompletion;if((null==o?void 0:o.semanticId)!==(null==u?void 0:u.semanticId)&&(u=o,o)){const e=o.inlineCompletion,n=e.source;null===(i=(t=n.provider).handleItemDidShow)||void 0===i||i.call(t,n.inlineCompletions,e.sourceInlineCompletion,e.insertText)}})))}async trigger(e){this._isActive.set(!0,e),await this._fetchInlineCompletionsPromise.get()}async triggerExplicitly(e){cI(e,(e=>{this._isActive.set(!0,e),this._forceUpdateExplicitlySignal.trigger(e)})),await this._fetchInlineCompletionsPromise.get()}stop(e){cI(e,(e=>{this._isActive.set(!1,e),this._source.clear(e)}))}_computeAugmentation(e,t){const i=this.textModel,n=this._source.suggestWidgetInlineCompletions.read(t);return function(e,t){for(const i of e){const e=t(i);if(void 0!==e)return e}}(n?n.inlineCompletions:[this.selectedInlineCompletion.read(t)].filter(Sl),(n=>{let o=n.toSingleTextEdit(t);return o=S5(o,i,hh.fromPositions(o.range.getStartPosition(),e.range.getEndPosition())),k5(o,e)?{completion:n,edit:o}:void 0}))}async _deltaSelectedInlineCompletionIndex(e){await this.triggerExplicitly();const t=this._filteredInlineCompletionItems.get()||[];if(t.length>0){const i=(this.selectedInlineCompletionIndex.get()+e+t.length)%t.length;this._selectedInlineCompletionId.set(t[i].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(e){var t;if(e.getModel()!==this.textModel)throw new Pe;const i=this.state.get();if(!i||i.primaryGhostText.isEmpty()||!i.inlineCompletion)return;const n=i.inlineCompletion.toInlineCompletion(void 0);if(e.pushUndoStop(),n.snippetInfo)e.executeEdits("inlineSuggestion.accept",[pj.replace(n.range,""),...n.additionalTextEdits]),e.setPosition(n.snippetInfo.range.getStartPosition(),"inlineCompletionAccept"),null===(t=d3.get(e))||void 0===t||t.insert(n.snippetInfo.snippet,{undoStopBefore:!1});else{const t=i.edits,o=m3(t).map((e=>uh.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",[...t.map((e=>pj.replace(e.range,e.text))),...n.additionalTextEdits]),e.setSelections(o,"inlineCompletionAccept")}n.command&&n.source.addRef(),lI((e=>{this._source.clear(e),this._isActive.set(!1,e)})),n.command&&(await this._commandService.executeCommand(n.command.id,...n.command.arguments||[]).then(void 0,Le),n.source.removeRef())}async acceptNextWord(e){await this._acceptNext(e,((e,t)=>{const i=this.textModel.getLanguageIdAtPosition(e.lineNumber,e.column),n=this._languageConfigurationService.getLanguageConfiguration(i),o=new RegExp(n.wordDefinition.source,n.wordDefinition.flags.replace("g","")),s=t.match(o);let r=0;r=s&&void 0!==s.index?0===s.index?s[0].length:s.index:t.length;const a=/\s+/g.exec(t);return a&&void 0!==a.index&&a.index+a[0].length{const i=t.match(/\n/);return i&&void 0!==i.index?i.index+1:t.length}),1)}async _acceptNext(e,t,i){if(e.getModel()!==this.textModel)throw new Pe;const n=this.state.get();if(!n||n.primaryGhostText.isEmpty()||!n.inlineCompletion)return;const o=n.primaryGhostText,s=n.inlineCompletion.toInlineCompletion(void 0);if(s.snippetInfo||s.filterText!==s.insertText)return void await this.accept(e);const r=o.parts[0],a=new wd(o.lineNumber,r.column),l=r.text,d=t(a,l);if(d===l.length&&1===o.parts.length)return void this.accept(e);const c=l.substring(0,d),h=this._positions.get(),u=h[0];s.source.addRef();try{this._isAcceptingPartially=!0;try{e.pushUndoStop();const t=hh.fromPositions(u,a),i=e.getModel().getValueInRange(t)+c,n=new mH(t,i),o=[n,...p3(this.textModel,h,n)],s=m3(o).map((e=>uh.fromPositions(e)));e.executeEdits("inlineSuggestion.accept",o.map((e=>pj.replace(e.range,e.text)))),e.setSelections(s,"inlineCompletionPartialAccept"),e.revealPositionInCenterIfOutsideViewport(e.getPosition(),1)}finally{this._isAcceptingPartially=!1}if(s.source.provider.handlePartialAccept){const t=hh.fromPositions(s.range.getStartPosition(),bp.ofText(c).addToPosition(a)),n=e.getModel().getValueInRange(t,1);s.source.provider.handlePartialAccept(s.source.inlineCompletions,s.sourceInlineCompletion,n.length,{kind:i})}}finally{s.source.removeRef()}}handleSuggestAccepted(e){var t,i;const n=S5(e.toSingleTextEdit(),this.textModel),o=this._computeAugmentation(n,void 0);if(!o)return;const s=o.completion.inlineCompletion;null===(i=(t=s.source.provider).handlePartialAccept)||void 0===i||i.call(t,s.source.inlineCompletions,s.sourceInlineCompletion,n.text.length,{kind:2})}};function p3(e,t,i){if(1===t.length)return[];const n=t[0],o=t.slice(1),s=i.range.getStartPosition(),r=i.range.getEndPosition(),a=e.getValueInRange(hh.fromPositions(n,r)),l=u5(n,s);if(l.lineNumber<1)return xe(new Pe(`positionWithinTextEdit line number should be bigger than 0.\n\t\t\tInvalid subtraction between ${n.toString()} and ${s.toString()}`)),[];const d=function(e,t){let i="";const n=function(e){var t;const i=[],n=e.split(/(\r\n|\r|\n)/);for(let e=0;e{const i=(n=u5(t,s),o=r,new wd(n.lineNumber+o.lineNumber-1,1===o.lineNumber?n.column+o.column-1:o.column));var n,o;const l=e.getValueInRange(hh.fromPositions(t,i)),c=Nn(a,l),h=hh.fromPositions(t,t.delta(0,c));return new mH(h,d)}))}function m3(e){const t=hu.createSortPermutation(e,((e,t)=>hh.compareRangesUsingStarts(e.range,t.range))),i=new pH(t.apply(e)).getNewRanges();return t.inverse().apply(i).map((e=>e.getEndPosition()))}g3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([u3(9,_d),u3(10,Nd),u3(11,sp)],g3);var f3,_3=function(e,t){return function(i,n){t(i,n,e)}};class v3{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;const n=i[0].score[0];for(let e=0;ethis._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===bW.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(e,t){var i;const n=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:e.getLanguageIdAtPosition(t.lineNumber,t.column),resource:e.uri});if((null===(i=this._strategy)||void 0===i?void 0:i.name)!==n){this._saveState();const e=f3._strategyCtors.get(n)||b3;this._strategy=new e;try{const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=this._storageService.get(`${f3._storagePrefix}/${n}`,e);t&&this._strategy.fromJSON(JSON.parse(t))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const e=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,t=JSON.stringify(this._strategy);this._storageService.store(`${f3._storagePrefix}/${this._strategy.name}`,t,e,1)}}};w3._strategyCtors=new Map([["recentlyUsedByPrefix",class extends v3{constructor(){super("recentlyUsedByPrefix"),this._trie=Hk.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageId()}/${n}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){const{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);const o=`${e.getLanguageId()}/${n}`;let s=this._trie.get(o);if(s||(s=this._trie.findSubstr(o)),s)for(let e=0;ee.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:LC.fromString(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends v3{constructor(){super("recentlyUsed"),this._cache=new ua(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageId()}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);const o=i[0].score[0];let s=-1,r=-1;for(let t=0;tr&&o.type===i[t].completion.kind&&o.insertText===i[t].completion.insertText&&(r=o.touch,s=t),i[t].completion.preselect)return t}return-1!==s?s:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:LC.fromString(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",b3]]),w3._storagePrefix="suggest/memories",w3=f3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_3(0,vW),_3(1,Cg)],w3);const C3=vd("ISuggestMemories");Ng(C3,w3,1);var y3;let S3=y3=class{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=y3.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(123)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(123);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};S3.AtEnd=new gc("atEndOfWord",!1),S3=y3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,pc)],S3);var k3;let x3=k3=class{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=k3.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){0!==e.items.length&&k3._moveIndex(!0,e,t)!==t?(this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(let o=t.items.length;o>0&&(n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i)&&t.items[n].completion.additionalTextEdits;o--);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(this._model)try{this._ignore=!0,this._index=k3._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};x3.OtherSuggestions=new gc("hasOtherSuggestions",!1),x3=k3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,pc)],x3);class L3{constructor(e,t,i,n){this._disposables=new at,this._disposables.add(i.onDidSuggest((e=>{0===e.completionModel.items.length&&this.reset()}))),this._disposables.add(i.onDidCancel((e=>{this.reset()}))),this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((o=>{if(this._active&&!t.isFrozen()&&0!==i.state){const t=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&n(this._active.item)}})))}_onItem(e){if(!e||!Gh(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new Jw;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class D3{async provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;await new Promise((t=>D3._bracketsRightYield(t,0,e,n,o))),await new Promise((i=>D3._bracketsLeftYield(i,0,e,n,o,t)))}return i}static _bracketsRightYield(e,t,i,n,o){const s=new Map,r=Date.now();for(;;){if(t>=D3._maxRounds){e();break}if(!n){e();break}const a=i.bracketPairs.findNextBracket(n);if(!a){e();break}if(Date.now()-r>D3._maxDuration){setTimeout((()=>D3._bracketsRightYield(e,t+1,i,n,o)));break}if(a.bracketInfo.isOpeningBracket){const e=a.bracketInfo.bracketText,t=s.has(e)?s.get(e):0;s.set(e,t+1)}else{const e=a.bracketInfo.getOpeningBrackets()[0].bracketText;let t=s.has(e)?s.get(e):0;if(t-=1,s.set(e,Math.max(0,t)),t<0){let t=o.get(e);t||(t=new pt,o.set(e,t)),t.push(a.range)}}n=a.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,o,s){const r=new Map,a=Date.now();for(;;){if(t>=D3._maxRounds&&0===o.size){e();break}if(!n){e();break}const l=i.bracketPairs.findPrevBracket(n);if(!l){e();break}if(Date.now()-a>D3._maxDuration){setTimeout((()=>D3._bracketsLeftYield(e,t+1,i,n,o,s)));break}if(l.bracketInfo.isOpeningBracket){const e=l.bracketInfo.bracketText;let t=r.has(e)?r.get(e):0;if(t-=1,r.set(e,Math.max(0,t)),t<0){const t=o.get(e);if(t){const n=t.shift();0===t.size&&o.delete(e);const r=hh.fromPositions(l.range.getEndPosition(),n.getStartPosition()),a=hh.fromPositions(l.range.getStartPosition(),n.getEndPosition());s.push({range:r}),s.push({range:a}),D3._addBracketLeading(i,a,s)}}}else{const e=l.bracketInfo.getOpeningBrackets()[0].bracketText,t=r.has(e)?r.get(e):0;r.set(e,t+1)}n=l.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,o=e.getLineFirstNonWhitespaceColumn(n);0!==o&&o!==t.startColumn&&(i.push({range:hh.fromPositions(new wd(n,o),t.getEndPosition())}),i.push({range:hh.fromPositions(new wd(n,1),t.getEndPosition())}));const s=n-1;if(s>0){const n=e.getLineFirstNonWhitespaceColumn(s);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(s)&&(i.push({range:hh.fromPositions(new wd(s,n),t.getEndPosition())}),i.push({range:hh.fromPositions(new wd(s,1),t.getEndPosition())}))}}}D3._maxDuration=30,D3._maxRounds=2;class E3{static async create(e,t){if(!t.getOption(118).localityBonus)return E3.None;if(!t.hasModel())return E3.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return E3.None;const[o]=await(new D3).provideSelectionRanges(i,[n]);if(0===o.length)return E3.None;const s=await e.computeWordRanges(i.uri,o[0].range);if(!s)return E3.None;const r=i.getWordUntilPosition(n);return delete s[r.word],new class extends E3{distance(e,i){if(!n.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;const r="string"==typeof i.label?i.label:i.label.label,a=s[r];if($h(a))return 2<<20;const l=Vh(a,hh.fromPositions(e),hh.compareRangesUsingStarts),d=l>=0?a[l]:a[Math.max(0,~l-1)];let c=o.length;for(const e of o){if(!hh.containsRange(e.range,d))break;c-=1}return c}}}}E3.None=new class extends E3{distance(){return 0}};class N3{constructor(e,t){this.leadingLineContent=e,this.characterCountDelta=t}}class I3{constructor(e,t,i,n,o,s,r=hl.default,a=void 0){this.clipboardText=a,this._snippetCompareFn=I3._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=i,this._fuzzyScoreOptions=r,"top"===s?this._snippetCompareFn=I3._compareCompletionItemsSnippetsUp:"bottom"===s&&(this._snippetCompareFn=I3._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta0&&i[0].container.incomplete&&e.add(t);return e}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",o="";const s=1===this._refilterKind?this._items:this._filteredItems,r=[],a=!this._options.filterGraceful||s.length>2e3?ul:pl;for(let l=0;l=u)d.score=cl.Default;else if("string"==typeof d.completion.filterText){const t=a(n,o,e,d.completion.filterText,d.filterTextLow,0,this._fuzzyScoreOptions);if(!t)continue;0===yn(d.completion.filterText,d.textLabel)?d.score=t:(d.score=Za(n,o,e,d.textLabel,d.labelLow,0),d.score[0]=t[0])}else{const t=a(n,o,e,d.textLabel,d.labelLow,0,this._fuzzyScoreOptions);if(!t)continue;d.score=t}}d.idx=l,d.distance=this._wordDistance.distance(d.position,d.completion),r.push(d),e.push(d.textLabel.length)}this._filteredItems=r.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Hh(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return I3._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return I3._compareCompletionItems(e,t)}}var T3,M3=function(e,t){return function(i,n){t(i,n,e)}};class A3{static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenization.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column&&n.startColumn+1!==i.column||!isNaN(Number(n.word)))}constructor(e,t,i){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.triggerOptions=i}}let R3=T3=class{constructor(e,t,i,n,o,s,r,a,l){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=o,this._contextKeyService=s,this._configurationService=r,this._languageFeaturesService=a,this._envService=l,this._toDispose=new at,this._triggerCharacterListener=new at,this._triggerQuickSuggest=new $t,this._triggerState=void 0,this._completionDisposables=new at,this._onDidCancel=new kt,this._onDidTrigger=new kt,this._onDidSuggest=new kt,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new uh(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters()}))),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})));let d=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{d=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{d=!1,this._onCompositionEnd()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{d||this._onCursorChange(e)}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{d||void 0===this._triggerState||this._refilterCompletionItems()}))),this._updateTriggerCharacters()}dispose(){ot(this._triggerCharacterListener),ot([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(91)||!this._editor.hasModel()||!this._editor.getOption(121))return;const e=new Map;for(const t of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);n||(n=new Set,n.add(undefined),e.set(i,n)),n.add(t)}const t=t=>{var i;if(!function(e,t,i){if(!Boolean(t.getContextKeyValue("inlineSuggestionVisible")))return!0;const n=t.getContextKeyValue(t5.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(62).suppressSuggestions}(this._editor,this._contextKeyService,this._configurationService))return;if(A3.shouldAutoTrigger(this._editor))return;if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let n="";Mn(t.charCodeAt(t.length-1))?Tn(t.charCodeAt(t.length-2))&&(n=t.substr(t.length-2)):n=t.charAt(t.length-1);const o=e.get(n);if(o){const e=new Map;if(this._completionModel)for(const[t,i]of this._completionModel.getItemsByProvider())o.has(t)||e.set(t,i);this.trigger({auto:!0,triggerKind:1,triggerCharacter:n,retrigger:Boolean(this._completionModel),clipboardText:null===(i=this._completionModel)||void 0===i?void 0:i.clipboardText,completionOptions:{providerFilter:o,providerItemsToReuse:e}})}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd((()=>t())))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(e=!1){var t;void 0!==this._triggerState&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){void 0!==this._triggerState&&(this._editor.hasModel()&&this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.trigger({auto:this._triggerState.auto,retrigger:!0}):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._currentSelection;this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source?this.cancel():void 0===this._triggerState&&0===e.reason?(t.containsRange(this._currentSelection)||t.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():void 0!==this._triggerState&&3===e.reason&&this._refilterCompletionItems()}_onCompositionEnd(){void 0===this._triggerState?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var e;K5.isAllOff(this._editor.getOption(89))||this._editor.getOption(118).snippetsPreventQuickSuggestions&&(null===(e=d3.get(this._editor))||void 0===e?void 0:e.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(void 0!==this._triggerState)return;if(!A3.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(89);if(!K5.isAllOff(i)){if(!K5.isAllOn(i)){e.tokenization.tokenizeIfCheap(t.lineNumber);const n=e.tokenization.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("on"!==K5.valueFor(i,o))return}(function(e,t,i){if(!Boolean(t.getContextKeyValue(t5.inlineSuggestionVisible.key)))return!0;const n=t.getContextKeyValue(t5.suppressSuggestions.key);return void 0!==n?!n:!e.getOption(62).suppressSuggestions})(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(e)&&this.trigger({auto:!0})}}),this._editor.getOption(90)))}_refilterCompletionItems(){xl(this._editor.hasModel()),xl(void 0!==this._triggerState);const e=this._editor.getModel(),t=this._editor.getPosition(),i=new A3(e,t,{...this._triggerState,refilter:!0});this._onNewContext(i)}trigger(e){var t,i,n,o,s,r;if(!this._editor.hasModel())return;const a=this._editor.getModel(),l=new A3(a,this._editor.getPosition(),e);this.cancel(e.retrigger),this._triggerState=e,this._onDidTrigger.fire({auto:e.auto,shy:null!==(t=e.shy)&&void 0!==t&&t,position:this._editor.getPosition()}),this._context=l;let d={triggerKind:null!==(i=e.triggerKind)&&void 0!==i?i:0};e.triggerCharacter&&(d={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Pt;let c=1;switch(this._editor.getOption(112)){case"top":c=0;break;case"bottom":c=2}const{itemKind:h,showDeprecated:u}=T3.createSuggestFilter(this._editor),g=new W5(c,null!==(o=null===(n=e.completionOptions)||void 0===n?void 0:n.kindFilter)&&void 0!==o?o:h,null===(s=e.completionOptions)||void 0===s?void 0:s.providerFilter,null===(r=e.completionOptions)||void 0===r?void 0:r.providerItemsToReuse,u),p=E3.create(this._editorWorkerService,this._editor),m=H5(this._languageFeaturesService.completionProvider,a,this._editor.getPosition(),g,d,this._requestToken.token);Promise.all([m,p]).then((async([t,i])=>{var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let o=null==e?void 0:e.clipboardText;if(!o&&t.needsClipboard&&(o=await this._clipboardService.readText()),void 0===this._triggerState)return;const s=this._editor.getModel(),r=new A3(s,this._editor.getPosition(),e),a={...hl.default,firstMatchCanBeWeak:!this._editor.getOption(118).matchOnWordStartOnly};if(this._completionModel=new I3(t.items,this._context.column,{leadingLineContent:r.leadingLineContent,characterCountDelta:r.column-this._context.column},i,this._editor.getOption(118),this._editor.getOption(112),a,o),this._completionDisposables.add(t.disposable),this._onNewContext(r),this._reportDurationsTelemetry(t.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const e of t.items)e.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${e.provider._debugDisplayName}`,e.completion)})).catch(xe)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static createSuggestFilter(e){const t=new Set;"none"===e.getOption(112)&&t.add(27);const i=e.getOption(118);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if(vn(e.leadingLineContent)===vn(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){if(A3.shouldAutoTrigger(this._editor)&&this._context){const e=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:e}})}}else if(e.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&0!==e.leadingWord.word.length){const e=new Map,t=new Set;for(const[i,n]of this._completionModel.getItemsByProvider())n.length>0&&n[0].container.incomplete?t.add(i):e.set(i,n);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:t,providerItemsToReuse:e}})}else{const t=this._completionModel.lineContext;let i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){const n=A3.shouldAutoTrigger(this._editor);if(!this._context)return void this.cancel();if(n&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:e.triggerOptions,isFrozen:i})}}else this.cancel();else this.cancel()}};R3=T3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([M3(1,uX),M3(2,OL),M3(3,Vc),M3(4,Hc),M3(5,pc),M3(6,Cg),M3(7,Pk),M3(8,TW)],R3);class P3{constructor(e,t){this._disposables=new at,this._lastOvertyped=[],this._locked=!1,this._disposables.add(e.onWillType((()=>{if(this._locked||!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eP3._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}}))),this._disposables.add(t.onDidTrigger((e=>{this._locked=!0}))),this._disposables.add(t.onDidCancel((e=>{this._locked=!1})))}getLastOvertypedInfo(e){if(e>=0&&ee instanceof Fc?i.createInstance(W3,e,void 0):void 0;this._leftActions=new TT(this.element,{actionViewItemProvider:s}),this._rightActions=new TT(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const t=[],i=[];for(const[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};V3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([B3(2,_d),B3(3,Ac),B3(4,pc)],V3);function H3(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let z3=class{constructor(e,t){this._editor=e,this._onDidClose=new kt,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new kt,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new at,this._renderDisposeable=new at,this._borderWidth=1,this._size=new Ms(330,0),this.domNode=Sr(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(NL,{editor:e}),this._body=Sr(".body"),this._scrollbar=new PN(this._body,{alwaysConsumeMouseWheel:!0}),_r(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=_r(this._body,Sr(".header")),this._close=_r(this._header,Sr("span"+Rl.asCSSSelector(Ml.close))),this._close.title=v(0,"Close"),this._type=_r(this._header,Sr("p.type")),this._docs=_r(this._body,Sr("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(50),i=t.getMassagedFontFamily(),n=e.get(119)||t.fontSize,o=e.get(120)||t.lineHeight,s=t.fontWeight,r=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=r,this.domNode.style.lineHeight=""+o/n,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(120)||this._editor.getOption(50).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=v(0,"Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:o,documentation:s}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,s=(new dd).appendCodeblock("empty",t),o=`Provider: ${e.provider._debugDisplayName}`}if(t||H3(e)){if(this.domNode.classList.remove("no-docs","no-type"),o){const e=o.length>1e5?`${o.substr(0,1e5)}…`:o;this._type.textContent=e,this._type.title=e,kr(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else vs(this._type),this._type.title="",xr(this._type),this.domNode.classList.add("no-type");if(vs(this._docs),"string"==typeof s)this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),vs(this._docs);const e=this._markdownRenderer.render(s);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get isEmpty(){return this.domNode.classList.contains("no-docs")}get size(){return this._size}layout(e,t){const i=new Ms(e,t);Ms.equals(i,this._size)||(this._size=i,function(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};z3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,_d)],z3);class U3{constructor(e,t){let i,n;this.widget=e,this._editor=t,this.allowEditorOverflow=!0,this._disposables=new at,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new PK,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,s=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(s=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+s})}e.done&&(i=void 0,n=void 0,o=0,s=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size,this._preferAlignAtTop)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e,t){var i;const n=e.getBoundingClientRect();this._anchorBox=n,this._preferAlignAtTop=t,this._placeAtAnchor(this._anchorBox,null!==(i=this._userSize)&&void 0!==i?i:this.widget.size,t)}_placeAtAnchor(e,t,i){var n;const o=Is(this.getDomNode().ownerDocument.body),s=this.widget.getLayoutInfo(),r=new Ms(220,2*s.lineHeight),a=e.top,l=function(){const i=o.width-(e.left+e.width+s.borderWidth+s.horizontalPadding),n=-s.borderWidth+e.left+e.width,l=new Ms(i,o.height-e.top-s.borderHeight-s.verticalPadding),d=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:d,minSize:r.with(Math.min(i,r.width))}}(),d=function(){const i=e.left-s.borderWidth-s.horizontalPadding,n=Math.max(s.horizontalPadding,e.left-t.width-s.borderWidth),l=new Ms(i,o.height-e.top-s.borderHeight-s.verticalPadding),d=l.with(void 0,e.top+e.height-s.borderHeight-s.verticalPadding);return{top:a,left:n,fit:i-t.width,maxSizeTop:l,maxSizeBottom:d,minSize:r.with(Math.min(i,r.width))}}(),c=function(){const i=e.left,n=-s.borderWidth+e.top+e.height,a=new Ms(e.width-s.borderHeight,o.height-e.top-e.height-s.verticalPadding);return{top:n,left:i,fit:a.height-t.height,maxSizeBottom:a,maxSizeTop:a,minSize:r.with(a.width)}}(),h=[l,d,c],u=null!==(n=h.find((e=>e.fit>=0)))&&void 0!==n?n:h.sort(((e,t)=>t.fit-e.fit))[0],g=e.top+e.height-s.borderHeight;let p,m=t.height;const f=Math.max(u.maxSizeTop.height,u.maxSizeBottom.height);let _;m>f&&(m=f),i?m<=u.maxSizeTop.height?(p=!0,_=u.maxSizeTop):(p=!1,_=u.maxSizeBottom):m<=u.maxSizeBottom.height?(p=!1,_=u.maxSizeBottom):(p=!0,_=u.maxSizeTop);let{top:v,left:b}=u;!p&&m>e.height&&(v=g-m);const w=this._editor.getDomNode();if(w){const e=w.getBoundingClientRect();v-=e.top,b-=e.left}this._applyTopLeft({left:b,top:v}),this._resizable.enableSashes(!p,u===l,p,u!==l),this._resizable.minSize=u.minSize,this._resizable.maxSize=_,this._resizable.layout(m,Math.min(_.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this._editor.layoutOverlayWidget(this)}}var K3;!function(e){e[e.FILE=0]="FILE",e[e.FOLDER=1]="FOLDER",e[e.ROOT_FOLDER=2]="ROOT_FOLDER"}(K3||(K3={}));const j3=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function q3(e,t,i,n,o){if(Rl.isThemeIcon(o))return[`codicon-${o.id}`,"predefined-file-icon"];if(Po.isUri(o))return[];const s=n===K3.ROOT_FOLDER?["rootfolder-icon"]:n===K3.FOLDER?["folder-icon"]:["file-icon"];if(i){let o;if(i.scheme===qo.data)o=ld.parseMetaData(i).get(ld.META_DATA_LABEL);else{const e=i.path.match(j3);e?(o=$3(e[2].toLowerCase()),e[1]&&s.push(`${$3(e[1].toLowerCase())}-name-dir-icon`)):o=$3(i.authority.toLowerCase())}if(n===K3.ROOT_FOLDER)s.push(`${o}-root-name-folder-icon`);else if(n===K3.FOLDER)s.push(`${o}-name-folder-icon`);else{if(o){if(s.push(`${o}-name-file-icon`),s.push("name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t{const e=this._editor.getOptions(),t=e.get(50),o=t.getMassagedFontFamily(),s=t.fontFeatureSettings,a=e.get(119)||t.fontSize,l=e.get(120)||t.lineHeight,d=t.fontWeight,c=`${a}px`,h=`${l}px`,u=`${t.letterSpacing}px`;i.style.fontSize=c,i.style.fontWeight=d,i.style.letterSpacing=u,r.style.fontFamily=o,r.style.fontFeatureSettings=s,r.style.lineHeight=h,n.style.height=h,n.style.width=h,p.style.height=h,p.style.width=h}}}renderElement(e,t,i){i.configureFont();const{completion:n}=e;i.root.id=Y3(t),i.colorspan.style.backgroundColor="";const o={labelEscapeNewLines:!0,matches:Ya(e.score)},s=[];if(19===n.kind&&X3.extract(e,s))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=s[0];else if(20===n.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=q3(this._modelService,this._languageService,Po.from({scheme:"fake",path:e.textLabel}),K3.FILE),s=q3(this._modelService,this._languageService,Po.from({scheme:"fake",path:n.detail}),K3.FILE);o.extraClasses=t.length>s.length?t:s}else 23===n.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",o.extraClasses=[q3(this._modelService,this._languageService,Po.from({scheme:"fake",path:e.textLabel}),K3.FOLDER),q3(this._modelService,this._languageService,Po.from({scheme:"fake",path:n.detail}),K3.FOLDER)].flat()):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Rl.asClassNameArray(LC.toIcon(n.kind))));n.tags&&n.tags.indexOf(1)>=0&&(o.extraClasses=(o.extraClasses||[]).concat(["deprecated"]),o.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,o),"string"==typeof n.label?(i.parametersLabel.textContent="",i.detailsLabel.textContent=e6(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=e6(n.label.detail||""),i.detailsLabel.textContent=e6(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(118).showInlineDetails?kr(i.detailsLabel):xr(i.detailsLabel),H3(e)?(i.right.classList.add("can-expand-details"),kr(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),xr(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function e6(e){return e.replace(/\r\n|\r|\n/g,"")}J3=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Z3(1,Cd),Z3(2,Mu),Z3(3,Vv)],J3);var t6,i6=function(e,t){return function(i,n){t(i,n,e)}};Tm("editorSuggestWidget.background",{dark:nf,light:nf,hcDark:nf,hcLight:nf},v(0,"Background color of the suggest widget.")),Tm("editorSuggestWidget.border",{dark:sf,light:sf,hcDark:sf,hcLight:sf},v(0,"Border color of the suggest widget."));const n6=Tm("editorSuggestWidget.foreground",{dark:tf,light:tf,hcDark:tf,hcLight:tf},v(0,"Foreground color of the suggest widget."));Tm("editorSuggestWidget.selectedForeground",{dark:Rv,light:Rv,hcDark:Rv,hcLight:Rv},v(0,"Foreground color of the selected entry in the suggest widget.")),Tm("editorSuggestWidget.selectedIconForeground",{dark:Pv,light:Pv,hcDark:Pv,hcLight:Pv},v(0,"Icon foreground color of the selected entry in the suggest widget."));const o6=Tm("editorSuggestWidget.selectedBackground",{dark:Ov,light:Ov,hcDark:Ov,hcLight:Ov},v(0,"Background color of the selected entry in the suggest widget."));Tm("editorSuggestWidget.highlightForeground",{dark:dv,light:dv,hcDark:dv,hcLight:dv},v(0,"Color of the match highlights in the suggest widget.")),Tm("editorSuggestWidget.focusHighlightForeground",{dark:cv,light:cv,hcDark:cv,hcLight:cv},v(0,"Color of the match highlights in the suggest widget when an item is focused.")),Tm("editorSuggestWidgetStatus.foreground",{dark:Rm(n6,.5),light:Rm(n6,.5),hcDark:Rm(n6,.5),hcLight:Rm(n6,.5)},v(0,"Foreground color of the suggest widget status."));class s6{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Ej}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(Ms.is(e))return Ms.lift(e)}catch(e){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let r6=t6=class{constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._pendingLayout=new dt,this._pendingShowDetails=new dt,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new $t,this._disposables=new at,this._onDidSelect=new Lt,this._onDidFocus=new Lt,this._onDidHide=new kt,this._onDidShow=new kt,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new kt,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new PK,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new a6(this,e),this._persistedSize=new s6(t,e);class s{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),r=new s(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,o;if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:s}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:d}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-d)<=a)&&(d=null!==(i=null===(t=r.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:s.height),(!r.persistWidth||Math.abs(r.currentSize.width-l)<=a)&&(l=null!==(o=null===(n=r.persistedSize)||void 0===n?void 0:n.width)&&void 0!==o?o:s.width),this._persistedSize.store(new Ms(l,d))}this._contentWidget.unlockPreference(),r=void 0}}))),this._messageElement=_r(this.element.domNode,Sr(".message")),this._listElement=_r(this.element.domNode,Sr(".tree"));const a=this._disposables.add(o.createInstance(z3,this.editor));a.onDidClose(this.toggleDetails,this,this._disposables),this._details=new U3(a,this.editor);const l=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(118).showIcons);l();const d=o.createInstance(J3,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new mT("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>v(0,"Suggest"),getWidgetRole:()=>"listbox",getAriaLabel:e=>{let t=e.textLabel;if("string"!=typeof e.completion.label){const{detail:i,description:n}=e.completion.label;i&&n?t=v(0,"{0} {1}, {2}",t,i,n):i?t=v(0,"{0} {1}",t,i):n&&(t=v(0,"{0}, {1}",t,n))}if(!e.isResolved||!this._isDetailsVisible())return t;const{documentation:i,detail:n}=e.completion;return v(0,"{0}, docs: {1}",t,dn("{0}{1}",n||"",i?"string"==typeof i?i:i.value:""))}}}),this._list.style(JT({listInactiveFocusBackground:o6,listInactiveFocusOutline:jm})),this._status=o.createInstance(V3,this.element.domNode,F5);const c=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(118).showStatusBar);c(),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(118)&&(c(),l()),this._completionModel&&(e.hasChanged(50)||e.hasChanged(119)||e.hasChanged(120))&&this._list.splice(0,this._list.length,this._completionModel.items)}))),this._ctxSuggestWidgetVisible=O5.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=O5.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=O5.MultipleSuggestions.bindTo(i),this._ctxSuggestWidgetHasFocusedSuggestion=O5.HasFocusedSuggestion.bindTo(i),this._disposables.add(ys(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){this._details.widget.borderWidth=Bv(e.type)?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),void this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Wt((async e=>{const t=jt((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250),n=e.onCancellationRequested((()=>t.dispose()));try{return await i.resolve(e)}finally{t.dispose(),n.dispose()}})),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:Y3(n)}))})).catch(xe)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(e){if(this._state!==e)switch(this._state=e,this.element.domNode.classList.toggle("frozen",4===e),this.element.domNode.classList.remove("message"),e){case 0:xr(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=t6.LOADING_MESSAGE,xr(this._listElement,this._status.element),kr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,oa(t6.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=t6.NO_SUGGESTIONS_MESSAGE,xr(this._listElement,this._status.element),kr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,oa(t6.NO_SUGGESTIONS_MESSAGE);break;case 3:case 4:xr(this._messageElement),kr(this._listElement,this._status.element),this._show();break;case 5:xr(this._messageElement),kr(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=jt((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n,o){var s,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(s=this._loadingTimeout)||void 0===s||s.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const a=this._completionModel.items.length,l=0===a;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus(o?[]:[t])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=xs(ls(this.element.domNode),(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")}))}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!H3(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._pendingShowDetails.value=xs(ls(this.element.domNode),(()=>{this._pendingShowDetails.clear(),this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()}))}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;this._pendingLayout.clear(),this._pendingShowDetails.clear(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.heightl&&(a=l);const d=this._completionModel?this._completionModel.stats.pLabelLen*s.typicalHalfwidthCharacterWidth:a,c=s.statusBarHeight+this._list.contentHeight+s.borderHeight,h=s.itemHeight+s.statusBarHeight,u=Rs(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(o.height-p-s.verticalPadding,c),f=u.top+g.top-s.verticalPadding,_=Math.min(f,c);let v=Math.min(Math.max(_,m)+s.borderHeight,c);r===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(r=this._cappedHeight.wanted),rv&&(r=v);const b=150;r>m||this._forceRenderingAbove&&f>b?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),v=_):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),v=m),this.element.preferredSize=new Ms(d,s.defaultSize.height),this.element.maxSize=new Ms(l,v),this.element.minSize=new Ms(220,h),this._cappedHeight=r===c?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:r}:void 0}this._resize(a,r)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var e;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,2===(null===(e=this._contentWidget.getPosition())||void 0===e?void 0:e.preference[0]))}getLayoutInfo(){const e=this.editor.getOption(50),t=lN(this.editor.getOption(120)||e.lineHeight,8,1e3),i=this.editor.getOption(118).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Ms(430,i+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};r6.LOADING_MESSAGE=v(0,"Loading..."),r6.NO_SUGGESTIONS_MESSAGE=v(0,"No suggestions."),r6=t6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([i6(1,vW),i6(2,pc),i6(3,Vv),i6(4,_d)],r6);class a6{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Ms(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}var l6,d6=function(e,t){return function(i,n){t(i,n,e)}};class c6{constructor(e,t){if(this._model=e,this._position=t,this._decorationOptions=zy.register({description:"suggest-line-suffix",stickiness:1}),e.getLineMaxColumn(t.lineNumber)!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);e.changeDecorations((e=>{this._marker&&e.removeDecoration(this._marker),this._marker=e.addDecoration(hh.fromPositions(t,n),this._decorationOptions)}))}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations((e=>{e.removeDecoration(this._marker),this._marker=void 0}))}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(t.getStartPosition())-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let h6=l6=class{static get(e){return e.getContribution(l6.ID)}constructor(e,t,i,n,o,s,r){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=o,this._logService=s,this._telemetryService=r,this._lineSuffix=new dt,this._toDispose=new at,this._selectors=new u6((e=>e.priority)),this._onWillInsertSuggestItem=new kt,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=e,this.model=o.createInstance(R3,this.editor),this._selectors.register({priority:0,select:(e,t,i)=>this._memoryService.select(e,t,i)});const a=O5.InsertMode.bindTo(n);a.set(e.getOption(118).insertMode),this._toDispose.add(this.model.onDidTrigger((()=>a.set(e.getOption(118).insertMode)))),this.widget=this._toDispose.add(new ks(ls(e.getDomNode()),(()=>{const e=this._instantiationService.createInstance(r6,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new L3(this.editor,e,this.model,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t);const i=O5.MakesTextEdit.bindTo(this._contextKeyService),n=O5.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=O5.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(rt((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),s=e.editStart.column,r=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.additionalTextEdits||4&e.completion.insertTextRules||r-s!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:s,endLineNumber:t.lineNumber,endColumn:r})!==e.completion.insertText),i.set(a),n.set(!wd.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeyCodeChord().equals(new Be(!0,!1,!1,!1,33))||K&&e.toKeyCodeChord().equals(new Be(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeyCodeChord().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new ks(ls(e.getDomNode()),(()=>this._toDispose.add(new P3(this.editor,this.model))))),this._alternatives=this._toDispose.add(new ks(ls(e.getDomNode()),(()=>this._toDispose.add(new x3(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(S3,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new c6(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(e.triggerOptions.shy)return;let t=-1;for(const i of this._selectors.itemsOrderedByPriorityDesc)if(t=i.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items),-1!==t)break;if(-1===t&&(t=0),0===this.model.state)return;let i=!1;if(e.triggerOptions.auto){const t=this.editor.getOption(118);"never"===t.selectionMode||"always"===t.selectionMode?i="never"===t.selectionMode:"whenTriggerCharacter"===t.selectionMode?i=1!==e.triggerOptions.triggerKind:"whenQuickSuggestion"===t.selectionMode&&(i=1===e.triggerOptions.triggerKind&&!e.triggerOptions.refilter)}this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.triggerOptions.auto,i)}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));const l=O5.AcceptSuggestionsOnEnter.bindTo(n),d=()=>{const e=this.editor.getOption(1);l.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>d()))),d()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=d3.get(this.editor);if(!i)return;this._onWillInsertSuggestItem.fire({item:e.item});const n=this.editor.getModel(),o=n.getAlternativeVersionId(),{item:s}=e,r=[],a=new Pt;1&t||this.editor.pushUndoStop();const l=this.getOverwriteInfo(s,Boolean(8&t));this._memoryService.memorize(n,this.editor.getPosition(),s);const d=s.isResolved;let c=-1,h=-1;if(Array.isArray(s.completion.additionalTextEdits)){this.model.cancel();const e=cW.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map((e=>{let t=hh.lift(e.range);if(t.startLineNumber===s.position.lineNumber&&t.startColumn>s.position.column){const e=this.editor.getPosition().column-s.position.column,i=e,n=hh.spansMultipleLines(t)?0:e;t=new hh(t.startLineNumber,t.startColumn+i,t.endLineNumber,t.endColumn+n)}return pj.replaceMove(t,e.text)}))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!d){const e=new ft;let i;const o=n.onDidChangeContent((e=>{if(e.isFlush)return a.cancel(),void o.dispose();for(const t of e.changes){const e=hh.getEndPosition(t.range);i&&!wd.isBefore(e,i)||(i=e)}})),l=t;t|=2;let d=!1;const c=this.editor.onWillType((()=>{c.dispose(),d=!0,2&l||this.editor.pushUndoStop()}));r.push(s.resolve(a.token).then((()=>{if(!s.completion.additionalTextEdits||a.token.isCancellationRequested)return;if(i&&s.completion.additionalTextEdits.some((e=>wd.isBefore(i,hh.getStartPosition(e.range)))))return!1;d&&this.editor.pushUndoStop();const e=cW.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map((e=>pj.replaceMove(hh.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!d&&2&l||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),h=!0===t?1:!1===t?0:-2})).finally((()=>{o.dispose(),c.dispose()})))}let{insertText:u}=s.completion;if(4&s.completion.insertTextRules||(u=px.escape(u)),this.model.cancel(),i.insert(u,{overwriteBefore:l.overwriteBefore,overwriteAfter:l.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&s.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),s.completion.command)if(s.completion.command.id===g6.id)this.model.trigger({auto:!0,retrigger:!0});else{const e=new ft;r.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch((e=>{s.completion.extensionId?Le(e):xe(e)})).finally((()=>{c=e.elapsed()})))}4&t&&this._alternatives.value.set(e,(e=>{for(a.cancel();n.canUndo();){o!==n.getAlternativeVersionId()&&n.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(s),Promise.all(r).finally((()=>{this._reportSuggestionAcceptedTelemetry(s,n,d,c,h),this.model.clear(),a.dispose()}))}_reportSuggestionAcceptedTelemetry(e,t,i,n,o){var s,r,a;0!==Math.floor(100*Math.random())&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:null!==(r=null===(s=e.extensionId)||void 0===s?void 0:s.value)&&void 0!==r?r:"unknown",providerId:null!==(a=e.provider._debugDisplayName)&&void 0!==a?a:"unknown",kind:e.completion.kind,basenameHash:Jo(Jl(t.uri)).toString(16),languageId:t.getLanguageId(),fileExtension:ed(t.uri),resolveInfo:e.provider.resolveCompletionItem?i?1:0:-1,resolveDuration:e.resolveDuration,commandDuration:n,additionalEditsAsync:o})}getOverwriteInfo(e,t){xl(this.editor.hasModel());let i="replace"===this.editor.getOption(118).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){Gh(e.completion.additionalTextEdits)&&na(v(0,"Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length))}triggerSuggest(e,t,i){this.editor.hasModel()&&(this.model.trigger({auto:null!=t&&t,completionOptions:{providerFilter:e,kindFilter:i?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};_t.once(this.model.onDidTrigger)((e=>{const t=[];_t.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{ot(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if(ot(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),s=e.items[o];n(s)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:s,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(t,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(e){return this._selectors.register(e)}};h6.ID="editor.contrib.suggestController",h6=l6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([d6(1,C3),d6(2,Nd),d6(3,pc),d6(4,_d),d6(5,Hc),d6(6,Vc)],h6);class u6{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(-1!==this._items.indexOf(e))throw new Error("Value is already registered");return this._items.push(e),this._items.sort(((e,t)=>this.prioritySelector(t)-this.prioritySelector(e))),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class g6 extends Qc{constructor(){super({id:g6.id,label:v(0,"Trigger Suggest"),alias:"Trigger Suggest",precondition:$d.and(gh.writable,gh.hasCompletionItemProvider,O5.Visible.toNegated()),kbOpts:{kbExpr:gh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t,i){const n=h6.get(t);if(!n)return;let o;i&&"object"==typeof i&&!0===i.auto&&(o=!0),n.triggerSuggest(void 0,o,void 0)}}g6.id="editor.action.triggerSuggest",oh(h6.ID,h6,2),ih(g6);const p6=190,m6=Yc.bindToContribution(h6.get);th(new m6({id:"acceptSelectedSuggestion",precondition:$d.and(O5.Visible,O5.HasFocusedSuggestion),handler(e){e.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:$d.and(O5.Visible,gh.textInputFocus),weight:p6},{primary:3,kbExpr:$d.and(O5.Visible,gh.textInputFocus,O5.AcceptSuggestionsOnEnter,O5.MakesTextEdit),weight:p6}],menuOpts:[{menuId:F5,title:v(0,"Insert"),group:"left",order:1,when:O5.HasInsertAndReplaceRange.toNegated()},{menuId:F5,title:v(0,"Insert"),group:"left",order:1,when:$d.and(O5.HasInsertAndReplaceRange,O5.InsertMode.isEqualTo("insert"))},{menuId:F5,title:v(0,"Replace"),group:"left",order:1,when:$d.and(O5.HasInsertAndReplaceRange,O5.InsertMode.isEqualTo("replace"))}]})),th(new m6({id:"acceptAlternativeSelectedSuggestion",precondition:$d.and(O5.Visible,gh.textInputFocus,O5.HasFocusedSuggestion),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:F5,group:"left",order:2,when:$d.and(O5.HasInsertAndReplaceRange,O5.InsertMode.isEqualTo("insert")),title:v(0,"Replace")},{menuId:F5,group:"left",order:2,when:$d.and(O5.HasInsertAndReplaceRange,O5.InsertMode.isEqualTo("replace")),title:v(0,"Insert")}]})),Id.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),th(new m6({id:"hideSuggestWidget",precondition:O5.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:9,secondary:[1033]}})),th(new m6({id:"selectNextSuggestion",precondition:$d.and(O5.Visible,$d.or(O5.MultipleSuggestions,O5.HasFocusedSuggestion.negate())),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),th(new m6({id:"selectNextPageSuggestion",precondition:$d.and(O5.Visible,$d.or(O5.MultipleSuggestions,O5.HasFocusedSuggestion.negate())),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:12,secondary:[2060]}})),th(new m6({id:"selectLastSuggestion",precondition:$d.and(O5.Visible,$d.or(O5.MultipleSuggestions,O5.HasFocusedSuggestion.negate())),handler:e=>e.selectLastSuggestion()})),th(new m6({id:"selectPrevSuggestion",precondition:$d.and(O5.Visible,$d.or(O5.MultipleSuggestions,O5.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),th(new m6({id:"selectPrevPageSuggestion",precondition:$d.and(O5.Visible,$d.or(O5.MultipleSuggestions,O5.HasFocusedSuggestion.negate())),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:11,secondary:[2059]}})),th(new m6({id:"selectFirstSuggestion",precondition:$d.and(O5.Visible,$d.or(O5.MultipleSuggestions,O5.HasFocusedSuggestion.negate())),handler:e=>e.selectFirstSuggestion()})),th(new m6({id:"focusSuggestion",precondition:$d.and(O5.Visible,O5.HasFocusedSuggestion.negate()),handler:e=>e.focusSuggestion(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),th(new m6({id:"focusAndAcceptSuggestion",precondition:$d.and(O5.Visible,O5.HasFocusedSuggestion.negate()),handler:e=>{e.focusSuggestion(),e.acceptSelectedSuggestion(!0,!1)}})),th(new m6({id:"toggleSuggestionDetails",precondition:$d.and(O5.Visible,O5.HasFocusedSuggestion),handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:F5,group:"right",order:1,when:$d.and(O5.DetailsVisible,O5.CanResolve),title:v(0,"show less")},{menuId:F5,group:"right",order:1,when:$d.and(O5.DetailsVisible.toNegated(),O5.CanResolve),title:v(0,"show more")}]})),th(new m6({id:"toggleExplainMode",precondition:O5.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),th(new m6({id:"toggleSuggestionFocus",precondition:O5.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:2570,mac:{primary:778}}})),th(new m6({id:"insertBestCompletion",precondition:$d.and(gh.textInputFocus,$d.equals("config.editor.tabCompletion","on"),S3.AtEnd,O5.Visible.toNegated(),x3.OtherSuggestions.toNegated(),d3.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest(_l(t)?{fallback:"tab",...t}:{fallback:"tab"})},kbOpts:{weight:p6,primary:2}})),th(new m6({id:"insertNextSuggestion",precondition:$d.and(gh.textInputFocus,$d.equals("config.editor.tabCompletion","on"),x3.OtherSuggestions,O5.Visible.toNegated(),d3.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:2}})),th(new m6({id:"insertPrevSuggestion",precondition:$d.and(gh.textInputFocus,$d.equals("config.editor.tabCompletion","on"),x3.OtherSuggestions,O5.Visible.toNegated(),d3.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:p6,kbExpr:gh.textInputFocus,primary:1026}})),ih(class extends Qc{constructor(){super({id:"editor.action.resetSuggestSize",label:v(0,"Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){var i;null===(i=h6.get(t))||void 0===i||i.resetWidgetSize()}});class f6 extends lt{get selectedItem(){return this._selectedItem}constructor(e,t,i,n){super(),this.editor=e,this.suggestControllerPreselector=t,this.checkModelVersion=i,this.onWillAccept=n,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=uI(this,void 0),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const o=h6.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(e,t,i)=>{lI((e=>this.checkModelVersion(e)));const n=this.editor.getModel();if(!n)return-1;const s=this.suggestControllerPreselector(),r=s?S5(s,n):void 0;if(!r)return-1;const a=wd.lift(t),l=Du(i.map(((e,t)=>{const i=S5(_6.fromSuggestion(o,n,a,e,this.isShiftKeyPressed).toSingleTextEdit(),n);return{index:t,valid:k5(r,i),prefixLength:i.text.length,suggestItem:e}})).filter((e=>e&&e.valid&&e.prefixLength>0)),su((e=>e.prefixLength),ru));return l?l.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(o.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(o.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.update(!1)}))),this._register(o.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(_t.once(o.model.onDidTrigger)((e=>{t()}))),this._register(o.onWillInsertSuggestItem((e=>{const t=this.editor.getPosition(),i=this.editor.getModel();if(!t||!i)return;const n=_6.fromSuggestion(o,i,t,e.item,this.isShiftKeyPressed);this.onWillAccept(n)})))}this.update(this._isActive)}update(e){const t=this.getSuggestItemInfo();var i,n;this._isActive===e&&((i=this._currentSuggestItemInfo)===(n=t)||i&&n&&i.equals(n))||(this._isActive=e,this._currentSuggestItemInfo=t,lI((e=>{this.checkModelVersion(e),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,e)})))}getSuggestItemInfo(){const e=h6.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem(),i=this.editor.getPosition(),n=this.editor.getModel();return t&&i&&n?_6.fromSuggestion(e,n,i,t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=h6.get(this.editor);null==e||e.stopForceRenderingAbove()}forceRenderingAbove(){const e=h6.get(this.editor);null==e||e.forceRenderingAbove()}}class _6{static fromSuggestion(e,t,i,n,o){let{insertText:s}=n.completion,r=!1;if(4&n.completion.insertTextRules){const e=(new px).parse(s);e.children.length<100&&s3.adjustWhitespace(t,i,!0,e),s=e.toString(),r=!0}const a=e.getOverwriteInfo(n,o);return new _6(hh.fromPositions(i.delta(0,-a.overwriteBefore),i.delta(0,Math.max(a.overwriteAfter,0))),s,n.completion.kind,r)}constructor(e,t,i,n){this.range=e,this.insertText=t,this.completionItemKind=i,this.isSnippetText=n}equals(e){return this.range.equalsRange(e.range)&&this.insertText===e.insertText&&this.completionItemKind===e.completionItemKind&&this.isSnippetText===e.isSnippetText}toSelectedSuggestionInfo(){return new MC(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new mH(this.range,this.insertText)}}var v6,b6=function(e,t){return function(i,n){t(i,n,e)}};let w6=v6=class extends lt{static get(e){return e.getContribution(v6.ID)}constructor(e,t,i,n,o,s,r,a,l,d){super(),this.editor=e,this._instantiationService=t,this._contextKeyService=i,this._configurationService=n,this._commandService=o,this._debounceService=s,this._languageFeaturesService=r,this._accessibilitySignalService=a,this._keybindingService=l,this._accessibilityService=d,this.model=this._register(pI("inlineCompletionModel",void 0)),this._textModelVersionId=uI(this,-1),this._positions=function(e,t){var i;return new gI(new YN(e.owner,e.debugName,void 0),t,null!==(i=e.equalsFn)&&void 0!==i?i:GN)}({owner:this,equalsFn:ZN(((e,t)=>e.equals(t)))},[new wd(1,1)]),this._suggestWidgetAdaptor=this._register(new f6(this.editor,(()=>{var e,t;return null===(t=null===(e=this.model.get())||void 0===e?void 0:e.selectedInlineCompletion.get())||void 0===t?void 0:t.toSingleTextEdit(void 0)}),(e=>this.updateObservables(e,h3.Other)),(e=>{lI((t=>{var i;this.updateObservables(t,h3.Other),null===(i=this.model.get())||void 0===i||i.handleSuggestAccepted(e)}))}))),this._enabledInConfig=II(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).enabled)),this._isScreenReaderEnabled=II(this._accessibilityService.onDidChangeScreenReaderOptimized,(()=>this._accessibilityService.isScreenReaderOptimized())),this._editorDictationInProgress=II(this._contextKeyService.onDidChangeContext,(()=>!0===this._contextKeyService.getContext(this.editor.getDomNode()).getValue("editorDictation.inProgress"))),this._enabled=fI(this,(e=>this._enabledInConfig.read(e)&&(!this._isScreenReaderEnabled.read(e)||!this._editorDictationInProgress.read(e)))),this._fontFamily=II(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(62).fontFamily)),this._ghostTexts=fI(this,(e=>{var t;const i=this.model.read(e);return null!==(t=null==i?void 0:i.ghostTexts.read(e))&&void 0!==t?t:[]})),this._stablizedGhostTexts=function(e,t){const i=uI("result",[]),n=[];return t.add(SI((t=>{const o=e.read(t);lI((e=>{if(o.length!==n.length){n.length=o.length;for(let e=0;et.set(o[i],e)))}))}))),i}(this._ghostTexts,this._store),this._ghostTextWidgets=function(e,t,i,n){let o=new BI(i,void 0);return vI({debugReferenceFn:i,owner:e,onLastObserverRemoved:()=>{o.dispose(),o=new BI(i)}},(e=>(o.setItems(t.read(e)),o.getItems())))}(this,this._stablizedGhostTexts,((e,t)=>t.add(this._instantiationService.createInstance(p5,this.editor,{ghostText:e,minReservedLineCount:EI(0),targetTextModel:this.model.map((e=>null==e?void 0:e.textModel))})))).recomputeInitiallyAndOnChange(this._store),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._playAccessibilitySignal=RI(this),this._isReadonly=II(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(91))),this._textModel=II(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this._textModelIfWritable=fI((e=>this._isReadonly.read(e)?void 0:this._textModel.read(e))),this._register(new t5(this._contextKeyService,this.model)),this._register(SI((i=>{const n=this._textModelIfWritable.read(i);lI((i=>{if(this.model.set(void 0,i),this.updateObservables(i,h3.Other),n){const o=t.createInstance(g3,n,this._suggestWidgetAdaptor.selectedItem,this._textModelVersionId,this._positions,this._debounceValue,II(e.onDidChangeConfiguration,(()=>e.getOption(118).preview)),II(e.onDidChangeConfiguration,(()=>e.getOption(118).previewMode)),II(e.onDidChangeConfiguration,(()=>e.getOption(62).mode)),this._enabled);this.model.set(o,i)}}))})));const c=this._register(Qs());this._register(SI((e=>{const t=this._fontFamily.read(e);c.setStyle(""===t||"default"===t?"":`\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${t};\n}`)})));const h=e=>{var t;return e.isUndoing?h3.Undo:e.isRedoing?h3.Redo:(null===(t=this.model.get())||void 0===t?void 0:t.isAcceptingPartially)?h3.AcceptWord:h3.Other};this._register(e.onDidChangeModelContent((e=>lI((t=>this.updateObservables(t,h(e))))))),this._register(e.onDidChangeCursorPosition((e=>lI((t=>{var i;this.updateObservables(t,h3.Other),3!==e.reason&&"api"!==e.source||null===(i=this.model.get())||void 0===i||i.stop(t)}))))),this._register(e.onDidType((()=>lI((e=>{var t;this.updateObservables(e,h3.Other),this._enabled.get()&&(null===(t=this.model.get())||void 0===t||t.trigger(e))}))))),this._register(this._commandService.onDidExecuteCommand((t=>{new Set([XS.Tab.id,XS.DeleteLeft.id,XS.DeleteRight.id,TU,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this._enabled.get()&&lI((e=>{var t;null===(t=this.model.get())||void 0===t||t.trigger(e)}))}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||e.getOption(62).keepOnBlur||wK.dropDownVisible||lI((e=>{var t;null===(t=this.model.get())||void 0===t||t.stop(e)}))}))),this._register(SI((e=>{var t;const i=null===(t=this.model.read(e))||void 0===t?void 0:t.state.read(e);(null==i?void 0:i.suggestItem)?i.primaryGhostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()}))),this._register(rt((()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()})));const u=this._register(new at);let g;this._register(xI({handleChange:(e,t)=>(e.didChange(this._playAccessibilitySignal)&&(g=void 0),!0)},(async(e,t)=>{this._playAccessibilitySignal.read(e);const i=this.model.read(e),n=null==i?void 0:i.state.read(e);if(i&&n&&n.inlineCompletion){if(n.inlineCompletion.semanticId!==g){u.clear(),g=n.inlineCompletion.semanticId;const e=i.textModel.getLineContent(n.primaryGhostText.lineNumber);await Kt(50,Ot(u)),await WI(this._suggestWidgetAdaptor.selectedItem,yl,(()=>!1),Ot(u)),await this._accessibilitySignalService.playSignal(NQ.inlineSuggestion),this.editor.getOption(8)&&this.provideScreenReaderUpdate(n.primaryGhostText.renderForScreenReader(e))}}else g=void 0}))),this._register(new _K(this.editor,this.model,this._instantiationService)),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}))),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAccessibilitySignal(e){this._playAccessibilitySignal.trigger(e)}provideScreenReaderUpdate(e){const t=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),i=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let n;!t&&i&&this.editor.getOption(149)&&(n=v(0,"Inspect this in the accessible view ({0})",i.getAriaLabel())),na(n?e+", "+n:e)}updateObservables(e,t){var i,n,o;const s=this.editor.getModel();this._textModelVersionId.set(null!==(i=null==s?void 0:s.getVersionId())&&void 0!==i?i:-1,e,t),this._positions.set(null!==(o=null===(n=this.editor.getSelections())||void 0===n?void 0:n.map((e=>e.getPosition())))&&void 0!==o?o:[new wd(1,1)],e)}shouldShowHoverAt(e){var t;const i=null===(t=this.model.get())||void 0===t?void 0:t.primaryGhostText.get();return!!i&&i.parts.some((t=>e.containsPosition(new wd(i.lineNumber,t.column))))}shouldShowHoverAtViewZone(e){var t,i;return null!==(i=null===(t=this._ghostTextWidgets.get()[0])||void 0===t?void 0:t.ownsViewZone(e))&&void 0!==i&&i}};w6.ID="editor.contrib.inlineCompletionsController",w6=v6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([b6(1,_d),b6(2,pc),b6(3,Cg),b6(4,Nd),b6(5,AW),b6(6,Pk),b6(7,LQ),b6(8,uD),b6(9,ak)],w6);class C6 extends Qc{constructor(){super({id:C6.ID,label:v(0,"Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:$d.and(gh.writable,t5.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(e,t){var i;const n=w6.get(t);null===(i=null==n?void 0:n.model.get())||void 0===i||i.next()}}C6.ID=AU;class y6 extends Qc{constructor(){super({id:y6.ID,label:v(0,"Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:$d.and(gh.writable,t5.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(e,t){var i;const n=w6.get(t);null===(i=null==n?void 0:n.model.get())||void 0===i||i.previous()}}y6.ID=MU;class S6 extends Qc{constructor(){super({id:S6.ID,label:v(0,"Hide Inline Suggestion"),alias:"Hide Inline Suggestion",precondition:t5.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(e,t){const i=w6.get(t);lI((e=>{var t;null===(t=null==i?void 0:i.model.get())||void 0===t||t.stop(e)}))}}S6.ID="editor.action.inlineSuggest.hide";class k6 extends Bc{constructor(){super({id:k6.ID,title:v(0,"Always Show Toolbar"),f1:!1,precondition:void 0,menu:[{id:Mc.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:$d.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(e,t){const i=e.get(Cg),n="always"===i.getValue("editor.inlineSuggest.showToolbar")?"onHover":"always";i.updateValue("editor.inlineSuggest.showToolbar",n)}}k6.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar";var x6=function(e,t){return function(i,n){t(i,n,e)}};class L6{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let D6=class{constructor(e,t,i,n,o,s){this._editor=e,this._languageService=t,this._openerService=i,this.accessibilityService=n,this._instantiationService=o,this._telemetryService=s,this.hoverOrdinal=4}suggestHoverAnchor(e){const t=w6.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId))return new XK(1e3,this,hh.fromPositions(this._editor.getModel().validatePosition(n.positionBefore||n.position)),e.event.posx,e.event.posy,!1)}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new XK(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if("onHover"!==this._editor.getOption(62).showToolbar)return[];const i=w6.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new L6(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new at,n=t[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(e,n,i);const o=n.controller.model.get(),s=this._instantiationService.createInstance(wK,this._editor,!1,EI(null),o.selectedInlineCompletionIndex,o.inlineCompletionsCount,o.activeCommands);return e.fragment.appendChild(s.getDomNode()),o.triggerExplicitly(),i.add(s),i}renderScreenReaderText(e,t,i){const n=Sr,o=n("div.hover-row.markdown-hover"),s=_r(o,n("div.hover-contents",{"aria-live":"assertive"})),r=i.add(new NL({editor:this._editor},this._languageService,this._openerService));i.add(SI((n=>{var o;const a=null===(o=t.controller.model.read(n))||void 0===o?void 0:o.primaryGhostText.read(n);if(a){const t=this._editor.getModel().getLineContent(a.lineNumber);(t=>{i.add(r.onDidRenderAsync((()=>{s.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=v(0,"Suggestion:"),o=i.add(r.render((new dd).appendText(n).appendCodeblock("text",t)));s.replaceChildren(o.element)})(a.renderForScreenReader(t))}else br(s)}))),e.fragment.appendChild(o)}};D6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([x6(1,Mu),x6(2,LL),x6(3,ak),x6(4,_d),x6(5,Vc)],D6),oh(w6.ID,w6,3),ih(class extends Qc{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:v(0,"Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:gh.writable})}async run(e,t){const i=w6.get(t);await async function(e,t){const i=new hI(e,void 0);try{await e(i)}finally{i.finish()}}((async e=>{var t;await(null===(t=null==i?void 0:i.model.get())||void 0===t?void 0:t.triggerExplicitly(e)),null==i||i.playAccessibilitySignal(e)}))}}),ih(C6),ih(y6),ih(class extends Qc{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:v(0,"Accept Next Word Of Inline Suggestion"),alias:"Accept Next Word Of Inline Suggestion",precondition:$d.and(gh.writable,t5.inlineSuggestionVisible),kbOpts:{weight:101,primary:2065,kbExpr:$d.and(gh.writable,t5.inlineSuggestionVisible)},menuOpts:[{menuId:Mc.InlineSuggestionToolbar,title:v(0,"Accept Word"),group:"primary",order:2}]})}async run(e,t){var i;const n=w6.get(t);await(null===(i=null==n?void 0:n.model.get())||void 0===i?void 0:i.acceptNextWord(n.editor))}}),ih(class extends Qc{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:v(0,"Accept Next Line Of Inline Suggestion"),alias:"Accept Next Line Of Inline Suggestion",precondition:$d.and(gh.writable,t5.inlineSuggestionVisible),kbOpts:{weight:101},menuOpts:[{menuId:Mc.InlineSuggestionToolbar,title:v(0,"Accept Line"),group:"secondary",order:2}]})}async run(e,t){var i;const n=w6.get(t);await(null===(i=null==n?void 0:n.model.get())||void 0===i?void 0:i.acceptNextLine(n.editor))}}),ih(class extends Qc{constructor(){super({id:TU,label:v(0,"Accept Inline Suggestion"),alias:"Accept Inline Suggestion",precondition:t5.inlineSuggestionVisible,menuOpts:[{menuId:Mc.InlineSuggestionToolbar,title:v(0,"Accept"),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:$d.and(t5.inlineSuggestionVisible,gh.tabMovesFocus.toNegated(),t5.inlineSuggestionHasIndentationLessThanTabSize,O5.Visible.toNegated(),gh.hoverFocused.toNegated())}})}async run(e,t){var i;const n=w6.get(t);n&&(null===(i=n.model.get())||void 0===i||i.accept(n.editor),n.editor.focus())}}),ih(S6),Wc(k6),JK.register(D6),E4.register(new class extends lt{constructor(){super()}});var E6=i(9823),N6={};N6.styleTagTransform=Gr(),N6.setAttributes=Kr(),N6.insert=zr().bind(null,"head"),N6.domAPI=Vr(),N6.insertStyleElement=qr(),Br()(E6.Z,N6),E6.Z&&E6.Z.locals&&E6.Z.locals;const I6="inline-edit";let T6=class extends lt{constructor(e,t,i){super(),this.editor=e,this.model=t,this.languageService=i,this.isDisposed=uI(this,!1),this.currentTextModel=II(this.editor.onDidChangeModel,(()=>this.editor.getModel())),this.uiState=fI(this,(e=>{var t;if(this.isDisposed.read(e))return;const i=this.currentTextModel.read(e);if(i!==this.model.targetTextModel.read(e))return;const n=this.model.ghostText.read(e);if(!n)return;let o=null===(t=this.model.range)||void 0===t?void 0:t.read(e);o&&o.startLineNumber===o.endLineNumber&&o.startColumn===o.endColumn&&(o=void 0);const s=(!o||o.startLineNumber===o.endLineNumber)&&1===n.parts.length&&1===n.parts[0].lines.length,r=1===n.parts.length&&n.parts[0].lines.every((e=>0===e.length)),a=[],l=[];function d(e,t){if(l.length>0){const i=l[l.length-1];t&&i.decorations.push(new MA(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)l.push({content:i,decorations:t?[new MA(1,i.length+1,t,0)]:[]})}const c=i.getLineContent(n.lineNumber);let h,u=0;if(!r){for(const e of n.parts){let t=e.lines;o&&!s&&(d(t,I6),t=[]),void 0===h?(a.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):d([c.substring(u,e.column-1)],void 0),t.length>0&&(d(t,I6),void 0===h&&e.column<=c.length&&(h=e.column)),u=e.column-1}void 0!==h&&d([c.substring(u)],void 0)}const g=void 0!==h?new c5(h,c.length+1):void 0,p=s||!o?n.lineNumber:o.endLineNumber-1;return{inlineTexts:a,additionalLines:l,hiddenRange:g,lineNumber:p,additionalReservedLineCount:this.model.minReservedLineCount.read(e),targetTextModel:i,range:o,isSingleLine:s,isPureRemove:r,backgroundColoring:this.model.backgroundColoring.read(e)}})),this.decorations=fI(this,(e=>{const t=this.uiState.read(e);if(!t)return[];const i=[];if(t.hiddenRange&&i.push({range:t.hiddenRange.toRange(t.lineNumber),options:{inlineClassName:"inline-edit-hidden",description:"inline-edit-hidden"}}),t.range){const e=[];if(t.isSingleLine)e.push(t.range);else if(t.isPureRemove){const i=t.range.endLineNumber-t.range.startLineNumber;for(let n=0;n{const t=this.uiState.read(e);return t&&!t.isPureRemove?{lineNumber:t.lineNumber,additionalLines:t.additionalLines,minReservedLineCount:t.additionalReservedLineCount,targetTextModel:t.targetTextModel}:void 0})))),this._register(rt((()=>{this.isDisposed.set(!0,void 0)}))),this._register(h5(this.editor,this.decorations))}ownsViewZone(e){return this.additionalLinesWidget.viewZoneId===e}};T6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,Mu)],T6);var M6=i(6407),A6={};A6.styleTagTransform=Gr(),A6.setAttributes=Kr(),A6.insert=zr().bind(null,"head"),A6.domAPI=Vr(),A6.insertStyleElement=qr(),Br()(M6.Z,A6),M6.Z&&M6.Z.locals&&M6.Z.locals;var R6,P6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},O6=function(e,t){return function(i,n){t(i,n,e)}};let F6=class extends lt{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=II(this.editor.onDidChangeConfiguration,(()=>"always"===this.editor.getOption(63).showToolbar)),this.sessionPosition=void 0,this.position=fI(this,(e=>{var t,i,n;const o=null===(t=this.model.read(e))||void 0===t?void 0:t.widget.model.ghostText.read(e);if(!this.alwaysShowToolbar.read(e)||!o||0===o.parts.length)return this.sessionPosition=void 0,null;const s=o.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==o.lineNumber&&(this.sessionPosition=void 0);const r=new wd(o.lineNumber,Math.min(s,null!==(n=null===(i=this.sessionPosition)||void 0===i?void 0:i.column)&&void 0!==n?n:Number.MAX_SAFE_INTEGER));return this.sessionPosition=r,r})),this._register(LI(((t,i)=>{if(!this.model.read(t)||!this.alwaysShowToolbar.read(t))return;const n=i.add(this.instantiationService.createInstance(B6,this.editor,!0,this.position));e.addContentWidget(n),i.add(rt((()=>e.removeContentWidget(n))))})))}};F6=P6([O6(2,_d)],F6);let B6=R6=class extends lt{constructor(e,t,i,n,o,s){super(),this.editor=e,this.withBorder=t,this._position=i,this._contextKeyService=o,this._menuService=s,this.id="InlineEditHintsContentWidget"+R6.id++,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Pr("div.inlineEditHints",{className:this.withBorder?".withBorder":""},[Pr("div@toolBar")]),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(Mc.InlineEditActions,this._contextKeyService)),this.toolBar=this._register(n.createInstance(V6,this.nodes.toolBar,this.editor,Mc.InlineEditToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("primary")},actionViewItemProvider:(e,t)=>{if(e instanceof Fc)return n.createInstance(W6,e,void 0)},telemetrySource:"InlineEditToolbar"})),this._register(this.toolBar.onDidChangeDropdownVisibility((e=>{R6._dropDownVisible=e}))),this._register(SI((e=>{this._position.read(e),this.editor.layoutContentWidget(this)}))),this._register(SI((e=>{const t=[];for(const[e,i]of this.inlineCompletionsActionsMenus.getActions())for(const e of i)e instanceof Fc&&t.push(e);t.length>0&&t.unshift(new xd),this.toolBar.setAdditionalSecondaryActions(t)})))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};B6._dropDownVisible=!1,B6.id=0,B6=R6=P6([O6(3,_d),O6(4,pc),O6(5,Ac)],B6);class W6 extends jU{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=Pr("div.keybinding").root;this._register(new KT(t,te,{disableTitle:!0,...UT})).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineEditStatusBarItemLabel")}}updateTooltip(){}}let V6=class extends uK{constructor(e,t,i,n,o,s,r,a,l,d){super(e,{resetMenu:i,...n},o,s,r,a,l,d),this.editor=t,this.menuId=i,this.options2=n,this.menuService=o,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange((()=>this.updateToolbar()))),this._store.add(this.editor.onDidChangeCursorPosition((()=>this.updateToolbar()))),this.updateToolbar()}updateToolbar(){var e,t,i,n,o,s,r;const a=[],l=[];UU(this.menu,null===(e=this.options2)||void 0===e?void 0:e.menuOptions,{primary:a,secondary:l},null===(i=null===(t=this.options2)||void 0===t?void 0:t.toolbarOptions)||void 0===i?void 0:i.primaryGroup,null===(o=null===(n=this.options2)||void 0===n?void 0:n.toolbarOptions)||void 0===o?void 0:o.shouldInlineSubmenu,null===(r=null===(s=this.options2)||void 0===s?void 0:s.toolbarOptions)||void 0===r?void 0:r.useSeparatorsInPrimaryActions),l.push(...this.additionalActions),a.unshift(...this.prependedPrimaryActions),this.setActions(a,l)}setAdditionalSecondaryActions(e){Wh(this.additionalActions,e,((e,t)=>e===t))||(this.additionalActions=e,this.updateToolbar())}};V6=P6([O6(4,Ac),O6(5,pc),O6(6,hD),O6(7,uD),O6(8,Nd),O6(9,Vc)],V6);var H6,z6=function(e,t){return function(i,n){t(i,n,e)}};class U6{constructor(e,t){this.widget=e,this.edit=t}dispose(){this.widget.dispose()}}let K6=H6=class extends lt{static get(e){return e.getContribution(H6.ID)}constructor(e,t,i,n,o,s){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.languageFeaturesService=n,this._commandService=o,this._configurationService=s,this._isVisibleContext=H6.inlineEditVisibleContext.bindTo(this.contextKeyService),this._isCursorAtInlineEditContext=H6.cursorAtInlineEditContext.bindTo(this.contextKeyService),this._currentEdit=this._register(pI(this,void 0)),this._isAccepting=uI(this,!1),this._enabled=II(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).enabled)),this._fontFamily=II(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).fontFamily)),this._backgroundColoring=II(this.editor.onDidChangeConfiguration,(()=>this.editor.getOption(63).backgroundColoring));const r=MI("InlineEditController.modelContentChangedSignal",e.onDidChangeModelContent);this._register(SI((t=>{this._enabled.read(t)&&(r.read(t),this._isAccepting.read(t)||this.getInlineEdit(e,!0))})));const a=II(e.onDidChangeCursorPosition,(()=>e.getPosition()));this._register(SI((e=>{if(!this._enabled.read(e))return;const t=a.read(e);t&&this.checkCursorPosition(t)}))),this._register(SI((t=>{const i=this._currentEdit.read(t);if(this._isCursorAtInlineEditContext.set(!1),!i)return void this._isVisibleContext.set(!1);this._isVisibleContext.set(!0);const n=e.getPosition();n&&this.checkCursorPosition(n)})));const l=MI("InlineEditController.editorBlurSignal",e.onDidBlurEditorWidget);this._register(SI((async t=>{var i;this._enabled.read(t)&&(l.read(t),this._configurationService.getValue("editor.experimentalInlineEdit.keepOnBlur")||e.getOption(63).keepOnBlur||(null===(i=this._currentRequestCts)||void 0===i||i.dispose(!0),this._currentRequestCts=void 0,await this.clear(!1)))})));const d=MI("InlineEditController.editorFocusSignal",e.onDidFocusEditorText);this._register(SI((t=>{this._enabled.read(t)&&(d.read(t),this.getInlineEdit(e,!0))})));const c=this._register(Qs());this._register(SI((e=>{const t=this._fontFamily.read(e);c.setStyle(""===t||"default"===t?"":`\n.monaco-editor .inline-edit-decoration,\n.monaco-editor .inline-edit-decoration-preview,\n.monaco-editor .inline-edit {\n\tfont-family: ${t};\n}`)}))),this._register(new F6(this.editor,this._currentEdit,this.instantiationService))}checkCursorPosition(e){var t;if(!this._currentEdit)return void this._isCursorAtInlineEditContext.set(!1);const i=null===(t=this._currentEdit.get())||void 0===t?void 0:t.edit;i?this._isCursorAtInlineEditContext.set(hh.containsPosition(i.range,e)):this._isCursorAtInlineEditContext.set(!1)}validateInlineEdit(e,t){var i,n;if(t.text.includes("\n")&&t.range.startLineNumber!==t.range.endLineNumber&&t.range.startColumn!==t.range.endColumn){if(1!==t.range.startColumn)return!1;const o=t.range.endLineNumber;if(t.range.endColumn!==(null!==(n=null===(i=e.getModel())||void 0===i?void 0:i.getLineLength(o))&&void 0!==n?n:0)+1)return!1}return!0}async fetchInlineEdit(e,t){this._currentRequestCts&&this._currentRequestCts.dispose(!0);const i=e.getModel();if(!i)return;const n=i.getVersionId(),o=this.languageFeaturesService.inlineEditProvider.all(i);if(0===o.length)return;const s=o[0];this._currentRequestCts=new Pt;const r=this._currentRequestCts.token,a=t?zC.Automatic:zC.Invoke;var l;if(t&&await(50,l=r,new Promise((e=>{let t;const i=setTimeout((()=>{t&&t.dispose(),e()}),50);l&&(t=l.onCancellationRequested((()=>{clearTimeout(i),t&&t.dispose(),e()})))}))),r.isCancellationRequested||i.isDisposed()||i.getVersionId()!==n)return;const d=await s.provideInlineEdit(i,{triggerKind:a},r);return d&&!r.isCancellationRequested&&!i.isDisposed()&&i.getVersionId()===n&&this.validateInlineEdit(e,d)?d:void 0}async getInlineEdit(e,t){var i;this._isCursorAtInlineEditContext.set(!1),await this.clear();const n=await this.fetchInlineEdit(e,t);if(!n)return;const o=n.range.endLineNumber,s=n.range.endColumn,r=!n.text.endsWith("\n")||n.range.startLineNumber===n.range.endLineNumber&&n.range.startColumn===n.range.endColumn?n.text:n.text.slice(0,-1),a=new o5(o,[new s5(s,r,!1)]),l=this.instantiationService.createInstance(T6,this.editor,{ghostText:EI(a),minReservedLineCount:EI(0),targetTextModel:EI(null!==(i=this.editor.getModel())&&void 0!==i?i:void 0),range:EI(n.range),backgroundColoring:this._backgroundColoring});this._currentEdit.set(new U6(l,n),void 0)}async trigger(){await this.getInlineEdit(this.editor,!1)}async jumpBack(){this._jumpBackPosition&&(this.editor.setPosition(this._jumpBackPosition),this.editor.revealPositionInCenterIfOutsideViewport(this._jumpBackPosition))}async accept(){var e;this._isAccepting.set(!0,void 0);const t=null===(e=this._currentEdit.get())||void 0===e?void 0:e.edit;if(!t)return;let i=t.text;t.text.startsWith("\n")&&(i=t.text.substring(1)),this.editor.pushUndoStop(),this.editor.executeEdits("acceptCurrent",[pj.replace(hh.lift(t.range),i)]),t.accepted&&await this._commandService.executeCommand(t.accepted.id,...t.accepted.arguments||[]).then(void 0,Le),this.freeEdit(t),lI((e=>{this._currentEdit.set(void 0,e),this._isAccepting.set(!1,e)}))}jumpToCurrent(){var e,t;this._jumpBackPosition=null===(e=this.editor.getSelection())||void 0===e?void 0:e.getStartPosition();const i=null===(t=this._currentEdit.get())||void 0===t?void 0:t.edit;if(!i)return;const n=wd.lift({lineNumber:i.range.startLineNumber,column:i.range.startColumn});this.editor.setPosition(n),this.editor.revealPositionInCenterIfOutsideViewport(n)}async clear(e=!0){var t;const i=null===(t=this._currentEdit.get())||void 0===t?void 0:t.edit;i&&(null==i?void 0:i.rejected)&&e&&await this._commandService.executeCommand(i.rejected.id,...i.rejected.arguments||[]).then(void 0,Le),i&&this.freeEdit(i),this._currentEdit.set(void 0,void 0)}freeEdit(e){const t=this.editor.getModel();if(!t)return;const i=this.languageFeaturesService.inlineEditProvider.all(t);0!==i.length&&i[0].freeInlineEdit(e)}shouldShowHoverAt(e){const t=this._currentEdit.get();if(!t)return!1;const i=t.edit,n=t.widget.model;if(hh.containsPosition(i.range,e.getStartPosition())||hh.containsPosition(i.range,e.getEndPosition()))return!0;const o=n.ghostText.get();return!!o&&o.parts.some((t=>e.containsPosition(new wd(o.lineNumber,t.column))))}shouldShowHoverAtViewZone(e){var t,i;return null!==(i=null===(t=this._currentEdit.get())||void 0===t?void 0:t.widget.ownsViewZone(e))&&void 0!==i&&i}};K6.ID="editor.contrib.inlineEditController",K6.inlineEditVisibleKey="inlineEditVisible",K6.inlineEditVisibleContext=new gc(H6.inlineEditVisibleKey,!1),K6.cursorAtInlineEditKey="cursorAtInlineEdit",K6.cursorAtInlineEditContext=new gc(H6.cursorAtInlineEditKey,!1),K6=H6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([z6(1,_d),z6(2,pc),z6(3,Pk),z6(4,Nd),z6(5,Cg)],K6);var j6=function(e,t){return function(i,n){t(i,n,e)}};class q6{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let $6=class{constructor(e,t,i){this._editor=e,this._instantiationService=t,this._telemetryService=i,this.hoverOrdinal=5}suggestHoverAnchor(e){const t=K6.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const n=i.detail;if(t.shouldShowHoverAtViewZone(n.viewZoneId)){const t=i.range;return new XK(1e3,this,t,e.event.posx,e.event.posy,!1)}}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new XK(1e3,this,i.range,e.event.posx,e.event.posy,!1):null}computeSync(e,t){if("onHover"!==this._editor.getOption(63).showToolbar)return[];const i=K6.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new q6(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new at;this._telemetryService.publicLog2("inlineEditHover.shown");const n=this._instantiationService.createInstance(B6,this._editor,!1,EI(null));return e.fragment.appendChild(n.getDomNode()),i.add(n),i}};$6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([j6(1,_d),j6(2,Vc)],$6),ih(class extends Qc{constructor(){super({id:"editor.action.inlineEdit.accept",label:"Accept Inline Edit",alias:"Accept Inline Edit",precondition:$d.and(gh.writable,K6.inlineEditVisibleContext),kbOpts:[{weight:101,primary:2,kbExpr:$d.and(gh.writable,K6.inlineEditVisibleContext,K6.cursorAtInlineEditContext)}],menuOpts:[{menuId:Mc.InlineEditToolbar,title:"Accept",group:"primary",order:1}]})}async run(e,t){const i=K6.get(t);await(null==i?void 0:i.accept())}}),ih(class extends Qc{constructor(){const e=$d.and(gh.writable,K6.inlineEditVisibleContext);super({id:"editor.action.inlineEdit.reject",label:"Reject Inline Edit",alias:"Reject Inline Edit",precondition:e,kbOpts:{weight:100,primary:9,kbExpr:e},menuOpts:[{menuId:Mc.InlineEditToolbar,title:"Reject",group:"secondary",order:2}]})}async run(e,t){const i=K6.get(t);await(null==i?void 0:i.clear())}}),ih(class extends Qc{constructor(){const e=$d.and(gh.writable,K6.inlineEditVisibleContext,$d.not(K6.cursorAtInlineEditKey));super({id:"editor.action.inlineEdit.jumpTo",label:"Jump to Inline Edit",alias:"Jump to Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e},menuOpts:[{menuId:Mc.InlineEditToolbar,title:"Jump To Edit",group:"primary",order:3,when:e}]})}async run(e,t){const i=K6.get(t);null==i||i.jumpToCurrent()}}),ih(class extends Qc{constructor(){const e=$d.and(gh.writable,K6.cursorAtInlineEditContext);super({id:"editor.action.inlineEdit.jumpBack",label:"Jump Back from Inline Edit",alias:"Jump Back from Inline Edit",precondition:e,kbOpts:{weight:110,primary:2646,kbExpr:e},menuOpts:[{menuId:Mc.InlineEditToolbar,title:"Jump Back",group:"primary",order:3,when:e}]})}async run(e,t){const i=K6.get(t);null==i||i.jumpBack()}}),ih(class extends Qc{constructor(){const e=$d.and(gh.writable,$d.not(K6.inlineEditVisibleKey));super({id:"editor.action.inlineEdit.trigger",label:"Trigger Inline Edit",alias:"Trigger Inline Edit",precondition:e,kbOpts:{weight:101,primary:2646,kbExpr:e}})}async run(e,t){const i=K6.get(t);null==i||i.trigger()}}),oh(K6.ID,K6,3),JK.register($6);var G6=i(6907),Z6={};Z6.styleTagTransform=Gr(),Z6.setAttributes=Kr(),Z6.insert=zr().bind(null,"head"),Z6.domAPI=Vr(),Z6.insertStyleElement=qr(),Br()(G6.Z,Z6),G6.Z&&G6.Z.locals&&G6.Z.locals;const Y6=vd("themeService");var Q6,X6=function(e,t){return function(i,n){t(i,n,e)}};let J6=Q6=class extends lt{static get(e){return e.getContribution(Q6.ID)}constructor(e,t,i){super(),this._editor=e,this._languageService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(HC.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new e9(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};J6.ID="editor.contrib.inspectTokens",J6=Q6=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([X6(1,Y6),X6(2,Mu)],J6);class e9 extends lt{constructor(e,t){super(),this.allowEditorOverflow=!0,this._editor=e,this._languageService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=function(e,t){const i=HC.get(t);if(i)return i;const n=e.encodeLanguageId(t);return{getInitialState:()=>UC,tokenize:(e,i,n)=>KC(t,n),tokenizeEncoded:(e,t,i)=>jC(n,i)}}(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return e9._ID}_compute(e){const t=this._getTokensAtLine(e.lineNumber);let i=0;for(let n=t.tokens1.length-1;n>=0;n--){const o=t.tokens1[n];if(e.column-1>=o.offset){i=n;break}}let n=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){n=i;break}const o=this._model.getLineContent(e.lineNumber);let s="";if(ie.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);const n=[];let o=0,s=0;const r=t.length;for(let a=1,l=e.getLineCount();a<=l;a++){const l=e.getLineContent(a),d=l.length+1;let c=0;if(se.getLanguageId(),n=(t,i)=>e.getLanguageIdAtPosition(t,i),o=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===o)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let s=this._selection;s.startLineNumbert===s.startLineNumber?e.tokenization.getLineTokens(o):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s.startLineNumber?e.getLineContent(o):e.getLineContent(t)},h=PS(this._autoIndent,t,e.getLanguageIdAtPosition(o,1),s.startLineNumber,d,this._languageConfigurationService);if(null!==h){const t=vn(e.getLineContent(o)),i=W4(h,r);if(i!==W4(t,r)){const e=V4(i,r,l);c=e+this.trimStart(a)}}}t.addEditOperation(new hh(s.startLineNumber,1,s.startLineNumber,1),c+"\n");const u=this.matchEnterRuleMovingDown(e,d,r,s.startLineNumber,o,c);if(null!==u)0!==u&&this.getIndentEditsOfMovingBlock(e,t,s,r,l,u);else{const a={tokenization:{getLineTokens:t=>t===s.startLineNumber?e.tokenization.getLineTokens(o):t>=s.startLineNumber+1&&t<=s.endLineNumber+1?e.tokenization.getLineTokens(t-1):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===s.startLineNumber?c:t>=s.startLineNumber+1&&t<=s.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)},h=PS(this._autoIndent,a,e.getLanguageIdAtPosition(o,1),s.startLineNumber+1,d,this._languageConfigurationService);if(null!==h){const i=vn(e.getLineContent(s.startLineNumber)),n=W4(h,r),o=W4(i,r);if(n!==o){const i=n-o;this.getIndentEditsOfMovingBlock(e,t,s,r,l,i)}}}}else t.addEditOperation(new hh(s.startLineNumber,1,s.startLineNumber,1),c+"\n")}else if(o=s.startLineNumber-1,a=e.getLineContent(o),t.addEditOperation(new hh(o,1,o+1,1),null),t.addEditOperation(new hh(s.endLineNumber,e.getLineMaxColumn(s.endLineNumber),s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),"\n"+a),this.shouldAutoIndent(e,s)){const a={tokenization:{getLineTokens:t=>t===o?e.tokenization.getLineTokens(s.startLineNumber):e.tokenization.getLineTokens(t),getLanguageId:i,getLanguageIdAtPosition:n},getLineContent:t=>t===o?e.getLineContent(s.startLineNumber):e.getLineContent(t)},c=this.matchEnterRule(e,d,r,s.startLineNumber,s.startLineNumber-2);if(null!==c)0!==c&&this.getIndentEditsOfMovingBlock(e,t,s,r,l,c);else{const i=PS(this._autoIndent,a,e.getLanguageIdAtPosition(s.startLineNumber,1),o,d,this._languageConfigurationService);if(null!==i){const n=vn(e.getLineContent(s.startLineNumber)),o=W4(i,r),a=W4(n,r);if(o!==a){const i=o-a;this.getIndentEditsOfMovingBlock(e,t,s,r,l,i)}}}}}this._selectionId=t.trackSelection(s)}buildIndentConverter(e,t,i){return{shiftIndent:n=>TS.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>TS.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===Wu.None||o.indentAction===Wu.Indent?s=o.indentation+o.appendText:o.indentAction===Wu.IndentOutdent?s=o.indentation:o.indentAction===Wu.Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);const r=e.getLineContent(n);if(this.trimStart(r).indexOf(this.trimStart(s))>=0){const o=vn(e.getLineContent(n));let r=vn(s);const a=OS(e,n,this._languageConfigurationService);return null!==a&&2&a&&(r=t.unshiftIndent(r)),W4(r,i)-W4(o,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(bn(s)>=0){const s=e.getLineMaxColumn(o),r=DS(this._autoIndent,e,new hh(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;for(;o>=1&&!(bn(e.getLineContent(o))>=0);)o--;if(o<1||n>e.getLineCount())return null;const s=e.getLineMaxColumn(o),r=DS(this._autoIndent,e,new hh(o,s,o,s),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;for(;r>=1;){let t;if(t=r===o&&void 0!==s?s:e.getLineContent(r),bn(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;const a=e.getLineMaxColumn(r),l=DS(this._autoIndent,e,new hh(r,a,r,a),this._languageConfigurationService);return this.parseEnterResult(e,t,i,n,l)}trimStart(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==this._languageConfigurationService.getLanguageConfiguration(i).indentRulesSupport}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){const a=vn(e.getLineContent(r)),l=V4(W4(a,n)+s,n,o);l!==a&&(t.addEditOperation(new hh(r,1,r,a.length+1),l),r===i.endLineNumber&&i.endColumn<=a.length+1&&""===l&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,sp)],n9);class o9{static getCollator(){return o9._COLLATOR||(o9._COLLATOR=new Intl.Collator),o9._COLLATOR}constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}getEditOperations(e,t){const i=function(e,t,i){const n=s9(e,t,i);return n?pj.replace(new hh(n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;const n=s9(e,t,i);if(!n)return!1;for(let e=0,t=n.before.length;e=o)return null;const s=[];for(let t=n;t<=o;t++)s.push(e.getLineContent(t));let r=s.slice(0);return r.sort(o9.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}o9._COLLATOR=null;class r9 extends Qc{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>hh.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;enew wd(e.positionLineNumber,e.positionColumn))));const o=t.getSelection();if(null===o)return;const s=e.get(Cg),r=t.getModel(),a=s.getValue("files.trimTrailingWhitespaceInRegexAndStrings",{overrideIdentifier:null==r?void 0:r.getLanguageId(),resource:null==r?void 0:r.uri}),l=new t9(o,n,a);t.pushUndoStop(),t.executeCommands(this.id,[l]),t.pushUndoStop()}}d9.ID="editor.action.trimTrailingWhitespace";class c9 extends Qc{run(e,t){if(!t.hasModel())return;const i=t.getSelection(),n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;epj.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class h9 extends Qc{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(131),s=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),r=t.getConfiguredWordAtPosition(i);if(!r)continue;const a=new hh(i.lineNumber,r.startColumn,i.lineNumber,r.endColumn),l=n.getValueInRange(a);s.push(pj.replace(a,this._modifyText(l,o)))}else{const t=n.getValueInRange(e);s.push(pj.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class u9{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class g9 extends h9{constructor(){super({id:"editor.action.transformToTitlecase",label:v(0,"Transform to Title Case"),alias:"Transform to Title Case",precondition:gh.writable})}_modifyText(e,t){const i=g9.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}g9.titleBoundary=new u9("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class p9 extends h9{constructor(){super({id:"editor.action.transformToSnakecase",label:v(0,"Transform to Snake Case"),alias:"Transform to Snake Case",precondition:gh.writable})}_modifyText(e,t){const i=p9.caseBoundary.get(),n=p9.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}p9.caseBoundary=new u9("(\\p{Ll})(\\p{Lu})","gmu"),p9.singleLetters=new u9("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class m9 extends h9{constructor(){super({id:"editor.action.transformToCamelcase",label:v(0,"Transform to Camel Case"),alias:"Transform to Camel Case",precondition:gh.writable})}_modifyText(e,t){const i=m9.wordBoundary.get();if(!i)return e;const n=e.split(i);return n.shift()+n.map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join("")}}m9.wordBoundary=new u9("[_\\s-]","gm");class f9 extends h9{constructor(){super({id:"editor.action.transformToPascalcase",label:v(0,"Transform to Pascal Case"),alias:"Transform to Pascal Case",precondition:gh.writable})}_modifyText(e,t){const i=f9.wordBoundary.get(),n=f9.wordBoundaryToMaintain.get();return i&&n?e.split(n).map((e=>e.split(i))).flat().map((e=>e.substring(0,1).toLocaleUpperCase()+e.substring(1))).join(""):e}}f9.wordBoundary=new u9("[_\\s-]","gm"),f9.wordBoundaryToMaintain=new u9("(?<=\\.)","gm");class _9 extends h9{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every((e=>e.isSupported()))}constructor(){super({id:"editor.action.transformToKebabcase",label:v(0,"Transform to Kebab Case"),alias:"Transform to Kebab Case",precondition:gh.writable})}_modifyText(e,t){const i=_9.caseBoundary.get(),n=_9.singleLetters.get(),o=_9.underscoreBoundary.get();return i&&n&&o?e.replace(o,"$1-$3").replace(i,"$1-$2").replace(n,"$1-$2").toLocaleLowerCase():e}}_9.caseBoundary=new u9("(\\p{Ll})(\\p{Lu})","gmu"),_9.singleLetters=new u9("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),_9.underscoreBoundary=new u9("(\\S)(_)(\\S)","gm"),ih(class extends r9{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:v(0,"Copy Line Up"),alias:"Copy Line Up",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"2_line",title:v(0,"&&Copy Line Up"),order:1}})}}),ih(class extends r9{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:v(0,"Copy Line Down"),alias:"Copy Line Down",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"2_line",title:v(0,"Co&&py Line Down"),order:2}})}}),ih(class extends Qc{constructor(){super({id:"editor.action.duplicateSelection",label:v(0,"Duplicate Selection"),alias:"Duplicate Selection",precondition:gh.writable,menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"2_line",title:v(0,"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],o=t.getSelections(),s=t.getModel();for(const e of o)if(e.isEmpty())n.push(new i9(e,!0));else{const t=new uh(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn);n.push(new cS(t,s.getValueInRange(e)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}),ih(class extends a9{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:v(0,"Move Line Up"),alias:"Move Line Up",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"2_line",title:v(0,"Mo&&ve Line Up"),order:3}})}}),ih(class extends a9{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:v(0,"Move Line Down"),alias:"Move Line Down",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"2_line",title:v(0,"Move &&Line Down"),order:4}})}}),ih(class extends l9{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:v(0,"Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:gh.writable})}}),ih(class extends l9{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:v(0,"Sort Lines Descending"),alias:"Sort Lines Descending",precondition:gh.writable})}}),ih(class extends Qc{constructor(){super({id:"editor.action.removeDuplicateLines",label:v(0,"Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:gh.writable})}run(e,t){if(!t.hasModel())return;const i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;const n=[],o=[];let s=0,r=!0,a=t.getSelections();1===a.length&&a[0].isEmpty()&&(a=[new uh(1,1,i.getLineCount(),i.getLineMaxColumn(i.getLineCount()))],r=!1);for(const e of a){const t=new Set,r=[];for(let n=e.startLineNumber;n<=e.endLineNumber;n++){const e=i.getLineContent(n);t.has(e)||(r.push(e),t.add(e))}const a=new uh(e.startLineNumber,1,e.endLineNumber,i.getLineMaxColumn(e.endLineNumber)),l=e.startLineNumber-s,d=new uh(l,1,l+r.length-1,r[r.length-1].length);n.push(pj.replace(a,r.join("\n"))),o.push(d),s+=e.endLineNumber-e.startLineNumber+1-r.length}t.pushUndoStop(),t.executeEdits(this.id,n,r?o:void 0),t.pushUndoStop()}}),ih(d9),ih(class extends Qc{constructor(){super({id:"editor.action.deleteLines",label:v(0,"Delete Line"),alias:"Delete Line",precondition:gh.writable,kbOpts:{kbExpr:gh.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;const i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0;const s=[],r=[];for(let e=0,t=i.length;e1&&(a-=1,d=n.getLineMaxColumn(a)),s.push(pj.replace(new uh(a,d,l,c),"")),r.push(new uh(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){const t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));const i=[];let n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}),ih(class extends Qc{constructor(){super({id:"editor.action.indentLines",label:v(0,"Indent Line"),alias:"Indent Line",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:2142,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,FS.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}),ih(class extends Qc{constructor(){super({id:"editor.action.outdentLines",label:v(0,"Outdent Line"),alias:"Outdent Line",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:2140,weight:100}})}run(e,t){XS.Outdent.runEditorCommand(e,t,null)}}),ih(class extends Qc{constructor(){super({id:"editor.action.insertLineBefore",label:v(0,"Insert Line Above"),alias:"Insert Line Above",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,FS.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}),ih(class extends Qc{constructor(){super({id:"editor.action.insertLineAfter",label:v(0,"Insert Line Below"),alias:"Insert Line Below",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,FS.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}),ih(class extends c9{constructor(){super({id:"deleteAllLeft",label:v(0,"Delete All Left"),alias:"Delete All Left",precondition:gh.writable,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];let o=0;return t.forEach((t=>{let s;if(1===t.endColumn&&o>0){const e=t.startLineNumber-o;s=new uh(e,t.startColumn,e,t.startColumn)}else s=new uh(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)})),i&&n.unshift(i),n}_getRangesToDelete(e){const t=e.getSelections();if(null===t)return[];let i=t;const n=e.getModel();return null===n?[]:(i.sort(hh.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){const t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineLength(t)+1;return new hh(t,i,e.startLineNumber,1)}return new hh(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new hh(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}),ih(class extends c9{constructor(){super({id:"deleteAllRight",label:v(0,"Delete All Right"),alias:"Delete All Right",precondition:gh.writable,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null;const n=[];for(let o=0,s=t.length,r=0;o{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new hh(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new hh(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(hh.compareRangesUsingStarts),n}}),ih(class extends Qc{constructor(){super({id:"editor.action.joinLines",label:v(0,"Join Lines"),alias:"Join Lines",precondition:gh.writable,kbOpts:{kbExpr:gh.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){const i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(hh.compareRangesUsingStarts);const o=[],s=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new uh(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new uh(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(s);const r=t.getModel();if(null===r)return;const a=[],l=[];let d=n,c=0;for(let e=0,t=o.length;e=1){let e=!0;""===m&&(e=!1),!e||" "!==m.charAt(m.length-1)&&"\t"!==m.charAt(m.length-1)||(e=!1,m=m.replace(/[\s\uFEFF\xA0]+$/g," "));const n=t.substr(i-1);m+=(e?" ":"")+n,g=e?n.length+1:n.length}else g=0}const f=new hh(i,s,h,u);if(!f.isEmpty()){let e;t.isEmpty()?(a.push(pj.replace(f,m)),e=new uh(f.startLineNumber-c,m.length-g+1,i-c,m.length-g+1)):t.startLineNumber===t.endLineNumber?(a.push(pj.replace(f,m)),e=new uh(t.startLineNumber-c,t.startColumn,t.endLineNumber-c,t.endColumn)):(a.push(pj.replace(f,m)),e=new uh(t.startLineNumber-c,t.startColumn,t.startLineNumber-c,m.length-p)),null!==hh.intersectRanges(f,n)?d=e:l.push(e)}c+=f.endLineNumber-f.startLineNumber}l.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}),ih(class extends Qc{constructor(){super({id:"editor.action.transpose",label:v(0,"Transpose Characters around the Cursor"),alias:"Transpose Characters around the Cursor",precondition:gh.writable})}run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=[];for(let e=0,t=i.length;e=r){if(s.lineNumber===n.getLineCount())continue;const e=new hh(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new dS(new uh(s.lineNumber,Math.max(1,s.column-1),s.lineNumber+1,1),t))}else{const e=new hh(s.lineNumber,Math.max(1,s.column-1),s.lineNumber,s.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new gS(e,t,new uh(s.lineNumber,s.column+1,s.lineNumber,s.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}),ih(class extends h9{constructor(){super({id:"editor.action.transformToUppercase",label:v(0,"Transform to Uppercase"),alias:"Transform to Uppercase",precondition:gh.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}),ih(class extends h9{constructor(){super({id:"editor.action.transformToLowercase",label:v(0,"Transform to Lowercase"),alias:"Transform to Lowercase",precondition:gh.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}),p9.caseBoundary.isSupported()&&p9.singleLetters.isSupported()&&ih(p9),m9.wordBoundary.isSupported()&&ih(m9),f9.wordBoundary.isSupported()&&ih(f9),g9.titleBoundary.isSupported()&&ih(g9),_9.isSupported()&&ih(_9);var v9=i(9717),b9={};b9.styleTagTransform=Gr(),b9.setAttributes=Kr(),b9.insert=zr().bind(null,"head"),b9.domAPI=Vr(),b9.insertStyleElement=qr(),Br()(v9.Z,b9),v9.Z&&v9.Z.locals&&v9.Z.locals;var w9,C9=function(e,t){return function(i,n){t(i,n,e)}};const y9=new gc("LinkedEditingInputVisible",!1);let S9=w9=class extends lt{static get(e){return e.getContribution(w9.ID)}constructor(e,t,i,n,o){super(),this.languageConfigurationService=n,this._syncRangesToken=0,this._localToDispose=this._register(new at),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=y9.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new at),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(70)||e.hasChanged(93))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(70)||this._editor.getOption(93))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(_t.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new zt(this._debounceInformation.get(t)),o=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},s=new zt(0),r=e=>{this._rangeSyncTriggerPromise=s.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{o()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const t=this._currentDecorations.getRange(0);if(t&&e.changes.every((e=>t.intersectRanges(e.range))))return void r(this._syncRangesToken)}o()}))),this._localToDispose.add({dispose:()=>{n.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._syncRangesToken||0===this._currentDecorations.length)return;const t=this._editor.getModel(),i=this._currentDecorations.getRange(0);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}const o=[];for(let e=1,i=this._currentDecorations.length;e1)return void this.clearRanges();const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const e=this._currentDecorations.getRange(0);if(e&&e.containsPosition(t))return}}this.clearRanges(),this._currentRequestPosition=t,this._currentRequestModelVersion=n;const o=this._currentRequestCts=new Pt;try{const e=new ft(!1),s=await k9(this._providers,i,t,o.token);if(this._debounceInformation.update(i,e.elapsed()),o!==this._currentRequestCts)return;if(this._currentRequestCts=null,n!==i.getVersionId())return;let r=[];(null==s?void 0:s.ranges)&&(r=s.ranges),this._currentWordPattern=(null==s?void 0:s.wordPattern)||this._languageWordPattern;let a=!1;for(let e=0,i=r.length;e({range:e,options:w9.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations.set(l),this._syncRangesToken++}catch(e){Ne(e)||xe(e),this._currentRequestCts!==o&&this._currentRequestCts||this.clearRanges()}}};function k9(e,t,i,n){return qt(e.ordered(t).map((e=>async()=>{try{return await e.provideLinkedEditingRanges(t,i,n)}catch(e){return void Le(e)}})),(e=>!!e&&Gh(null==e?void 0:e.ranges)))}S9.ID="editor.contrib.linkedEditing",S9.DECORATION=zy.register({description:"linked-editing",stickiness:0,className:"linked-editing-decoration"}),S9=w9=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([C9(1,pc),C9(2,Pk),C9(3,sp),C9(4,AW)],S9),th(new(Yc.bindToContribution(S9.get))({id:"cancelLinkedEditingInput",precondition:y9,handler:e=>e.clearRanges(),kbOpts:{kbExpr:gh.editorTextFocus,weight:199,primary:9,secondary:[1033]}})),Tm("editor.linkedEditingBackground",{dark:fu.fromHex("#f00").transparent(.3),light:fu.fromHex("#f00").transparent(.3),hcDark:fu.fromHex("#f00").transparent(.3),hcLight:fu.white},v(0,"Background color when the editor auto renames on type.")),eh("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(Pk);return k9(n,t,i,At.None)})),oh(S9.ID,S9,1),ih(class extends Qc{constructor(){super({id:"editor.action.linkedEditing",label:v(0,"Start Linked Editing"),alias:"Start Linked Editing",precondition:$d.and(gh.writable,gh.hasRenameProvider),kbOpts:{kbExpr:gh.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(bd),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return Po.isUri(n)&&wd.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),xe):super.runCommand(e,t)}run(e,t){const i=S9.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}});var x9=i(4222),L9={};L9.styleTagTransform=Gr(),L9.setAttributes=Kr(),L9.insert=zr().bind(null,"head"),L9.domAPI=Vr(),L9.insertStyleElement=qr(),Br()(x9.Z,L9),x9.Z&&x9.Z.locals&&x9.Z.locals;class D9{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}async resolve(e){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}}class E9{constructor(e){this._disposables=new at;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new D9(e,n)));t=E9._union(t,e),nt(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){const i=[];let n,o,s,r;for(n=0,s=0,o=e.length,r=t.length;nPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[o]=[t,e])}),Le)));return Promise.all(o).then((()=>{const e=new E9(jh(n));return i.isCancellationRequested?(e.dispose(),new E9([])):e}))}Id.registerCommand("_executeLinkProvider",(async(e,...t)=>{let[i,n]=t;xl(i instanceof Po),"number"!=typeof n&&(n=0);const{linkProvider:o}=e.get(Pk),s=e.get(Cd).getModel(i);if(!s)return[];const r=await N9(o,s,At.None);if(!r)return[];for(let e=0;ethis.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const s=this._register(new wj(e));this._register(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(s.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(s.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(71)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(71))return;const e=this.editor.getModel();if(!e.isTooLargeForSyncing()&&this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Wt((t=>N9(this.providers,e,t)));try{const t=new ft(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){xe(e)}finally{this.computePromise=null}}}updateDecorations(e){const t="altKey"===this.editor.getOption(78),i=[],n=Object.keys(this.currentOccurrences);for(const e of n){const t=this.currentOccurrences[e];i.push(t.decorationId)}const o=[];if(e)for(const i of e)o.push(P9.decoration(i,t));this.editor.changeDecorations((t=>{const n=t.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=n.length;t{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(78);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(At.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===qo.file&&e.startsWith(`${qo.file}:`)){const i=Po.parse(e);if(i.scheme===qo.file){const n=Gl(i);let o=null;n.startsWith("/./")||n.startsWith("\\.\\")?o=`.${n.substr(1)}`:(n.startsWith("//./")||n.startsWith("\\\\.\\"))&&(o=`.${n.substr(2)}`),o&&(e=id(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(v(0,"Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(v(0,"Failed to open this link because its target is missing.")):xe(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};M9.ID="editor.linkDetector",M9=I9=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([T9(1,LL),T9(2,fD),T9(3,Pk),T9(4,AW)],M9);const A9=zy.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),R9=zy.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"});class P9{static decoration(e,t){return{range:e.range,options:P9._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n={...i?R9:A9};return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:v(0,i?"Execute command":"Follow link"),o=v(0,t?K?"cmd + click":"ctrl + click":K?"option + click":"alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);i&&(t=v(0,"Execute command {0}",i[1]))}return new dd("",!0).appendLink(e.url.toString(!0).replace(/ /g,"%20"),n,t).appendMarkdown(` (${o})`)}return(new dd).appendText(`${n} (${o})`)}(e,t),n}constructor(e,t){this.link=e,this.decorationId=t}activate(e,t){e.changeDecorationOptions(this.decorationId,P9._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,P9._getOptions(this.link,t,!1))}}oh(M9.ID,M9,1),ih(class extends Qc{constructor(){super({id:"editor.action.openLink",label:v(0,"Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=M9.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const e of n){const t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}});class O9 extends lt{constructor(e){super(),this._editor=e,this._register(this._editor.onMouseDown((e=>{const t=this._editor.getOption(117);t>=0&&6===e.target.type&&e.target.position.column>=t&&this._editor.updateOptions({stopRenderingLineAfter:-1})})))}}O9.ID="editor.contrib.longLinesHelper",oh(O9.ID,O9,2);var F9=i(6174),B9={};B9.styleTagTransform=Gr(),B9.setAttributes=Kr(),B9.insert=zr().bind(null,"head"),B9.domAPI=Vr(),B9.insertStyleElement=qr(),Br()(F9.Z,B9),F9.Z&&F9.Z.locals&&F9.Z.locals;const W9=Tm("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},v(0,"Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0);Tm("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},v(0,"Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),Tm("editor.wordHighlightTextBackground",{light:W9,dark:W9,hcDark:W9,hcLight:W9},v(0,"Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0);const V9=Tm("editor.wordHighlightBorder",{light:null,dark:null,hcDark:jm,hcLight:jm},v(0,"Border color of a symbol during read-access, like reading a variable."));Tm("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:jm,hcLight:jm},v(0,"Border color of a symbol during write-access, like writing to a variable.")),Tm("editor.wordHighlightTextBorder",{light:V9,dark:V9,hcDark:V9,hcLight:V9},v(0,"Border color of a textual occurrence for a symbol."));const H9=Tm("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},v(0,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),z9=Tm("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},v(0,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),U9=Tm("editorOverviewRuler.wordHighlightTextForeground",{dark:t_,light:t_,hcDark:t_,hcLight:t_},v(0,"Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."),!0),K9=zy.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Hv(z9),position:Eh.Center},minimap:{color:Hv(r_),position:1}}),j9=zy.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:Hv(U9),position:Eh.Center},minimap:{color:Hv(r_),position:1}}),q9=zy.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Hv(t_),position:Eh.Center},minimap:{color:Hv(r_),position:1}}),$9=zy.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),G9=zy.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Hv(H9),position:Eh.Center},minimap:{color:Hv(r_),position:1}});function Z9(e){return e?$9:q9}jv(((e,t)=>{const i=e.getColor(vf);i&&t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`)}));var Y9;function Q9(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", ");oa(1===i.length?v(0,"Cursor added: {0}",e):v(0,"Cursors added: {0}",e))}}class X9{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class J9{static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new J9(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,s=!1;const r=e.getSelections();1===r.length&&r[0].isEmpty()?(s=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,d=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,d=new uh(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new J9(e,t,s,l,n,o,d)}constructor(e,t,i,n,o,s,r){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=s,this.currentMatch=r}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new X9(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new X9(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(131):null,!1);return i?new uh(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new X9(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new X9(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(131):null,!1);return i?new uh(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(e){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const t=this._editor.getModel();return e?t.findMatches(this.searchText,e,!1,this.matchCase,this.wholeWord?this._editor.getOption(131):null,!1,1073741824):t.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(131):null,!1,1073741824)}}class e7 extends lt{static get(e){return e.getContribution(e7.ID)}constructor(e){super(),this._sessionDispose=this._register(new at),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=J9.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new uh(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!o7(this._editor.getModel(),t,i)){const e=this._editor.getModel(),i=[];for(let n=0,o=t.length;n0&&i.isRegex){const e=this._editor.getModel();t=i.searchScope?e.findMatches(i.searchString,i.searchScope,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(131):null,!1,1073741824):e.findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(131):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll(i.searchScope)}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew uh(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}e7.ID="editor.contrib.multiCursorController";class t7 extends Qc{run(e,t){const i=e7.get(t);if(!i)return;const n=t._getViewModel();if(n){const o=n.getCursorStates(),s=v1.get(t);if(s)this._run(i,s);else{const n=e.get(_d).createInstance(v1,t);this._run(i,n),n.dispose()}Q9(o,n.getCursorStates())}}}class i7{constructor(e,t,i,n,o){this._model=e,this._searchText=t,this._matchCase=i,this._wordSeparators=n,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,o&&this._model===o._model&&this._searchText===o._searchText&&this._matchCase===o._matchCase&&this._wordSeparators===o._wordSeparators&&this._modelVersionId===o._modelVersionId&&(this._cachedFindMatches=o._cachedFindMatches)}findMatches(){return null===this._cachedFindMatches&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map((e=>e.range)),this._cachedFindMatches.sort(hh.compareRangesUsingStarts)),this._cachedFindMatches}}let n7=Y9=class extends lt{constructor(e,t){super(),this._languageFeaturesService=t,this.editor=e,this._isEnabled=e.getOption(108),this._decorations=e.createDecorationsCollection(),this.updateSoon=this._register(new Zt((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(108)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()})));const i=v1.get(e);i&&this._register(i.getState().onFindReplaceStateChange((e=>{this._update()}))),this.updateSoon.schedule()}_update(){this._setState(Y9._createState(this.state,this._isEnabled,this.editor))}static _createState(e,t,i){if(!t)return null;if(!i.hasModel())return null;const n=i.getSelection();if(n.startLineNumber!==n.endLineNumber)return null;const o=e7.get(i);if(!o)return null;const s=v1.get(i);if(!s)return null;let r=o.getSession(s);if(!r){const e=i.getSelections();if(e.length>1){const t=s.getState().matchCase;if(!o7(i.getModel(),e,t))return null}r=J9.create(i,s)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const a=s.getState(),l=a.matchCase;if(a.isRevealed){let e=a.searchString;l||(e=e.toLowerCase());let t=r.searchText;if(l||(t=t.toLowerCase()),e===t&&r.matchCase===a.matchCase&&r.wholeWord===a.wholeWord&&!a.isRegex)return null}return new i7(i.getModel(),r.searchText,r.matchCase,r.wholeWord?i.getOption(131):null,e)}_setState(e){if(this.state=e,!this.state)return void this._decorations.clear();if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=this.state.findMatches(),n=this.editor.getSelections();n.sort(hh.compareRangesUsingStarts);const o=[];for(let e=0,t=0,s=i.length,r=n.length;e=r)o.push(s),e++;else{const i=hh.compareRangesUsingStarts(s,n[t]);i<0?(!n[t].isEmpty()&&hh.areIntersecting(s,n[t])||o.push(s),e++):(i>0||e++,t++)}}const s="off"!==this.editor.getOption(81),r=this._languageFeaturesService.documentHighlightProvider.has(t)&&s,a=o.map((e=>({range:e,options:Z9(r)})));this._decorations.set(a)}dispose(){this._setState(null),super.dispose()}};function o7(e,t,i){const n=s7(e,t[0],!i);for(let o=1,s=t.length;o=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,Pk)],n7),oh(e7.ID,e7,4),oh(n7.ID,n7,1),ih(class extends Qc{constructor(){super({id:"editor.action.insertCursorAbove",label:v(0,"Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:gh.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"3_multi",title:v(0,"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,CS.addCursorUp(o,s,n)),o.revealTopMostCursor(i.source),Q9(s,o.getCursorStates())}}),ih(class extends Qc{constructor(){super({id:"editor.action.insertCursorBelow",label:v(0,"Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:gh.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"3_multi",title:v(0,"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;let n=!0;i&&!1===i.logicalLine&&(n=!1);const o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.model.pushStackElement();const s=o.getCursorStates();o.setCursorStates(i.source,3,CS.addCursorDown(o,s,n)),o.revealBottomMostCursor(i.source),Q9(s,o.getCursorStates())}}),ih(class extends Qc{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:v(0,"Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:gh.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"3_multi",title:v(0,"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new uh(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),s=o.getCursorStates(),r=[];n.forEach((e=>this.getCursorsForSelection(e,i,r))),r.length>0&&t.setSelections(r),Q9(s,o.getCursorStates())}}),ih(class extends t7{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:v(0,"Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:2082,weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"3_multi",title:v(0,"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}),ih(class extends t7{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:v(0,"Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"3_multi",title:v(0,"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}),ih(class extends t7{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:v(0,"Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:Se(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}),ih(class extends t7{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:v(0,"Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}),ih(class extends t7{constructor(){super({id:"editor.action.selectHighlights",label:v(0,"Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:3114,weight:100},menuOpts:{menuId:Mc.MenubarSelectionMenu,group:"3_multi",title:v(0,"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}),ih(class extends t7{constructor(){super({id:"editor.action.changeAll",label:v(0,"Change All Occurrences"),alias:"Change All Occurrences",precondition:$d.and(gh.writable,gh.editorTextFocus),kbOpts:{kbExpr:gh.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}),ih(class extends Qc{constructor(){super({id:"editor.action.addCursorsToBottom",label:v(0,"Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount(),o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new uh(e,i[0].startColumn,e,i[0].endColumn));const s=t._getViewModel(),r=s.getCursorStates();o.length>0&&t.setSelections(o),Q9(r,s.getCursorStates())}}),ih(class extends Qc{constructor(){super({id:"editor.action.addCursorsToTop",label:v(0,"Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new uh(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),s=o.getCursorStates();n.length>0&&t.setSelections(n),Q9(s,o.getCursorStates())}}),ih(class extends Qc{constructor(){super({id:"editor.action.focusNextCursor",label:v(0,"Focus Next Cursor"),metadata:{description:v(0,"Focuses the next cursor"),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const o=Array.from(n.getCursorStates()),s=o.shift();s&&(o.push(s),n.setCursorStates(i.source,3,o),n.revealPrimaryCursor(i.source,!0),Q9(o,n.getCursorStates()))}}),ih(class extends Qc{constructor(){super({id:"editor.action.focusPreviousCursor",label:v(0,"Focus Previous Cursor"),metadata:{description:v(0,"Focuses the previous cursor"),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(e,t,i){if(!t.hasModel())return;const n=t._getViewModel();if(n.cursorConfig.readOnly)return;n.model.pushStackElement();const o=Array.from(n.getCursorStates()),s=o.pop();s&&(o.unshift(s),n.setCursorStates(i.source,3,o),n.revealPrimaryCursor(i.source,!0),Q9(o,n.getCursorStates()))}});const r7={Visible:new gc("parameterHintsVisible",!1),MultipleSignatures:new gc("parameterHintsMultipleSignatures",!1)};async function a7(e,t,i,n,o){const s=e.ordered(t);for(const e of s)try{const s=await e.provideSignatureHelp(t,i,o,n);if(s)return s}catch(e){Le(e)}}var l7;Id.registerCommand("_executeSignatureHelpProvider",(async(e,...t)=>{const[i,n,o]=t;xl(Po.isUri(i)),xl(wd.isIPosition(n)),xl("string"==typeof o||!o);const s=e.get(Pk),r=await e.get(yd).createModelReference(i);try{const e=await a7(s.signatureHelpProvider,r.object.textEditorModel,wd.lift(n),{triggerKind:NC.Invoke,isRetrigger:!1,triggerCharacter:o},At.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}})),function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(l7||(l7={}));class d7 extends lt{constructor(e,t,i=d7.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new kt),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=l7.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new dt),this.triggerChars=new Jw,this.retriggerChars=new Jw,this.triggerId=0,this.editor=e,this.providers=t,this.throttledDelayer=new zt(i),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=l7.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!this.providers.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(xe)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(86).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new l7.Active({...this.state.hints,activeSignature:e}),this._onChangedHints.fire(this.state.hints))}async doTrigger(e){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(c7);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),r=this.editor.getPosition();this.state=new l7.Pending(Wt((e=>a7(this.providers,s,r,o,e))),i);try{const t=await this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new l7.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=l7.Default),xe(t),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const e=this.editor.getModel();if(e)for(const t of this.providers.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])if(e.length){const t=e.charCodeAt(0);this.triggerChars.add(t),this.retriggerChars.add(t)}for(const e of t.signatureHelpRetriggerCharacters||[])e.length&&this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:NC.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:NC.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:NC.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function c7(e,t){switch(t.triggerKind){case NC.Invoke:return t;case NC.ContentChange:return e;case NC.TriggerCharacter:default:return t}}d7.DEFAULT_DELAY=120;var h7=i(6867),u7={};u7.styleTagTransform=Gr(),u7.setAttributes=Kr(),u7.insert=zr().bind(null,"head"),u7.domAPI=Vr(),u7.insertStyleElement=qr(),Br()(h7.Z,u7),h7.Z&&h7.Z.locals&&h7.Z.locals;var g7,p7=function(e,t){return function(i,n){t(i,n,e)}};const m7=Sr,f7=Xz("parameter-hints-next",Ml.chevronDown,v(0,"Icon for show next parameter hint.")),_7=Xz("parameter-hints-previous",Ml.chevronUp,v(0,"Icon for show previous parameter hint."));let v7=g7=class extends lt{constructor(e,t,i,n,o,s){super(),this.editor=e,this.model=t,this.telemetryService=s,this.renderDisposeables=this._register(new at),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new NL({editor:e},o,n)),this.keyVisible=r7.Visible.bindTo(i),this.keyMultipleSignatures=r7.MultipleSignatures.bindTo(i)}createParameterHintDOMNodes(){const e=m7(".editor-widget.parameter-hints-widget"),t=_r(e,m7(".phwrapper"));t.tabIndex=-1;const i=_r(t,m7(".controls")),n=_r(i,m7(".button"+Rl.asCSSSelector(_7))),o=_r(i,m7(".overloads")),s=_r(i,m7(".button"+Rl.asCSSSelector(f7)));this._register(ws(n,"click",(e=>{pr(e),this.previous()}))),this._register(ws(s,"click",(e=>{pr(e),this.next()})));const r=m7(".body"),a=new PN(r,{alwaysConsumeMouseWheel:!0});this._register(a),t.appendChild(a.getDomNode());const l=_r(r,m7(".signature")),d=_r(r,m7(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:l,overloads:o,docs:d,scrollbar:a},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const c=()=>{if(!this.domNodes)return;const e=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${e.fontSize}px`,this.domNodes.element.style.lineHeight=""+e.lineHeight/e.fontSize};c(),this._register(_t.chain(this.editor.onDidChangeConfiguration.bind(this.editor),(e=>e.filter((e=>e.hasChanged(50)))))(c)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{var e;null===(e=this.domNodes)||void 0===e||e.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){var e;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,null===(e=this.domNodes)||void 0===e||e.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const n=e.signatures[e.activeSignature];if(!n)return;const o=_r(this.domNodes.signature,m7(".code")),s=this.editor.getOption(50);o.style.fontSize=`${s.fontSize}px`,o.style.fontFamily=s.fontFamily;const r=n.parameters.length>0,a=null!==(t=n.activeParameter)&&void 0!==t?t:e.activeParameter;r?this.renderParameters(o,n,a):_r(o,m7("span")).textContent=n.label;const l=n.parameters[a];if(null==l?void 0:l.documentation){const e=m7("span.documentation");if("string"==typeof l.documentation)e.textContent=l.documentation;else{const t=this.renderMarkdownDocs(l.documentation);e.appendChild(t.element)}_r(this.domNodes.docs,m7("p",{},e))}if(void 0===n.documentation);else if("string"==typeof n.documentation)_r(this.domNodes.docs,m7("p",{},n.documentation));else{const e=this.renderMarkdownDocs(n.documentation);_r(this.domNodes.docs,e.element)}const d=this.hasDocs(n,l);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,l){let e="";const t=n.parameters[a];e=Array.isArray(t.label)?n.label.substring(t.label[0],t.label[1]):t.label,t.documentation&&(e+="string"==typeof t.documentation?`, ${t.documentation}`:`, ${t.documentation.value}`),n.documentation&&(e+="string"==typeof n.documentation?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==e&&(na(v(0,"{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=new ft,i=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));i.element.classList.add("markdown-docs");const n=t.elapsed();return n>300&&this.telemetryService.publicLog2("parameterHints.parseMarkdown",{renderDuration:n}),i}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&Ll(t.documentation).length>0||t&&"object"==typeof t.documentation&&Ll(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&Ll(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&Ll(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),s=document.createElement("span");s.textContent=t.label.substring(0,n);const r=document.createElement("span");r.textContent=t.label.substring(n,o),r.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),_r(e,s,r,a)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${hn(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return g7.ID}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};v7.ID="editor.widget.parameterHintsWidget",v7=g7=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([p7(2,pc),p7(3,LL),p7(4,Mu),p7(5,Vc)],v7),Tm("editorHoverWidget.highlightForeground",{dark:dv,light:dv,hcDark:dv,hcLight:dv},v(0,"Foreground color of the active item in the parameter hint."));var b7,w7=function(e,t){return function(i,n){t(i,n,e)}};let C7=b7=class extends lt{static get(e){return e.getContribution(b7.ID)}constructor(e,t,i){super(),this.editor=e,this.model=this._register(new d7(e,i.signatureHelpProvider)),this._register(this.model.onChangedHints((e=>{var t;e?(this.widget.value.show(),this.widget.value.render(e)):null===(t=this.widget.rawValue)||void 0===t||t.hide()}))),this.widget=new sn((()=>this._register(t.createInstance(v7,this.editor,this.model))))}cancel(){this.model.cancel()}previous(){var e;null===(e=this.widget.rawValue)||void 0===e||e.previous()}next(){var e;null===(e=this.widget.rawValue)||void 0===e||e.next()}trigger(e){this.model.trigger(e,0)}};C7.ID="editor.controller.parameterHints",C7=b7=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([w7(1,_d),w7(2,Pk)],C7),oh(C7.ID,C7,2),ih(class extends Qc{constructor(){super({id:"editor.action.triggerParameterHints",label:v(0,"Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:gh.hasSignatureHelpProvider,kbOpts:{kbExpr:gh.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=C7.get(t);null==i||i.trigger({triggerKind:NC.Invoke})}});const y7=Yc.bindToContribution(C7.get);th(new y7({id:"closeParameterHints",precondition:r7.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:gh.focus,primary:9,secondary:[1033]}})),th(new y7({id:"showPrevParameterHint",precondition:$d.and(r7.Visible,r7.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:gh.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),th(new y7({id:"showNextParameterHint",precondition:$d.and(r7.Visible,r7.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:gh.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));class S7{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(e,t){const i=this.computeEmbedding(e),n=new Map,o=[];for(const[e,s]of this.documents){if(t.isCancellationRequested)return[];for(const t of s.chunks){const s=this.computeSimilarityScore(t,i,n);s>0&&o.push({key:e,score:s})}}return o}static termFrequencies(e){return function(e){var t;const i=new Map;for(const n of e)i.set(n,(null!==(t=i.get(n))&&void 0!==t?t:0)+1);return i}(S7.splitTerms(e))}static*splitTerms(e){const t=e=>e.toLowerCase();for(const[i]of e.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield t(i);const e=i.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(e.length>1)for(const i of e)i.length>2&&/\p{Letter}{3,}/gu.test(i)&&(yield t(i))}}updateDocuments(e){var t;for(const{key:t}of e)this.deleteDocument(t);for(const i of e){const e=[];for(const n of i.textChunks){const i=S7.termFrequencies(n);for(const e of i.keys())this.chunkOccurrences.set(e,(null!==(t=this.chunkOccurrences.get(e))&&void 0!==t?t:0)+1);e.push({text:n,tf:i})}this.chunkCount+=e.length,this.documents.set(i.key,{chunks:e})}return this}deleteDocument(e){const t=this.documents.get(e);if(t){this.documents.delete(e),this.chunkCount-=t.chunks.length;for(const e of t.chunks)for(const t of e.tf.keys()){const e=this.chunkOccurrences.get(t);if("number"==typeof e){const i=e-1;i<=0?this.chunkOccurrences.delete(t):this.chunkOccurrences.set(t,i)}}}}computeSimilarityScore(e,t,i){let n=0;for(const[o,s]of Object.entries(t)){const t=e.tf.get(o);if(!t)continue;let r=i.get(o);"number"!=typeof r&&(r=this.computeIdf(o),i.set(o,r)),n+=t*r*s}return n}computeEmbedding(e){const t=S7.termFrequencies(e);return this.computeTfidf(t)}computeIdf(e){var t;const i=null!==(t=this.chunkOccurrences.get(e))&&void 0!==t?t:0;return i>0?Math.log((this.chunkCount+1)/i):0}computeTfidf(e){const t=Object.create(null);for(const[i,n]of e){const e=this.computeIdf(i);e>0&&(t[i]=n*e)}return t}}const k7=vd("dialogService");var x7;function L7(e){const t=e;return Array.isArray(t.items)}function D7(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(x7||(x7={}));class E7 extends lt{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t,i){var n;const o=new at;let s;e.canAcceptInBackground=!!(null===(n=this.options)||void 0===n?void 0:n.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const r=o.add(new dt),a=async()=>{var n;const o=r.value=new at;null==s||s.dispose(!0),e.busy=!1,s=new Pt(t);const a=s.token;let l=e.value.substring(this.prefix.length);(null===(n=this.options)||void 0===n?void 0:n.shouldSkipTrimPickFilter)||(l=l.trim());const d=this._getPicks(l,o,a,i),c=(t,i)=>{var n;let o,s;if(L7(t)?(o=t.items,s=t.active):o=t,0===o.length){if(i)return!1;(l.length>0||e.hideInput)&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(o=Dl(this.options.noResultsPick)?[this.options.noResultsPick(l)]:[this.options.noResultsPick])}return e.items=o,s&&(e.activeItems=[s]),!0},h=async t=>{let i=!1,n=!1;await Promise.all([(async()=>{"number"==typeof t.mergeDelay&&(await Kt(t.mergeDelay),a.isCancellationRequested)||n||(i=c(t.picks,!0))})(),(async()=>{e.busy=!0;try{const n=await t.additionalPicks;if(a.isCancellationRequested)return;let o,s,r,l;if(L7(t.picks)?(o=t.picks.items,s=t.picks.active):o=t.picks,L7(n)?(r=n.items,l=n.active):r=n,r.length>0||!i){let t;if(!s&&!l){const i=e.activeItems[0];i&&-1!==o.indexOf(i)&&(t=i)}c({items:[...o,...r],active:s||l||t})}}finally{a.isCancellationRequested||(e.busy=!1),n=!0}})()])};if(null===d);else if(D7(d))await h(d);else if(d instanceof Promise){e.busy=!0;try{const e=await d;if(a.isCancellationRequested)return;D7(e)?await h(e):c(e)}finally{a.isCancellationRequested||(e.busy=!1)}}else c(d)};o.add(e.onDidChangeValue((()=>a()))),a(),o.add(e.onDidAccept((t=>{var n;if(null==i?void 0:i.handleAccept)return t.inBackground||e.hide(),void(null===(n=i.handleAccept)||void 0===n||n.call(i,e.activeItems[0]));const[o]=e.selectedItems;"function"==typeof(null==o?void 0:o.accept)&&(t.inBackground||e.hide(),o.accept(e.keyMods,t))})));const l=async(i,n)=>{var o,s;if("function"!=typeof n.trigger)return;const r=null!==(s=null===(o=n.buttons)||void 0===o?void 0:o.indexOf(i))&&void 0!==s?s:-1;if(r>=0){const i=n.trigger(r,e.keyMods),o="number"==typeof i?i:await i;if(t.isCancellationRequested)return;switch(o){case x7.NO_ACTION:break;case x7.CLOSE_PICKER:e.hide();break;case x7.REFRESH_PICKER:a();break;case x7.REMOVE_ITEM:{const t=e.items.indexOf(n);if(-1!==t){const i=e.items.slice(),n=i.splice(t,1),o=e.activeItems.filter((e=>e!==n[0])),s=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=i,o&&(e.activeItems=o),e.keepScrollPosition=s}break}}}};return o.add(e.onDidTriggerItemButton((({button:e,item:t})=>l(e,t)))),o.add(e.onDidTriggerSeparatorButton((({button:e,separator:t})=>l(e,t)))),o}}var N7,I7,T7=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},M7=function(e,t){return function(i,n){t(i,n,e)}};let A7=N7=class extends E7{constructor(e,t,i,n,o,s){super(N7.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(R7)),this.options=e}async _getPicks(e,t,i,n){var o,s,r,a;const l=await this.getCommandPicks(i);if(i.isCancellationRequested)return[];const d=Ye((()=>{const t=new S7;return t.updateDocuments(l.map((e=>({key:e.commandId,textChunks:[this.getTfIdfChunk(e)]})))),function(e){var t,i;const n=e.slice(0);n.sort(((e,t)=>t.score-e.score));const o=null!==(i=null===(t=n[0])||void 0===t?void 0:t.score)&&void 0!==i?i:0;if(o>0)for(const e of n)e.score/=o;return n}(t.calculateScores(e,i)).filter((e=>e.score>N7.TFIDF_THRESHOLD)).slice(0,N7.TFIDF_MAX_RESULTS)})),c=[];for(const t of l){const n=null!==(o=N7.WORD_FILTER(e,t.label))&&void 0!==o?o:void 0,r=t.commandAlias&&null!==(s=N7.WORD_FILTER(e,t.commandAlias))&&void 0!==s?s:void 0;if(n||r)t.highlights={label:n,detail:this.options.showAlias?r:void 0},c.push(t);else if(e===t.commandId)c.push(t);else if(e.length>=3){const e=d();if(i.isCancellationRequested)return[];const n=e.find((e=>e.key===t.commandId));n&&(t.tfIdfScore=n.score,c.push(t))}}const h=new Map;for(const e of c){const t=h.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):h.set(e.label,e)}c.sort(((e,t)=>{if(e.tfIdfScore&&t.tfIdfScore)return e.tfIdfScore===t.tfIdfScore?e.label.localeCompare(t.label):t.tfIdfScore-e.tfIdfScore;if(e.tfIdfScore)return 1;if(t.tfIdfScore)return-1;const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);if(i&&n)return i>n?-1:1;if(i)return-1;if(n)return 1;if(this.options.suggestedCommandIds){const i=this.options.suggestedCommandIds.has(e.commandId),n=this.options.suggestedCommandIds.has(t.commandId);if(i&&n)return 0;if(i)return-1;if(n)return 1}return e.label.localeCompare(t.label)}));const u=[];let g=!1,p=!0,m=!!this.options.suggestedCommandIds;for(let e=0;e{var t;const o=await this.getAdditionalCommandPicks(l,c,e,i);if(i.isCancellationRequested)return[];const s=o.map((e=>this.toCommandPick(e,n)));return p&&"separator"!==(null===(t=s[0])||void 0===t?void 0:t.type)&&s.unshift({type:"separator",label:v(0,"similar commands")}),s})()}:u}toCommandPick(e,t){if("separator"===e.type)return e;const i=this.keybindingService.lookupKeybinding(e.commandId),n=i?v(0,"{0}, {1}",e.label,i.getAriaLabel()):e.label;return{...e,ariaLabel:n,detail:this.options.showAlias&&e.commandAlias!==e.label?e.commandAlias:void 0,keybinding:i,accept:async()=>{var i,n;this.commandsHistory.push(e.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.commandId,from:null!==(i=null==t?void 0:t.from)&&void 0!==i?i:"quick open"});try{(null===(n=e.args)||void 0===n?void 0:n.length)?await this.commandService.executeCommand(e.commandId,...e.args):await this.commandService.executeCommand(e.commandId)}catch(t){Ne(t)||this.dialogService.error(v(0,"Command '{0}' resulted in an error",e.label),aD(t))}}}}getTfIdfChunk({label:e,commandAlias:t,commandDescription:i}){let n=e;return t&&t!==e&&(n+=` - ${t}`),i&&i.value!==e&&(n+=` - ${i.value===i.original?i.value:`${i.value} (${i.original})`}`),n}};A7.PREFIX=">",A7.TFIDF_THRESHOLD=.5,A7.TFIDF_MAX_RESULTS=5,A7.WORD_FILTER=ya(Sa,(function(e,t,i=!1){if(!t||0===t.length)return null;let n=null,o=0;for(e=e.toLowerCase(),t=t.toLowerCase();othis.updateConfiguration(e)))),this._register(this.storageService.onWillSaveState((e=>{e.reason===bW.SHUTDOWN&&this.saveState()})))}updateConfiguration(e){e&&!e.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=I7.getConfiguredCommandHistoryLength(this.configurationService),I7.cache&&I7.cache.limit!==this.configuredCommandsHistoryLength&&(I7.cache.limit=this.configuredCommandsHistoryLength,I7.hasChanges=!0))}load(){const e=this.storageService.get(I7.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch(e){this.logService.error(`[CommandsHistory] invalid data: ${e}`)}const i=I7.cache=new ua(this.configuredCommandsHistoryLength,1);if(t){let e;e=t.usesLRU?t.entries:t.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>i.set(e.key,e.value)))}I7.counter=this.storageService.getNumber(I7.PREF_KEY_COUNTER,0,I7.counter)}push(e){I7.cache&&(I7.cache.set(e,I7.counter++),I7.hasChanges=!0)}peek(e){var t;return null===(t=I7.cache)||void 0===t?void 0:t.peek(e)}saveState(){if(!I7.cache)return;if(!I7.hasChanges)return;const e={usesLRU:!0,entries:[]};I7.cache.forEach(((t,i)=>e.entries.push({key:i,value:t}))),this.storageService.store(I7.PREF_KEY_CACHE,JSON.stringify(e),0,0),this.storageService.store(I7.PREF_KEY_COUNTER,I7.counter,0,0),I7.hasChanges=!1}static getConfiguredCommandHistoryLength(e){var t,i;const n=null===(i=null===(t=e.getValue().workbench)||void 0===t?void 0:t.commandPalette)||void 0===i?void 0:i.history;return"number"==typeof n?n:I7.DEFAULT_COMMANDS_HISTORY_LENGTH}};R7.DEFAULT_COMMANDS_HISTORY_LENGTH=50,R7.PREF_KEY_CACHE="commandPalette.mru.cache",R7.PREF_KEY_COUNTER="commandPalette.mru.counter",R7.counter=1,R7.hasChanges=!1,R7=I7=T7([M7(0,vW),M7(1,Cg),M7(2,Hc)],R7);class P7 extends A7{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s)}getCodeEditorCommandPicks(){var e;const t=this.activeTextEditorControl;if(!t)return[];const i=[];for(const o of t.getSupportedActions()){let t;(null===(e=o.metadata)||void 0===e?void 0:e.description)&&(t=(n=o.metadata.description)&&"object"==typeof n&&"string"==typeof n.original&&"string"==typeof n.value?o.metadata.description:{original:o.metadata.description,value:o.metadata.description}),i.push({commandId:o.id,commandAlias:o.alias,commandDescription:t,label:Wl(o.label)||o.id})}var n;return i}}var O7=function(e,t){return function(i,n){t(i,n,e)}};let F7=class extends P7{get activeTextEditorControl(){var e;return null!==(e=this.codeEditorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}constructor(e,t,i,n,o,s){super({showAlias:!1},e,i,n,o,s),this.codeEditorService=t}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};F7=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([O7(0,_d),O7(1,bd),O7(2,uD),O7(3,Nd),O7(4,Vc),O7(5,k7)],F7);class B7 extends Qc{constructor(){super({id:B7.ID,label:c4.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:gh.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(KL).quickAccess.show(F7.PREFIX)}}B7.ID="editor.action.quickCommand",ih(B7),xc.as(r4).registerQuickAccessProvider({ctor:F7,prefix:F7.PREFIX,helpEntries:[{description:c4.quickCommandHelp,commandId:B7.ID}]});var W7,V7=function(e,t){return function(i,n){t(i,n,e)}};let H7=W7=class{constructor(e,t){this.quickInputService=e,this.keybindingService=t,this.registry=xc.as(r4)}provide(e){const t=new at;return t.add(e.onDidAccept((()=>{const[t]=e.selectedItems;t&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),t.add(e.onDidChangeValue((e=>{const t=this.registry.getQuickAccessProvider(e.substr(W7.PREFIX.length));t&&t.prefix&&t.prefix!==W7.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})}))),e.items=this.getQuickAccessProviders().filter((e=>e.prefix!==W7.PREFIX)),t}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))).flatMap((e=>this.createPicks(e)))}createPicks(e){return e.helpEntries.map((t=>{const i=t.prefix||e.prefix,n=i||"…";return{prefix:i,label:n,keybinding:t.commandId?this.keybindingService.lookupKeybinding(t.commandId):void 0,ariaLabel:v(0,"{0}, {1}",n,t.description),description:t.description}}))}};H7.PREFIX="?",H7=W7=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([V7(0,KL),V7(1,uD)],H7),xc.as(r4).registerQuickAccessProvider({ctor:H7,prefix:"",helpEntries:[{description:d4.helpQuickAccessActionLabel}]});const z7=[void 0,[]];function U7(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?function(e,t,i,n){let o=0;const s=[];for(const r of t){const[t,a]=K7(e,r,i,n);if("number"!=typeof t)return z7;o+=t,s.push(...a)}return[o,j7(s)]}(e,o.values,i,n):K7(e,t,i,n)}function K7(e,t,i,n){const o=ul(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],Ya(o)]:z7}function j7(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(s=e,(o=n).end=0,r=q7(e);let a;const l=e.split($7);if(l.length>1)for(const e of l){const t=q7(e),{pathNormalized:i,normalized:n,normalizedLowercase:o}=Z7(e);n&&(a||(a=[]),a.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:i,normalized:n,normalizedLowercase:o,expectContiguousMatch:t}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:a,containsPathSeparator:s,expectContiguousMatch:r}}function Z7(e){let t;t=U?e.replace(/\//g,Eo):e.replace(/\\/g,Eo);const i=(n=t,n.replace(/\*/g,"")).replace(/\s|"/g,"");var n;return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function Y7(e){return Array.isArray(e)?G7(e.map((e=>e.original)).join($7)):G7(e.original)}var Q7,X7=function(e,t){return function(i,n){t(i,n,e)}};let J7=Q7=class extends n4{constructor(e,t,i=Object.create(null)){super(i),this._languageFeaturesService=e,this._outlineModelService=t,this.options=i,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,v(0,"To go to a symbol, first open a text editor with symbol information.")),lt.None}provideWithTextEditor(e,t,i,n){const o=e.editor,s=this.getModel(o);return s?this._languageFeaturesService.documentSymbolProvider.has(s)?this.doProvideWithEditorSymbols(e,s,t,i,n):this.doProvideWithoutEditorSymbols(e,s,t,i):lt.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new at;return this.provideLabelPick(i,v(0,"The active text editor does not provide symbol information.")),(async()=>{await this.waitForLanguageSymbolRegistry(t,o)&&!n.isCancellationRequested&&o.add(this.doProvideWithEditorSymbols(e,t,i,n))})(),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}async waitForLanguageSymbolRegistry(e,t){if(this._languageFeaturesService.documentSymbolProvider.has(e))return!0;const i=new ei,n=t.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>{this._languageFeaturesService.documentSymbolProvider.has(e)&&(n.dispose(),i.complete(!0))})));return t.add(rt((()=>i.complete(!1)))),i.p}doProvideWithEditorSymbols(e,t,i,n,o){var s;const r=e.editor,a=new at;a.add(i.onDidAccept((t=>{var n;const[s]=i.selectedItems;s&&s.range&&(this.gotoLocation(e,{range:s.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),null===(n=null==o?void 0:o.handleAccept)||void 0===n||n.call(o,s),t.inBackground||i.hide())}))),a.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const l=this.getDocumentSymbols(t,n);let d;const c=async e=>{null==d||d.dispose(!0),i.busy=!1,d=new Pt(n),i.busy=!0;try{const o=G7(i.value.substr(Q7.PREFIX.length).trim()),s=await this.doGetSymbolPicks(l,o,void 0,d.token,t);if(n.isCancellationRequested)return;if(s.length>0){if(i.items=s,e&&0===o.original.length){const t=yu(s,(t=>Boolean("separator"!==t.type&&t.range&&hh.containsPosition(t.range.decoration,e))));t&&(i.activeItems=[t])}}else o.original.length>0?this.provideLabelPick(i,v(0,"No matching editor symbols")):this.provideLabelPick(i,v(0,"No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}};return a.add(i.onDidChangeValue((()=>c(void 0)))),c(null===(s=r.getSelection())||void 0===s?void 0:s.getPosition()),a.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;e&&e.range&&(r.revealRangeInCenter(e.range.selection,0),this.addDecorations(r,e.range.decoration))}))),a}async doGetSymbolPicks(e,t,i,n,o){var s,r;const a=await e;if(n.isCancellationRequested)return[];const l=0===t.original.indexOf(Q7.SCOPE_PREFIX),d=l?1:0;let c,h,u;t.values&&t.values.length>1?(c=Y7(t.values[0]),h=Y7(t.values.slice(1))):c=t;const g=null===(r=null===(s=this.options)||void 0===s?void 0:s.openSideBySideDirection)||void 0===r?void 0:r.call(s);g&&(u=[{iconClass:"right"===g?Rl.asClassName(Ml.splitHorizontal):Rl.asClassName(Ml.splitVertical),tooltip:v(0,"right"===g?"Open to the Side":"Open to the Bottom")}]);const p=[];for(let w=0;wd){let T=!1;if(c!==t&&([x,L]=U7(S,{...t,values:void 0},d,k),"number"==typeof x&&(T=!0)),"number"!=typeof x&&([x,L]=U7(S,c,d,k),"number"!=typeof x))continue;if(!T&&h){if(N&&h.original.length>0&&([D,E]=U7(N,h)),"number"!=typeof D)continue;"number"==typeof x&&(x+=D)}}const I=C.tags&&C.tags.indexOf(1)>=0;p.push({index:w,kind:C.kind,score:x,label:S,ariaLabel:(m=C.name,f=C.kind,v(0,"{0} ({1})",m,AC[f])),description:N,highlights:I?void 0:{label:L,description:E},range:{selection:hh.collapseToStart(C.selectionRange),decoration:C.range},uri:o.uri,symbolName:y,strikethrough:I,buttons:u})}var m,f;const _=p.sort(((e,t)=>l?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let b=[];if(l){let M,A,R=0;function P(){A&&"number"==typeof M&&R>0&&(A.label=dn(t8[M]||e8,R))}for(const O of _)M!==O.kind?(P(),M=O.kind,R=1,A={type:"separator"},b.push(A)):R++,b.push(O);P()}else _.length>0&&(b=[{label:v(0,"symbols ({0})",p.length),type:"separator"},..._]);return b}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=t8[e.kind]||e8,n=t8[t.kind]||e8,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}async getDocumentSymbols(e,t){const i=await this._outlineModelService.getOrCreate(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}};J7.PREFIX="@",J7.SCOPE_PREFIX=":",J7.PREFIX_BY_CATEGORY=`${Q7.PREFIX}${Q7.SCOPE_PREFIX}`,J7=Q7=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([X7(0,Pk),X7(1,wJ)],J7);const e8=v(0,"properties ({0})"),t8={5:v(0,"methods ({0})"),11:v(0,"functions ({0})"),8:v(0,"constructors ({0})"),12:v(0,"variables ({0})"),4:v(0,"classes ({0})"),22:v(0,"structs ({0})"),23:v(0,"events ({0})"),24:v(0,"operators ({0})"),10:v(0,"interfaces ({0})"),2:v(0,"namespaces ({0})"),3:v(0,"packages ({0})"),25:v(0,"type parameters ({0})"),1:v(0,"modules ({0})"),6:v(0,"properties ({0})"),9:v(0,"enumerations ({0})"),21:v(0,"enumeration members ({0})"),14:v(0,"strings ({0})"),0:v(0,"files ({0})"),17:v(0,"arrays ({0})"),15:v(0,"numbers ({0})"),16:v(0,"booleans ({0})"),18:v(0,"objects ({0})"),19:v(0,"keys ({0})"),7:v(0,"fields ({0})"),13:v(0,"constants ({0})")};var i8=function(e,t){return function(i,n){t(i,n,e)}};let n8=class extends J7{constructor(e,t,i){super(t,i),this.editorService=e,this.onDidActiveTextEditorControlChange=_t.None}get activeTextEditorControl(){var e;return null!==(e=this.editorService.getFocusedCodeEditor())&&void 0!==e?e:void 0}};n8=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([i8(0,bd),i8(1,Pk),i8(2,wJ)],n8);class o8 extends Qc{constructor(){super({id:o8.ID,label:h4.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:gh.hasDocumentSymbolProvider,kbOpts:{kbExpr:gh.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(KL).quickAccess.show(J7.PREFIX,{itemActivation:zL.NONE})}}o8.ID="editor.action.quickOutline",ih(o8),xc.as(r4).registerQuickAccessProvider({ctor:n8,prefix:J7.PREFIX,helpEntries:[{description:h4.quickOutlineActionLabel,prefix:J7.PREFIX,commandId:o8.ID},{description:h4.quickOutlineByCategoryActionLabel,prefix:J7.PREFIX_BY_CATEGORY}]});class s8 extends lt{constructor(e){super(),this.editor=e,this._register(this.editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit())))}_onDidAttemptReadOnlyEdit(){const e=RL.get(this.editor);if(e&&this.editor.hasModel()){let t=this.editor.getOptions().get(92);t||(t=this.editor.isSimpleWidget?new dd(v(0,"Cannot edit in read-only input")):new dd(v(0,"Cannot edit in read-only editor"))),e.showMessage(t,this.editor.getPosition())}}}s8.ID="editor.contrib.readOnlyMessageController",oh(s8.ID,s8,2);var r8=function(e,t){return function(i,n){t(i,n,e)}};let a8=class extends WZ{constructor(e,t,i,n,o,s,r){super(!0,e,t,i,n,o,s,r)}};a8=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([r8(1,pc),r8(2,bd),r8(3,fD),r8(4,_d),r8(5,vW),r8(6,Cg)],a8),oh(WZ.ID,a8,4);var l8=i(871),d8={};d8.styleTagTransform=Gr(),d8.setAttributes=Kr(),d8.insert=zr().bind(null,"head"),d8.domAPI=Vr(),d8.insertStyleElement=qr(),Br()(l8.Z,d8),l8.Z&&l8.Z.locals&&l8.Z.locals;var c8=function(e,t){return function(i,n){t(i,n,e)}};const h8=new gc("renameInputVisible",!1,v(0,"Whether the rename input widget is visible"));new gc("renameInputFocused",!1,v(0,"Whether the rename input widget is focused"));let u8=class{constructor(e,t,i,n,o,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._logService=s,this.allowEditorOverflow=!0,this._disposables=new at,this._visibleContextKey=h8.bindTo(o),this._isEditingRenameCandidate=!1,this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,this._candidates=new Set,this._beforeFirstInputFieldEditSW=new ft,this._inputWithButton=new p8,this._disposables.add(this._inputWithButton),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputWithButton.domNode),this._renameCandidateListView=this._disposables.add(new g8(this._domNode,{fontInfo:this._editor.getOption(50),onFocusChange:e=>{this._inputWithButton.input.value=e,this._isEditingRenameCandidate=!1},onSelectionChange:()=>{this._isEditingRenameCandidate=!1,this.acceptInput(!1)}})),this._disposables.add(this._inputWithButton.onDidInputChange((()=>{var e,t,i,n;void 0!==(null===(e=this._renameCandidateListView)||void 0===e?void 0:e.focusedCandidate)&&(this._isEditingRenameCandidate=!0),null!==(t=this._timeBeforeFirstInputFieldEdit)&&void 0!==t||(this._timeBeforeFirstInputFieldEdit=this._beforeFirstInputFieldEditSW.elapsed()),!1===(null===(i=this._renameCandidateProvidersCts)||void 0===i?void 0:i.token.isCancellationRequested)&&this._renameCandidateProvidersCts.cancel(),null===(n=this._renameCandidateListView)||void 0===n||n.clearFocus()}))),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(e){var t,i,n,o,s;if(!this._domNode)return;const r=e.getColor(Wf),a=e.getColor(Vf);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(nf))&&void 0!==t?t:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.border=a?`1px solid ${a}`:"",this._domNode.style.color=String(null!==(i=e.getColor(p_))&&void 0!==i?i:"");const l=e.getColor(m_);this._inputWithButton.domNode.style.backgroundColor=String(null!==(n=e.getColor(g_))&&void 0!==n?n:""),this._inputWithButton.input.style.backgroundColor=String(null!==(o=e.getColor(g_))&&void 0!==o?o:""),this._inputWithButton.domNode.style.borderWidth=l?"1px":"0px",this._inputWithButton.domNode.style.borderStyle=l?"solid":"none",this._inputWithButton.domNode.style.borderColor=null!==(s=null==l?void 0:l.toString())&&void 0!==s?s:"none"}_updateFont(){if(void 0===this._domNode)return;xl(void 0!==this._label,"RenameWidget#_updateFont: _label must not be undefined given _domNode is defined"),this._editor.applyFontInfo(this._inputWithButton.input);const e=this._editor.getOption(50);this._label.style.fontSize=`${this._computeLabelFontSize(e.fontSize)}px`}_computeLabelFontSize(e){return.8*e}getPosition(){if(!this._visible)return null;if(!this._editor.hasModel()||!this._editor.getDomNode())return null;const e=Is(this.getDomNode().ownerDocument.body),t=Rs(this._editor.getDomNode()),i=this._getTopForPosition();this._nPxAvailableAbove=i+t.top,this._nPxAvailableBelow=e.height-this._nPxAvailableAbove;const n=this._editor.getOption(67),{totalHeight:o}=m8.getLayoutInfo({lineHeight:n}),s=this._nPxAvailableBelow>6*o?[2,1]:[1,2];return{position:this._position,preference:s}}beforeRender(){var e,t;const[i,n]=this._acceptKeybindings;return this._label.innerText=v(0,"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(n))||void 0===t?void 0:t.getLabel()),this._domNode.style.minWidth="200px",null}afterRender(e){if(this._trace("invoking afterRender, position: ",e?"not null":"null"),null===e)return void this.cancelInput(!0,"afterRender (because position is null)");if(!this._editor.hasModel()||!this._editor.getDomNode())return;xl(this._renameCandidateListView),xl(void 0!==this._nPxAvailableAbove),xl(void 0!==this._nPxAvailableBelow);const t=Ws(this._inputWithButton.domNode),i=Ws(this._label);let n;n=2===e?this._nPxAvailableBelow:this._nPxAvailableAbove,this._renameCandidateListView.layout({height:n-i-t,width:Os(this._inputWithButton.domNode)})}acceptInput(e){var t;this._trace("invoking acceptInput"),null===(t=this._currentAcceptInput)||void 0===t||t.call(this,e)}cancelInput(e,t){var i;this._trace(`invoking cancelInput, caller: ${t}, _currentCancelInput: ${this._currentAcceptInput?"not undefined":"undefined"}`),null===(i=this._currentCancelInput)||void 0===i||i.call(this,e)}focusNextRenameSuggestion(){var e;(null===(e=this._renameCandidateListView)||void 0===e?void 0:e.focusNext())||(this._inputWithButton.input.value=this._currentName)}focusPreviousRenameSuggestion(){var e;(null===(e=this._renameCandidateListView)||void 0===e?void 0:e.focusPrevious())||(this._inputWithButton.input.value=this._currentName)}getInput(e,t,i,n,o){const{start:s,end:r}=this._getSelection(e,t);this._renameCts=o;const a=new at;this._nRenameSuggestionsInvocations=0,this._hadAutomaticRenameSuggestionsInvocation=!1,void 0===n?this._inputWithButton.button.style.display="none":(this._inputWithButton.button.style.display="flex",this._requestRenameCandidatesOnce=n,this._requestRenameCandidates(t,!1),a.add(ws(this._inputWithButton.button,"click",(()=>this._requestRenameCandidates(t,!0)))),a.add(ws(this._inputWithButton.button,ur.KEY_DOWN,(e=>{const i=new Ke(e);(i.equals(3)||i.equals(10))&&(i.stopPropagation(),i.preventDefault(),this._requestRenameCandidates(t,!0))})))),this._isEditingRenameCandidate=!1,this._domNode.classList.toggle("preview",i),this._position=new wd(e.startLineNumber,e.startColumn),this._currentName=t,this._inputWithButton.input.value=t,this._inputWithButton.input.setAttribute("selectionStart",s.toString()),this._inputWithButton.input.setAttribute("selectionEnd",r.toString()),this._inputWithButton.input.size=Math.max(1.1*(e.endColumn-e.startColumn),20),this._beforeFirstInputFieldEditSW.reset(),a.add(rt((()=>{this._renameCts=void 0,o.dispose(!0)}))),a.add(rt((()=>{void 0!==this._renameCandidateProvidersCts&&(this._renameCandidateProvidersCts.dispose(!0),this._renameCandidateProvidersCts=void 0)}))),a.add(rt((()=>this._candidates.clear())));const l=new ei;return l.p.finally((()=>{a.dispose(),this._hide()})),this._currentCancelInput=e=>{var t;return this._trace("invoking _currentCancelInput"),this._currentAcceptInput=void 0,this._currentCancelInput=void 0,null===(t=this._renameCandidateListView)||void 0===t||t.clearCandidates(),l.complete(e),!0},this._currentAcceptInput=e=>{this._trace("invoking _currentAcceptInput"),xl(void 0!==this._renameCandidateListView);const n=this._renameCandidateListView.nCandidates;let o,s;const r=this._renameCandidateListView.focusedCandidate;void 0!==r?(this._trace("using new name from renameSuggestion"),o=r,s={k:"renameSuggestion"}):(this._trace("using new name from inputField"),o=this._inputWithButton.input.value,s=this._isEditingRenameCandidate?{k:"userEditedRenameSuggestion"}:{k:"inputField"}),o!==t&&0!==o.trim().length?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,this._renameCandidateListView.clearCandidates(),l.complete({newName:o,wantsPreview:i&&e,stats:{source:s,nRenameSuggestions:n,timeBeforeFirstInputFieldEdit:this._timeBeforeFirstInputFieldEdit,nRenameSuggestionsInvocations:this._nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:this._hadAutomaticRenameSuggestionsInvocation}})):this.cancelInput(!0,"_currentAcceptInput (because newName === value || newName.trim().length === 0)")},a.add(o.token.onCancellationRequested((()=>this.cancelInput(!0,"cts.token.onCancellationRequested")))),a.add(this._editor.onDidBlurEditorWidget((()=>{var e;return this.cancelInput(!(null===(e=this._domNode)||void 0===e?void 0:e.ownerDocument.hasFocus()),"editor.onDidBlurEditorWidget")}))),this._show(),l.p}_requestRenameCandidates(e,t){if(void 0!==this._requestRenameCandidatesOnce&&(void 0!==this._renameCandidateProvidersCts&&this._renameCandidateProvidersCts.dispose(!0),xl(this._renameCts),"stop"!==this._inputWithButton.buttonState)){this._renameCandidateProvidersCts=new Pt;const i=t?OC.Invoke:OC.Automatic,n=this._requestRenameCandidatesOnce(i,this._renameCandidateProvidersCts.token);if(0===n.length)return void this._inputWithButton.setSparkleButton();t||(this._hadAutomaticRenameSuggestionsInvocation=!0),this._nRenameSuggestionsInvocations+=1,this._inputWithButton.setStopButton(),this._updateRenameCandidates(n,e,this._renameCts.token)}}_getSelection(e,t){xl(this._editor.hasModel());const i=this._editor.getSelection();let n=0,o=t.length;return hh.isEmpty(i)||hh.spansMultipleLines(i)||!hh.containsRange(e,i)||(n=Math.max(0,i.startColumn-e.startColumn),o=Math.min(e.endColumn,i.endColumn)-e.startColumn),{start:n,end:o}}_show(){this._trace("invoking _show"),this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._inputWithButton.input.focus(),this._inputWithButton.input.setSelectionRange(parseInt(this._inputWithButton.input.getAttribute("selectionStart")),parseInt(this._inputWithButton.input.getAttribute("selectionEnd")))}),100)}async _updateRenameCandidates(e,t,i){const n=(...e)=>this._trace("_updateRenameCandidates",...e);n("start");const o=await Vt(Promise.allSettled(e),i);if(this._inputWithButton.setSparkleButton(),void 0===o)return void n("returning early - received updateRenameCandidates results - undefined");const s=o.flatMap((e=>"fulfilled"===e.status&&Sl(e.value)?e.value:[]));n(`received updateRenameCandidates results - total (unfiltered) ${s.length} candidates.`);const r=Zh(s,(e=>e.newSymbolName));n(`distinct candidates - ${r.length} candidates.`);const a=r.filter((({newSymbolName:e})=>e.trim().length>0&&e!==this._inputWithButton.input.value&&e!==t&&!this._candidates.has(e)));n(`valid distinct candidates - ${s.length} candidates.`),a.forEach((e=>this._candidates.add(e.newSymbolName))),a.length<1?n("returning early - no valid distinct candidates"):(n("setting candidates"),this._renameCandidateListView.setCandidates(a),n("asking editor to re-layout"),this._editor.layoutContentWidget(this))}_hide(){this._trace("invoked _hide"),this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}_getTopForPosition(){const e=this._editor.getVisibleRanges();let t;return e.length>0?t=e[0].startLineNumber:(this._logService.warn("RenameWidget#_getTopForPosition: this should not happen - visibleRanges is empty"),t=Math.max(1,this._position.lineNumber-5)),this._editor.getTopForLineNumber(this._position.lineNumber)-this._editor.getTopForLineNumber(t)}_trace(...e){this._logService.trace("RenameWidget",...e)}};u8=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([c8(2,Vv),c8(3,uD),c8(4,pc),c8(5,Hc)],u8);class g8{constructor(e,t){this._disposables=new at,this._availableHeight=0,this._minimumWidth=0,this._lineHeight=t.fontInfo.lineHeight,this._typicalHalfwidthCharacterWidth=t.fontInfo.typicalHalfwidthCharacterWidth,this._listContainer=document.createElement("div"),this._listContainer.className="rename-box rename-candidate-list-container",e.appendChild(this._listContainer),this._listWidget=g8._createListWidget(this._listContainer,this._candidateViewHeight,t.fontInfo),this._listWidget.onDidChangeFocus((e=>{1===e.elements.length&&t.onFocusChange(e.elements[0].newSymbolName)}),this._disposables),this._listWidget.onDidChangeSelection((e=>{1===e.elements.length&&t.onSelectionChange()}),this._disposables),this._disposables.add(this._listWidget.onDidBlur((e=>{this._listWidget.setFocus([])}))),this._listWidget.style(JT({listInactiveFocusForeground:Rv,listInactiveFocusBackground:Ov}))}dispose(){this._listWidget.dispose(),this._disposables.dispose()}layout({height:e,width:t}){this._availableHeight=e,this._minimumWidth=t}setCandidates(e){this._listWidget.splice(0,0,e);const t=this._pickListHeight(this._listWidget.length),i=this._pickListWidth(e);this._listWidget.layout(t,i),this._listContainer.style.height=`${t}px`,this._listContainer.style.width=`${i}px`,oa(v(0,"Received {0} rename suggestions",e.length))}clearCandidates(){this._listContainer.style.height="0px",this._listContainer.style.width="0px",this._listWidget.splice(0,this._listWidget.length,[])}get nCandidates(){return this._listWidget.length}get focusedCandidate(){if(0===this._listWidget.length)return;const e=this._listWidget.getSelectedElements()[0];if(void 0!==e)return e.newSymbolName;const t=this._listWidget.getFocusedElements()[0];return void 0!==t?t.newSymbolName:void 0}focusNext(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length)return this._listWidget.focusFirst(),this._listWidget.reveal(0),!0;if(e[0]===this._listWidget.length-1)return this._listWidget.setFocus([]),this._listWidget.reveal(0),!1;{this._listWidget.focusNext();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}focusPrevious(){if(0===this._listWidget.length)return!1;const e=this._listWidget.getFocus();if(0===e.length){this._listWidget.focusLast();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}if(0===e[0])return this._listWidget.setFocus([]),!1;{this._listWidget.focusPrevious();const e=this._listWidget.getFocus()[0];return this._listWidget.reveal(e),!0}}clearFocus(){this._listWidget.setFocus([])}get _candidateViewHeight(){const{totalHeight:e}=m8.getLayoutInfo({lineHeight:this._lineHeight});return e}_pickListHeight(e){const t=this._candidateViewHeight*e;return Math.min(t,this._availableHeight,7*this._candidateViewHeight)}_pickListWidth(e){const t=Math.ceil(Math.max(...e.map((e=>e.newSymbolName.length)))*this._typicalHalfwidthCharacterWidth);return Math.max(this._minimumWidth,25+t+10)}static _createListWidget(e,t,i){const n=new class{getTemplateId(e){return"candidate"}getHeight(e){return t}},o=new class{constructor(){this.templateId="candidate"}renderTemplate(e){return new m8(e,i)}renderElement(e,t,i){i.populate(e)}disposeTemplate(e){e.dispose()}};return new mT("NewSymbolNameCandidates",e,n,[o],{keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1})}}class p8{constructor(){this._onDidInputChange=new kt,this.onDidInputChange=this._onDidInputChange.event,this._disposables=new at}get domNode(){return this._domNode||(this._domNode=document.createElement("div"),this._domNode.className="rename-input-with-button",this._domNode.style.display="flex",this._domNode.style.flexDirection="row",this._domNode.style.alignItems="center",this._inputNode=document.createElement("input"),this._inputNode.className="rename-input",this._inputNode.type="text",this._inputNode.style.border="none",this._inputNode.setAttribute("aria-label",v(0,"Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._inputNode),this._buttonNode=document.createElement("div"),this._buttonNode.className="rename-suggestions-button",this._buttonNode.setAttribute("tabindex","0"),this._buttonGenHoverText=v(0,"Generate new name suggestions"),this._buttonCancelHoverText=v(0,"Cancel"),this._buttonHover=iD().setupUpdatableHover(QL("element"),this._buttonNode,this._buttonGenHoverText),this._disposables.add(this._buttonHover),this._domNode.appendChild(this._buttonNode),this._disposables.add(ws(this.input,ur.INPUT,(()=>this._onDidInputChange.fire()))),this._disposables.add(ws(this.input,ur.KEY_DOWN,(e=>{const t=new Ke(e);15!==t.keyCode&&17!==t.keyCode||this._onDidInputChange.fire()}))),this._disposables.add(ws(this.input,ur.CLICK,(()=>this._onDidInputChange.fire()))),this._disposables.add(ws(this.input,ur.FOCUS,(()=>{this.domNode.style.outlineWidth="1px",this.domNode.style.outlineStyle="solid",this.domNode.style.outlineOffset="-1px",this.domNode.style.outlineColor="var(--vscode-focusBorder)"}))),this._disposables.add(ws(this.input,ur.BLUR,(()=>{this.domNode.style.outline="none"})))),this._domNode}get input(){return xl(this._inputNode),this._inputNode}get button(){return xl(this._buttonNode),this._buttonNode}get buttonState(){return this._buttonState}setSparkleButton(){var e,t;this._buttonState="sparkle",null!==(e=this._sparkleIcon)&&void 0!==e||(this._sparkleIcon=Px(Ml.sparkle)),vs(this.button),this.button.appendChild(this._sparkleIcon),this.button.setAttribute("aria-label","Generating new name suggestions"),null===(t=this._buttonHover)||void 0===t||t.update(this._buttonGenHoverText),this.input.focus()}setStopButton(){var e,t;this._buttonState="stop",null!==(e=this._stopIcon)&&void 0!==e||(this._stopIcon=Px(Ml.primitiveSquare)),vs(this.button),this.button.appendChild(this._stopIcon),this.button.setAttribute("aria-label","Cancel generating new name suggestions"),null===(t=this._buttonHover)||void 0===t||t.update(this._buttonCancelHoverText),this.input.focus()}dispose(){this._disposables.dispose()}}class m8{constructor(e,t){this._domNode=document.createElement("div"),this._domNode.className="rename-box rename-candidate",this._domNode.style.display="flex",this._domNode.style.columnGap="5px",this._domNode.style.alignItems="center",this._domNode.style.height=`${t.lineHeight}px`,this._domNode.style.padding=`${m8._PADDING}px`;const i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.width=i.style.height=.8*t.lineHeight+"px",this._domNode.appendChild(i),this._icon=Px(Ml.sparkle),this._icon.style.display="none",i.appendChild(this._icon),this._label=document.createElement("div"),yL(this._label,t),this._domNode.appendChild(this._label),e.appendChild(this._domNode)}populate(e){this._updateIcon(e),this._updateLabel(e)}_updateIcon(e){var t;const i=!!(null===(t=e.tags)||void 0===t?void 0:t.includes(PC.AIGenerated));this._icon.style.display=i?"inherit":"none"}_updateLabel(e){this._label.innerText=e.newSymbolName}static getLayoutInfo({lineHeight:e}){return{totalHeight:e+2*m8._PADDING}}dispose(){}}m8._PADDING=2;var f8,_8=function(e,t){return function(i,n){t(i,n,e)}};class v8{constructor(e,t,i){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=i.ordered(e)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(e){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:hh.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}async provideRenameEdits(e,t){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}async _provideRenameEdits(e,t,i,n){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join("\n")};const s=await o.provideRenameEdits(this.model,this.position,e,n);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),n):s:this._provideRenameEdits(e,t+1,i.concat(v(0,"No result.")),n)}}let b8=f8=class{static get(e){return e.getContribution(f8.ID)}constructor(e,t,i,n,o,s,r,a,l){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=s,this._configService=r,this._languageFeaturesService=a,this._telemetryService=l,this._disposableStore=new at,this._cts=new Pt,this._renameWidget=this._disposableStore.add(this._instaService.createInstance(u8,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var e,t;const i=this._logService.trace.bind(this._logService,"[rename]");if(this._cts.dispose(!0),this._cts=new Pt,!this.editor.hasModel())return void i("editor has no model");const n=this.editor.getPosition(),o=new v8(this.editor.getModel(),n,this._languageFeaturesService.renameProvider);if(!o.hasProvider())return void i("skeleton has no provider");const s=new Cx(this.editor,5,void 0,this._cts.token);let r;try{i("resolving rename location");const e=o.resolveRenameLocation(s.token);this._progressService.showWhile(e,250),r=await e,i("resolved rename location")}catch(t){return void(t instanceof Ie?i("resolve rename location cancelled",JSON.stringify(t,null,"\t")):(i("resolve rename location failed",t instanceof Error?t:JSON.stringify(t,null,"\t")),("string"==typeof t||hd(t))&&(null===(e=RL.get(this.editor))||void 0===e||e.showMessage(t||v(0,"An unknown error occurred while resolving rename location"),n))))}finally{s.dispose()}if(!r)return void i("returning early - no loc");if(r.rejectReason)return i(`returning early - rejected with reason: ${r.rejectReason}`,r.rejectReason),void(null===(t=RL.get(this.editor))||void 0===t||t.showMessage(r.rejectReason,n));if(s.token.isCancellationRequested)return void i("returning early - cts1 cancelled");const a=new Cx(this.editor,5,r.range,this._cts.token),l=this.editor.getModel(),d=this._languageFeaturesService.newSymbolNamesProvider.all(l),c=await Promise.all(d.map((async e=>{var t;return[e,null!==(t=await e.supportsAutomaticNewSymbolNamesTriggerKind)&&void 0!==t&&t]})));i("creating rename input field and awaiting its result");const h=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),u=await this._renameWidget.getInput(r.range,r.text,h,d.length>0?(e,t)=>{let i=c.slice();return e===OC.Automatic&&(i=i.filter((([e,t])=>t))),i.map((([i])=>i.provideNewSymbolNames(l,r.range,e,t)))}:void 0,a);if(i("received response from rename input field"),d.length>0&&this._reportTelemetry(d.length,l.getLanguageId(),u),"boolean"==typeof u)return i(`returning early - rename input field response - ${u}`),u&&this.editor.focus(),void a.dispose();this.editor.focus(),i("requesting rename edits");const g=Vt(o.provideRenameEdits(u.newName,a.token),a.token).then((async e=>{if(e)if(this.editor.hasModel()){if(e.rejectReason)return i(`returning early - rejected with reason: ${e.rejectReason}`),void this._notificationService.info(e.rejectReason);this.editor.setSelection(hh.fromPositions(this.editor.getSelection().getPosition())),i("applying edits"),this._bulkEditService.apply(e,{editor:this.editor,showPreview:u.wantsPreview,label:v(0,"Renaming '{0}' to '{1}'",null==r?void 0:r.text,u.newName),code:"undoredo.rename",quotableLabel:v(0,"Renaming {0} to {1}",null==r?void 0:r.text,u.newName),respectAutoSaveConfig:!0}).then((e=>{i("edits applied"),e.ariaSummary&&na(v(0,"Successfully renamed '{0}' to '{1}'. Summary: {2}",r.text,u.newName,e.ariaSummary))})).catch((e=>{i(`error when applying edits ${JSON.stringify(e,null,"\t")}`),this._notificationService.error(v(0,"Rename failed to apply edits")),this._logService.error(e)}))}else i("returning early - no model after rename edits are provided");else i("returning early - no rename edits result")}),(e=>{i("error when providing rename edits",JSON.stringify(e,null,"\t")),this._notificationService.error(v(0,"Rename failed to compute edits")),this._logService.error(e)})).finally((()=>{a.dispose()}));return i("returning rename operation"),this._progressService.showWhile(g,250),g}acceptRenameInput(e){this._renameWidget.acceptInput(e)}cancelRenameInput(){this._renameWidget.cancelInput(!0,"cancelRenameInput command")}focusNextRenameSuggestion(){this._renameWidget.focusNextRenameSuggestion()}focusPreviousRenameSuggestion(){this._renameWidget.focusPreviousRenameSuggestion()}_reportTelemetry(e,t,i){const n="boolean"==typeof i?{kind:"cancelled",languageId:t,nRenameSuggestionProviders:e}:{kind:"accepted",languageId:t,nRenameSuggestionProviders:e,source:i.stats.source.k,nRenameSuggestions:i.stats.nRenameSuggestions,timeBeforeFirstInputFieldEdit:i.stats.timeBeforeFirstInputFieldEdit,wantsPreview:i.wantsPreview,nRenameSuggestionsInvocations:i.stats.nRenameSuggestionsInvocations,hadAutomaticRenameSuggestionsInvocation:i.stats.hadAutomaticRenameSuggestionsInvocation};this._telemetryService.publicLog2("renameInvokedEvent",n)}};b8.ID="editor.contrib.renameController",b8=f8=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_8(1,_d),_8(2,fD),_8(3,Tk),_8(4,WL),_8(5,Hc),_8(6,_z),_8(7,Pk),_8(8,Vc)],b8),oh(b8.ID,b8,4),ih(class extends Qc{constructor(){super({id:"editor.action.rename",label:v(0,"Rename Symbol"),alias:"Rename Symbol",precondition:$d.and(gh.writable,gh.hasRenameProvider),kbOpts:{kbExpr:gh.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(bd),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return Po.isUri(n)&&wd.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),xe):super.runCommand(e,t)}run(e,t){const i=e.get(Hc),n=b8.get(t);return n?(i.trace("[RenameAction] got controller, running..."),n.run()):(i.trace("[RenameAction] returning early - controller missing"),Promise.resolve())}});const w8=Yc.bindToContribution(b8.get);th(new w8({id:"acceptRenameInput",precondition:h8,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:$d.and(gh.focus,$d.not("isComposing")),primary:3}})),th(new w8({id:"acceptRenameInputWithPreview",precondition:$d.and(h8,$d.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:$d.and(gh.focus,$d.not("isComposing")),primary:2051}})),th(new w8({id:"cancelRenameInput",precondition:h8,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:gh.focus,primary:9,secondary:[1033]}})),Wc(class extends Bc{constructor(){super({id:"focusNextRenameSuggestion",title:{...b(0,"Focus Next Rename Suggestion")},precondition:h8,keybinding:[{primary:18,weight:199}]})}run(e){const t=e.get(bd).getFocusedCodeEditor();if(!t)return;const i=b8.get(t);i&&i.focusNextRenameSuggestion()}}),Wc(class extends Bc{constructor(){super({id:"focusPreviousRenameSuggestion",title:{...b(0,"Focus Previous Rename Suggestion")},precondition:h8,keybinding:[{primary:16,weight:199}]})}run(e){const t=e.get(bd).getFocusedCodeEditor();if(!t)return;const i=b8.get(t);i&&i.focusPreviousRenameSuggestion()}}),eh("_executeDocumentRenameProvider",(function(e,t,i,...n){const[o]=n;xl("string"==typeof o);const{renameProvider:s}=e.get(Pk);return async function(e,t,i,n){const o=new v8(t,i,e),s=await o.resolveRenameLocation(At.None);return(null==s?void 0:s.rejectReason)?{edits:[],rejectReason:s.rejectReason}:o.provideRenameEdits(n,At.None)}(s,t,i,o)})),eh("_executePrepareRename",(async function(e,t,i){const{renameProvider:n}=e.get(Pk),o=new v8(t,i,n),s=await o.resolveRenameLocation(At.None);if(null==s?void 0:s.rejectReason)throw new Error(s.rejectReason);return s})),xc.as(Rg).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:v(0,"Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});var C8=function(e,t){return function(i,n){t(i,n,e)}};let y8=class extends lt{constructor(e,t,i){super(),this.editor=e,this.languageConfigurationService=t,this.editorWorkerService=i,this.decorations=this.editor.createDecorationsCollection(),this.options=this.createOptions(e.getOption(73)),this.computePromise=null,this.currentOccurrences={},this._register(e.onDidChangeModel((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(e.onDidChangeModelLanguage((t=>{this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0)}))),this._register(t.onDidChange((t=>{var i;const n=null===(i=this.editor.getModel())||void 0===i?void 0:i.getLanguageId();n&&t.affects(n)&&(this.currentOccurrences={},this.options=this.createOptions(e.getOption(73)),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(e.onDidChangeConfiguration((t=>{this.options&&!t.hasChanged(73)||(this.options=this.createOptions(e.getOption(73)),this.updateDecorations([]),this.stop(),this.computeSectionHeaders.schedule(0))}))),this._register(this.editor.onDidChangeModelContent((e=>{this.computeSectionHeaders.schedule()}))),this._register(e.onDidChangeModelTokens((e=>{this.computeSectionHeaders.isScheduled()||this.computeSectionHeaders.schedule(1e3)}))),this.computeSectionHeaders=this._register(new Zt((()=>{this.findSectionHeaders()}),250)),this.computeSectionHeaders.schedule(0)}createOptions(e){if(!e||!this.editor.hasModel())return;const t=this.editor.getModel().getLanguageId();if(!t)return;const i=this.languageConfigurationService.getLanguageConfiguration(t).comments,n=this.languageConfigurationService.getLanguageConfiguration(t).foldingRules;return i||(null==n?void 0:n.markers)?{foldingRules:n,findMarkSectionHeaders:e.showMarkSectionHeaders,findRegionSectionHeaders:e.showRegionSectionHeaders}:void 0}findSectionHeaders(){var e,t;if(!this.editor.hasModel()||!(null===(e=this.options)||void 0===e?void 0:e.findMarkSectionHeaders)&&!(null===(t=this.options)||void 0===t?void 0:t.findRegionSectionHeaders))return;const i=this.editor.getModel();if(i.isDisposed()||i.isTooLargeForSyncing())return;const n=i.getVersionId();this.editorWorkerService.findSectionHeaders(i.uri,this.options).then((e=>{i.isDisposed()||i.getVersionId()!==n||this.updateDecorations(e)}))}updateDecorations(e){const t=this.editor.getModel();t&&(e=e.filter((e=>{if(!e.shouldBeInComments)return!0;const i=t.validateRange(e.range),n=t.tokenization.getLineTokens(i.startLineNumber),o=n.findTokenIndexAtOffset(i.startColumn-1),s=n.getStandardTokenType(o);return n.getLanguageId(o)===t.getLanguageId()&&1===s})));const i=Object.values(this.currentOccurrences).map((e=>e.decorationId)),n=e.map((e=>function(e){return{range:e.range,options:zy.createDynamic({description:"section-header",stickiness:3,collapseOnReplaceEdit:!0,minimap:{color:void 0,position:1,sectionHeaderStyle:e.hasSeparatorLine?2:1,sectionHeaderText:e.text}})}}(e)));this.editor.changeDecorations((t=>{const o=t.deltaDecorations(i,n);this.currentOccurrences={};for(let t=0,i=o.length;t=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([C8(1,sp),C8(2,uX)],y8),oh(y8.ID,y8,1);class S8{static create(e,t){return new S8(e,new k8(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new hh(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,o,s]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new S8(this._startLineNumber,n),new S8(this._startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=_u(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new wd(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const s=e.lineNumber-this._startLineNumber;s<0?this._startLineNumber+=t:s>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class k8{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let s=n;for(;se||c===e&&u>=t)&&(ce||h===e&&g>=t){if(ho?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){d=!0;continue}p-=o-i}else if(uo)){d=!0;continue}u=t,g=i,p=g+(p-o)}else if(u>n){if(0===a&&!d){l=r;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-i,p-=o-i}const f=4*l;s[f]=u,s[f+1]=g,s[f+2]=p,s[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s0&&t>=1;e>0&&this._logService.getLevel()===zc.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),r.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(o,r,i);void 0===n?s=2147483647:(s=0,void 0!==n.italic&&(s|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(s|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(s|=4|(n.underline?4:0)<<11),void 0!==n.strikethrough&&(s|=8|(n.strikethrough?8:0)<<11),n.foreground&&(s|=16|n.foreground<<15),0===s&&(s=2147483647))}else this._logService.getLevel()===zc.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,o="not-in-legend";this._hashTable.add(e,t,n,s),this._logService.getLevel()===zc.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${r.join(" ")}): foreground ${Jp.getForeground(s)}, fontStyle ${Jp.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}warnInvalidLengthSemanticTokens(e,t){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${e}, column ${t}`))}warnInvalidEditStart(e,t,i,n,o){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${e}, resultId: ${t}) at edit #${i}: The provided start offset ${n} is outside the previous data (length ${o}).`))}};function E8(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),r=[];let a=0,l=1,d=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=c;for(;e+1c)t.warnOverlappingSemanticTokens(r,c+1);else{const e=t.getMetadata(_,v,i);2147483647!==e&&(0===g&&(g=r),h[u]=r-g,h[u+1]=c,h[u+2]=f,h[u+3]=e,u+=4,p=r,m=f)}l=r,d=c,a++}u!==h.length&&(h=h.subarray(0,u));const f=S8.create(g,h);r.push(f)}return r}D8=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([L8(1,Vv),L8(2,Mu),L8(3,Hc)],D8);class N8{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class I8{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=I8._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=I8._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?i[0]:[]}(e,t),r=await Promise.all(s.map((async e=>{let s,r=null;try{s=await e.provideDocumentSemanticTokens(t,e===i?n:null,o)}catch(e){r=e,s=null}return s&&(M8(s)||A8(s))||(s=null),new R8(e,s,r)})));for(const e of r){if(e.error)throw e.error;if(e.tokens)return e}return r.length>0?r[0]:null}class F8{constructor(e,t){this.provider=e,this.tokens=t}}function B8(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}async function W8(e,t,i,n){const o=B8(e,t),s=await Promise.all(o.map((async e=>{let o;try{o=await e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){Le(e),o=null}return o&&M8(o)||(o=null),new F8(e,o)})));for(const e of s)if(e.tokens)return e;return s.length>0?s[0]:null}Id.registerCommand("_provideDocumentSemanticTokensLegend",(async(e,...t)=>{const[i]=t;xl(i instanceof Po);const n=e.get(Cd).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(Pk),s=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(o,n);return s?s[0].getLegend():e.get(Nd).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})),Id.registerCommand("_provideDocumentSemanticTokens",(async(e,...t)=>{const[i]=t;xl(i instanceof Po);const n=e.get(Cd).getModel(i);if(!n)return;const{documentSemanticTokensProvider:o}=e.get(Pk);if(!P8(o,n))return e.get(Nd).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const s=await O8(o,n,null,null,At.None);if(!s)return;const{provider:r,tokens:a}=s;if(!a||!M8(a))return;const l=T8({id:0,type:"full",data:a.data});return a.resultId&&r.releaseDocumentSemanticTokens(a.resultId),l})),Id.registerCommand("_provideDocumentRangeSemanticTokensLegend",(async(e,...t)=>{const[i,n]=t;xl(i instanceof Po);const o=e.get(Cd).getModel(i);if(!o)return;const{documentRangeSemanticTokensProvider:s}=e.get(Pk),r=B8(s,o);if(0===r.length)return;if(1===r.length)return r[0].getLegend();if(!n||!hh.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),r[0].getLegend();const a=await W8(s,o,hh.lift(n),At.None);return a?a.provider.getLegend():void 0})),Id.registerCommand("_provideDocumentRangeSemanticTokens",(async(e,...t)=>{const[i,n]=t;xl(i instanceof Po),xl(hh.isIRange(n));const o=e.get(Cd).getModel(i);if(!o)return;const{documentRangeSemanticTokensProvider:s}=e.get(Pk),r=await W8(s,o,hh.lift(n),At.None);return r&&r.tokens?T8({id:0,type:"full",data:r.tokens.data}):void 0}));const V8=vd("semanticTokensStylingService"),H8="editor.semanticHighlighting";function z8(e,t,i){var n;const o=null===(n=i.getValue(H8,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}var U8,K8=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},j8=function(e,t){return function(i,n){t(i,n,e)}};let q8=class extends lt{constructor(e,t,i,n,o,s){super(),this._watchers=Object.create(null);const r=t=>{this._watchers[t.uri.toString()]=new $8(t,e,i,o,s)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(const e of t.getModels()){const t=this._watchers[e.uri.toString()];z8(e,i,n)?t||r(e):t&&a(e,t)}};t.getModels().forEach((e=>{z8(e,i,n)&&r(e)})),this._register(t.onModelAdded((e=>{z8(e,i,n)&&r(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(H8)&&l()}))),this._register(i.onDidColorThemeChange(l))}dispose(){for(const e of Object.values(this._watchers))e.dispose();super.dispose()}};q8=K8([j8(0,V8),j8(1,Cd),j8(2,Vv),j8(3,Cg),j8(4,AW),j8(5,Pk)],q8);let $8=U8=class extends lt{constructor(e,t,i,n,o){super(),this._semanticTokensStylingService=t,this._isDisposed=!1,this._model=e,this._provider=o.documentSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentSemanticTokens",{min:U8.REQUEST_MIN_DELAY,max:U8.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new Zt((()=>this._fetchDocumentSemanticTokensNow()),U8.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeAttached((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const s=()=>{ot(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of this._provider.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>{this._currentDocumentRequestCancellationTokenSource?this._providersChangedDuringRequest=!0:this._fetchDocumentSemanticTokens.schedule(0)})))};s(),this._register(this._provider.onDidChange((()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(i.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),ot(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!P8(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1));if(!this._model.isAttachedToEditor())return;const e=new Pt,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=O8(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e,this._providersChangedDuringRequest=!1;const o=[],s=this._model.onDidChangeContent((e=>{o.push(e)})),r=new ft(!1);n.then((e=>{if(this._debounceInformation.update(this._model,r.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticTokensStylingService.getStyling(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{e&&(Ne(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||xe(e),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),(o.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){o=Math.min(o,i.length-n,e.length-t);for(let s=0;s{(n.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.tokenization.setSemanticTokens(null,!0),void s();if(A8(t)){if(!o)return void this._model.tokenization.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const n=o.data,s=new Uint32Array(n.length+e);let r=n.length,a=s.length;for(let e=t.edits.length-1;e>=0;e--){const l=t.edits[e];if(l.start>n.length)return i.warnInvalidEditStart(o.resultId,t.resultId,e,l.start,n.length),void this._model.tokenization.setSemanticTokens(null,!0);const d=r-(l.start+l.deleteCount);d>0&&(U8._copy(n,r-d,s,a-d,d),a-=d),l.data&&(U8._copy(l.data,0,s,a-l.data.length,l.data.length),a-=l.data.length),r=l.start}r>0&&U8._copy(n,0,s,0,r),t={resultId:t.resultId,data:s}}}if(M8(t)){this._currentDocumentResponse=new G8(e,t.resultId,t.data);const o=E8(t,i,this._model.getLanguageId());if(n.length>0)for(const e of n)for(const t of o)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.tokenization.setSemanticTokens(o,!0)}else this._model.tokenization.setSemanticTokens(null,!0);s()}else this._model.tokenization.setSemanticTokens(null,!1)}};$8.REQUEST_MIN_DELAY=300,$8.REQUEST_MAX_DELAY=2e3,$8=U8=K8([j8(1,V8),j8(2,Vv),j8(3,AW),j8(4,Pk)],$8);class G8{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}Nz(q8);var Z8=function(e,t){return function(i,n){t(i,n,e)}};let Y8=class extends lt{constructor(e,t,i,n,o,s){super(),this._semanticTokensStylingService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._provider=s.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new Zt((()=>this._tokenizeViewportNow()),100)),this._outstandingRequests=[];const r=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange((()=>{r()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),r()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),r()}))),this._register(this._provider.onDidChange((()=>{this._cancelAll(),r()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(H8)&&(this._cancelAll(),r())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),r()}))),r()}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,t))))}_requestRange(e,t){const i=e.getVersionId(),n=Wt((i=>Promise.resolve(W8(this._provider,e,t,i)))),o=new ft(!1);return n.then((n=>{if(this._debounceInformation.update(e,o.elapsed()),!n||!n.tokens||e.isDisposed()||e.getVersionId()!==i)return;const{provider:s,tokens:r}=n,a=this._semanticTokensStylingService.getStyling(s);e.tokenization.setPartialSemanticTokens(t,E8(r,a,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(n)),(()=>this._removeOutstandingRequest(n))),n}};Y8.ID="editor.contrib.viewportSemanticTokens",Y8=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Z8(1,V8),Z8(2,Vv),Z8(3,Cg),Z8(4,AW),Z8(5,Pk)],Y8),oh(Y8.ID,Y8,1);class Q8{constructor(e=!0){this.selectSubwords=e}provideSelectionRanges(e,t){const i=[];for(const n of t){const t=[];i.push(t),this.selectSubwords&&this._addInWordRanges(t,e,n),this._addWordRanges(t,e,n),this._addWhitespaceLine(t,e,n),t.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;const{word:o,startColumn:s}=n,r=i.column-s;let a=r,l=r,d=0;for(;a>=0;a--){const e=o.charCodeAt(a);if(a!==r&&(95===e||45===e))break;if(xn(e)&&Ln(d))break;d=e}for(a+=1;l0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new hh(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var X8;class J8{constructor(e,t){this.index=e,this.ranges=t}mov(e){const t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new J8(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}let eee=X8=class{static get(e){return e.getContribution(X8.ID)}constructor(e,t){this._editor=e,this._languageFeaturesService=t,this._ignoreSelection=!1}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}async run(e){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(this._state||await iee(this._languageFeaturesService.selectionRangeProvider,i,t.map((e=>e.getPosition())),this._editor.getOption(113),At.None).then((e=>{var i;if(Gh(e)&&e.length===t.length&&this._editor.hasModel()&&Wh(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new J8(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}})),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const n=this._state.map((e=>uh.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}}};eee.ID="editor.contrib.smartSelectController",eee=X8=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(1,Pk)],eee);class tee extends Qc{constructor(e,t){super(t),this._forward=e}async run(e,t){const i=eee.get(t);i&&await i.run(this._forward)}}async function iee(e,t,i,n,o){const s=e.all(t).concat(new Q8(n.selectSubwords));1===s.length&&s.unshift(new D3);const r=[],a=[];for(const e of s)r.push(Promise.resolve(e.provideSelectionRanges(t,i,o)).then((e=>{if(Gh(e)&&e.length===i.length)for(let t=0;t{if(0===e.length)return[];e.sort(((e,t)=>wd.isBefore(e.getStartPosition(),t.getStartPosition())?1:wd.isBefore(t.getStartPosition(),e.getStartPosition())||wd.isBefore(e.getEndPosition(),t.getEndPosition())?-1:wd.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));const i=[];let o;for(const t of e)(!o||hh.containsRange(t,o)&&!hh.equalsRange(t,o))&&(i.push(t),o=t);if(!n.selectLeadingAndTrailingWhitespace)return i;const s=[i[0]];for(let e=1;ee}),lee="data-sticky-line-index",dee="data-sticky-is-line",cee="data-sticky-is-folding-icon";class hee extends lt{constructor(e){super(),this._editor=e,this._foldingIconStore=new at,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(67),this._renderedStickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",e instanceof Ej),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const t=()=>{this._linesDomNode.style.left=this._editor.getOption(115).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(115)&&t(),e.hasChanged(67)&&(this._lineHeight=this._editor.getOption(67))}))),this._register(this._editor.onDidScrollChange((e=>{e.scrollLeftChanged&&t(),e.scrollWidthChanged&&this._updateWidgetWidth()}))),this._register(this._editor.onDidChangeModel((()=>{t(),this._updateWidgetWidth()}))),this._register(this._foldingIconStore),t(),this._register(this._editor.onDidLayoutChange((e=>{this._updateWidgetWidth()}))),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getRenderedStickyLine(e){return this._renderedStickyLines.find((t=>t.lineNumber===e))}getCurrentLines(){return this._lineNumbers}setState(e,t,i){if(void 0===i&&(!this._previousState&&!e||this._previousState&&this._previousState.equals(e)))return;const n=this._isWidgetHeightZero(e),o=n?void 0:e,s=n?0:this._findLineToRebuildWidgetFrom(e,i);this._renderRootNode(o,t,s),this._previousState=e}_isWidgetHeightZero(e){if(!e)return!0;const t=e.startLineNumbers.length*this._lineHeight+e.lastLineRelativePosition;if(t>0){this._lastLineRelativePosition=e.lastLineRelativePosition;const t=[...e.startLineNumbers];null!==e.showEndForLine&&(t[e.showEndForLine]=e.endLineNumbers[e.showEndForLine]),this._lineNumbers=t}else this._lastLineRelativePosition=0,this._lineNumbers=[];return 0===t}_findLineToRebuildWidgetFrom(e,t){if(!e||!this._previousState)return 0;if(void 0!==t)return t;const i=this._previousState,n=e.startLineNumbers.findIndex((e=>!i.startLineNumbers.includes(e)));return-1===n?0:n}_updateWidgetWidth(){const e=this._editor.getLayoutInfo(),t=e.contentLeft;this._lineNumbersDomNode.style.width=`${t}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",this._editor.getScrollWidth()-e.verticalScrollbarWidth+"px"),this._rootDomNode.style.width=e.width-e.verticalScrollbarWidth+"px"}_clearStickyLinesFromLine(e){this._foldingIconStore.clear();for(let t=e;te.scrollWidth)))+n.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){"mouseover"===this._editor.getOption(110)&&(this._foldingIconStore.add(ws(this._lineNumbersDomNode,ur.MOUSE_ENTER,(()=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)}))),this._foldingIconStore.add(ws(this._lineNumbersDomNode,ur.MOUSE_LEAVE,(()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)}))))}_renderChildNode(e,t,i,n){const o=this._editor._getViewModel();if(!o)return;const s=o.coordinatesConverter.convertModelPositionToViewPosition(new wd(t,1)).lineNumber,r=o.getViewLineRenderingData(s),a=this._editor.getOption(68);let l;try{l=MA.filter(r.inlineDecorations,s,r.minColumn,r.maxColumn)}catch(e){l=[]}const d=new BA(!0,!0,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,0,r.tokens,l,r.tabSize,r.startVisibleColumn,1,1,1,500,"none",!0,!0,null),c=new ag(2e3),h=zA(d,c);let u;u=aee?aee.createHTML(c.build()):c.build();const g=document.createElement("span");g.setAttribute(lee,String(e)),g.setAttribute(dee,""),g.setAttribute("role","listitem"),g.tabIndex=0,g.className="sticky-line-content",g.classList.add(`stickyLine${t}`),g.style.lineHeight=`${this._lineHeight}px`,g.innerHTML=u;const p=document.createElement("span");p.setAttribute(lee,String(e)),p.setAttribute("data-sticky-is-line-number",""),p.className="sticky-line-number",p.style.lineHeight=`${this._lineHeight}px`;const m=n.contentLeft;p.style.width=`${m}px`;const f=document.createElement("span");1===a.renderType||3===a.renderType&&t%10==0?f.innerText=t.toString():2===a.renderType&&(f.innerText=Math.abs(t-this._editor.getPosition().lineNumber).toString()),f.className="sticky-line-number-inner",f.style.lineHeight=`${this._lineHeight}px`,f.style.width=`${n.lineNumbersWidth}px`,f.style.paddingLeft=`${n.lineNumbersLeft}px`,p.appendChild(f);const _=this._renderFoldingIconForLine(i,t);_&&p.appendChild(_.domNode),this._editor.applyFontInfo(g),this._editor.applyFontInfo(f),p.style.lineHeight=`${this._lineHeight}px`,g.style.lineHeight=`${this._lineHeight}px`,p.style.height=`${this._lineHeight}px`,g.style.height=`${this._lineHeight}px`;const v=new uee(e,t,g,p,_,h.characterMapping,g.scrollWidth);return this._updateTopAndZIndexOfStickyLine(v)}_updateTopAndZIndexOfStickyLine(e){var t;const i=e.index,n=e.lineDomNode,o=e.lineNumberDomNode,s=i===this._lineNumbers.length-1;n.style.zIndex=s?"0":"1",o.style.zIndex=s?"0":"1";const r=`${i*this._lineHeight+this._lastLineRelativePosition+((null===(t=e.foldingIcon)||void 0===t?void 0:t.isCollapsed)?1:0)}px`,a=i*this._lineHeight+"px";return n.style.top=s?r:a,o.style.top=s?r:a,e}_renderFoldingIconForLine(e,t){const i=this._editor.getOption(110);if(!e||"never"===i)return;const n=e.regions,o=n.findRange(t),s=n.getStartLineNumber(o);if(t!==s)return;const r=n.isCollapsed(o),a=new gee(r,s,n.getEndLineNumber(o),this._lineHeight);return a.setVisible(!!this._isOnGlyphMargin||r||"always"===i),a.domNode.setAttribute(cee,""),a}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:2,stackOridinal:10}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(e){0<=e&&e0)return null;const t=this._getRenderedStickyLineFromChildDomNode(e);if(!t)return null;const i=tR(t.characterMapping,e,0);return new wd(t.lineNumber,i)}getLineNumberFromChildDomNode(e){var t,i;return null!==(i=null===(t=this._getRenderedStickyLineFromChildDomNode(e))||void 0===t?void 0:t.lineNumber)&&void 0!==i?i:null}_getRenderedStickyLineFromChildDomNode(e){const t=this.getLineIndexFromChildDomNode(e);return null===t||t<0||t>=this._renderedStickyLines.length?null:this._renderedStickyLines[t]}getLineIndexFromChildDomNode(e){const t=this._getAttributeValue(e,lee);return t?parseInt(t,10):null}isInStickyLine(e){return void 0!==this._getAttributeValue(e,dee)}isInFoldingIconDomNode(e){return void 0!==this._getAttributeValue(e,cee)}_getAttributeValue(e,t){for(;e&&e!==this._rootDomNode;){const i=e.getAttribute(t);if(null!==i)return i;e=e.parentElement}}}class uee{constructor(e,t,i,n,o,s,r){this.index=e,this.lineNumber=t,this.lineDomNode=i,this.lineNumberDomNode=n,this.foldingIcon=o,this.characterMapping=s,this.scrollWidth=r}}class gee{constructor(e,t,i,n){this.isCollapsed=e,this.foldingStartLine=t,this.foldingEndLine=i,this.dimension=n,this.domNode=document.createElement("div"),this.domNode.style.width=`${n}px`,this.domNode.style.height=`${n}px`,this.domNode.className=Rl.asClassName(e?q1:j1)}setVisible(e){this.domNode.style.cursor=e?"pointer":"default",this.domNode.style.opacity=e?"1":"0"}}class pee{constructor(e,t){this.startLineNumber=e,this.endLineNumber=t}}class mee{constructor(e,t,i){this.range=e,this.children=t,this.parent=i}}class fee{constructor(e,t,i,n){this.uri=e,this.version=t,this.element=i,this.outlineProviderId=n}}var _ee,vee,bee=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},wee=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.OUTLINE_MODEL="outlineModel",e.FOLDING_PROVIDER_MODEL="foldingProviderModel",e.INDENTATION_MODEL="indentationModel"}(_ee||(_ee={})),function(e){e[e.VALID=0]="VALID",e[e.INVALID=1]="INVALID",e[e.CANCELED=2]="CANCELED"}(vee||(vee={}));let Cee=class extends lt{constructor(e,t,i,n){switch(super(),this._editor=e,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new zt(300)),this._updateOperation=this._register(new at),this._editor.getOption(115).defaultModel){case _ee.OUTLINE_MODEL:this._modelProviders.push(new See(this._editor,n));case _ee.FOLDING_PROVIDER_MODEL:this._modelProviders.push(new Lee(this._editor,t,n));case _ee.INDENTATION_MODEL:this._modelProviders.push(new xee(this._editor,i))}}dispose(){this._modelProviders.forEach((e=>e.dispose())),this._updateOperation.clear(),this._cancelModelPromise(),super.dispose()}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(e){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger((async()=>{for(const t of this._modelProviders){const{statusPromise:i,modelPromise:n}=t.computeStickyModel(e);this._modelPromise=n;const o=await i;if(this._modelPromise!==n)return null;switch(o){case vee.CANCELED:return this._updateOperation.clear(),null;case vee.VALID:return t.stickyModel}}return null})).catch((e=>(xe(e),null)))}};Cee=bee([wee(2,_d),wee(3,Pk)],Cee);class yee extends lt{constructor(e){super(),this._editor=e,this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,vee.INVALID}computeStickyModel(e){if(e.isCancellationRequested||!this.isProviderValid())return{statusPromise:this._invalid(),modelPromise:null};const t=Wt((e=>this.createModelFromProvider(e)));return{statusPromise:t.then((t=>this.isModelValid(t)?e.isCancellationRequested?vee.CANCELED:(this._stickyModel=this.createStickyModel(e,t),vee.VALID):this._invalid())).then(void 0,(e=>(xe(e),vee.CANCELED))),modelPromise:t}}isModelValid(e){return!0}isProviderValid(){return!0}}let See=class extends yee{constructor(e,t){super(e),this._languageFeaturesService=t}createModelFromProvider(e){return bJ.create(this._languageFeaturesService.documentSymbolProvider,this._editor.getModel(),e)}createStickyModel(e,t){var i;const{stickyOutlineElement:n,providerID:o}=this._stickyModelFromOutlineModel(t,null===(i=this._stickyModel)||void 0===i?void 0:i.outlineProviderId),s=this._editor.getModel();return new fee(s.uri,s.getVersionId(),n,o)}isModelValid(e){return e&&e.children.size>0}_stickyModelFromOutlineModel(e,t){let i;if(Qe.first(e.children.values())instanceof vJ){const n=Qe.find(e.children.values(),(e=>e.id===t));if(n)i=n.children;else{let n,o="",s=-1;for(const[t,i]of e.children.entries()){const e=this._findSumOfRangesOfGroup(i);e>s&&(n=i,s=e,o=i.id)}t=o,i=n.children}}else i=e.children;const n=[],o=Array.from(i.values()).sort(((e,t)=>{const i=new pee(e.symbol.range.startLineNumber,e.symbol.range.endLineNumber),n=new pee(t.symbol.range.startLineNumber,t.symbol.range.endLineNumber);return this._comparator(i,n)}));for(const e of o)n.push(this._stickyModelFromOutlineElement(e,e.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new mee(void 0,n,void 0),providerID:t}}_stickyModelFromOutlineElement(e,t){const i=[];for(const n of e.children.values())if(n.symbol.selectionRange.startLineNumber!==n.symbol.range.endLineNumber)if(n.symbol.selectionRange.startLineNumber!==t)i.push(this._stickyModelFromOutlineElement(n,n.symbol.selectionRange.startLineNumber));else for(const e of n.children.values())i.push(this._stickyModelFromOutlineElement(e,n.symbol.selectionRange.startLineNumber));i.sort(((e,t)=>this._comparator(e.range,t.range)));const n=new pee(e.symbol.selectionRange.startLineNumber,e.symbol.range.endLineNumber);return new mee(n,i,void 0)}_comparator(e,t){return e.startLineNumber!==t.startLineNumber?e.startLineNumber-t.startLineNumber:t.endLineNumber-e.endLineNumber}_findSumOfRangesOfGroup(e){let t=0;for(const i of e.children.values())t+=this._findSumOfRangesOfGroup(i);return e instanceof _J?t+e.symbol.range.endLineNumber-e.symbol.selectionRange.startLineNumber:t}};See=bee([wee(1,Pk)],See);class kee extends yee{constructor(e){super(e),this._foldingLimitReporter=new r2(e)}createStickyModel(e,t){const i=this._fromFoldingRegions(t),n=this._editor.getModel();return new fee(n.uri,n.getVersionId(),i,void 0)}isModelValid(e){return null!==e}_fromFoldingRegions(e){const t=e.length,i=[],n=new mee(void 0,[],void 0);for(let o=0;o0&&(this.provider=this._register(new e2(e.getModel(),n,t,this._foldingLimitReporter,void 0)))}isProviderValid(){return void 0!==this.provider}async createModelFromProvider(e){var t,i;return null!==(i=null===(t=this.provider)||void 0===t?void 0:t.compute(e))&&void 0!==i?i:null}};Lee=bee([wee(2,Pk)],Lee);var Dee=function(e,t){return function(i,n){t(i,n,e)}};class Eee{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.nestingDepth=i}}let Nee=class extends lt{constructor(e,t,i){super(),this._languageFeaturesService=t,this._languageConfigurationService=i,this._onDidChangeStickyScroll=this._register(new kt),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=e,this._sessionStore=this._register(new at),this._updateSoon=this._register(new Zt((()=>this.update()),50)),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(115)&&this.readConfiguration()}))),this.readConfiguration()}readConfiguration(){this._sessionStore.clear(),this._editor.getOption(115).enabled&&(this._sessionStore.add(this._editor.onDidChangeModel((()=>{this._model=null,this.updateStickyModelProvider(),this._onDidChangeStickyScroll.fire(),this.update()}))),this._sessionStore.add(this._editor.onDidChangeHiddenAreas((()=>this.update()))),this._sessionStore.add(this._editor.onDidChangeModelContent((()=>this._updateSoon.schedule()))),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange((()=>this.update()))),this._sessionStore.add(rt((()=>{var e;null===(e=this._stickyModelProvider)||void 0===e||e.dispose(),this._stickyModelProvider=null}))),this.updateStickyModelProvider(),this.update())}getVersionId(){var e;return null===(e=this._model)||void 0===e?void 0:e.version}updateStickyModelProvider(){var e;null===(e=this._stickyModelProvider)||void 0===e||e.dispose(),this._stickyModelProvider=null;const t=this._editor;t.hasModel()&&(this._stickyModelProvider=new Cee(t,(()=>this._updateSoon.schedule()),this._languageConfigurationService,this._languageFeaturesService))}async update(){var e;null===(e=this._cts)||void 0===e||e.dispose(!0),this._cts=new Pt,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(e){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization())return void(this._model=null);const t=await this._stickyModelProvider.update(e);e.isCancellationRequested||(this._model=t)}updateIndex(e){return-1===e?e=0:e<0&&(e=-e-2),e}getCandidateStickyLinesIntersectingFromStickyModel(e,t,i,n,o){if(0===t.children.length)return;let s=o;const r=[];for(let e=0;ee-t))),l=this.updateIndex(Vh(r,e.startLineNumber+n,((e,t)=>e-t)));for(let r=a;r<=l;r++){const a=t.children[r];if(!a)return;if(a.range){const t=a.range.startLineNumber,o=a.range.endLineNumber;e.startLineNumber<=o+1&&t-1<=e.endLineNumber&&t!==s&&(s=t,i.push(new Eee(t,o-1,n+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n+1,t))}else this.getCandidateStickyLinesIntersectingFromStickyModel(e,a,i,n,o)}}getCandidateStickyLinesIntersecting(e){var t,i;if(!(null===(t=this._model)||void 0===t?void 0:t.element))return[];let n=[];this.getCandidateStickyLinesIntersectingFromStickyModel(e,this._model.element,n,0,-1);const o=null===(i=this._editor._getViewModel())||void 0===i?void 0:i.getHiddenAreas();if(o)for(const e of o)n=n.filter((t=>!(t.startLineNumber>=e.startLineNumber&&t.endLineNumber<=e.endLineNumber+1)));return n}};Nee=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Dee(1,Pk),Dee(2,sp)],Nee);var Iee,Tee=function(e,t){return function(i,n){t(i,n,e)}};let Mee=Iee=class extends lt{constructor(e,t,i,n,o,s,r){super(),this._editor=e,this._contextMenuService=t,this._languageFeaturesService=i,this._instaService=n,this._contextKeyService=r,this._sessionStore=new at,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new hee(this._editor),this._stickyLineCandidateProvider=new Nee(this._editor,i,o),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new ree([],[],0),this._onDidResize(),this._readConfiguration();const a=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration((e=>{this._readConfigurationChange(e)}))),this._register(ws(a,ur.CONTEXT_MENU,(async e=>{this._onContextMenu(ls(a),e)}))),this._stickyScrollFocusedContextKey=gh.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=gh.stickyScrollVisible.bindTo(this._contextKeyService);const l=this._register(fr(a));this._register(l.onDidBlur((e=>{!1===this._positionRevealed&&0===a.clientHeight?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()}))),this._register(l.onDidFocus((e=>{this.focus()}))),this._registerMouseListeners(),this._register(ws(a,ur.MOUSE_DOWN,(e=>{this._onMouseDown=!0})))}static get(e){return e.getContribution(Iee.ID)}_disposeFocusStickyScrollStore(){var e;this._stickyScrollFocusedContextKey.set(!1),null===(e=this._focusDisposableStore)||void 0===e||e.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown)return this._onMouseDown=!1,void this._editor.focus();!0!==this._stickyScrollFocusedContextKey.get()&&(this._focused=!0,this._focusDisposableStore=new at,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(e){this._focusedStickyElementIndex=e?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const e=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:e[this._focusedStickyElementIndex],column:1})}_revealPosition(e){this._reveaInEditor(e,(()=>this._editor.revealPosition(e)))}_revealLineInCenterIfOutsideViewport(e){this._reveaInEditor(e,(()=>this._editor.revealLineInCenterIfOutsideViewport(e.lineNumber,0)))}_reveaInEditor(e,t){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,t(),this._editor.setSelection(hh.fromPositions(e)),this._editor.focus()}_registerMouseListeners(){const e=this._register(new at),t=this._register(new wj(this._editor,{extractLineNumberFromMouseEvent:e=>{const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);return t?t.lineNumber:0}})),i=e=>{if(!this._editor.hasModel())return null;if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return null;const t=e.target.element;if(!t||t.innerText!==t.innerHTML)return null;const i=this._stickyScrollWidget.getEditorPositionFromNode(t);return i?{range:new hh(i.lineNumber,i.column,i.lineNumber,i.column+t.innerText.length),textElement:t}:null},n=this._stickyScrollWidget.getDomNode();this._register(ys(n,ur.CLICK,(e=>{if(e.ctrlKey||e.altKey||e.metaKey)return;if(!e.leftButton)return;if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t)return;const i=new wd(this._endLineNumbers[t],1);return void this._revealLineInCenterIfOutsideViewport(i)}if(this._stickyScrollWidget.isInFoldingIconDomNode(e.target)){const t=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);return void this._toggleFoldingRegionForLine(t)}if(!this._stickyScrollWidget.isInStickyLine(e.target))return;let t=this._stickyScrollWidget.getEditorPositionFromNode(e.target);if(!t){const i=this._stickyScrollWidget.getLineNumberFromChildDomNode(e.target);if(null===i)return;t=new wd(i,1)}this._revealPosition(t)}))),this._register(ys(n,ur.MOUSE_MOVE,(e=>{if(e.shiftKey){const t=this._stickyScrollWidget.getLineIndexFromChildDomNode(e.target);if(null===t||null!==this._showEndForLine&&this._showEndForLine===t)return;return this._showEndForLine=t,void this._renderStickyScroll()}null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(ws(n,ur.MOUSE_LEAVE,(e=>{null!==this._showEndForLine&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._register(t.onMouseMoveOrRelevantKeyDown((([t,n])=>{const o=i(t);if(!o||!t.hasTriggerModifier||!this._editor.hasModel())return void e.clear();const{range:s,textElement:r}=o;if(s.equalsRange(this._stickyRangeProjectedOnEditor)){if("underline"===r.style.textDecoration)return}else this._stickyRangeProjectedOnEditor=s,e.clear();const a=new Pt;let l;e.add(rt((()=>a.dispose(!0)))),ZZ(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new wd(s.startLineNumber,s.startColumn+1),a.token).then((t=>{if(!a.token.isCancellationRequested)if(0!==t.length){this._candidateDefinitionsLength=t.length;const i=r;l!==i?(e.clear(),l=i,l.style.textDecoration="underline",e.add(rt((()=>{l.style.textDecoration="none"})))):l||(l=i,l.style.textDecoration="underline",e.add(rt((()=>{l.style.textDecoration="none"}))))}else e.clear()}))}))),this._register(t.onCancel((()=>{e.clear()}))),this._register(t.onExecute((async e=>{if(12!==e.target.type||e.target.detail!==this._stickyScrollWidget.getId())return;const t=this._stickyScrollWidget.getEditorPositionFromNode(e.target.element);t&&this._editor.hasModel()&&this._stickyRangeProjectedOnEditor&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:t.lineNumber,column:1})),this._instaService.invokeFunction(vY,e,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(e,t){const i=new Ge(e,t);this._contextMenuService.showContextMenu({menuId:Mc.StickyScrollContext,getAnchor:()=>i})}_toggleFoldingRegionForLine(e){if(!this._foldingModel||null===e)return;const t=this._stickyScrollWidget.getRenderedStickyLine(e),i=null==t?void 0:t.foldingIcon;if(!i)return;A1(this._foldingModel,Number.MAX_VALUE,[e]),i.isCollapsed=!i.isCollapsed;const n=(i.isCollapsed?this._editor.getTopForLineNumber(i.foldingEndLine):this._editor.getTopForLineNumber(i.foldingStartLine))-this._editor.getOption(67)*t.index+1;this._editor.setScrollTop(n),this._renderStickyScroll(e)}_readConfiguration(){const e=this._editor.getOption(115);if(!1===e.enabled)return this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),void(this._enabled=!1);e.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())}))),this._sessionStore.add(this._editor.onDidLayoutChange((()=>this._onDidResize()))),this._sessionStore.add(this._editor.onDidChangeModelTokens((e=>this._onTokensChange(e)))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll((()=>{this._showEndForLine=null,this._renderStickyScroll()}))),this._enabled=!0),2===this._editor.getOption(68).renderType&&this._sessionStore.add(this._editor.onDidChangeCursorPosition((()=>{this._showEndForLine=null,this._renderStickyScroll(0)})))}_readConfigurationChange(e){(e.hasChanged(115)||e.hasChanged(73)||e.hasChanged(67)||e.hasChanged(110)||e.hasChanged(68))&&this._readConfiguration(),e.hasChanged(68)&&this._renderStickyScroll(0)}_needsUpdate(e){const t=this._stickyScrollWidget.getCurrentLines();for(const i of t)for(const t of e.ranges)if(i>=t.fromLineNumber&&i<=t.toLineNumber)return!0;return!1}_onTokensChange(e){this._needsUpdate(e)&&this._renderStickyScroll(0)}_onDidResize(){const e=this._editor.getLayoutInfo().height/this._editor.getOption(67);this._maxStickyLines=Math.round(.25*e)}async _renderStickyScroll(e){var t,i;const n=this._editor.getModel();if(!n||n.isTooLargeForTokenization())return this._foldingModel=null,void this._stickyScrollWidget.setState(void 0,null);const o=this._stickyLineCandidateProvider.getVersionId();if(void 0===o||o===n.getVersionId())if(this._foldingModel=null!==(i=await(null===(t=s2.get(this._editor))||void 0===t?void 0:t.getFoldingModel()))&&void 0!==i?i:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(!(0===this._widgetState.startLineNumbers.length)),this._focused)if(-1===this._focusedStickyElementIndex)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,-1!==this._focusedStickyElementIndex&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const t=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e),0===this._stickyScrollWidget.lineNumberCount?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(t)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}else this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,e)}findScrollWidgetState(){const e=this._editor.getOption(67),t=Math.min(this._maxStickyLines,this._editor.getOption(115).maxLineCount),i=this._editor.getScrollTop();let n=0;const o=[],s=[],r=this._editor.getVisibleRanges();if(0!==r.length){const a=new pee(r[0].startLineNumber,r[r.length-1].endLineNumber),l=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(a);for(const r of l){const a=r.startLineNumber,l=r.endLineNumber,d=r.nestingDepth;if(l-a>0){const r=(d-1)*e,c=d*e,h=this._editor.getBottomForLineNumber(a)-i,u=this._editor.getTopForLineNumber(l)-i,g=this._editor.getBottomForLineNumber(l)-i;if(r>u&&r<=g){o.push(a),s.push(l+1),n=g-c;break}if(c>h&&c<=g&&(o.push(a),s.push(l+1)),o.length===t)break}}}return this._endLineNumbers=s,new ree(o,s,n,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};Mee.ID="store.contrib.stickyScrollController",Mee=Iee=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Tee(1,hD),Tee(2,Pk),Tee(3,_d),Tee(4,sp),Tee(5,AW),Tee(6,pc)],Mee);const Aee=100;oh(Mee.ID,Mee,1),Wc(class extends Bc{constructor(){super({id:"editor.action.toggleStickyScroll",title:{...b(0,"Toggle Editor Sticky Scroll"),mnemonicTitle:v(0,"&&Toggle Editor Sticky Scroll")},metadata:{description:b(0,"Toggle/enable the editor sticky scroll which shows the nested scopes at the top of the viewport")},category:nee.View,toggled:{condition:$d.equals("config.editor.stickyScroll.enabled",!0),title:v(0,"Sticky Scroll"),mnemonicTitle:v(0,"&&Sticky Scroll")},menu:[{id:Mc.CommandPalette},{id:Mc.MenubarAppearanceMenu,group:"4_editor",order:3},{id:Mc.StickyScrollContext}]})}async run(e){const t=e.get(Cg),i=!t.getValue("editor.stickyScroll.enabled");return t.updateValue("editor.stickyScroll.enabled",i)}}),Wc(class extends Jc{constructor(){super({id:"editor.action.focusStickyScroll",title:{...b(0,"Focus on the editor sticky scroll"),mnemonicTitle:v(0,"&&Focus Sticky Scroll")},precondition:$d.and($d.has("config.editor.stickyScroll.enabled"),gh.stickyScrollVisible),menu:[{id:Mc.CommandPalette}]})}runEditorCommand(e,t){var i;null===(i=Mee.get(t))||void 0===i||i.focus()}}),Wc(class extends Jc{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:b(0,"Select the previous sticky scroll line"),precondition:gh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Aee,primary:16}})}runEditorCommand(e,t){var i;null===(i=Mee.get(t))||void 0===i||i.focusPrevious()}}),Wc(class extends Jc{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:b(0,"Select the next editor sticky scroll line"),precondition:gh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Aee,primary:18}})}runEditorCommand(e,t){var i;null===(i=Mee.get(t))||void 0===i||i.focusNext()}}),Wc(class extends Jc{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:b(0,"Go to the focused sticky scroll line"),precondition:gh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Aee,primary:3}})}runEditorCommand(e,t){var i;null===(i=Mee.get(t))||void 0===i||i.goToFocused()}}),Wc(class extends Jc{constructor(){super({id:"editor.action.selectEditor",title:b(0,"Select Editor"),precondition:gh.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:Aee,primary:9}})}runEditorCommand(e,t){var i;null===(i=Mee.get(t))||void 0===i||i.selectEditor()}});var Ree=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Pee=function(e,t){return function(i,n){t(i,n,e)}};class Oee{constructor(e,t,i,n,o,s){this.range=e,this.insertText=t,this.filterText=i,this.additionalTextEdits=n,this.command=o,this.completion=s}}let Fee=class extends ct{constructor(e,t,i,n,o,s){super(o.disposable),this.model=e,this.line=t,this.word=i,this.completionModel=n,this._suggestMemoryService=s}canBeReused(e,t,i){return this.model===e&&this.line===t&&this.word.word.length>0&&this.word.startColumn===i.startColumn&&this.word.endColumn=0&&i.resolve(At.None)}return t}};Fee=Ree([Pee(5,C3)],Fee);let Bee=class extends lt{constructor(e,t,i,n){super(),this._languageFeatureService=e,this._clipboardService=t,this._suggestMemoryService=i,this._editorService=n,this._store.add(e.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(e,t,i,n){var o;if(i.selectedSuggestionInfo)return;let s;for(const t of this._editorService.listCodeEditors())if(t.getModel()===e){s=t;break}if(!s)return;const r=s.getOption(89);if(K5.isAllOff(r))return;e.tokenization.tokenizeIfCheap(t.lineNumber);const a=e.tokenization.getLineTokens(t.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if("inline"!==K5.valueFor(r,l))return;let d,c,h=e.getWordAtPosition(t);if((null==h?void 0:h.word)||(d=this._getTriggerCharacterInfo(e,t)),!(null==h?void 0:h.word)&&!d)return;if(h||(h=e.getWordUntilPosition(t)),h.endColumn!==t.column)return;const u=e.getValueInRange(new hh(t.lineNumber,1,t.lineNumber,t.column));if(!d&&(null===(o=this._lastResult)||void 0===o?void 0:o.canBeReused(e,t.lineNumber,h))){const e=new N3(u,t.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=e,this._lastResult.acquire(),c=this._lastResult}else{const i=await H5(this._languageFeatureService.completionProvider,e,t,new W5(void 0,R3.createSuggestFilter(s).itemKind,null==d?void 0:d.providers),d&&{triggerKind:1,triggerCharacter:d.ch},n);let o;i.needsClipboard&&(o=await this._clipboardService.readText());const r=new I3(i.items,t.column,new N3(u,0),E3.None,s.getOption(118),s.getOption(112),{boostFullMatch:!1,firstMatchCanBeWeak:!1},o);c=new Fee(e,t.lineNumber,h,r,i,this._suggestMemoryService)}return this._lastResult=c,c}handleItemDidShow(e,t){t.completion.resolve(At.None)}freeInlineCompletions(e){e.release()}_getTriggerCharacterInfo(e,t){var i;const n=e.getValueInRange(hh.fromPositions({lineNumber:t.lineNumber,column:t.column-1},t)),o=new Set;for(const t of this._languageFeatureService.completionProvider.all(e))(null===(i=t.triggerCharacters)||void 0===i?void 0:i.includes(n))&&o.add(t);if(0!==o.size)return{providers:o,ch:n}}};Bee=Ree([Pee(0,Pk),Pee(1,OL),Pee(2,C3),Pee(3,bd)],Bee),Nz(Bee);class Wee{constructor(e,t,i,n,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}const Vee=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class Hee{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(Vee);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=fu.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class zee{static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,o=e.length;n{const i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}const s=new Hee;for(const e of t)s.getId(e);const r=s.getId(n),a=s.getId(o),l=new Kee(i,r,a),d=new jee(l);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const Uee=/\b(comment|string|regex|regexp)\b/;class Kee{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new Kee(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}class jee{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const o=this._children.get(i);return void 0!==o?o.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const o=e.indexOf(".");let s,r;-1===o?(s=e,r=""):(s=e.substring(0,o),r=e.substring(o+1));let a=this._children.get(s);void 0===a&&(a=new jee(this._mainRule.clone()),this._children.set(s,a)),a.insert(r,t,i,n)}}const qee={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[ef]:"#FFFFFE",[tf]:"#000000",[_f]:"#E5EBF1",[sb]:"#D3D3D3",[hb]:"#939393",[vf]:"#ADD6FF4D"}},$ee={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[ef]:"#1E1E1E",[tf]:"#D4D4D4",[_f]:"#3A3D41",[sb]:"#404040",[hb]:"#707070",[vf]:"#ADD6FF26"}},Gee={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[ef]:"#000000",[tf]:"#FFFFFF",[sb]:"#FFFFFF",[hb]:"#FFFFFF"}},Zee={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[ef]:"#FFFFFF",[tf]:"#292929",[sb]:"#292929",[hb]:"#292929"}};class Yee{getIcon(e){const t=Jz();let i=e.defaults;for(;Rl.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}const Qee="vs",Xee="vs-dark",Jee="hc-black",ete="hc-light",tte=xc.as(Nm),ite=xc.as(Uv);class nte{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(ote(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(const t in this.themeData.colors)e.set(t,fu.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=ste(this.themeData.base);for(const i in t.colors)e.has(i)||e.set(i,fu.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=tte.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return this.getColors().has(e)}get type(){switch(this.base){case Qee:return Fv.LIGHT;case Jee:return Fv.HIGH_CONTRAST_DARK;case ete:return Fv.HIGH_CONTRAST_LIGHT;default:return Fv.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=ste(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=zee.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=Jp.getForeground(n),s=Jp.getFontStyle(n);return{foreground:o,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s),strikethrough:Boolean(8&s)}}}function ote(e){return e===Qee||e===Xee||e===Jee||e===ete}function ste(e){switch(e){case Qee:return qee;case Xee:return $ee;case Jee:return Gee;case ete:return Zee}}function rte(e){const t=ste(e);return new nte(e,t)}ih(class extends Qc{constructor(){super({id:"editor.action.toggleHighContrast",label:g4.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Y6),n=i.getColorTheme();Bv(n.type)?(i.setTheme(this._originalThemeName||(Wv(n.type)?Xee:Qee)),this._originalThemeName=null):(i.setTheme(Wv(n.type)?Jee:ete),this._originalThemeName=n.themeName)}});class ate extends Bc{constructor(){super({id:ate.ID,title:b(0,"Toggle Tab Key Moves Focus"),precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},metadata:{description:b(0,"Determines whether the tab key moves focus around the workbench or inserts the tab character in the current editor. This is also called tab trapping, tab navigation, or tab focus mode.")},f1:!0})}run(){const e=!tA.getTabFocusMode();tA.setTabFocusMode(e),na(v(0,e?"Pressing Tab will now move focus to the next focusable element":"Pressing Tab will now insert the tab character"))}}ate.ID="editor.action.toggleTabFocusMode",Wc(ate),ih(class extends Qc{constructor(){super({id:"editor.action.forceRetokenize",label:v(0,"Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.tokenization.resetTokenization();const n=new ft;i.tokenization.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}});var lte=i(2316),dte={};dte.styleTagTransform=Gr(),dte.setAttributes=Kr(),dte.insert=zr().bind(null,"head"),dte.domAPI=Vr(),dte.insertStyleElement=qr(),Br()(lte.Z,dte),lte.Z&<e.Z.locals&<e.Z.locals;var cte=i(5385),hte={};hte.styleTagTransform=Gr(),hte.setAttributes=Kr(),hte.insert=zr().bind(null,"head"),hte.domAPI=Vr(),hte.insertStyleElement=qr(),Br()(cte.Z,hte),cte.Z&&cte.Z.locals&&cte.Z.locals;var ute=i(5464),gte={};gte.styleTagTransform=Gr(),gte.setAttributes=Kr(),gte.insert=zr().bind(null,"head"),gte.domAPI=Vr(),gte.insertStyleElement=qr(),Br()(ute.Z,gte),ute.Z&&ute.Z.locals&&ute.Z.locals;var pte=function(e,t){return function(i,n){t(i,n,e)}};let mte=class extends lt{get enabled(){return this._enabled}set enabled(e){e?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=e}constructor(e,t,i={},n,o){var s,r;super(),this._link=t,this._hoverService=n,this._enabled=!0,this.el=_r(e,Sr("a.monaco-link",{tabIndex:null!==(s=t.tabIndex)&&void 0!==s?s:0,href:t.href},t.label)),this.hoverDelegate=null!==(r=i.hoverDelegate)&&void 0!==r?r:QL("mouse"),this.setTooltip(t.title),this.el.setAttribute("role","button");const a=this._register(new ok(this.el,"click")),l=this._register(new ok(this.el,"keypress")),d=_t.chain(l.event,(e=>e.map((e=>new Ke(e))).filter((e=>3===e.keyCode)))),c=this._register(new ok(this.el,qL.Tap)).event;this._register($L.addTarget(this.el));const h=_t.any(a.event,d,c);this._register(h((e=>{this.enabled&&(pr(e,!0),(null==i?void 0:i.opener)?i.opener(this._link.href):o.open(this._link.href,{allowCommands:!0}))}))),this.enabled=!0}setTooltip(e){this.hoverDelegate.showNativeHover?this.el.title=null!=e?e:"":!this.hover&&e?this.hover=this._register(this._hoverService.setupUpdatableHover(this.hoverDelegate,this.el,e)):this.hover&&this.hover.update(e)}};mte=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([pte(3,tj),pte(4,LL)],mte);var fte=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},_te=function(e,t){return function(i,n){t(i,n,e)}};let vte=class extends lt{constructor(e,t){super(),this._editor=e,this.instantiationService=t,this.banner=this._register(this.instantiationService.createInstance(bte))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(e){this.banner.show({...e,onClose:()=>{var t;this.hide(),null===(t=e.onClose)||void 0===t||t.call(e)}}),this._editor.setBanner(this.banner.element,26)}};vte=fte([_te(1,_d)],vte);let bte=class extends lt{constructor(e){super(),this.instantiationService=e,this.markdownRenderer=this.instantiationService.createInstance(NL,{}),this.element=Sr("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(e){return e.ariaLabel?e.ariaLabel:"string"==typeof e.message?e.message:void 0}getBannerMessage(e){if("string"==typeof e){const t=Sr("span");return t.innerText=e,t}return this.markdownRenderer.render(e).element}clear(){vs(this.element)}show(e){vs(this.element);const t=this.getAriaLabel(e);t&&this.element.setAttribute("aria-label",t);const i=_r(this.element,Sr("div.icon-container"));i.setAttribute("aria-hidden","true"),e.icon&&i.appendChild(Sr(`div${Rl.asCSSSelector(e.icon)}`));const n=_r(this.element,Sr("div.message-container"));if(n.setAttribute("aria-hidden","true"),n.appendChild(this.getBannerMessage(e.message)),this.messageActionsContainer=_r(this.element,Sr("div.message-actions-container")),e.actions)for(const t of e.actions)this._register(this.instantiationService.createInstance(mte,this.messageActionsContainer,{...t,tabIndex:-1},{}));const o=_r(this.element,Sr("div.action-container"));this.actionBar=this._register(new TT(o)),this.actionBar.push(this._register(new Sd("banner.close","Close Banner",Rl.asClassName(nU),!0,(()=>{"function"==typeof e.onClose&&e.onClose()}))),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};bte=fte([_te(0,_d)],bte);const wte=vd("workspaceTrustManagementService");var Cte=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},yte=function(e,t){return function(i,n){t(i,n,e)}};const Ste=Xz("extensions-warning-message",Ml.warning,v(0,"Icon shown with a warning message in the extensions editor."));let kte=class extends lt{constructor(e,t,i,n){super(),this._editor=e,this._editorWorkerService=t,this._workspaceTrustService=i,this._highlighter=null,this._bannerClosed=!1,this._updateState=e=>{if(e&&e.hasMore){if(this._bannerClosed)return;const t=Math.max(e.ambiguousCharacterCount,e.nonBasicAsciiCharacterCount,e.invisibleCharacterCount);let i;if(e.nonBasicAsciiCharacterCount>=t)i={message:v(0,"This document contains many non-basic ASCII unicode characters"),command:new Fte};else if(e.ambiguousCharacterCount>=t)i={message:v(0,"This document contains many ambiguous unicode characters"),command:new Pte};else{if(!(e.invisibleCharacterCount>=t))throw new Error("Unreachable");i={message:v(0,"This document contains many invisible unicode characters"),command:new Ote}}this._bannerController.show({id:"unicodeHighlightBanner",message:i.message,icon:Ste,actions:[{label:i.command.shortLabel,href:`command:${i.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(n.createInstance(vte,e)),this._register(this._editor.onDidChangeModel((()=>{this._bannerClosed=!1,this._updateHighlighter()}))),this._options=e.getOption(125),this._register(i.onDidChangeTrust((e=>{this._updateHighlighter()}))),this._register(e.onDidChangeConfiguration((t=>{t.hasChanged(125)&&(this._options=e.getOption(125),this._updateHighlighter())}))),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const e=function(e,t){return{nonBasicASCII:t.nonBasicASCII===dE?!e:t.nonBasicASCII,ambiguousCharacters:t.ambiguousCharacters,invisibleCharacters:t.invisibleCharacters,includeComments:t.includeComments===dE?!e:t.includeComments,includeStrings:t.includeStrings===dE?!e:t.includeStrings,allowedCharacters:t.allowedCharacters,allowedLocales:t.allowedLocales}}(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([e.nonBasicASCII,e.ambiguousCharacters,e.invisibleCharacters].every((e=>!1===e)))return;const t={nonBasicASCII:e.nonBasicASCII,ambiguousCharacters:e.ambiguousCharacters,invisibleCharacters:e.invisibleCharacters,includeComments:e.includeComments,includeStrings:e.includeStrings,allowedCodePoints:Object.keys(e.allowedCharacters).map((e=>e.codePointAt(0))),allowedLocales:Object.keys(e.allowedLocales).map((e=>"_os"===e?(new Intl.NumberFormat).resolvedOptions().locale:"_vscode"===e?X:e))};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new xte(this._editor,t,this._updateState,this._editorWorkerService):this._highlighter=new Lte(this._editor,t,this._updateState)}getDecorationInfo(e){return this._highlighter?this._highlighter.getDecorationInfo(e):null}};kte.ID="editor.contrib.unicodeHighlighter",kte=Cte([yte(1,uX),yte(2,wte),yte(3,_d)],kte);let xte=class extends lt{constructor(e,t,i,n){super(),this._editor=e,this._options=t,this._updateState=i,this._editorWorkerService=n,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Zt((()=>this._update()),250)),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then((t=>{if(this._model.isDisposed())return;if(this._model.getVersionId()!==e)return;this._updateState(t);const i=[];if(!t.hasMore)for(const e of t.ranges)i.push({range:e,options:Mte.instance.getDecorationFromOptions(this._options)});this._decorations.set(i)}))}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel();return bB(t,e)?{reason:Tte(t.getValueInRange(e.range),this._options),inComment:wB(t,e),inString:CB(t,e)}:null}};xte=Cte([yte(3,uX)],xte);class Lte extends lt{constructor(e,t,i){super(),this._editor=e,this._options=t,this._updateState=i,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new Zt((()=>this._update()),250)),this._register(this._editor.onDidLayoutChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidScrollChange((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeHiddenAreas((()=>{this._updateSoon.schedule()}))),this._register(this._editor.onDidChangeModelContent((()=>{this._updateSoon.schedule()}))),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII())return void this._decorations.clear();const e=this._editor.getVisibleRanges(),t=[],i={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const t of e){const e=lH.computeUnicodeHighlights(this._model,this._options,t);for(const t of e.ranges)i.ranges.push(t);i.ambiguousCharacterCount+=i.ambiguousCharacterCount,i.invisibleCharacterCount+=i.invisibleCharacterCount,i.nonBasicAsciiCharacterCount+=i.nonBasicAsciiCharacterCount,i.hasMore=i.hasMore||e.hasMore}if(!i.hasMore)for(const e of i.ranges)t.push({range:e,options:Mte.instance.getDecorationFromOptions(this._options)});this._updateState(i),this._decorations.set(t)}getDecorationInfo(e){if(!this._decorations.has(e))return null;const t=this._editor.getModel(),i=t.getValueInRange(e.range);return bB(t,e)?{reason:Tte(i,this._options),inComment:wB(t,e),inString:CB(t,e)}:null}}const Dte=v(0,"Configure Unicode Highlight Options");let Ete=class{constructor(e,t,i){this._editor=e,this._languageService=t,this._openerService=i,this.hoverOrdinal=5}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=this._editor.getContribution(kte.ID);if(!n)return[];const o=[],s=new Set;let r=300;for(const e of t){const t=n.getDecorationInfo(e);if(!t)continue;const a=i.getValueInRange(e.range).codePointAt(0),l=Ite(a);let d;switch(t.reason.kind){case 0:d=zn(t.reason.confusableWith)?v(0,"The character {0} could be confused with the ASCII character {1}, which is more common in source code.",l,Ite(t.reason.confusableWith.codePointAt(0))):v(0,"The character {0} could be confused with the character {1}, which is more common in source code.",l,Ite(t.reason.confusableWith.codePointAt(0)));break;case 1:d=v(0,"The character {0} is invisible.",l);break;case 2:d=v(0,"The character {0} is not a basic ASCII character.",l)}if(s.has(d))continue;s.add(d);const c={codePoint:a,reason:t.reason,inComment:t.inComment,inString:t.inString},h=v(0,"Adjust settings"),u=`command:${Bte.ID}?${encodeURIComponent(JSON.stringify(c))}`,g=new dd("",!0).appendMarkdown(d).appendText(" ").appendLink(u,h,Dte);o.push(new dj(this,e.range,[g],!1,r++))}return o}renderHoverParts(e,t){return function(e,t,i,n,o){t.sort(su((e=>e.ordinal),ru));const s=new at;for(const r of t)s.add(gj(i,e.fragment,r.contents,n,o,e.onContentsChanged));return s}(e,t,this._editor,this._languageService,this._openerService)}};function Nte(e){return`U+${e.toString(16).padStart(4,"0")}`}function Ite(e){let t=`\`${Nte(e)}\``;return eo.isInvisibleCharacter(e)||(t+=` "${function(e){return 96===e?"`` ` ``":"`"+String.fromCodePoint(e)+"`"}(e)}"`),t}function Tte(e,t){return lH.computeUnicodeHighlightReason(e,t)}Ete=Cte([yte(1,Mu),yte(2,LL)],Ete);class Mte{constructor(){this.map=new Map}getDecorationFromOptions(e){return this.getDecoration(!e.includeComments,!e.includeStrings)}getDecoration(e,t){const i=`${e}${t}`;let n=this.map.get(i);return n||(n=zy.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:e,hideInStringTokens:t}),this.map.set(i,n)),n}}Mte.instance=new Mte;class Ate extends Qc{constructor(){super({id:Pte.ID,label:v(0,"Disable highlighting of characters in comments"),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=v(0,"Disable Highlight In Comments")}async run(e,t,i){const n=null==e?void 0:e.get(Cg);n&&this.runAction(n)}async runAction(e){await e.updateValue(pE,!1,2)}}class Rte extends Qc{constructor(){super({id:Pte.ID,label:v(0,"Disable highlighting of characters in strings"),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=v(0,"Disable Highlight In Strings")}async run(e,t,i){const n=null==e?void 0:e.get(Cg);n&&this.runAction(n)}async runAction(e){await e.updateValue(mE,!1,2)}}class Pte extends Qc{constructor(){super({id:Pte.ID,label:v(0,"Disable highlighting of ambiguous characters"),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=v(0,"Disable Ambiguous Highlight")}async run(e,t,i){const n=null==e?void 0:e.get(Cg);n&&this.runAction(n)}async runAction(e){await e.updateValue(gE,!1,2)}}Pte.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class Ote extends Qc{constructor(){super({id:Ote.ID,label:v(0,"Disable highlighting of invisible characters"),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=v(0,"Disable Invisible Highlight")}async run(e,t,i){const n=null==e?void 0:e.get(Cg);n&&this.runAction(n)}async runAction(e){await e.updateValue(hE,!1,2)}}Ote.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class Fte extends Qc{constructor(){super({id:Fte.ID,label:v(0,"Disable highlighting of non basic ASCII characters"),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=v(0,"Disable Non ASCII Highlight")}async run(e,t,i){const n=null==e?void 0:e.get(Cg);n&&this.runAction(n)}async runAction(e){await e.updateValue(uE,!1,2)}}Fte.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class Bte extends Qc{constructor(){super({id:Bte.ID,label:v(0,"Show Exclude Options"),alias:"Show Exclude Options",precondition:void 0})}async run(e,t,i){const{codePoint:n,reason:o,inString:s,inComment:r}=i,a=String.fromCodePoint(n),l=e.get(KL),d=e.get(Cg),c=[];if(0===o.kind)for(const e of o.notAmbiguousInLocales)c.push({label:v(0,'Allow unicode characters that are more common in the language "{0}".',e),run:async()=>{Wte(d,[e])}});if(c.push({label:function(e){return eo.isInvisibleCharacter(e)?v(0,"Exclude {0} (invisible character) from being highlighted",Nte(e)):v(0,"Exclude {0} from being highlighted",`${Nte(e)} "${a}"`)}(n),run:()=>async function(e,t){const i=e.getValue(cE);let n;n="object"==typeof i&&i?i:{};for(const e of t)n[String.fromCodePoint(e)]=!0;await e.updateValue(cE,n,2)}(d,[n])}),r){const e=new Ate;c.push({label:e.label,run:async()=>e.runAction(d)})}else if(s){const e=new Rte;c.push({label:e.label,run:async()=>e.runAction(d)})}if(0===o.kind){const e=new Pte;c.push({label:e.label,run:async()=>e.runAction(d)})}else if(1===o.kind){const e=new Ote;c.push({label:e.label,run:async()=>e.runAction(d)})}else if(2===o.kind){const e=new Fte;c.push({label:e.label,run:async()=>e.runAction(d)})}else!function(e){throw new Error(`Unexpected value: ${e}`)}(o);const h=await l.pick(c,{title:Dte});h&&await h.run()}}async function Wte(e,t){var i;const n=null===(i=e.inspect(fE).user)||void 0===i?void 0:i.value;let o;o="object"==typeof n&&n?Object.assign({},n):{};for(const e of t)o[e]=!0;await e.updateValue(fE,o,2)}Bte.ID="editor.action.unicodeHighlight.showExcludeOptions",ih(Pte),ih(Ote),ih(Fte),ih(Bte),oh(kte.ID,kte,1),JK.register(Ete);var Vte=function(e,t){return function(i,n){t(i,n,e)}};const Hte="ignoreUnusualLineTerminators";let zte=class extends lt{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._isPresentingDialog=!1,this._config=this._editor.getOption(126),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(126)&&(this._config=this._editor.getOption(126),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()}))),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,Hte)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(91))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());if(this._isPresentingDialog)return;let i;try{this._isPresentingDialog=!0,i=await this._dialogService.confirm({title:v(0,"Unusual Line Terminators"),message:v(0,"Detected unusual line terminators"),detail:v(0,"The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",Jl(e.uri)),primaryButton:v(0,"&&Remove Unusual Line Terminators"),cancelButton:v(0,"Ignore")})}finally{this._isPresentingDialog=!1}i.confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,Hte,!0)}(this._codeEditorService,e)}};zte.ID="editor.contrib.unusualLineTerminatorsDetector",zte=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Vte(1,k7),Vte(2,bd)],zte),oh(zte.ID,zte,1);const Ute="**",Kte="/",jte="[/\\\\]",qte="[^/\\\\]",$te=/\//g;function Gte(e,t){switch(e){case 0:return"";case 1:return`${qte}*?`;default:return`(?:${jte}|${qte}+${jte}${t?`|${jte}${qte}+`:""})*?`}}function Zte(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}s+=r}return s&&i.push(s),i}function Yte(e){if(!e)return"";let t="";const i=Zte(e,Kte);if(i.every((e=>e===Ute)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===Ute){if(e)return;t+=Gte(2,o===i.length-1)}else{let e=!1,s="",r=!1,a="";for(const i of n)if("}"!==i&&e)s+=i;else if(!r||"]"===i&&a)switch(i){case"{":e=!0;continue;case"[":r=!0;continue;case"}":{const i=`(?:${Zte(s,",").map((e=>Yte(e))).join("|")})`;t+=i,e=!1,s="";break}case"]":t+="["+a+"]",r=!1,a="";break;case"?":t+=qte;continue;case"*":t+=Gte(1);continue;default:t+=hn(i)}else{let e;e="-"===i?i:"^"!==i&&"!"!==i||a?i===Kte?"":hn(i):"^",a+=e}orie(e,t))).filter((e=>e!==sie)),e),n=i.length;if(!n)return sie;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}(i,t):(o=tie.exec(aie(i,t)))?lie(o[1].substr(1),i,!0):(o=iie.exec(aie(i,t)))?lie(o[1],i,!1):function(e){try{const t=new RegExp(`^${Yte(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return sie}}(i),nie.set(n,s)),function(e,t){if("string"==typeof t)return e;const i=function(i,n){return ql(i,t.base,!j)?e(gn(i.substr(t.base.length),Eo),n):null};return i.allBasenames=e.allBasenames,i.allPaths=e.allPaths,i.basenames=e.basenames,i.patterns=e.patterns,i}(s,e)}function aie(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function lie(e,t,i){const n=Eo===Co.sep,o=n?e:e.replace($te,Eo),s=Eo+o,r=Co.sep+e;let a;return a=i?function(i,a){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(r))?null:t}:function(i,s){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t},a.allPaths=[(i?"*/":"./")+e],a}function die(e,t={}){if(!e)return oie;if("string"==typeof e||function(e){const t=e;return!!t&&("string"==typeof t.base&&"string"==typeof t.pattern)}(e)){const i=rie(e,t);if(i===sie)return oie;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=cie(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return sie;const n=rie(e,i);if(n===sie)return sie;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,s,r)=>{if(!r||!n(t,o))return null;const a=r(i.replace("$(basename)",(()=>s)));return Bt(a)?a.then((t=>t?e:null)):a?e:null};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==sie))),n=i.length;if(!n)return sie;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){let n;for(let o=0,s=i.length;o{for(const e of n){const t=await e;if("string"==typeof t)return t}return null})():null},t=i.find((e=>!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,n){let o,s;for(let r=0,a=i.length;r{for(const e of s){const t=await e;if("string"==typeof t)return t}return null})():null},s=i.find((e=>!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return r.length&&(o.allPaths=r),o}(e,t)}function cie(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(s),r}function hie(e,t,i,n,o,s){if(Array.isArray(e)){let r=0;for(const a of e){const e=hie(a,t,i,n,o,s);if(10===e)return e;e>r&&(r=e)}return r}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:l,pattern:d,scheme:c,hasAccessToAllModels:h,notebookType:u}=e;if(!n&&!h)return 0;u&&o&&(t=o);let g=0;if(c)if(c===t.scheme)g=10;else{if("*"!==c)return 0;g=5}if(l)if(l===i)g=10;else{if("*"!==l)return 0;g=Math.max(g,5)}if(u)if(u===s)g=10;else{if("*"!==u||void 0===s)return 0;g=Math.max(g,5)}if(d){let e;if(e="string"==typeof d?d:{...d,base:yo(d.base)},e!==t.fsPath&&(r=e,a=t.fsPath,!r||"string"!=typeof a||!die(r)(a,void 0,undefined)))return 0;g=10}return g}return 0;var r,a}var uie,gie,pie=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},mie=function(e,t){return function(i,n){t(i,n,e)}};const fie=new gc("hasWordHighlights",!1);function _ie(e,t,i,n){return qt(e.ordered(t).map((e=>()=>Promise.resolve(e.provideDocumentHighlights(t,i,n)).then(void 0,Le))),Gh).then((e=>{if(e){const i=new da;return i.set(t.uri,e),i}return new da}))}class vie{constructor(e,t,i){this._model=e,this._selection=t,this._wordSeparators=i,this._wordRange=this._getCurrentWordRange(e,t),this._result=null}get result(){return this._result||(this._result=Wt((e=>this._compute(this._model,this._selection,this._wordSeparators,e)))),this._result}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new hh(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,s=t.endColumn,r=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(r));for(let e=0,t=i.length;!a&&e=s&&(a=!0)}return a}cancel(){this.result.cancel()}}class bie extends vie{constructor(e,t,i,n){super(e,t,i),this._providers=n}_compute(e,t,i,n){return _ie(this._providers,e,t.getPosition(),n).then((e=>e||new da))}}class wie extends vie{constructor(e,t,i,n,o){super(e,t,i),this._providers=n,this._otherModels=o}_compute(e,t,i,n){return function(e,t,i,n,o,s){return qt(e.ordered(t).map((e=>()=>{const n=s.filter((e=>Fh(e))).filter((t=>hie(e.selector,t.uri,t.getLanguageId(),!0,void 0,void 0)>0));return Promise.resolve(e.provideMultiDocumentHighlights(t,i,n,o)).then(void 0,Le)})),(e=>e instanceof da&&e.size>0))}(this._providers,e,t.getPosition(),0,n,this._otherModels).then((e=>e||new da))}}class Cie extends vie{constructor(e,t,i,n,o){super(e,t,n),this._otherModels=o,this._selectionIsEmpty=t.isEmpty(),this._word=i}_compute(e,t,i,n){return Kt(250,n).then((()=>{const n=new da;let o;if(o=this._word?this._word:e.getWordAtPosition(t.getPosition()),!o)return new da;const s=[e,...this._otherModels];for(const e of s){if(e.isDisposed())continue;const t=e.findMatches(o.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:IC.Text})));t&&n.set(e.uri,t)}return n}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}eh("_executeDocumentHighlights",(async(e,t,i)=>{const n=e.get(Pk),o=await _ie(n.documentHighlightProvider,t,i,At.None);return null==o?void 0:o.get(t.uri)}));let yie=uie=class{constructor(e,t,i,n,o){this.toUnhook=new at,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new da,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.providers=t,this.multiDocumentProviders=i,this.codeEditorService=o,this._hasWordHighlights=fie.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(81),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||"off"!==this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidFocusEditorText((e=>{"off"!==this.occurrencesHighlight&&(this.workerRequest||this._run())}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeModel((e=>{!e.newModelUrl&&e.oldModelUrl?this._stopSingular():uie.query&&this._run()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{const t=this.editor.getOption(81);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,uie.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){"off"!==this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(hh.compareRangesUsingStarts)}moveNext(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();t&&na(`${this.editor.getModel().getLineContent(n.startLineNumber)}, ${i+1} of ${e.length} for '${t.word}'`)}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const e=this._getSortedHighlights(),t=e.findIndex((e=>e.containsPosition(this.editor.getPosition()))),i=(t-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const t=this._getWord();t&&na(`${this.editor.getModel().getLineContent(n.startLineNumber)}, ${i+1} of ${e.length} for '${t.word}'`)}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const e=uie.storedDecorations.get(this.editor.getModel().uri);e&&(this.editor.removeDecorations(e),uie.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){const e=this.codeEditorService.listCodeEditors(),t=[];for(const i of e){if(!i.hasModel())continue;const e=uie.storedDecorations.get(i.getModel().uri);if(!e)continue;i.removeDecorations(e),t.push(i.getModel().uri);const n=Sie.get(i);(null==n?void 0:n.wordHighlighter)&&n.wordHighlighter.decorations.length>0&&(n.wordHighlighter.decorations.clear(),n.wordHighlighter.workerRequest=null,n.wordHighlighter._hasWordHighlights.set(!1))}for(const e of t)uie.storedDecorations.delete(e)}_stopSingular(){var e,t,i,n;this._removeSingleDecorations(),this.editor.hasTextFocus()&&((null===(e=this.editor.getModel())||void 0===e?void 0:e.uri.scheme)!==qo.vscodeNotebookCell&&(null===(i=null===(t=uie.query)||void 0===t?void 0:t.modelInfo)||void 0===i?void 0:i.model.uri.scheme)!==qo.vscodeNotebookCell?(uie.query=null,this._run()):(null===(n=uie.query)||void 0===n?void 0:n.modelInfo)&&(uie.query.modelInfo=null)),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_stopAll(){this._removeAllDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){var t;"off"===this.occurrencesHighlight||3!==e.reason&&(null===(t=this.editor.getModel())||void 0===t?void 0:t.uri.scheme)!==qo.vscodeNotebookCell?this._stopAll():this._run()}_getWord(){const e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:t,column:i})}getOtherModelsToHighlight(e){if(!e)return[];if(e.uri.scheme===qo.vscodeNotebookCell){const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){const i=n.getModel();i&&i!==e&&i.uri.scheme===qo.vscodeNotebookCell&&t.push(i)}return t}const t=[],i=this.codeEditorService.listCodeEditors();for(const n of i){if(!xj(n))continue;const i=n.getModel();i&&e===i.modified&&t.push(i.modified)}if(t.length)return t;if("singleFile"===this.occurrencesHighlight)return[];for(const n of i){const i=n.getModel();i&&i!==e&&t.push(i)}return t}_run(){var e;let t;if(this.editor.hasTextFocus()){const e=this.editor.getSelection();if(!e||e.startLineNumber!==e.endLineNumber)return uie.query=null,void this._stopAll();const i=e.startColumn,n=e.endColumn,o=this._getWord();if(!o||o.startColumn>i||o.endColumn{t===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=e||[],this._beginRenderDecorations())}),xe)}}computeWithModel(e,t,i,n){return n.length?function(e,t,i,n,o,s){return e.has(t)?new wie(t,i,o,e,s):new Cie(t,i,n,o,s)}(this.multiDocumentProviders,e,t,i,this.editor.getOption(131),n):function(e,t,i,n,o){return e.has(t)?new bie(t,i,o,e):new Cie(t,i,n,o,[])}(this.providers,e,t,i,this.editor.getOption(131))}_beginRenderDecorations(){const e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){var e,t,i;this.renderDecorationsTimer=-1;const n=this.codeEditorService.listCodeEditors();for(const s of n){const n=Sie.get(s);if(!n)continue;const r=[],a=null===(e=s.getModel())||void 0===e?void 0:e.uri;if(a&&this.workerRequestValue.has(a)){const e=uie.storedDecorations.get(a),l=this.workerRequestValue.get(a);if(l)for(const e of l)e.range&&r.push({range:e.range,options:(o=e.kind,o===IC.Write?K9:o===IC.Text?j9:G9)});let d=[];s.changeDecorations((t=>{d=t.deltaDecorations(null!=e?e:[],r)})),uie.storedDecorations=uie.storedDecorations.set(a,d),r.length>0&&(null===(t=n.wordHighlighter)||void 0===t||t.decorations.set(r),null===(i=n.wordHighlighter)||void 0===i||i._hasWordHighlights.set(!0))}}var o}dispose(){this._stopSingular(),this.toUnhook.dispose()}};yie.storedDecorations=new da,yie.query=null,yie=uie=pie([mie(4,bd)],yie);let Sie=gie=class extends lt{static get(e){return e.getContribution(gie.ID)}constructor(e,t,i,n){super(),this._wordHighlighter=null;const o=()=>{e.hasModel()&&!e.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new yie(e,i.documentHighlightProvider,i.multiDocumentHighlightProvider,t,n))};this._register(e.onDidChangeModel((e=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),o()}))),o()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!(!this._wordHighlighter||!this._wordHighlighter.hasDecorations())}moveNext(){var e;null===(e=this._wordHighlighter)||void 0===e||e.moveNext()}moveBack(){var e;null===(e=this._wordHighlighter)||void 0===e||e.moveBack()}restoreViewState(e){this._wordHighlighter&&e&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};Sie.ID="editor.contrib.wordHighlighter",Sie=gie=pie([mie(1,pc),mie(2,Pk),mie(3,bd)],Sie);class kie extends Qc{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=Sie.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}oh(Sie.ID,Sie,0),ih(class extends kie{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:v(0,"Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:fie,kbOpts:{kbExpr:gh.editorTextFocus,primary:65,weight:100}})}}),ih(class extends kie{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:v(0,"Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:fie,kbOpts:{kbExpr:gh.editorTextFocus,primary:1089,weight:100}})}}),ih(class extends Qc{constructor(){super({id:"editor.action.wordHighlight.trigger",label:v(0,"Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:fie.toNegated(),kbOpts:{kbExpr:gh.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=Sie.get(t);n&&n.restoreViewState(!0)}});class xie extends Yc{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=iC(t.getOption(131),t.getOption(130)),o=t.getModel(),s=t.getSelections().map((e=>{const t=new wd(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,s.map((e=>iS.fromModelSelection(e)))),1===s.length){const e=new wd(s[0].positionLineNumber,s[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new uh(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new uh(t.lineNumber,t.column,t.lineNumber,t.column)}}class Lie extends xie{_move(e,t,i,n){return vS.moveWordLeft(e,t,i,n)}}class Die extends xie{_move(e,t,i,n){return vS.moveWordRight(e,t,i,n)}}class Eie extends Yc{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){const n=e.get(sp);if(!t.hasModel())return;const o=iC(t.getOption(131),t.getOption(130)),s=t.getModel(),r=t.getSelections(),a=t.getOption(6),l=t.getOption(11),d=n.getLanguageConfiguration(s.getLanguageId()).getAutoClosingPairs(),c=t._getViewModel(),h=r.map((e=>{const i=this._delete({wordSeparators:o,model:s,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(9),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:d,autoClosedCharacters:c.getCursorAutoClosedCharacters()},this._wordNavigationType);return new dS(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,h),t.pushUndoStop()}}class Nie extends Eie{_delete(e,t){return vS.deleteWordLeft(e,t)||new hh(1,1,1,1)}}class Iie extends Eie{_delete(e,t){const i=vS.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new hh(n,o,n,o)}}th(new class extends Lie{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}),th(new class extends Lie{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}),th(new class extends Lie{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:$d.and(gh.textInputFocus,null===(e=$d.and(lk,G$))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}),th(new class extends Lie{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}),th(new class extends Lie{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}),th(new class extends Lie{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:$d.and(gh.textInputFocus,null===(e=$d.and(lk,G$))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}),th(new class extends Die{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}),th(new class extends Die{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:$d.and(gh.textInputFocus,null===(e=$d.and(lk,G$))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}),th(new class extends Die{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}),th(new class extends Die{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}),th(new class extends Die{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:$d.and(gh.textInputFocus,null===(e=$d.and(lk,G$))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}),th(new class extends Die{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}),th(new class extends Lie{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(iC(CE.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n)}}),th(new class extends Lie{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(iC(CE.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n)}}),th(new class extends Die{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(iC(CE.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n)}}),th(new class extends Die{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(iC(CE.wordSeparators.defaultValue,e.intlSegmenterLocales),t,i,n)}}),th(new class extends Nie{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:gh.writable})}}),th(new class extends Nie{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:gh.writable})}}),th(new class extends Nie{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:gh.writable,kbOpts:{kbExpr:gh.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}),th(new class extends Iie{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:gh.writable})}}),th(new class extends Iie{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:gh.writable})}}),th(new class extends Iie{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:gh.writable,kbOpts:{kbExpr:gh.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}),ih(class extends Qc{constructor(){super({id:"deleteInsideWord",precondition:gh.writable,label:v(0,"Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=iC(t.getOption(131),t.getOption(130)),o=t.getModel(),s=t.getSelections().map((e=>{const t=vS.deleteInsideWord(n,o,e);return new dS(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}});class Tie extends xie{_move(e,t,i,n){return bS.moveWordPartLeft(e,t,i)}}Id.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft"),Id.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class Mie extends xie{_move(e,t,i,n){return bS.moveWordPartRight(e,t,i)}}th(new class extends Eie{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:gh.writable,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return bS.deleteWordPartLeft(e)||new hh(1,1,1,1)}}),th(new class extends Eie{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:gh.writable,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){const i=bS.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new hh(n,o,n,o)}}),th(new class extends Tie{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}),th(new class extends Tie{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}),th(new class extends Mie{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}),th(new class extends Mie{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:gh.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}});var Aie=i(953),Rie={};Rie.styleTagTransform=Gr(),Rie.setAttributes=Kr(),Rie.insert=zr().bind(null,"head"),Rie.domAPI=Vr(),Rie.insertStyleElement=qr(),Br()(Aie.Z,Rie),Aie.Z&&Aie.Z.locals&&Aie.Z.locals;class Pie extends Dz{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?Dh(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}function Oie(e){return"string"==typeof e}function Fie(e){return!Oie(e)}function Bie(e){return!e}function Wie(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Vie(e){return e.replace(/[&<>'"_]/g,"-")}function Hie(e,t){return new Error(`${e.languageId}: ${t}`)}function zie(e,t,i,n,o){let s=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,d,c,h,u,g){return Bie(a)?Bie(l)?!Bie(d)&&d0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}var Kie;class jie{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new qie(e,t);let i=qie.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new qie(e,t),this._entries[i]=n,n)}}jie._INSTANCE=new jie(5);class qie{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return qie._equals(this,e)}push(e){return jie.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return jie.create(this.parent,e)}}class $ie{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new $ie(this.languageId,this.state)}}class Gie{static create(e,t){return this._INSTANCE.create(e,t)}constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}create(e,t){if(null!==t)return new Zie(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new Zie(e,t);const i=qie.getStackElementId(e);let n=this._entries[i];return n||(n=new Zie(e,null),this._entries[i]=n,n)}}Gie._INSTANCE=new Gie(5);class Zie{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:Gie.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof Zie&&!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData))}}class Yie{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new yC(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=HC.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenize(e,t,s);if(0!==n)for(const e of a.tokens)this._tokens.push(new yC(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new SC(this._tokens,e)}}class Qie{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=1024|this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,o=t.length,s=null!==i?i.length:0;if(0===n&&0===o&&0===s)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===s)return e;const r=new Uint32Array(n+o+s);null!==e&&r.set(e);for(let e=0;e{if(s)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{e.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})))}getLoadStatus(){const e=[];for(const t in this._embeddedLanguages){const i=HC.get(t);if(i){if(i instanceof Kie){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}}else HC.isResolved(t)||e.push(HC.getOrCreate(t))}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then((e=>{}))}}getInitialState(){const e=jie.create(null,this._lexer.start);return Gie.create(e,null)}tokenize(e,t,i){if(e.length>=this._maxTokenizationLineLength)return KC(this._languageId,i);const n=new Yie,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){if(e.length>=this._maxTokenizationLineLength)return jC(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),i);const n=new Qie(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n);return n.finalize(o)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Uie(this._lexer,t.stack.state),!i))throw Hie(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const s of i){if(!Fie(s.action)||"@pop"!==s.action.nextEmbedded)continue;o=!0;let i=s.resolveRegex(t.stack.state);const r=i.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(r.substr(4,r.length-5),e)}const a=e.search(i);-1===a||0!==a&&s.matchOnlyAtLineStart||(-1===n||a0&&o.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(s);return this._myTokenize(a,t,i,n+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterLanguage(this._languageId);const s=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,d=i.stack,c=0,h=null,u=!0;for(;u||c=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=Uie(this._lexer,_),!e))throw Hie(this._lexer,"tokenizer state is not defined: "+_);const t=r.substr(c);for(const i of e)if((0===c||!i.matchOnlyAtLineStart)&&(v=t.match(i.resolveRegex(_)),v)){b=v[0],w=i.action;break}}if(v||(v=[""],b=""),w||(c=this._lexer.maxStack)throw Hie(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(_)}else if("@pop"===w.next){if(d.depth<=1)throw Hie(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(C));d=d.pop()}else if("@popall"===w.next)d=d.popall();else{let e=zie(this._lexer,w.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!Uie(this._lexer,e))throw Hie(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(C));d=d.push(e)}}w.log&&"string"==typeof w.log&&(g=this._lexer,p=this._lexer.languageId+": "+zie(this._lexer,w.log,b,v,_),console.log(`${g.languageId}: ${p}`))}if(null===S)throw Hie(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(C));const k=i=>{const s=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(s);if(c0)throw Hie(this._lexer,"groups cannot be nested: "+this._safeRuleName(C));if(v.length!==S.length+1)throw Hie(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(C));let e=0;for(let t=1;t=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(4,Cg)],Xie);const ene=fL("standaloneColorizer",{createHTML:e=>e});class tne{static colorizeElement(e,t,i,n){const o=(n=n||{}).theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+o,this.colorize(t,a||"",r,n).then((e=>{var t;const n=null!==(t=null==ene?void 0:ene.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static async colorize(e,t,i,n){const o=e.languageIdCodec;let s=4;n&&"number"==typeof n.tabSize&&(s=n.tabSize),Gn(t)&&(t=t.substr(1));const r=fn(t);if(!e.isRegisteredLanguageId(i))return ine(r,s,o);const a=await HC.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=function(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r"),s=l.endState}return o.join("")}(e,t,i,n);if(i instanceof Xie){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}(r,s,a,o):ine(r,s,o)}static colorizeLine(e,t,i,n,o=4){const s=$P.isBasicASCII(e,t),r=$P.containsRTL(e,s,i);return KA(new BA(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.tokenization.forceTokenization(t);const o=e.tokenization.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function ine(e,t,i){let n=[];const o=new Uint32Array(2);o[0]=0,o[1]=33587200;for(let s=0,r=e.length;s")}return n.join("")}let nne=class extends lt{constructor(e){super(),this._themeService=e,this._onWillCreateCodeEditor=this._register(new kt),this._onCodeEditorAdd=this._register(new kt),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new kt),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new kt),this._onDiffEditorAdd=this._register(new kt),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new kt),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new pt,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorationsByType(e)))))}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}async openCodeEditor(e,t,i){for(const n of this._codeEditorOpenHandlers){const o=await n(e,t,i);if(null!==o)return o}return null}registerCodeEditorOpenHandler(e){return rt(this._codeEditorOpenHandlers.unshift(e))}};nne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Vv)],nne);var one=function(e,t){return function(i,n){t(i,n,e)}};let sne=class extends nne{constructor(e,t){super(t),this._register(this.onCodeEditorAdd((()=>this._checkContextKey()))),this._register(this.onCodeEditorRemove((()=>this._checkContextKey()))),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler((async(e,t,i)=>t?this.doOpenEditor(t,e):null)))}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===qo.http||i===qo.https)return Dr(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};sne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([one(0,pc),one(1,Vv)],sne),Ng(bd,sne,0);const rne=vd("layoutService");var ane=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},lne=function(e,t){return function(i,n){t(i,n,e)}};let dne=class{get mainContainer(){var e,t;return null!==(t=null===(e=Yh(this._codeEditorService.listCodeEditors()))||void 0===e?void 0:e.getContainerDomNode())&&void 0!==t?t:s.document.body}get activeContainer(){var e,t;const i=null!==(e=this._codeEditorService.getFocusedCodeEditor())&&void 0!==e?e:this._codeEditorService.getActiveCodeEditor();return null!==(t=null==i?void 0:i.getContainerDomNode())&&void 0!==t?t:this.mainContainer}get mainContainerDimension(){return Is(this.mainContainer)}get activeContainerDimension(){return Is(this.activeContainer)}get containers(){return jh(this._codeEditorService.listCodeEditors().map((e=>e.getContainerDomNode())))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}constructor(e){this._codeEditorService=e,this.onDidLayoutMainContainer=_t.None,this.onDidLayoutActiveContainer=_t.None,this.onDidLayoutContainer=_t.None,this.onDidChangeActiveContainer=_t.None,this.onDidAddContainer=_t.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};dne=ane([lne(0,bd)],dne);let cne=class extends dne{get mainContainer(){return this._container}constructor(e,t){super(t),this._container=e}};cne=ane([lne(1,bd)],cne),Ng(rne,dne,1);var hne=function(e,t){return function(i,n){t(i,n,e)}};function une(e){return e.scheme===qo.file?e.fsPath:e.path}let gne=0;class pne{constructor(e,t,i,n,o,s,r){this.id=++gne,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class mne{constructor(e,t){this.resourceLabel=e,this.reason=t}}class fne{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);const i=[];return e.length>0&&i.push(v(0,"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(v(0,"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class _ne{constructor(e,t,i,n,o,s,r){this.id=++gne,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new fne),this.removedResources.has(t)||this.removedResources.set(t,new mne(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new fne),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new mne(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class vne{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new Sy(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,r=this._past.length;s=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let o=this._future.length-1;o>=0;o--,n++){const r=this._future[o];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,s=o),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class bne{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=s,i=n)}return[t,i]}canUndo(e){if(e instanceof xy){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){xe(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(t){return s(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(s(),n.dispose(),o())),(t=>(s(),n.dispose(),this._onError(t,e)))):(s(),n.dispose(),o())}async _invokeWorkspacePrepare(e){if(void 0===e.actual.prepareUndoRedo)return lt.None;const t=e.actual.prepareUndoRedo();return void 0===t?lt.None:t}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(lt.None);const i=e.actual.prepareUndoRedo();return i?nt(i)?t(i):i.then((e=>t(e))):t(lt.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||wne);return new bne(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new yne(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new yne}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,v(0,"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,v(0,"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,v(0,"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndUndo(e,t,null,v(0,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,v(0,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(e,t,i,n){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){let o;!function(e){e[e.All=0]="All",e[e.This=1]="This",e[e.Cancel=2]="Cancel"}(o||(o={}));const{result:s}=await this._dialogService.prompt({type:pD.Info,message:v(0,"Would you like to undo '{0}' across all files?",t.label),buttons:[{label:v(0,"&&Undo in {0} Files",i.editStacks.length),run:()=>o.All},{label:v(0,"Undo this &&File"),run:()=>o.This}],cancelButton:{run:()=>o.Cancel}});if(s===o.Cancel)return;if(s===o.This)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let o;try{o=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const s=this._checkWorkspaceUndo(e,t,i,!0);if(s)return o.dispose(),s.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new bne([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=v(0,"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof xy){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(o){if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}}async _confirmAndContinueUndo(e,t,i){if((await this._dialogService.confirm({message:v(0,"Would you like to undo '{0}'?",i.label),primaryButton:v(0,"&&Yes"),cancelButton:v(0,"No")})).confirmed)return this._undo(e,t,!0)}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,v(0,"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const s=[];for(const e of i.editStacks)e.locked&&s.push(e.resourceLabel);return s.length>0?this._tryToSplitAndRedo(e,t,null,v(0,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,s.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,v(0,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}async _executeWorkspaceRedo(e,t,i){let n;try{n=await this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new bne([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=v(0,"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&s.groupId===e&&(!t||s.groupOrder=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([hne(0,k7),hne(1,fD)],Cne);class yne{constructor(e){this.returnValue=e}}Ng(yy,Cne,1);var Sne=function(e,t){return function(i,n){t(i,n,e)}};let kne=class extends lt{constructor(e,t,i){super(),this._themeService=e,this._logService=t,this._languageService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(e){return this._caches.has(e)||this._caches.set(e,new D8(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}};function xne(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(xne):!!e.exclusive)}kne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Sne(0,Vv),Sne(1,Hc),Sne(2,Mu)],kne),Ng(V8,kne,1);class Lne{constructor(e,t,i,n){this.uri=e,this.languageId=t,this.notebookUri=i,this.notebookType=n}equals(e){var t,i;return this.notebookType===e.notebookType&&this.languageId===e.languageId&&this.uri.toString()===e.uri.toString()&&(null===(t=this.notebookUri)||void 0===t?void 0:t.toString())===(null===(i=e.notebookUri)||void 0===i?void 0:i.toString())}}class Dne{constructor(e){this._notebookInfoResolver=e,this._clock=0,this._entries=[],this._onDidChange=new kt,this.onDidChange=this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),rt((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(const e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}_updateScores(e){var t,i;const n=null===(t=this._notebookInfoResolver)||void 0===t?void 0:t.call(this,e.uri),o=n?new Lne(e.uri,e.getLanguageId(),n.uri,n.type):new Lne(e.uri,e.getLanguageId(),void 0,void 0);if(!(null===(i=this._lastCandidate)||void 0===i?void 0:i.equals(o))){this._lastCandidate=o;for(const t of this._entries)if(t._score=hie(t.selector,o.uri,o.languageId,Fh(e),o.notebookUri,o.notebookType),xne(t.selector)&&t._score>0){for(const e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(Dne._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:Ene(e.selector)&&!Ene(t.selector)?1:!Ene(e.selector)&&Ene(t.selector)?-1:e._timet._time?-1:0}}function Ene(e){return"string"!=typeof e&&(Array.isArray(e)?e.some(Ene):Boolean(e.isBuiltin))}Ng(Pk,class{constructor(){this.referenceProvider=new Dne(this._score.bind(this)),this.renameProvider=new Dne(this._score.bind(this)),this.newSymbolNamesProvider=new Dne(this._score.bind(this)),this.codeActionProvider=new Dne(this._score.bind(this)),this.definitionProvider=new Dne(this._score.bind(this)),this.typeDefinitionProvider=new Dne(this._score.bind(this)),this.declarationProvider=new Dne(this._score.bind(this)),this.implementationProvider=new Dne(this._score.bind(this)),this.documentSymbolProvider=new Dne(this._score.bind(this)),this.inlayHintsProvider=new Dne(this._score.bind(this)),this.colorProvider=new Dne(this._score.bind(this)),this.codeLensProvider=new Dne(this._score.bind(this)),this.documentFormattingEditProvider=new Dne(this._score.bind(this)),this.documentRangeFormattingEditProvider=new Dne(this._score.bind(this)),this.onTypeFormattingEditProvider=new Dne(this._score.bind(this)),this.signatureHelpProvider=new Dne(this._score.bind(this)),this.hoverProvider=new Dne(this._score.bind(this)),this.documentHighlightProvider=new Dne(this._score.bind(this)),this.multiDocumentHighlightProvider=new Dne(this._score.bind(this)),this.selectionRangeProvider=new Dne(this._score.bind(this)),this.foldingRangeProvider=new Dne(this._score.bind(this)),this.linkProvider=new Dne(this._score.bind(this)),this.inlineCompletionsProvider=new Dne(this._score.bind(this)),this.inlineEditProvider=new Dne(this._score.bind(this)),this.completionProvider=new Dne(this._score.bind(this)),this.linkedEditingRangeProvider=new Dne(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new Dne(this._score.bind(this)),this.documentSemanticTokensProvider=new Dne(this._score.bind(this)),this.documentDropEditProvider=new Dne(this._score.bind(this)),this.documentPasteEditProvider=new Dne(this._score.bind(this))}_score(e){var t;return null===(t=this._notebookTypeResolver)||void 0===t?void 0:t.call(this,e)}},1);var Nne=i(6910),Ine={};Ine.styleTagTransform=Gr(),Ine.setAttributes=Kr(),Ine.insert=zr().bind(null,"head"),Ine.domAPI=Vr(),Ine.insertStyleElement=qr(),Br()(Nne.Z,Ine),Nne.Z&&Nne.Z.locals&&Nne.Z.locals;var Tne=function(e,t){return function(i,n){t(i,n,e)}};const Mne=Sr;let Ane=class extends mN{get _targetWindow(){return ls(this._target.targetElements[0])}get _targetDocumentElement(){return ls(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return 2===this._hoverPosition?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(e,t,i,n,o,s){var r,a,l,d,c,h,u,g;super(),this._keybindingService=t,this._configurationService=i,this._openerService=n,this._instantiationService=o,this._accessibilityService=s,this._messageListeners=new at,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new kt),this._onRequestLayout=this._register(new kt),this._linkHandler=e.linkHandler||(t=>IL(this._openerService,t,hd(e.content)?e.content.isTrusted:void 0)),this._target="targetElements"in e.target?e.target:new Pne(e.target),this._hoverPointer=(null===(r=e.appearance)||void 0===r?void 0:r.showPointer)?Mne("div.workbench-hover-pointer"):void 0,this._hover=this._register(new VK),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),(null===(a=e.appearance)||void 0===a?void 0:a.compact)&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),(null===(l=e.appearance)||void 0===l?void 0:l.skipFadeInAnimation)&&this._hover.containerDomNode.classList.add("skip-fade-in"),e.additionalClasses&&this._hover.containerDomNode.classList.add(...e.additionalClasses),(null===(d=e.position)||void 0===d?void 0:d.forcePosition)&&(this._forcePosition=!0),e.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=null!==(h=null===(c=e.position)||void 0===c?void 0:c.hoverPosition)&&void 0!==h?h:3,this.onmousedown(this._hover.containerDomNode,(e=>e.stopPropagation())),this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.dispose()})),this._register(ws(this._targetWindow,"blur",(()=>this.dispose())));const p=Mne("div.hover-row.markdown-hover"),m=Mne("div.hover-contents");if("string"==typeof e.content)m.textContent=e.content,m.style.whiteSpace="pre-wrap";else if(lr(e.content))m.appendChild(e.content),m.classList.add("html-hover-contents");else{const t=e.content,i=this._instantiationService.createInstance(NL,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||vE.fontFamily}),{element:n}=i.render(t,{actionHandler:{callback:e=>this._linkHandler(e),disposables:this._messageListeners},asyncRenderCallback:()=>{m.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});m.appendChild(n)}if(p.appendChild(m),this._hover.contentsDomNode.appendChild(p),e.actions&&e.actions.length>0){const t=Mne("div.hover-row.status-bar"),i=Mne("div.actions");e.actions.forEach((e=>{const t=this._keybindingService.lookupKeybinding(e.commandId),n=t?t.getLabel():null;HK.render(i,{label:e.label,commandId:e.commandId,run:t=>{e.run(t),this.dispose()},iconClass:e.iconClass},n)})),t.appendChild(i),this._hover.containerDomNode.appendChild(t)}let f;if(this._hoverContainer=Mne("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode),f=!(e.actions&&e.actions.length>0)&&(void 0===(null===(u=e.persistence)||void 0===u?void 0:u.hideOnHover)?"string"==typeof e.content||hd(e.content)&&!e.content.value.includes("](")&&!e.content.value.includes(""):e.persistence.hideOnHover),f&&(null===(g=e.appearance)||void 0===g?void 0:g.showHoverHint)){const e=Mne("div.hover-row.status-bar"),t=Mne("div.info");t.textContent=v(0,"Hold {0} key to mouse over",K?"Option":"Alt"),e.appendChild(t),this._hover.containerDomNode.appendChild(e)}const _=[...this._target.targetElements];f||_.push(this._hoverContainer);const b=this._register(new Rne(_));if(this._register(b.onMouseOut((()=>{this._isLocked||this.dispose()}))),f){const e=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new Rne(e)),this._register(this._lockMouseTracker.onMouseOut((()=>{this._isLocked||this.dispose()})))}else this._lockMouseTracker=b}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const e=this._hover.containerDomNode,t=this.findLastFocusableChild(this._hover.containerDomNode);if(t){const i=vr(this._hoverContainer,Mne("div")),n=_r(this._hoverContainer,Mne("div"));i.tabIndex=0,n.tabIndex=0,this._register(ws(n,"focus",(t=>{e.focus(),t.preventDefault()}))),this._register(ws(i,"focus",(e=>{t.focus(),e.preventDefault()})))}}findLastFocusableChild(e){if(e.hasChildNodes())for(let t=0;t=0)return e}const n=this.findLastFocusableChild(i);if(n)return n}}render(e){var t;e.appendChild(this._hoverContainer);const i=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&zK(!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),null===(t=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))||void 0===t?void 0:t.getAriaLabel());i&&oa(i),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const e=this._target.targetElements.map((e=>(e=>{const t=Ps(e),i=e.getBoundingClientRect();return{top:i.top*t,bottom:i.bottom*t,right:i.right*t,left:i.left*t}})(e))),{top:t,right:i,bottom:n,left:o}=e[0],s=i-o,r=n-t,a={top:t,right:i,bottom:n,left:o,width:s,height:r,center:{x:o+s/2,y:t+r/2}};if(this.adjustHorizontalHoverPosition(a),this.adjustVerticalHoverPosition(a),this.adjustHoverMaxHeight(a),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:a.left+=3,a.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:a.left-=3,a.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:a.top+=3,a.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:a.top-=3,a.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px"}a.center.x=a.left+s/2,a.center.y=a.top+r/2}this.computeXCordinate(a),this.computeYCordinate(a),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(a)),this._hover.onContentsChanged()}computeXCordinate(e){const t=this._hover.containerDomNode.clientWidth+2;void 0!==this._target.x?this._x=this._target.x:1===this._hoverPosition?this._x=e.right:0===this._hoverPosition?this._x=e.left-t:(this._hoverPointer?this._x=e.center.x-this._hover.containerDomNode.clientWidth/2:this._x=e.left,this._x+t>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-t-2,this._targetDocumentElement.clientLeft))),this._xthis._targetWindow.innerHeight&&(this._y=e.bottom)}adjustHorizontalHoverPosition(e){if(void 0!==this._target.x)return;const t=this._hoverPointer?3:0;if(this._forcePosition){const i=t+2;1===this._hoverPosition?this._hover.containerDomNode.style.maxWidth=this._targetDocumentElement.clientWidth-e.right-i+"px":0===this._hoverPosition&&(this._hover.containerDomNode.style.maxWidth=e.left-i+"px")}else 1===this._hoverPosition?this._targetDocumentElement.clientWidth-e.right=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=0:this._hoverPosition=2):0===this._hoverPosition&&(e.left=this._hover.containerDomNode.clientWidth+t?this._hoverPosition=1:this._hoverPosition=2),e.left-this._hover.containerDomNode.clientWidth-t<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(e){if(void 0!==this._target.y||this._forcePosition)return;const t=this._hoverPointer?3:0;3===this._hoverPosition?e.top-this._hover.containerDomNode.clientHeight-t<0&&(this._hoverPosition=2):2===this._hoverPosition&&e.bottom+this._hover.containerDomNode.clientHeight+t>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(e){let t=this._targetWindow.innerHeight/2;if(this._forcePosition){const i=2+(this._hoverPointer?3:0);3===this._hoverPosition?t=Math.min(t,e.top-i):2===this._hoverPosition&&(t=Math.min(t,this._targetWindow.innerHeight-e.bottom-i))}if(this._hover.containerDomNode.style.maxHeight=`${t}px`,this._hover.contentsDomNode.clientHeighte.height?this._hoverPointer.style.top=e.center.y-(this._y-t)-3+"px":this._hoverPointer.style.top=Math.round(t/2)-3+"px";break}case 3:case 2:{this._hoverPointer.classList.add(3===this._hoverPosition?"bottom":"top");const t=this._hover.containerDomNode.clientWidth;let i=Math.round(t/2)-3;const n=this._x+i;(ne.right)&&(i=e.center.x-this._x-3),this._hoverPointer.style.left=`${i}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};Ane=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Tne(1,uD),Tne(2,Cg),Tne(3,LL),Tne(4,_d),Tne(5,ak)],Ane);class Rne extends mN{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(e){super(),this._elements=e,this._isMouseIn=!0,this._onMouseOut=this._register(new kt),this._elements.forEach((e=>this.onmouseover(e,(()=>this._onTargetMouseOver(e))))),this._elements.forEach((e=>this.onmouseleave(e,(()=>this._onTargetMouseLeave(e)))))}_onTargetMouseOver(e){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(e)}_onTargetMouseLeave(e){this._isMouseIn=!1,this._evaluateMouseState(e)}_evaluateMouseState(e){this._clearEvaluateMouseStateTimeout(e),this._mouseTimeout=ls(e).setTimeout((()=>this._fireIfMouseOutside()),0)}_clearEvaluateMouseStateTimeout(e){this._mouseTimeout&&(ls(e).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class Pne{constructor(e){this._element=e,this.targetElements=[this._element]}dispose(){}}var One,Fne=i(6691),Bne={};function Wne(e,t,i){const n=i.mode===One.ALIGN?i.offset:i.offset+i.size,o=i.mode===One.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}Bne.styleTagTransform=Gr(),Bne.setAttributes=Kr(),Bne.insert=zr().bind(null,"head"),Bne.domAPI=Vr(),Bne.insertStyleElement=qr(),Br()(Fne.Z,Bne),Fne.Z&&Fne.Z.locals&&Fne.Z.locals,function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(One||(One={}));class Vne extends lt{constructor(e,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=lt.None,this.toDisposeOnSetContainer=lt.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Sr(".context-view"),xr(this.view),this.setContainer(e,t),this._register(rt((()=>this.setContainer(null,1))))}setContainer(e,t){var i;this.useFixedPosition=1!==t;const n=this.useShadowDOM;if(this.useShadowDOM=3===t,(e!==this.container||n!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e)){if(this.container=e,this.useShadowDOM){this.shadowRootHostElement=Sr(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Hne,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Sr("slot"))}else this.container.appendChild(this.view);const t=new at;Vne.BUBBLE_UP_EVENTS.forEach((e=>{t.add(ys(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),Vne.BUBBLE_DOWN_EVENTS.forEach((e=>{t.add(ys(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=t}}show(e){var t,i,n;this.isVisible()&&this.hide(),vs(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(null!==(t=e.layer)&&void 0!==t?t:0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",kr(this.view),this.toDisposeOnClean=e.render(this.view)||lt.None,this.delegate=e,this.doLayout(),null===(n=(i=this.delegate).focus)||void 0===n||n.call(i)}getViewElement(){return this.view}layout(){var e,t;this.isVisible()&&(!1!==this.delegate.canRelayout||Z&&ce?(null===(t=null===(e=this.delegate)||void 0===e?void 0:e.layout)||void 0===t||t.call(e),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;const e=this.delegate.getAnchor();let t;if(lr(e)){const i=Rs(e),n=Ps(e);t={top:i.top*n,left:i.left*n,width:i.width*n,height:i.height*n}}else t=function(e){const t=e;return!!t&&"number"==typeof t.x&&"number"==typeof t.y}(e)?{top:e.y,left:e.x,width:e.width||1,height:e.height||2}:{top:e.posy,left:e.posx,width:2,height:2};const i=Os(this.view),n=Ws(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0,r=this.delegate.anchorAxisAlignment||0;let a,l;const d=Zs();if(0===r){const e={offset:t.top-d.pageYOffset,size:t.height,position:0===o?0:1},r={offset:t.left,size:t.width,position:0===s?0:1,mode:One.ALIGN};a=Wne(d.innerHeight,n,e)+d.pageYOffset,DN.intersects({start:a,end:a+n},{start:e.offset,end:e.offset+e.size})&&(r.mode=One.AVOID),l=Wne(d.innerWidth,i,r)}else{const e={offset:t.left,size:t.width,position:0===s?0:1},r={offset:t.top,size:t.height,position:0===o?0:1,mode:One.ALIGN};l=Wne(d.innerWidth,i,e),DN.intersects({start:l,end:l+i},{start:e.offset,end:e.offset+e.size})&&(r.mode=One.AVOID),a=Wne(d.innerHeight,n,r)+d.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===s?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const c=Rs(this.container);this.view.style.top=a-(this.useFixedPosition?Rs(this.view).top:c.top)+"px",this.view.style.left=l-(this.useFixedPosition?Rs(this.view).left:c.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),xr(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,ls(e).document.activeElement):t&&!Vs(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Vne.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Vne.BUBBLE_DOWN_EVENTS=["click"];const Hne='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';let zne=class extends lt{constructor(e){super(),this.layoutService=e,this.contextView=this._register(new Vne(this.layoutService.mainContainer,1)),this.layout(),this._register(e.onDidLayoutContainer((()=>this.layout())))}showContextView(e,t,i){let n;n=t?t===this.layoutService.getContainer(ls(t))?1:i?3:2:1,this.contextView.setContainer(null!=t?t:this.layoutService.activeContainer,n),this.contextView.show(e);const o={close:()=>{this.openContextView===o&&this.hideContextView()}};return this.openContextView=o,o}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e),this.openContextView=void 0}};zne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,rne)],zne);class Une extends zne{getContextViewElement(){return this.contextView.getViewElement()}}class Kne{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}async update(e,t,i){var n;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(void 0===e||fl(e)||lr(e))o=e;else if(Dl(e.markdown)){this._hoverWidget||this.show(v(0,"Loading..."),t,i),this._cancellationTokenSource=new Pt;const n=this._cancellationTokenSource.token;if(o=await e.markdown(n),void 0===o&&(o=e.markdownNotSupportedFallback),this.isDisposed||n.isCancellationRequested)return}else o=null!==(n=e.markdown)&&void 0!==n?n:e.markdownNotSupportedFallback;this.show(o,t,i)}show(e,t,i){const n=this._hoverWidget;if(this.hasContent(e)){const o={content:e,target:this.target,appearance:{showPointer:"element"===this.hoverDelegate.placement,skipFadeInAnimation:!this.fadeInAnimation||!!n},position:{hoverPosition:2},...i};this._hoverWidget=this.hoverDelegate.showHover(o,t)}null==n||n.dispose()}hasContent(e){return!(!e||hd(e)&&!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}var jne=function(e,t){return function(i,n){t(i,n,e)}};let qne=class extends lt{constructor(e,t,i,n,o){super(),this._instantiationService=e,this._keybindingService=i,this._layoutService=n,this._accessibilityService=o,this._existingHovers=new Map,t.onDidShowContextMenu((()=>this.hideHover())),this._contextViewHandler=this._register(new zne(this._layoutService))}showHover(e,t,i){var n,o,r,a;if($ne(this._currentHoverOptions)===$ne(e))return;if(this._currentHover&&(null===(o=null===(n=this._currentHoverOptions)||void 0===n?void 0:n.persistence)||void 0===o?void 0:o.sticky))return;this._currentHoverOptions=e,this._lastHoverOptions=e;const l=e.trapFocus||this._accessibilityService.isScreenReaderOptimized(),d=js();i||(l&&d?d.classList.contains("monaco-hover")||(this._lastFocusedElementBeforeOpen=d):this._lastFocusedElementBeforeOpen=void 0);const c=new at,h=this._instantiationService.createInstance(Ane,e);if((null===(r=e.persistence)||void 0===r?void 0:r.sticky)&&(h.isLocked=!0),h.onDispose((()=>{var t,i;(null===(t=this._currentHover)||void 0===t?void 0:t.domNode)&&$s(this._currentHover.domNode)&&(null===(i=this._lastFocusedElementBeforeOpen)||void 0===i||i.focus()),this._currentHoverOptions===e&&(this._currentHoverOptions=void 0),c.dispose()}),void 0,c),!e.container){const t=lr(e.target)?e.target:e.target.targetElements[0];e.container=this._layoutService.getContainer(ls(t))}if(this._contextViewHandler.showContextView(new Gne(h,t),e.container),h.onRequestLayout((()=>this._contextViewHandler.layout()),void 0,c),null===(a=e.persistence)||void 0===a?void 0:a.sticky)c.add(ws(ls(e.container).document,ur.MOUSE_DOWN,(e=>{Vs(e.target,h.domNode)||this.doHideHover()})));else{if("targetElements"in e.target)for(const t of e.target.targetElements)c.add(ws(t,ur.CLICK,(()=>this.hideHover())));else c.add(ws(e.target,ur.CLICK,(()=>this.hideHover())));const t=js();if(t){const i=ls(t).document;c.add(ws(t,ur.KEY_DOWN,(t=>{var i;return this._keyDown(t,h,!!(null===(i=e.persistence)||void 0===i?void 0:i.hideOnKeyDown))}))),c.add(ws(i,ur.KEY_DOWN,(t=>{var i;return this._keyDown(t,h,!!(null===(i=e.persistence)||void 0===i?void 0:i.hideOnKeyDown))}))),c.add(ws(t,ur.KEY_UP,(e=>this._keyUp(e,h)))),c.add(ws(i,ur.KEY_UP,(e=>this._keyUp(e,h))))}}if("IntersectionObserver"in s){const t=new IntersectionObserver((e=>this._intersectionChange(e,h)),{threshold:0}),i="targetElements"in e.target?e.target.targetElements[0]:e.target;t.observe(i),c.add(rt((()=>t.disconnect())))}return this._currentHover=h,h}hideHover(){var e;!(null===(e=this._currentHover)||void 0===e?void 0:e.isLocked)&&this._currentHoverOptions&&this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewHandler.hideContextView()}_intersectionChange(e,t){e[e.length-1].isIntersecting||t.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showHover(this._lastHoverOptions,!0,!0)}_keyDown(e,t,i){var n,o;if("Alt"===e.key)return void(t.isLocked=!0);const s=new Ke(e);this._keybindingService.resolveKeyboardEvent(s).getSingleModifierDispatchChords().some((e=>!!e))||0!==this._keybindingService.softDispatch(s,s.target).kind||!i||(null===(n=this._currentHoverOptions)||void 0===n?void 0:n.trapFocus)&&"Tab"===e.key||(this.hideHover(),null===(o=this._lastFocusedElementBeforeOpen)||void 0===o||o.focus())}_keyUp(e,t){var i;"Alt"===e.key&&(t.isLocked=!1,t.isMouseIn||(this.hideHover(),null===(i=this._lastFocusedElementBeforeOpen)||void 0===i||i.focus()))}setupUpdatableHover(e,t,i,n){let o,s;t.setAttribute("custom-hover","true"),""!==t.title&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),console.trace("Stack trace:",t.title),t.title="");const r=(t,i)=>{var n;const r=void 0!==s;t&&(null==s||s.dispose(),s=void 0),i&&(null==o||o.dispose(),o=void 0),r&&(null===(n=e.onDidHideHover)||void 0===n||n.call(e),s=void 0)},a=(o,r,a,l)=>new $t((async()=>{s&&!s.isDisposed||(s=new Kne(e,a||t,o>0),await s.update("function"==typeof i?i():i,r,{...n,trapFocus:l}))}),o);let l=!1;const d=ws(t,ur.MOUSE_DOWN,(()=>{l=!0,r(!0,!0)}),!0),c=ws(t,ur.MOUSE_UP,(()=>{l=!1}),!0),h=ws(t,ur.MOUSE_LEAVE,(e=>{l=!1,r(!1,e.fromElement===t)}),!0),u=ws(t,ur.MOUSE_OVER,(i=>{if(o)return;const n=new at,s={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>{s.x=e.x+10,lr(e.target)&&Zne(e.target,t)!==t&&r(!0,!0)};n.add(ws(t,ur.MOUSE_MOVE,e,!0))}o=n,lr(i.target)&&Zne(i.target,t)!==t||n.add(a(e.delay,!1,s))}),!0);let g;const p=t.tagName.toLowerCase();"input"!==p&&"textarea"!==p&&(g=ws(t,ur.FOCUS,(()=>{if(l||o)return;const i={targetElements:[t],dispose:()=>{}},n=new at;n.add(ws(t,ur.BLUR,(()=>r(!0,!0)),!0)),n.add(a(e.delay,!1,i)),o=n}),!0));const m={show:e=>{r(!1,!0),a(0,e,void 0,e)},hide:()=>{r(!0,!0)},update:async(e,t)=>{i=e,await(null==s?void 0:s.update(i,void 0,t))},dispose:()=>{this._existingHovers.delete(t),u.dispose(),h.dispose(),d.dispose(),c.dispose(),null==g||g.dispose(),r(!0,!0)}};return this._existingHovers.set(t,m),m}triggerUpdatableHover(e){const t=this._existingHovers.get(e);t&&t.show(!0)}dispose(){this._existingHovers.forEach((e=>e.dispose())),super.dispose()}};function $ne(e){var t;if(void 0!==e)return null!==(t=null==e?void 0:e.id)&&void 0!==t?t:e}qne=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([jne(0,_d),jne(1,hD),jne(2,uD),jne(3,rne),jne(4,ak)],qne);class Gne{get anchorPosition(){return this._hover.anchor}constructor(e,t=!1){this._hover=e,this._focus=t,this.layer=1}render(e){return this._hover.render(e),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function Zne(e,t){for(t=null!=t?t:ls(e).document.body;!e.hasAttribute("custom-hover")&&e!==t;)e=e.parentElement;return e}function Yne(e){return Object.isFrozen(e)?e:function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(yh.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||vl(n)||t.push(n)}}return e}(e)}Ng(tj,qne,1),jv(((e,t)=>{const i=e.getColor(xf);i&&(t.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${i.transparent(.5)}; }`))}));class Qne{static createEmptyModel(e){return new Qne({},[],[],void 0,e)}constructor(e,t,i,n,o){this._contents=e,this._keys=t,this._overrides=i,this.raw=n,this.logService=o,this.overrideConfigurations=new Map}get rawConfiguration(){var e;if(!this._rawConfiguration)if(null===(e=this.raw)||void 0===e?void 0:e.length){const e=this.raw.map((e=>{if(e instanceof Qne)return e;const t=new Xne("",this.logService);return t.parseRaw(e),t.configurationModel}));this._rawConfiguration=e.reduce(((e,t)=>t===e?t:e.merge(t)),e[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?Lg(this.contents,e):this.contents}inspect(e,t){const i=this;return{get value(){return Yne(i.rawConfiguration.getValue(e))},get override(){return t?Yne(i.rawConfiguration.getOverrideValue(e,t)):void 0},get merged(){return Yne(t?i.rawConfiguration.override(t).getValue(e):i.rawConfiguration.getValue(e))},get overrides(){const t=[];for(const{contents:n,identifiers:o,keys:s}of i.rawConfiguration.overrides){const r=new Qne(n,s,[],void 0,i.logService).getValue(e);void 0!==r&&t.push({identifiers:o,value:r})}return t.length?Yne(t):void 0}}}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?Lg(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){var t,i;const n=Ch(this.contents),o=Ch(this.overrides),s=[...this.keys],r=(null===(t=this.raw)||void 0===t?void 0:t.length)?[...this.raw]:[this];for(const t of e)if(r.push(...(null===(i=t.raw)||void 0===i?void 0:i.length)?t.raw:[t]),!t.isEmpty()){this.mergeContents(n,t.contents);for(const e of t.overrides){const[t]=o.filter((t=>Wh(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=Zh(t.keys)):o.push(Ch(e))}for(const e of t.keys)-1===s.indexOf(e)&&s.push(e)}return new Qne(n,s,o,r.every((e=>e instanceof Qne))?void 0:r,this.logService)}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;const i={};for(const e of Zh([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e];const o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=Ch(n),this.mergeContents(n,o)):n=o),i[e]=n}return new Qne(i,this.keys,this.overrides,void 0,this.logService)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&_l(e[i])&&_l(t[i])?this.mergeContents(e[i],t[i]):e[i]=Ch(t[i])}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=Ch(e))};for(const i of this.overrides)1===i.identifiers.length&&i.identifiers[0]===e?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(e,t){this.updateValue(e,t,!0)}setValue(e,t){this.updateValue(e,t,!1)}removeValue(e){const t=this.keys.indexOf(e);-1!==t&&(this.keys.splice(t,1),kg(this.contents,e),qg.test(e)&&this.overrides.splice(this.overrides.findIndex((t=>Wh(t.identifiers,$g(e)))),1))}updateValue(e,t,i){Sg(this.contents,e,t,(e=>this.logService.error(e))),(i=i||-1===this.keys.indexOf(e))&&this.keys.push(e),qg.test(e)&&this.overrides.push({identifiers:$g(e),keys:Object.keys(this.contents[e]),contents:yg(this.contents[e],(e=>this.logService.error(e)))})}}class Xne{constructor(e,t){this._name=e,this.logService=t,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||Qne.createEmptyModel(this.logService)}parseRaw(e,t){this._raw=e;const{contents:i,keys:n,overrides:o,restricted:s,hasExcludedProperties:r}=this.doParseRaw(e,t);this._configurationModel=new Qne(i,n,o,r?[e]:void 0,this.logService),this._restrictedConfigurations=s||[]}doParseRaw(e,t){const i=xc.as(Rg).getConfigurationProperties(),n=this.filter(e,i,!0,t);return{contents:yg(e=n.raw,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`))),keys:Object.keys(e),overrides:this.toOverrides(e,(e=>this.logService.error(`Conflict in settings file ${this._name}: ${e}`))),restricted:n.restricted,hasExcludedProperties:n.hasExcludedProperties}}filter(e,t,i,n){var o,s,r;let a=!1;if(!(null==n?void 0:n.scopes)&&!(null==n?void 0:n.skipRestricted)&&!(null===(o=null==n?void 0:n.exclude)||void 0===o?void 0:o.length))return{raw:e,restricted:[],hasExcludedProperties:a};const l={},d=[];for(const o in e)if(qg.test(o)&&i){const i=this.filter(e[o],t,!1,n);l[o]=i.raw,a=a||i.hasExcludedProperties,d.push(...i.restricted)}else{const i=t[o],c=i?void 0!==i.scope?i.scope:3:void 0;(null==i?void 0:i.restricted)&&d.push(o),(null===(s=n.exclude)||void 0===s?void 0:s.includes(o))||!(null===(r=n.include)||void 0===r?void 0:r.includes(o))&&(void 0!==c&&void 0!==n.scopes&&!n.scopes.includes(c)||n.skipRestricted&&(null==i?void 0:i.restricted))?a=!0:l[o]=e[o]}return{raw:l,restricted:d,hasExcludedProperties:a}}toOverrides(e,t){const i=[];for(const n of Object.keys(e))if(qg.test(n)){const o={};for(const t in e[n])o[t]=e[n][t];i.push({identifiers:$g(n),keys:Object.keys(o),contents:yg(o,t)})}return i}}class Jne{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u){this.key=e,this.overrides=t,this._value=i,this.overrideIdentifiers=n,this.defaultConfiguration=o,this.policyConfiguration=s,this.applicationConfiguration=r,this.userConfiguration=a,this.localUserConfiguration=l,this.remoteUserConfiguration=d,this.workspaceConfiguration=c,this.folderConfigurationModel=h,this.memoryConfigurationModel=u}toInspectValue(e){return void 0!==(null==e?void 0:e.value)||void 0!==(null==e?void 0:e.override)||void 0!==(null==e?void 0:e.overrides)?e:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.toInspectValue(this.userInspectValue)}}class eoe{constructor(e,t,i,n,o,s,r,a,l,d){this._defaultConfiguration=e,this._policyConfiguration=t,this._applicationConfiguration=i,this._localUserConfiguration=n,this._remoteUserConfiguration=o,this._workspaceConfiguration=s,this._folderConfigurations=r,this._memoryConfiguration=a,this._memoryConfigurationByResource=l,this.logService=d,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new da,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidatedConfigurationModel(e,t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=Qne.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidatedConfigurationModel(e,t,i),o=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=new Set;for(const t of n.overrides)for(const i of t.identifiers)void 0!==n.getOverrideValue(e,i)&&r.add(i);return new Jne(e,t,n.getValue(e),r.size?[...r]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,i?this._workspaceConfiguration:void 0,o||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(e,t,i){let n=this.getConsolidatedConfigurationModelForResource(t,i);return t.overrideIdentifier&&(n=n.override(t.overrideIdentifier)),this._policyConfiguration.isEmpty()||void 0===this._policyConfiguration.getValue(e)||(n=n.merge(this._policyConfiguration)),n}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e,t){const i=this.parseConfigurationModel(e.defaults,t),n=this.parseConfigurationModel(e.policy,t),o=this.parseConfigurationModel(e.application,t),s=this.parseConfigurationModel(e.user,t),r=this.parseConfigurationModel(e.workspace,t),a=e.folders.reduce(((e,i)=>(e.set(Po.revive(i[0]),this.parseConfigurationModel(i[1],t)),e)),new da);return new eoe(i,n,o,s,Qne.createEmptyModel(t),r,a,Qne.createEmptyModel(t),new da,t)}static parseConfigurationModel(e,t){return new Qne(e.contents,e.keys,e.overrides,void 0,t)}}class toe{constructor(e,t,i,n,o){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this.logService=o,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const t of e.keys)this.affectedKeys.add(t);for(const[,t]of e.overrides)for(const e of t)this.affectedKeys.add(e);this._affectsConfigStr=this._marker;for(const e of this.affectedKeys)this._affectsConfigStr+=e+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=eoe.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(e,t){var i;const n=this._marker+e,o=this._affectsConfigStr.indexOf(n);if(o<0)return!1;const s=o+n.length;if(s>=this._affectsConfigStr.length)return!1;const r=this._affectsConfigStr.charCodeAt(s);return(r===this._markerCode1||r===this._markerCode2)&&(!t||!Lh(this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,this.currentConfiguraiton.getValue(e,t,this.currentWorkspace)))}}const ioe={kind:0},noe={kind:1};class ooe{constructor(e,t,i){var n;this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=ooe.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e=0;e--){const n=i[e];if(n.command===t.command)continue;let o=!0;for(let e=1;e=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){const n=[...t,i];this._log(`| Resolving ${n}`);const o=this._map.get(n[0]);if(void 0===o)return this._log("\\ No keybinding entries."),ioe;let s=null;if(n.length<2)s=o;else{s=[];for(let e=0,t=o.length;et.chords.length)continue;let i=!0;for(let e=1;e=0;i--){const n=t[i];if(ooe._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function soe(e){return e?`${e.serialize()}`:"no when condition"}function roe(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}const aoe=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class loe extends lt{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:_t.None}get inChordMode(){return this._currentChords.length>0}constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new kt),this._currentChords=[],this._currentChordChecker=new Gt,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=doe.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new $t,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){this._log("/ Soft dispatching keyboard event");const i=this.resolveKeyboardEvent(e);if(i.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),ioe;const[n]=i.getDispatchChords();if(null===n)return this._log("\\ Keyboard event cannot be dispatched"),ioe;const o=this._contextKeyService.getContext(t),s=this._currentChords.map((({keypress:e})=>e));return this._getResolver().resolve(o,s,n)}_scheduleLeaveChordMode(){const e=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-e>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_expectAnotherChord(e,t){switch(this._currentChords.push({keypress:e,label:t}),this._currentChords.length){case 0:throw Me("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(v(0,"({0}) was pressed. Waiting for second key of chord...",t));break;default:{const e=this._currentChords.map((({label:e})=>e)).join(", ");this._currentChordStatusMessage=this._notificationService.status(v(0,"({0}) was pressed. Waiting for next key of chord...",e))}}this._scheduleLeaveChordMode(),PR.enabled&&PR.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],PR.enable()}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchChords();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=doe.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=doe.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=i.getChords();return this._ignoreSingleModifiers=new doe(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){var n;let o=!1;if(e.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let s=null,r=null;if(i){const[t]=e.getSingleModifierDispatchChords();s=t,r=t?[t]:[]}else[s]=e.getDispatchChords(),r=this._currentChords.map((({keypress:e})=>e));if(null===s)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),o;const a=this._contextKeyService.getContext(t),l=e.getLabel(),d=this._getResolver().resolve(a,r,s);switch(d.kind){case 0:if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(v(0,"The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),o=!0}return o;case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),o=!0,this._expectAnotherChord(s,l),this._log(1===this._currentChords.length?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),o;case 2:if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${d.commandId} ]`),null===d.commandId||""===d.commandId){if(this.inChordMode){const e=this._currentChords.map((({label:e})=>e)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${e}, ${l}".`),this._notificationService.status(v(0,"The key combination ({0}, {1}) is not a command.",e,l),{hideAfter:1e4}),this._leaveChordMode(),o=!0}}else{this.inChordMode&&this._leaveChordMode(),d.isBubble||(o=!0),this._log(`+ Invoking command ${d.commandId}.`),this._currentlyDispatchingCommandId=d.commandId;try{void 0===d.commandArgs?this._commandService.executeCommand(d.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(d.commandId,d.commandArgs).then(void 0,(e=>this._notificationService.warn(e)))}finally{this._currentlyDispatchingCommandId=null}aoe.test(d.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"keybinding",detail:null!==(n=e.getUserSettingsLabel())&&void 0!==n?n:void 0})}return o}}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class doe{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}doe.EMPTY=new doe(null);class coe{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.chords=e?hoe(e.getDispatchChords()):[],e&&0===this.chords.length&&(this.chords=hoe(e.getSingleModifierDispatchChords())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=r}}function hoe(e){const t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return OT.toLabel(this._os,this._chords,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:FT.toLabel(this._os,this._chords,(e=>this._getElectronAccelerator(e)))}getUserSettingsLabel(){return BT.toLabel(this._os,this._chords,(e=>this._getUserSettingsLabel(e)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((e=>this._getChord(e)))}_getChord(e){return new Ve(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchChords(){return this._chords.map((e=>this._getChordDispatch(e)))}getSingleModifierDispatchChords(){return this._chords.map((e=>this._getSingleModifierChordDispatch(e)))}}class goe extends uoe{constructor(e,t){super(t,e)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return ye.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":ye.toString(e.keyCode)}_getElectronAccelerator(e){return ye.toElectronAccelerator(e.keyCode)}_getUserSettingsLabel(e){if(e.isDuplicateModifierCase())return"";const t=ye.toUserSettingsUS(e.keyCode);return t?t.toLowerCase():t}_getChordDispatch(e){return goe.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=ye.toString(e.keyCode),t}_getSingleModifierChordDispatch(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=we[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(e){if(!e)return null;if(e instanceof Be)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new Be(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveKeybinding(e,t){const i=hoe(e.chords.map((e=>this._toKeyCodeChord(e))));return i.length>0?[new goe(i,t)]:[]}}let poe=[],moe=[],foe=[];function _oe(e,t=!1){!function(e,t,i){const n=function(e,t){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:false,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?die(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(Co.sep)>=0}}(e);poe.push(n),n.userConfigured?foe.push(n):moe.push(n),i&&!n.userConfigured&&poe.forEach((e=>{e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn(`Overwriting extension <<${n.extension}>> to now point to mime <<${n.mime}>>`),n.filename&&e.filename===n.filename&&console.warn(`Overwriting filename <<${n.filename}>> to now point to mime <<${n.mime}>>`),n.filepattern&&e.filepattern===n.filepattern&&console.warn(`Overwriting filepattern <<${n.filepattern}>> to now point to mime <<${n.mime}>>`),n.firstline&&e.firstline===n.firstline&&console.warn(`Overwriting firstline <<${n.firstline}>> to now point to mime <<${n.mime}>>`))}))}(e,0,t)}function voe(e,t,i){var n;let o,s,r;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return o||s||r||void 0}const boe=Object.prototype.hasOwnProperty,woe="vs.editor.nullLanguage";class Coe{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(woe,0),this._register(Qg,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||woe}}class yoe extends lt{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new kt),this.onDidChange=this._onDidChange.event,yoe.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new Coe,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Yg.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){yoe.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},poe=poe.filter((e=>e.userConfigured)),moe=[];const e=[].concat(Yg.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),xc.as(Rg).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;boe.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(const e of t.extensions)_oe({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(const o of t.filenames)_oe({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(const e of t.filenamePatterns)_oe({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);"^"!==(o=t).source&&"^$"!==o.source&&"$"!==o.source&&"^\\s*$"!==o.source&&o.exec("")&&0===o.lastIndex||_oe({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(i){console.warn(`[${t.id}]: Invalid regular expression \`${e}\`: `,i)}}var o;e.aliases.push(i);let s=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(s=0===t.aliases.length?[null]:t.aliases),null!==s)for(const t of s)t&&0!==t.length&&e.aliases.push(t);const r=null!==s&&s.length>0;if(r&&null===s[0]);else{const t=(r?s[0]:null)||i;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&boe.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return boe.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&boe.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){return e||t?function(e,t){return function(e,t){let i;if(e)switch(e.scheme){case qo.file:i=e.fsPath;break;case qo.data:i=ld.parseMetaData(e).get(ld.META_DATA_LABEL);break;case qo.vscodeNotebookCell:i=void 0;break;default:i=e.path}if(!i)return[{id:"unknown",mime:Tg.unknown}];i=i.toLowerCase();const n=Lo(i),o=voe(i,n,foe);if(o)return[o,{id:Qg,mime:Tg.text}];const s=voe(i,n,moe);if(s)return[s,{id:Qg,mime:Tg.text}];if(t){const e=function(e){if(Gn(e)&&(e=e.substr(1)),e.length>0)for(let t=poe.length-1;t>=0;t--){const i=poe[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i}}(t);if(e)return[e,{id:Qg,mime:Tg.text}]}return[{id:"unknown",mime:Tg.unknown}]}(e,t).map((e=>e.id))}(e,t):[]}}yoe.instanceCount=0;class Soe extends lt{constructor(e=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new kt),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new kt),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new kt({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,Soe.instanceCount++,this._registry=this._register(new yoe(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){Soe.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){return Yh(this._registry.guessLanguageIdByFilepathOrFirstLine(e,t),null)}createById(e){return new koe(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new koe(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=Qg),e}requestBasicLanguageFeatures(e){this._requestedBasicLanguages.has(e)||(this._requestedBasicLanguages.add(e),this._onDidRequestBasicLanguageFeatures.fire(e))}requestRichLanguageFeatures(e){this._requestedRichLanguages.has(e)||(this._requestedRichLanguages.add(e),this.requestBasicLanguageFeatures(e),HC.getOrCreate(e),this._onDidRequestRichLanguageFeatures.fire(e))}}Soe.instanceCount=0;class koe{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages((()=>this._evaluate()))),this._emitter||(this._emitter=new kt({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var e;const t=this._selector();t!==this.languageId&&(this.languageId=t,null===(e=this._emitter)||void 0===e||e.fire(this.languageId))}}const xoe=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Loe=/(&)?(&)([^\s&])/g;var Doe,Eoe;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(Doe||(Doe={})),function(e){e[e.Above=0]="Above",e[e.Below=1]="Below"}(Eoe||(Eoe={}));class Noe extends TT{constructor(e,t,i,n){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const o=document.createElement("div");o.classList.add("monaco-menu"),o.setAttribute("role","presentation"),super(o,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...K||j?[10]:[]],keyDown:!0}}),this.menuStyles=n,this.menuElement=o,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(e,n),this._register($L.addTarget(o)),this._register(ws(o,ur.KEY_DOWN,(e=>{new Ke(e).equals(2)&&e.preventDefault()}))),i.enableMnemonics&&this._register(ws(o,ur.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){pr(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Toe&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),j&&this._register(ws(o,ur.KEY_DOWN,(e=>{const t=new Ke(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),pr(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),pr(e,!0))}))),this._register(ws(this.domNode,ur.MOUSE_OUT,(e=>{Vs(e.relatedTarget,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register(ws(this.actionsList,ur.MOUSE_OVER,(e=>{let t=e.target;if(t&&Vs(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register($L.addTarget(this.actionsList)),this._register(ws(this.actionsList,qL.Tap,(e=>{let t=e.initialTarget;if(t&&Vs(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));const s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new PN(o,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this.styleScrollElement(r,n),this._register(ws(o,qL.Change,(e=>{pr(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register(ws(r,ur.MOUSE_UP,(e=>{e.preventDefault()})));const a=ls(e);o.style.maxHeight=`${Math.max(10,a.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(((e,n)=>{var o;if(null===(o=i.submenuIds)||void 0===o?void 0:o.has(e.id))return console.warn(`Found submenu cycle: ${e.id}`),!1;if(e instanceof xd){if(n===t.length-1||0===n)return!1;if(t[n-1]instanceof xd)return!1}return!0})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof Moe))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(Us(e)?this.styleSheet=Js(e):(Noe.globalStyleSheet||(Noe.globalStyleSheet=Js()),this.styleSheet=Noe.globalStyleSheet)),this.styleSheet.textContent=function(e,t){let i=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${Aoe(Ml.menuSelection)}\n${Aoe(Ml.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\tcolor: var(--vscode-disabledForeground);\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n\tmax-height: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}`;if(t){i+="\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t";const t=e.scrollbarShadow;t&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${t} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${t} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`);const n=e.scrollbarSliderBackground;n&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${n};\n\t\t\t\t}\n\t\t\t`);const o=e.scrollbarSliderHoverBackground;o&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${o};\n\t\t\t\t}\n\t\t\t`);const s=e.scrollbarSliderActiveBackground;s&&(i+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${s};\n\t\t\t\t}\n\t\t\t`)}return i}(t,Us(e))}styleScrollElement(e,t){var i,n;const o=null!==(i=t.foregroundColor)&&void 0!==i?i:"",s=null!==(n=t.backgroundColor)&&void 0!==n?n:"",r=t.borderColor?`1px solid ${t.borderColor}`:"",a=t.shadowColor?`0 2px 8px ${t.shadowColor}`:"";e.style.outline=r,e.style.borderRadius="5px",e.style.color=o,e.style.backgroundColor=s,e.style.boxShadow=a}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(ws(this.element,ur.MOUSE_UP,(e=>{if(pr(e,!0),d){if(new Ge(ls(this.element),e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register(ws(this.element,ur.CONTEXT_MENU,(e=>{pr(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=_r(this.element,Sr("a.action-menu-item")),this._action.id===xd.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=_r(this.item,Sr("span.menu-item-check"+Rl.asCSSSelector(Ml.menuSelection))),this.check.setAttribute("role","none"),this.label=_r(this.item,Sr("span.action-label")),this.options.label&&this.options.keybinding&&(_r(this.item,Sr("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var e;super.focus(),null===(e=this.item)||void 0===e||e.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){var e;if(this.label&&this.options.label){vs(this.label);let t=Wl(this.action.label);if(t){const i=function(e){const t=xoe,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(t);this.options.enableMnemonics||(t=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const n=xoe.exec(t);if(n){t=cn(t),Loe.lastIndex=0;let i=Loe.exec(t);for(;i&&i[1];)i=Loe.exec(t);const o=e=>e.replace(/&&/g,"&");i?this.label.append(gn(o(t.substr(0,i.index))," "),Sr("u",{"aria-hidden":"true"},i[3]),pn(o(t.substr(i.index+i[0].length))," ")):this.label.innerText=o(t).trim(),null===(e=this.item)||void 0===e||e.setAttribute("aria-keyshortcuts",(n[1]?n[1]:n[3]).toLocaleLowerCase())}else this.label.innerText=t.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.action.checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",o=e&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=null!=t?t:"",this.item.style.backgroundColor=null!=i?i:"",this.item.style.outline=n,this.item.style.outlineOffset=o),this.check&&(this.check.style.color=null!=t?t:"")}}class Toe extends Ioe{constructor(e,t,i,n,o){super(e,e,n,o),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new at),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:{horizontal:Doe.Right,vertical:Eoe.Below},this.showScheduler=new Zt((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new Zt((()=>{this.element&&!Vs(js(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=_r(this.item,Sr("span.submenu-indicator"+Rl.asCSSSelector(Ml.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(ws(this.element,ur.KEY_UP,(e=>{const t=new Ke(e);(t.equals(17)||t.equals(3))&&(pr(e,!0),this.createSubmenu(!0))}))),this._register(ws(this.element,ur.KEY_DOWN,(e=>{const t=new Ke(e);js()===this.item&&(t.equals(17)||t.equals(3))&&pr(e,!0)}))),this._register(ws(this.element,ur.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register(ws(this.element,ur.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register(ws(this.element,ur.FOCUS_OUT,(e=>{this.element&&!Vs(js(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}))))}updateEnabled(){}onClick(e){pr(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=Wne(e.width,t.width,{position:n.horizontal===Doe.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{new Ke(e).equals(15)&&(pr(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add(ws(this.submenuContainer,ur.KEY_DOWN,(e=>{new Ke(e).equals(15)&&pr(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){super.applyStyle();const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=null!=e?e:"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Moe extends NT{constructor(e,t,i,n){super(e,t,i),this.menuStyles=n}render(e){super.render(e),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function Aoe(e){const t=Tl()[e.id];return`.codicon-${e.id}:before { content: '\\${t.toString(16)}'; }`}class Roe{constructor(e,t,i,n){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=js();const n=lr(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{var o;this.lastContainer=n;const s=e.getMenuClassName?e.getMenuClassName():"";s&&(n.className+=" "+s),this.options.blockMouse&&(this.block=n.appendChild(Sr(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",null===(o=this.blockDisposable)||void 0===o||o.dispose(),this.blockDisposable=ws(this.block,ur.MOUSE_DOWN,(e=>e.stopPropagation())));const r=new at,a=e.actionRunner||new kd;a.onWillRun((t=>this.onActionRun(t,!e.skipTelemetry)),this,r),a.onDidRun(this.onDidActionRun,this,r),i=new Noe(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:a,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)},nM),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r);const l=ls(n);return r.add(ws(l,ur.BLUR,(()=>this.contextViewService.hideContextView(!0)))),r.add(ws(l,ur.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;const t=new Ge(l,e);let i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),st(r,i)},focus:()=>{null==i||i.focus(!!e.autoSelectFirstItem)},onHide:t=>{var i,n,o;null===(i=e.onHide)||void 0===i||i.call(e,!!t),this.block&&(this.block.remove(),this.block=null),null===(n=this.blockDisposable)||void 0===n||n.dispose(),this.blockDisposable=null,this.lastContainer&&(js()===this.lastContainer||Vs(js(),this.lastContainer))&&(null===(o=this.focusToReturn)||void 0===o||o.focus()),this.lastContainer=null}},n,!!n)}onActionRun(e,t){t&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(e){e.error&&!Ne(e.error)&&this.notificationService.error(e.error)}}var Poe=function(e,t){return function(i,n){t(i,n,e)}};let Ooe=class extends lt{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new Roe(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(e,t,i,n,o,s){super(),this.telemetryService=e,this.notificationService=t,this.contextViewService=i,this.keybindingService=n,this.menuService=o,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new kt),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new kt)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){e=Foe.transform(e,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...e,onHide:t=>{var i;null===(i=e.onHide)||void 0===i||i.call(e,t),this._onDidHideContextMenu.fire()}}),Mr.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};var Foe,Boe;Ooe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Poe(0,Vc),Poe(1,fD),Poe(2,cD),Poe(3,uD),Poe(4,Ac),Poe(5,pc)],Ooe),function(e){e.transform=function(e,t,i){if(!((n=e)&&n.menuId instanceof Mc))return e;var n;const{menuId:o,menuActionOptions:s,contextKeyService:r}=e;return{...e,getActions:()=>{const n=[];if(o){const e=t.createMenu(o,null!=r?r:i);!function(e,t,i,n){const o=e.getActions(t),s=Mr.getInstance();KU(o,i,s.keyStatus.altKey||(U||j)&&s.keyStatus.shiftKey,(e=>"navigation"===e))}(e,s,n),e.dispose()}return e.getActions?xd.join(e.getActions(),n):n}}}}(Foe||(Foe={})),function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(Boe||(Boe={}));var Woe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Voe=function(e,t){return function(i,n){t(i,n,e)}};let Hoe=class{constructor(e){this._commandService=e}async open(e,t){if(!$o(e,qo.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;if("string"==typeof e&&(e=Po.parse(e)),Array.isArray(t.allowCommands)&&!t.allowCommands.includes(e.path))return!0;let i=[];try{i=Vx(decodeURIComponent(e.query))}catch(t){try{i=Vx(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),await this._commandService.executeCommand(e.path,...i),!0}};Hoe=Woe([Voe(0,Nd)],Hoe);let zoe=class{constructor(e){this._editorService=e}async open(e,t){"string"==typeof e&&(e=Po.parse(e));const{selection:i,uri:n}=function(e){let t;const i=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1,endLineNumber:i[4]?parseInt(i[4]):void 0,endColumn:i[4]?i[5]?parseInt(i[5]):1:void 0},e=e.with({fragment:""})),{selection:t,uri:e}}(e);return(e=n).scheme===qo.file&&(e=nd(e)),await this._editorService.openCodeEditor({resource:e,options:{selection:i,source:(null==t?void 0:t.fromUserGesture)?Boe.USER:Boe.API,...null==t?void 0:t.editorOptions}},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}};zoe=Woe([Voe(0,bd)],zoe);let Uoe=class{constructor(e,t){this._openers=new pt,this._validators=new pt,this._resolvers=new pt,this._resolvedUriTargets=new da((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new pt,this._defaultExternalOpener={openExternal:async e=>(Go(e,qo.http,qo.https)?Dr(e):s.location.href=e,!0)},this._openers.push({open:async(e,t)=>!(!(null==t?void 0:t.openExternal)&&!Go(e,qo.mailto,qo.http,qo.https,qo.vsls)||(await this._doOpenExternal(e,t),0))}),this._openers.push(new Hoe(t)),this._openers.push(new zoe(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}async open(e,t){var i;const n="string"==typeof e?Po.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!await e.shouldOpen(o,t))return!1;for(const i of this._openers)if(await i.open(e,t))return!0;return!1}async resolveExternalUri(e,t){for(const i of this._resolvers)try{const n=await i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(e){}throw new Error("Could not resolve external URI: "+e.toString())}async _doOpenExternal(e,t){const i="string"==typeof e?Po.parse(e):e;let n,o;try{n=(await this.resolveExternalUri(i,t)).resolved}catch(e){n=i}if(o="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(await t.openExternal(o,{sourceUri:i,preferredOpenerId:e},At.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},At.None)}dispose(){this._validators.clear()}};Uoe=Woe([Voe(0,bd),Voe(1,Nd)],Uoe);var Koe=function(e,t){return function(i,n){t(i,n,e)}};let joe=class extends lt{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new kt),this._markerDecorations=new da,e.getModels().forEach((e=>this._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new qoe(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){var t;const i=this._markerDecorations.get(e.uri);i&&(i.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==qo.inMemory&&e.uri.scheme!==qo.internal&&e.uri.scheme!==qo.vscode||null===(t=this._markerService)||void 0===t||t.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});e.update(t)&&this._onDidChangeMarker.fire(e.model)}};joe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Koe(0,Cd),Koe(1,yM)],joe);class qoe extends lt{constructor(e){super(),this.model=e,this._map=new ga,this._register(rt((()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()})))}update(e){const{added:t,removed:i}=function(e,t){const i=[],n=[];for(const n of e)t.has(n)||i.push(n);for(const i of t)e.has(i)||n.push(i);return{removed:i,added:n}}(new Set(this._map.keys()),new Set(e));if(0===t.length&&0===i.length)return!1;const n=i.map((e=>this._map.get(e))),o=t.map((e=>({range:this._createDecorationRange(this.model,e),options:this._createDecorationOption(e)}))),s=this.model.deltaDecorations(n,o);for(const e of i)this._map.delete(e);for(let e=0;e=t)return i;const n=e.getWordAtPosition(i.getStartPosition());n&&(i=new hh(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn))}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){const n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}}var $oe,Goe=function(e,t){return function(i,n){t(i,n,e)}};function Zoe(e){return e.toString()}class Yoe{constructor(e,t,i){this.model=e,this._modelEventListeners=new at,this.model=e,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}dispose(){this._modelEventListeners.dispose()}}const Qoe=j||K?1:2;class Xoe{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let Joe=$oe=class extends lt{constructor(e,t,i,n,o){super(),this._configurationService=e,this._resourcePropertiesService=t,this._undoRedoService=i,this._languageService=n,this._languageConfigurationService=o,this._onModelAdded=this._register(new kt),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new kt),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new kt),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e)))),this._updateModelOptions(void 0)}static _readModelOptions(e,t){var i;let n=Tu.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o="tabSize";if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=Math.max(t,1))}let s=Tu.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=Qoe;const a=e.eol;"\r\n"===a?r=2:"\n"===a&&(r=1);let l=Tu.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let d=Tu.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(d="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let c=Tu.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(c="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=Tu.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!e.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:s,detectIndentation:d,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:c,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===te||2===te?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(e,t,i){const n="string"==typeof e?e:e.languageId;let o=this._modelCreationOptionsByLanguageAndResource[n+t];if(!o){const e=this._configurationService.getValue("editor",{overrideIdentifier:n,resource:t}),s=this._getEOL(t,n);o=$oe._readModelOptions({editor:e,eol:s},i),this._modelCreationOptionsByLanguageAndResource[n+t]=o}return o}_updateModelOptions(e){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),s=new My(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(Zoe(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=this._getSHA1Computer(),o=!!n.canComputeSHA1(s)&&n.computeSHA1(s)===e.sha1;if(o||e.sharesUndoRedoStack){for(const e of t.past)iw(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)iw(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>iw(e)&&e.matchesResource(i))),o&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=Zoe(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new Yoe(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=a,a}createModel(e,t,i,n=!1){let o;return o=t?this._createModelData(e,t,i,n):this._createModelData(e,Qg,i,n),this._onModelAdded.fire(o.model),o.model}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||t.future.length>0){for(const i of t.past)iw(i)&&i.matchesResource(e.uri)&&(o=!0,s+=i.heapSize(e.uri),i.setModel(e.uri));for(const i of t.future)iw(i)&&i.matchesResource(e.uri)&&(o=!0,s+=i.heapSize(e.uri),i.setModel(e.uri))}}const r=$oe.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,a=this._getSHA1Computer();if(o)if(n||!(s>r)&&a.canComputeSHA1(e))this._ensureDisposedModelsHeapSize(r-s),this._undoRedoService.setElementsValidFlag(e.uri,!1,(t=>iw(t)&&t.matchesResource(e.uri))),this._insertDisposedModel(new Xoe(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,s,a.computeSHA1(e),e.getVersionId(),e.getAlternativeVersionId()));else{const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else if(!n){const e=i.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageId()+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageId(),o=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),s=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);$oe._setModelOptionsForModel(e,s,o),this._onModelModeChanged.fire({model:e,oldLanguageId:i})}_getSHA1Computer(){return new ese}};Joe.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,Joe=$oe=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([Goe(0,Cg),Goe(1,vz),Goe(2,yy),Goe(3,Mu),Goe(4,sp)],Joe);class ese{canComputeSHA1(e){return e.getValueLength()<=ese.MAX_MODEL_SIZE}computeSHA1(e){const t=new rs,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}}ese.MAX_MODEL_SIZE=10485760;var tse=i(3455),ise={};ise.styleTagTransform=Gr(),ise.setAttributes=Kr(),ise.insert=zr().bind(null,"head"),ise.domAPI=Vr(),ise.insertStyleElement=qr(),Br()(tse.Z,ise),tse.Z&&tse.Z.locals&&tse.Z.locals;var nse=function(e,t){return function(i,n){t(i,n,e)}};let ose=class extends lt{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=xc.as(r4),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n,o,s,r;const[a,l]=this.getOrInstantiateProvider(e,null==i?void 0:i.enabledProviderPrefixes),d=this.visibleQuickAccess,c=null==d?void 0:d.descriptor;if(d&&l&&c===l)return e===l.prefix||(null==i?void 0:i.preserveValue)||(d.picker.value=e),void this.adjustValueSelection(d.picker,l,i);if(l&&!(null==i?void 0:i.preserveValue)){let t;if(d&&c&&c!==l){const e=d.value.substr(c.prefix.length);e&&(t=`${l.prefix}${e}`)}if(!t){const e=null==a?void 0:a.defaultFilterValue;e===s4.LAST?t=this.lastAcceptedPickerValues.get(l):"string"==typeof e&&(t=`${l.prefix}${e}`)}"string"==typeof t&&(e=t)}const h=null===(n=null==d?void 0:d.picker)||void 0===n?void 0:n.valueSelection,u=null===(o=null==d?void 0:d.picker)||void 0===o?void 0:o.value,g=new at,p=g.add(this.quickInputService.createQuickPick());let m;p.value=e,this.adjustValueSelection(p,l,i),p.placeholder=null!==(s=null==i?void 0:i.placeholder)&&void 0!==s?s:null==l?void 0:l.placeholder,p.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,p.hideInput=!!p.quickNavigate&&!d,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(p.itemActivation=null!==(r=null==i?void 0:i.itemActivation)&&void 0!==r?r:zL.SECOND),p.contextKey=null==l?void 0:l.contextKey,p.filterValue=e=>e.substring(l?l.prefix.length:0),t&&(m=new ei,g.add(_t.once(p.onWillAccept)((e=>{e.veto(),p.hide()})))),g.add(this.registerPickerListeners(p,a,l,e,i));const f=g.add(new Pt);return a&&g.add(a.provide(p,f.token,null==i?void 0:i.providerOptions)),_t.once(p.onDidHide)((()=>{0===p.selectedItems.length&&f.cancel(),g.dispose(),null==m||m.complete(p.selectedItems.slice(0))})),p.show(),h&&u===e&&(p.valueSelection=h),t?null==m?void 0:m.p:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n,o){const s=new at,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add(rt((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),s.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e,null==o?void 0:o.enabledProviderPrefixes);i!==t?this.show(e,{enabledProviderPrefixes:null==o?void 0:o.enabledProviderPrefixes,preserveValue:!0,providerOptions:null==o?void 0:o.providerOptions}):r.value=e}))),i&&s.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),s}getOrInstantiateProvider(e,t){const i=this.registry.getQuickAccessProvider(e);if(!i||t&&!(null==t?void 0:t.includes(i.prefix)))return[void 0,void 0];let n=this.mapProviderToDescriptor.get(i);return n||(n=this.instantiationService.createInstance(i.ctor),this.mapProviderToDescriptor.set(i,n)),[n,i]}};ose=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([nse(0,KL),nse(1,_d)],ose);var sse=i(8044),rse={};rse.styleTagTransform=Gr(),rse.setAttributes=Kr(),rse.insert=zr().bind(null,"head"),rse.domAPI=Vr(),rse.insertStyleElement=qr(),Br()(sse.Z,rse),sse.Z&&sse.Z.locals&&sse.Z.locals;class ase{constructor(e){this.nodes=e}toString(){return this.nodes.map((e=>"string"==typeof e?e:e.label)).join("")}}!function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);s>3&&r&&Object.defineProperty(t,i,r)}([jL],ase.prototype,"toString",null);const lse=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi,dse={},cse=new Ox("quick-input-button-icon-");function hse(e,t,i){let n=e.iconClass||function(e){if(!e)return;let t;const i=e.dark.toString();return dse[i]?t=dse[i]:(t=cse.nextId(),sr(`.${t}, .hc-light .${t}`,`background-image: ${Er(e.light||e.dark)}`),sr(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${Er(e.dark)}`),dse[i]=t),t}(e.iconPath);return e.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible"),{id:t,label:"",tooltip:e.tooltip||"",class:n,enabled:!0,run:i}}var use=function(e,t){return function(i,n){t(i,n,e)}};const gse="inQuickInput",pse=new gc(gse,!1,v(0,"Whether keyboard focus is inside the quick input control")),mse=$d.has(gse),fse="quickInputType",_se=new gc(fse,void 0,v(0,"The type of the currently visible quick input")),vse="cursorAtEndOfQuickInputBox",bse=new gc(vse,!1,v(0,"Whether the cursor in the quick input is at the end of the input box")),wse=$d.has(vse),Cse={iconClass:Rl.asClassName(Ml.quickInputBack),tooltip:v(0,"Back"),handle:-1};class yse extends lt{constructor(e){super(),this.ui=e,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=yse.noPromptMessage,this._severity=pD.Ignore,this.onDidTriggerButtonEmitter=this._register(new kt),this.onDidHideEmitter=this._register(new kt),this.onWillHideEmitter=this._register(new kt),this.onDisposeEmitter=this._register(new kt),this.visibleDisposables=this._register(new at),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!Z;this._ignoreFocusOut=e&&!Z,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(e){this._toggles=null!=e?e:[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=HL.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}willHide(e=HL.Other){this.onWillHideEmitter.fire({reason:e})}update(){var e,t;if(!this.visible)return;const i=this.getTitle();i&&this.ui.title.textContent!==i?this.ui.title.textContent=i:i||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const n=this.getDescription();if(this.ui.description1.textContent!==n&&(this.ui.description1.textContent=n),this.ui.description2.textContent!==n&&(this.ui.description2.textContent=n),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?br(this.ui.widget,this._widget):br(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new $t,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===Cse)).map(((e,t)=>hse(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.leftActionBar.push(e,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==Cse)).map(((e,t)=>hse(e,`id-${t}`,(async()=>this.onDidTriggerButtonEmitter.fire(e)))));this.ui.rightActionBar.push(t,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const i=null!==(t=null===(e=this.toggles)||void 0===e?void 0:e.filter((e=>e instanceof _q)))&&void 0!==t?t:[];this.ui.inputBox.toggles=i}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const o=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==o&&(this._lastValidationMessage=o,br(this.ui.message),function(e,t,i){br(t);const n=function(e){const t=[];let i,n=0;for(;i=lse.exec(e);){i.index-n>0&&t.push(e.substring(n,i.index));const[,o,s,,r]=i;r?t.push({label:o,href:s,title:r}):t.push({label:o,href:s}),n=i.index+i[0].length}return n{gr(t)&&pr(t,!0),i.callback(e.href)},a=i.disposables.add(new ok(s,ur.CLICK)).event,l=i.disposables.add(new ok(s,ur.KEY_DOWN)).event,d=_t.chain(l,(e=>e.filter((e=>{const t=new Ke(e);return t.equals(10)||t.equals(3)}))));i.disposables.add($L.addTarget(s));const c=i.disposables.add(new ok(s,qL.Tap)).event;_t.any(a,c,d)(r,null,i.disposables),t.appendChild(s)}}(o,this.ui.message,{callback:e=>{this.ui.linkOpenerDelegate(e)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?v(0,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==pD.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}yse.noPromptMessage=v(0,"Press 'Enter' to confirm your input or 'Escape' to cancel");class Sse extends yse{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new kt),this.onWillAcceptEmitter=this._register(new kt),this.onDidAcceptEmitter=this._register(new kt),this.onDidCustomEmitter=this._register(new kt),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._keepScrollPosition=!1,this._itemActivation=zL.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new kt),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new kt),this.onDidTriggerItemButtonEmitter=this._register(new kt),this.onDidTriggerSeparatorButtonEmitter=this._register(new kt),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this._focusEventBufferer=new It,this.type="quickPick",this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){this._value!==e&&(this._value=e,t||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?VL:this.ui.keyMods}get valueSelection(){const e=this.ui.inputBox.getSelection();if(e)return[e.start,e.end]}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(UL.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this._focusEventBufferer.wrapEvent(this.ui.list.onDidChangeFocus,((e,t)=>t))((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Wh(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&Wh(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(cr(t)&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Wh(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((e=>this.onDidTriggerSeparatorButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return ws(this.ui.container,ur.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Ke(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const n=e.getChords();return!(n.length>1||(n[0].shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n[0].altKey&&6===i||n[0].ctrlKey&&5===i||n[0].metaKey&&57===i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this.description,i={title:!!this.title||!!this.step||!!this.buttons.length,description:t,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||t,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let n=this.ariaLabel;!n&&i.inputBox&&(n=this.placeholder||Sse.DEFAULT_ARIA_LABEL,this.title&&(n+=` - ${this.title}`)),this.ui.list.ariaLabel!==n&&(this.ui.list.ariaLabel=null!=n?n:null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated&&(this.itemsUpdated=!1,this._focusEventBufferer.bufferEvents((()=>{switch(this.ui.list.setElements(this.items),this.ui.list.shouldLoop=!this.canSelectMany,this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case zL.NONE:this._itemActivation=zL.FIRST;break;case zL.SECOND:this.ui.list.focus(UL.Second),this._itemActivation=zL.FIRST;break;case zL.LAST:this.ui.list.focus(UL.Last),this._itemActivation=zL.FIRST;break;default:this.trySelectFirst()}}))),this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(UL.First)),this.keepScrollPosition&&(this.scrollTop=e)}focus(e){this.ui.list.focus(e),this.canSelectMany&&this.ui.list.domFocus()}accept(e){e&&!this._canAcceptInBackground||this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(null!=e&&e))}}Sse.DEFAULT_ARIA_LABEL=v(0,"Type to narrow down results.");class kse extends yse{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new kt),this.onDidAcceptEmitter=this._register(new kt),this.type="inputBox",this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(e){this._value=e||"",this.update()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get password(){return this._password}set password(e){this._password=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.onDidValueChangeEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire()))),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const e={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(e),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}let xse=class extends ij{constructor(e,t){super("element",!1,(e=>this.getOverrideOptions(e)),e,t)}getOverrideOptions(e){var t;return{persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:(lr(e.content)?null!==(t=e.content.textContent)&&void 0!==t?t:"":"string"==typeof e.content?e.content:e.content.value).includes("\n"),skipFadeInAnimation:!0}}}};xse=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([use(0,Cg),use(1,tj)],xse);var Lse=i(1519),Dse={};Dse.styleTagTransform=Gr(),Dse.setAttributes=Kr(),Dse.insert=zr().bind(null,"head"),Dse.domAPI=Vr(),Dse.insertStyleElement=qr(),Br()(Lse.Z,Dse),Lse.Z&&Lse.Z.locals&&Lse.Z.locals;const Ese="done",Nse="active",Ise="infinite",Tse="infinite-long-running",Mse="discrete";class Ase extends lt{constructor(e,t){super(),this.progressSignal=this._register(new dt),this.workedVal=0,this.showDelayedScheduler=this._register(new Zt((()=>kr(this.element)),0)),this.longRunningScheduler=this._register(new Zt((()=>this.infiniteLongRunning()),Ase.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e,t)}create(e,t){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=(null==t?void 0:t.progressBarBackground)||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Nse,Ise,Tse,Mse),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel(),this.progressSignal.clear()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Ese),this.element.classList.contains(Ise)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Mse,Ese,Tse),this.element.classList.add(Nse,Ise),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(Tse)}getContainer(){return this.element}}Ase.LONG_RUNNING_INFINITE_THRESHOLD=1e4;const Rse=Sr;class Pse extends lt{constructor(e,t,i){super(),this.parent=e,this.onKeyDown=e=>ys(this.findInput.inputBox.inputElement,ur.KEY_DOWN,e),this.onDidChange=e=>this.findInput.onDidChange(e),this.container=_r(this.parent,Rse(".quick-input-box")),this.findInput=this._register(new Rq(this.container,void 0,{label:"",inputBoxStyles:t,toggleStyles:i}));const n=this.findInput.inputBox.inputElement;n.role="combobox",n.ariaHasPopup="menu",n.ariaAutoComplete="list",n.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(e){this.findInput.setValue(e)}select(e=null){this.findInput.inputBox.select(e)}getSelection(){return this.findInput.inputBox.getSelection()}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.findInput.inputBox.setPlaceHolder(e)}get password(){return"password"===this.findInput.inputBox.inputElement.type}set password(e){this.findInput.inputBox.inputElement.type=e?"password":"text"}set enabled(e){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!e)}set toggles(e){this.findInput.setAdditionalToggles(e)}setAttribute(e,t){this.findInput.inputBox.inputElement.setAttribute(e,t)}showDecoration(e){e===pD.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:e===pD.Info?1:e===pD.Warning?2:3,content:""})}stylesForType(e){return this.findInput.inputBox.stylesForType(e===pD.Info?1:e===pD.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}const Ose=new sn((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));new sn((()=>({collator:new Intl.Collator(void 0,{numeric:!0})}))),new sn((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var Fse,Bse=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Wse=function(e,t){return function(i,n){t(i,n,e)}};const Vse=Sr;class Hse{constructor(e,t,i){this.index=e,this.hasCheckbox=t,this._hidden=!1,this._init=new sn((()=>{var e;const t=null!==(e=i.label)&&void 0!==e?e:"",n=Hl(t).text.trim(),o=i.ariaLabel||[t,this.saneDescription,this.saneDetail].map((e=>{return(t=e)?t.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():"";var t})).filter((e=>!!e)).join(", ");return{saneLabel:t,saneSortLabel:n,saneAriaLabel:o}})),this._saneDescription=i.description,this._saneTooltip=i.tooltip}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(e){this._element=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get saneDescription(){return this._saneDescription}set saneDescription(e){this._saneDescription=e}get saneDetail(){return this._saneDetail}set saneDetail(e){this._saneDetail=e}get saneTooltip(){return this._saneTooltip}set saneTooltip(e){this._saneTooltip=e}get labelHighlights(){return this._labelHighlights}set labelHighlights(e){this._labelHighlights=e}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(e){this._descriptionHighlights=e}get detailHighlights(){return this._detailHighlights}set detailHighlights(e){this._detailHighlights=e}}class zse extends Hse{constructor(e,t,i,n,o,s){var r,a,l;super(e,t,o),this.fireButtonTriggered=i,this._onChecked=n,this.item=o,this._separator=s,this._checked=!1,this.onChecked=t?_t.map(_t.filter(this._onChecked.event,(e=>e.element===this)),(e=>e.checked)):_t.None,this._saneDetail=o.detail,this._labelHighlights=null===(r=o.highlights)||void 0===r?void 0:r.label,this._descriptionHighlights=null===(a=o.highlights)||void 0===a?void 0:a.description,this._detailHighlights=null===(l=o.highlights)||void 0===l?void 0:l.detail}get separator(){return this._separator}set separator(e){this._separator=e}get checked(){return this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire({element:this,checked:e}))}get checkboxDisabled(){return!!this.item.disabled}}var Use;!function(e){e[e.NONE=0]="NONE",e[e.MOUSE_HOVER=1]="MOUSE_HOVER",e[e.ACTIVE_ITEM=2]="ACTIVE_ITEM"}(Use||(Use={}));class Kse extends Hse{constructor(e,t,i){super(e,!1,i),this.fireSeparatorButtonTriggered=t,this.separator=i,this.children=new Array,this.focusInsideSeparator=Use.NONE}}class jse{getHeight(e){return e instanceof Kse?30:e.saneDetail?44:22}getTemplateId(e){return e instanceof zse?Gse.ID:Zse.ID}}class qse{getWidgetAriaLabel(){return v(0,"Quick Input")}getAriaLabel(e){var t;return(null===(t=e.separator)||void 0===t?void 0:t.label)?`${e.saneAriaLabel}, ${e.separator.label}`:e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(e){return e.hasCheckbox?"checkbox":"option"}isChecked(e){if(e.hasCheckbox&&e instanceof zse)return{get value(){return e.checked},onDidChange:t=>e.onChecked((()=>t()))}}}class $se{constructor(e){this.hoverDelegate=e}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=new at,t.toDisposeTemplate=new at,t.entry=_r(e,Vse(".quick-input-list-entry"));const i=_r(t.entry,Vse("label.quick-input-list-label"));t.toDisposeTemplate.add(ys(i,ur.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=_r(i,Vse("input.quick-input-list-checkbox")),t.checkbox.type="checkbox";const n=_r(i,Vse(".quick-input-list-rows")),o=_r(n,Vse(".quick-input-list-row")),s=_r(n,Vse(".quick-input-list-row"));t.label=new mZ(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.label),t.icon=vr(t.label.element,Vse(".quick-input-list-icon"));const r=_r(o,Vse(".quick-input-list-entry-keybinding"));t.keybinding=new KT(r,te),t.toDisposeTemplate.add(t.keybinding);const a=_r(s,Vse(".quick-input-list-label-meta"));return t.detail=new mZ(a,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),t.toDisposeTemplate.add(t.detail),t.separator=_r(t.entry,Vse(".quick-input-list-separator")),t.actionBar=new TT(t.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.add(t.actionBar),t}disposeTemplate(e){e.toDisposeElement.dispose(),e.toDisposeTemplate.dispose()}disposeElement(e,t,i){i.toDisposeElement.clear(),i.actionBar.clear()}}let Gse=Fse=class extends $se{constructor(e,t){super(e),this.themeService=t,this._itemsWithSeparatorsFrequency=new Map}get templateId(){return Fse.ID}renderTemplate(e){const t=super.renderTemplate(e);return t.toDisposeTemplate.add(ys(t.checkbox,ur.CHANGE,(e=>{t.element.checked=t.checkbox.checked}))),t}renderElement(e,t,i){var n,o,s;const r=e.element;i.element=r,r.element=null!==(n=i.entry)&&void 0!==n?n:void 0;const a=r.item;i.checkbox.checked=r.checked,i.toDisposeElement.add(r.onChecked((e=>i.checkbox.checked=e))),i.checkbox.disabled=r.checkboxDisabled;const{labelHighlights:l,descriptionHighlights:d,detailHighlights:c}=r;if(a.iconPath){const e=Wv(this.themeService.getColorTheme().type)?a.iconPath.dark:null!==(o=a.iconPath.light)&&void 0!==o?o:a.iconPath.dark,t=Po.revive(e);i.icon.className="quick-input-list-icon",i.icon.style.backgroundImage=Er(t)}else i.icon.style.backgroundImage="",i.icon.className=a.iconClass?`quick-input-list-icon ${a.iconClass}`:"";let h;!r.saneTooltip&&r.saneDescription&&(h={markdown:{value:r.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDescription});const u={matches:l||[],descriptionTitle:h,descriptionMatches:d||[],labelEscapeNewLines:!0};if(u.extraClasses=a.iconClasses,u.italic=a.italic,u.strikethrough=a.strikethrough,i.entry.classList.remove("quick-input-list-separator-as-item"),i.label.setLabel(r.saneLabel,r.saneDescription,u),i.keybinding.set(a.keybinding),r.saneDetail){let e;r.saneTooltip||(e={markdown:{value:r.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:r.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(r.saneDetail,void 0,{matches:c,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";(null===(s=r.separator)||void 0===s?void 0:s.label)?(i.separator.textContent=r.separator.label,i.separator.style.display="",this.addItemWithSeparator(r)):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!r.separator);const g=a.buttons;g&&g.length?(i.actionBar.push(g.map(((e,t)=>hse(e,`id-${t}`,(()=>r.fireButtonTriggered({button:e,item:r.item}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){this.removeItemWithSeparator(e.element),super.disposeElement(e,t,i)}isItemWithSeparatorVisible(e){return this._itemsWithSeparatorsFrequency.has(e)}addItemWithSeparator(e){this._itemsWithSeparatorsFrequency.set(e,(this._itemsWithSeparatorsFrequency.get(e)||0)+1)}removeItemWithSeparator(e){const t=this._itemsWithSeparatorsFrequency.get(e)||0;t>1?this._itemsWithSeparatorsFrequency.set(e,t-1):this._itemsWithSeparatorsFrequency.delete(e)}};Gse.ID="quickpickitem",Gse=Fse=Bse([Wse(1,Vv)],Gse);class Zse extends $se{constructor(){super(...arguments),this._visibleSeparatorsFrequency=new Map}get templateId(){return Zse.ID}get visibleSeparators(){return[...this._visibleSeparatorsFrequency.keys()]}isSeparatorVisible(e){return this._visibleSeparatorsFrequency.has(e)}renderElement(e,t,i){var n;const o=e.element;i.element=o,o.element=null!==(n=i.entry)&&void 0!==n?n:void 0,o.element.classList.toggle("focus-inside",!!o.focusInsideSeparator);const s=o.separator,{labelHighlights:r,descriptionHighlights:a,detailHighlights:l}=o;let d;i.icon.style.backgroundImage="",i.icon.className="",!o.saneTooltip&&o.saneDescription&&(d={markdown:{value:o.saneDescription,supportThemeIcons:!0},markdownNotSupportedFallback:o.saneDescription});const c={matches:r||[],descriptionTitle:d,descriptionMatches:a||[],labelEscapeNewLines:!0};if(i.entry.classList.add("quick-input-list-separator-as-item"),i.label.setLabel(o.saneLabel,o.saneDescription,c),o.saneDetail){let e;o.saneTooltip||(e={markdown:{value:o.saneDetail,supportThemeIcons:!0},markdownNotSupportedFallback:o.saneDetail}),i.detail.element.style.display="",i.detail.setLabel(o.saneDetail,void 0,{matches:l,title:e,labelEscapeNewLines:!0})}else i.detail.element.style.display="none";i.separator.style.display="none",i.entry.classList.add("quick-input-list-separator-border");const h=s.buttons;h&&h.length?(i.actionBar.push(h.map(((e,t)=>hse(e,`id-${t}`,(()=>o.fireSeparatorButtonTriggered({button:e,separator:o.separator}))))),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions"),this.addSeparator(o)}disposeElement(e,t,i){var n;this.removeSeparator(e.element),this.isSeparatorVisible(e.element)||null===(n=e.element.element)||void 0===n||n.classList.remove("focus-inside"),super.disposeElement(e,t,i)}addSeparator(e){this._visibleSeparatorsFrequency.set(e,(this._visibleSeparatorsFrequency.get(e)||0)+1)}removeSeparator(e){const t=this._visibleSeparatorsFrequency.get(e)||0;t>1?this._visibleSeparatorsFrequency.set(e,t-1):this._visibleSeparatorsFrequency.delete(e)}}Zse.ID="quickpickseparator";let Yse=class extends lt{constructor(e,t,i,n,o,s){super(),this.parent=e,this.hoverDelegate=t,this.linkOpenerDelegate=i,this.accessibilityService=s,this._onKeyDown=new kt,this._onLeave=new kt,this.onLeave=this._onLeave.event,this._onChangedAllVisibleChecked=new kt,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new kt,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new kt,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new kt,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new kt,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new kt,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._elementChecked=new kt,this._inputElements=new Array,this._elementTree=new Array,this._itemElements=new Array,this._elementDisposable=this._register(new at),this._shouldFireCheckedEvents=!0,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._shouldLoop=!0,this._container=_r(this.parent,Vse(".quick-input-list")),this._separatorRenderer=new Zse(t),this._itemRenderer=o.createInstance(Gse,t),this._tree=this._register(o.createInstance($G,"QuickInput",this._container,new jse,[this._itemRenderer,this._separatorRenderer],{accessibilityProvider:new qse,setRowLineHeight:!1,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,renderIndentGuides:Uq.None,findWidgetEnabled:!1,indent:0,horizontalScrolling:!1,allowNonCollapsibleParents:!0,alwaysConsumeMouseWheel:!0})),this._tree.getHTMLElement().id=n,this._registerListeners()}get onDidChangeFocus(){return _t.map(this._tree.onDidChangeFocus,(e=>e.elements.filter((e=>e instanceof zse)).map((e=>e.item))))}get onDidChangeSelection(){return _t.map(this._tree.onDidChangeSelection,(e=>({items:e.elements.filter((e=>e instanceof zse)).map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this._tree.scrollTop}set scrollTop(e){this._tree.scrollTop=e}get ariaLabel(){return this._tree.ariaLabel}set ariaLabel(e){this._tree.ariaLabel=null!=e?e:""}set enabled(e){this._tree.getHTMLElement().style.pointerEvents=e?"":"none"}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(e){this._matchOnLabelMode=e}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e}get shouldLoop(){return this._shouldLoop}set shouldLoop(e){this._shouldLoop=e}_registerListeners(){this._registerOnKeyDown(),this._registerOnContainerClick(),this._registerOnMouseMiddleClick(),this._registerOnElementChecked(),this._registerOnContextMenu(),this._registerHoverListeners(),this._registerSelectionChangeListener(),this._registerSeparatorActionShowingListeners()}_registerOnKeyDown(){this._register(this._tree.onKeyDown((e=>{const t=new Ke(e);10===t.keyCode&&this.toggleCheckbox(),this._onKeyDown.fire(t)})))}_registerOnContainerClick(){this._register(ws(this._container,ur.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()})))}_registerOnMouseMiddleClick(){this._register(ws(this._container,ur.AUXCLICK,(e=>{1===e.button&&this._onLeave.fire()})))}_registerOnElementChecked(){this._register(this._elementChecked.event((e=>this._fireCheckedEvents())))}_registerOnContextMenu(){this._register(this._tree.onContextMenu((e=>{e.element&&(e.browserEvent.preventDefault(),this._tree.setSelection([e.element]))})))}_registerHoverListeners(){const e=this._register(new Ut(this.hoverDelegate.delay));this._register(this._tree.onMouseOver((async t=>{var i;if(dr(t.browserEvent.target))e.cancel();else if(dr(t.browserEvent.relatedTarget)||!Vs(t.browserEvent.relatedTarget,null===(i=t.element)||void 0===i?void 0:i.element))try{await e.trigger((async()=>{t.element instanceof zse&&this.showHover(t.element)}))}catch(t){if(!Ne(t))throw t}}))),this._register(this._tree.onMouseOut((t=>{var i;Vs(t.browserEvent.relatedTarget,null===(i=t.element)||void 0===i?void 0:i.element)||e.cancel()})))}_registerSeparatorActionShowingListeners(){this._register(this._tree.onDidChangeFocus((e=>{const t=e.elements[0]?this._tree.getParentElement(e.elements[0]):null;for(const e of this._separatorRenderer.visibleSeparators){const i=e===t;!!(e.focusInsideSeparator&Use.ACTIVE_ITEM)!==i&&(i?e.focusInsideSeparator|=Use.ACTIVE_ITEM:e.focusInsideSeparator&=~Use.ACTIVE_ITEM,this._tree.rerender(e))}}))),this._register(this._tree.onMouseOver((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const e of this._separatorRenderer.visibleSeparators)e===t&&(e.focusInsideSeparator&Use.MOUSE_HOVER||(e.focusInsideSeparator|=Use.MOUSE_HOVER,this._tree.rerender(e)))}))),this._register(this._tree.onMouseOut((e=>{const t=e.element?this._tree.getParentElement(e.element):null;for(const e of this._separatorRenderer.visibleSeparators)e===t&&e.focusInsideSeparator&Use.MOUSE_HOVER&&(e.focusInsideSeparator&=~Use.MOUSE_HOVER,this._tree.rerender(e))})))}_registerSelectionChangeListener(){this._register(this._tree.onDidChangeSelection((e=>{const t=e.elements.filter((e=>e instanceof zse));t.length!==e.elements.length&&(1===e.elements.length&&e.elements[0]instanceof Kse&&(this._tree.setFocus([e.elements[0].children[0]]),this._tree.reveal(e.elements[0],0)),this._tree.setSelection(t))})))}getAllVisibleChecked(){return this._allVisibleChecked(this._itemElements,!1)}getCheckedCount(){return this._itemElements.filter((e=>e.checked)).length}getVisibleCount(){return this._itemElements.filter((e=>!e.hidden)).length}setAllVisibleChecked(e){try{this._shouldFireCheckedEvents=!1,this._itemElements.forEach((t=>{t.hidden||t.checkboxDisabled||(t.checked=e)}))}finally{this._shouldFireCheckedEvents=!0,this._fireCheckedEvents()}}setElements(e){this._elementDisposable.clear(),this._inputElements=e;const t=this.parent.classList.contains("show-checkboxes");let i;this._itemElements=new Array,this._elementTree=e.reduce(((n,o,s)=>{let r;if("separator"===o.type){if(!o.buttons)return n;i=new Kse(s,(e=>this.fireSeparatorButtonTriggered(e)),o),r=i}else{const a=s>0?e[s-1]:void 0;let l;a&&"separator"===a.type&&!a.buttons&&(i=void 0,l=a);const d=new zse(s,t,(e=>this.fireButtonTriggered(e)),this._elementChecked,o,l);if(this._itemElements.push(d),i)return i.children.push(d),n;r=d}return n.push(r),n}),new Array);const n=new Array;let o=0;for(const e of this._elementTree)e instanceof Kse?(n.push({element:e,collapsible:!1,collapsed:!1,children:e.children.map((e=>({element:e,collapsible:!1,collapsed:!1})))}),o+=e.children.length+1):(n.push({element:e,collapsible:!1,collapsed:!1}),o++);this._tree.setChildren(null,n),this._onChangedVisibleCount.fire(o),this.accessibilityService.isScreenReaderOptimized()&&setTimeout((()=>{const e=this._tree.getHTMLElement().querySelector(".monaco-list-row.focused"),t=null==e?void 0:e.parentNode;if(e&&t){const i=e.nextSibling;t.removeChild(e),t.insertBefore(e,i)}}),0)}setFocusedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e));if(this._tree.setFocus(t),e.length>0){const e=this._tree.getFocus()[0];e&&this._tree.reveal(e)}}getActiveDescendant(){return this._tree.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){const t=e.map((e=>this._itemElements.find((t=>t.item===e)))).filter((e=>!!e));this._tree.setSelection(t)}getCheckedElements(){return this._itemElements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){try{this._shouldFireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this._itemElements)e.checked=t.has(e.item)}finally{this._shouldFireCheckedEvents=!0,this._fireCheckedEvents()}}focus(e){var t;if(this._itemElements.length)switch(e===UL.Second&&this._itemElements.length<2&&(e=UL.First),e){case UL.First:this._tree.scrollTop=0,this._tree.focusFirst(void 0,(e=>e.element instanceof zse));break;case UL.Second:this._tree.scrollTop=0,this._tree.setFocus([this._itemElements[1]]);break;case UL.Last:this._tree.scrollTop=this._tree.scrollHeight,this._tree.setFocus([this._itemElements[this._itemElements.length-1]]);break;case UL.Next:{const e=this._tree.getFocus();this._tree.focusNext(void 0,this._shouldLoop,void 0,(e=>e.element instanceof zse&&(this._tree.reveal(e.element),!0)));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[this._itemElements.length-1]&&this._onLeave.fire();break}case UL.Previous:{const e=this._tree.getFocus();this._tree.focusPrevious(void 0,this._shouldLoop,void 0,(e=>{if(!(e.element instanceof zse))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));const t=this._tree.getFocus();e.length&&e[0]===t[0]&&e[0]===this._itemElements[0]&&this._onLeave.fire();break}case UL.NextPage:this._tree.focusNextPage(void 0,(e=>e.element instanceof zse&&(this._tree.reveal(e.element),!0)));break;case UL.PreviousPage:this._tree.focusPreviousPage(void 0,(e=>{if(!(e.element instanceof zse))return!1;const t=this._tree.getParentElement(e.element);return null===t||t.children[0]!==e.element?this._tree.reveal(e.element):this._tree.reveal(t),!0}));break;case UL.NextSeparator:{let e=!1;const t=this._tree.getFocus()[0];this._tree.focusNext(void 0,!0,void 0,(t=>{if(e)return!0;if(t.element instanceof Kse)e=!0,this._separatorRenderer.isSeparatorVisible(t.element)?this._tree.reveal(t.element.children[0]):this._tree.reveal(t.element,0);else if(t.element instanceof zse){if(t.element.separator)return this._itemRenderer.isItemWithSeparatorVisible(t.element)?this._tree.reveal(t.element):this._tree.reveal(t.element,0),!0;if(t.element===this._elementTree[0])return this._tree.reveal(t.element,0),!0}return!1})),t===this._tree.getFocus()[0]&&(this._tree.scrollTop=this._tree.scrollHeight,this._tree.setFocus([this._itemElements[this._itemElements.length-1]]));break}case UL.PreviousSeparator:{let e,i=!!(null===(t=this._tree.getFocus()[0])||void 0===t?void 0:t.separator);this._tree.focusPrevious(void 0,!0,void 0,(t=>{if(t.element instanceof Kse)i?e||(this._separatorRenderer.isSeparatorVisible(t.element)?this._tree.reveal(t.element):this._tree.reveal(t.element,0),e=t.element.children[0]):i=!0;else if(t.element instanceof zse&&!e)if(t.element.separator)this._itemRenderer.isItemWithSeparatorVisible(t.element)?this._tree.reveal(t.element):this._tree.reveal(t.element,0),e=t.element;else if(t.element===this._elementTree[0])return this._tree.reveal(t.element,0),!0;return!1})),e&&this._tree.setFocus([e]);break}}}clearFocus(){this._tree.setFocus([])}domFocus(){this._tree.domFocus()}layout(e){this._tree.getHTMLElement().style.maxHeight=e?44*Math.floor(e/44)+6+"px":"",this._tree.layout()}filter(e){if(!(this._sortByLabel||this._matchOnLabel||this._matchOnDescription||this._matchOnDetail))return this._tree.layout(),!1;const t=e;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let i;this._elementTree.forEach((n=>{var o,s,r,a;let l;l="fuzzy"===this.matchOnLabelMode?this.matchOnLabel&&null!==(o=zl(e,Hl(n.saneLabel)))&&void 0!==o?o:void 0:this.matchOnLabel&&null!==(s=function(e,t){const{text:i,iconOffsets:n}=t;if(!n||0===n.length)return Qse(e,i);const o=gn(i," "),s=i.length-o.length,r=Qse(e,o);if(r)for(const e of r){const t=n[e.start+s]+s;e.start+=t,e.end+=t}return r}(t,Hl(n.saneLabel)))&&void 0!==s?s:void 0;const d=this.matchOnDescription&&null!==(r=zl(e,Hl(n.saneDescription||"")))&&void 0!==r?r:void 0,c=this.matchOnDetail&&null!==(a=zl(e,Hl(n.saneDetail||"")))&&void 0!==a?a:void 0;if(l||d||c?(n.labelHighlights=l,n.descriptionHighlights=d,n.detailHighlights=c,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item||!n.item.alwaysShow),n.item?n.separator=void 0:n.separator&&(n.hidden=!0),!this.sortByLabel){const e=n.index&&this._inputElements[n.index-1];i=e&&"separator"===e.type?e:i,i&&!n.hidden&&(n.separator=i,i=void 0)}}))}else this._itemElements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this._inputElements[e.index-1];e.item&&(e.separator=t&&"separator"===t.type&&!t.buttons?t:void 0)}));const i=this._elementTree.filter((e=>!e.hidden));if(this.sortByLabel&&e){const t=e.toLowerCase();i.sort(((e,i)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=n.startsWith(i),r=o.startsWith(i);if(s!==r)return s?-1:1;if(s&&r){if(n.lengtho.length)return 1}return 0}(e,t,i);if(s)return s;const r=n.endsWith(i);if(r!==o.endsWith(i))return r?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",s=Ose.value.collator.compare(n,o);return Ose.value.collatorIsNumeric&&0===s&&n!==o?n(t instanceof zse?n?n.children.push(t):e.push(t):t instanceof Kse&&(t.children=[],n=t,e.push(t)),e)),new Array),s=new Array;for(const e of o)e instanceof Kse?s.push({element:e,collapsible:!1,collapsed:!1,children:e.children.map((e=>({element:e,collapsible:!1,collapsed:!1})))}):s.push({element:e,collapsible:!1,collapsed:!1});return this._tree.setChildren(null,s),this._tree.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._shouldFireCheckedEvents=!1;const e=this._tree.getFocus().filter((e=>e instanceof zse)),t=this._allVisibleChecked(e);for(const i of e)i.checkboxDisabled||(i.checked=!t)}finally{this._shouldFireCheckedEvents=!0,this._fireCheckedEvents()}}display(e){this._container.style.display=e?"":"none"}isDisplayed(){return"none"!==this._container.style.display}style(e){this._tree.style(e)}toggleHover(){const e=this._tree.getFocus()[0];if(!((null==e?void 0:e.saneTooltip)&&e instanceof zse))return;if(this._lastHover&&!this._lastHover.isDisposed)return void this._lastHover.dispose();this.showHover(e);const t=new at;t.add(this._tree.onDidChangeFocus((e=>{e.elements[0]instanceof zse&&this.showHover(e.elements[0])}))),this._lastHover&&t.add(this._lastHover),this._elementDisposable.add(t)}_allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{this.linkOpenerDelegate(e)},appearance:{showPointer:!0},container:this._container,position:{hoverPosition:1}},!1))}};function Qse(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1!==i?[{start:i,end:i+e.length}]:null}Bse([jL],Yse.prototype,"onDidChangeFocus",null),Bse([jL],Yse.prototype,"onDidChangeSelection",null),Yse=Bse([Wse(4,_d),Wse(5,ak)],Yse);const Xse={weight:200,when:$d.and($d.equals(fse,"quickPick"),mse),metadata:{description:v(0,"Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.")}};function Jse(e,t={}){var i;Dc.registerCommandAndKeybindingRule({...Xse,...e,secondary:tre(e.primary,null!==(i=e.secondary)&&void 0!==i?i:[],t)})}const ere=K?256:2048;function tre(e,t,i={}){return i.withAltMod&&t.push(512+e),i.withCtrlMod&&(t.push(ere+e),i.withAltMod&&t.push(512+ere+e)),i.withCmdMod&&K&&(t.push(2048+e),i.withCtrlMod&&t.push(2304+e),i.withAltMod&&(t.push(2560+e),i.withCtrlMod&&t.push(2816+e))),t}function ire(e,t){return i=>{const n=i.get(KL).currentQuickInput;if(n)return t&&n.quickNavigate?n.focus(t):n.focus(e)}}Jse({id:"quickInput.pageNext",primary:12,handler:ire(UL.NextPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),Jse({id:"quickInput.pagePrevious",primary:11,handler:ire(UL.PreviousPage)},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0}),Jse({id:"quickInput.first",primary:ere+14,handler:ire(UL.First)},{withAltMod:!0,withCmdMod:!0}),Jse({id:"quickInput.last",primary:ere+13,handler:ire(UL.Last)},{withAltMod:!0,withCmdMod:!0}),Jse({id:"quickInput.next",primary:18,handler:ire(UL.Next)},{withCtrlMod:!0}),Jse({id:"quickInput.previous",primary:16,handler:ire(UL.Previous)},{withCtrlMod:!0});const nre=v(0,"If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator."),ore=v(0,"If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");K?(Jse({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:2066,handler:ire(UL.NextSeparator,UL.Next),metadata:{description:nre}}),Jse({id:"quickInput.nextSeparator",primary:2578,secondary:[2322],handler:ire(UL.NextSeparator)},{withCtrlMod:!0}),Jse({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:2064,handler:ire(UL.PreviousSeparator,UL.Previous),metadata:{description:ore}}),Jse({id:"quickInput.previousSeparator",primary:2576,secondary:[2320],handler:ire(UL.PreviousSeparator)},{withCtrlMod:!0})):(Jse({id:"quickInput.nextSeparatorWithQuickAccessFallback",primary:530,handler:ire(UL.NextSeparator,UL.Next),metadata:{description:nre}}),Jse({id:"quickInput.nextSeparator",primary:2578,handler:ire(UL.NextSeparator)}),Jse({id:"quickInput.previousSeparatorWithQuickAccessFallback",primary:528,handler:ire(UL.PreviousSeparator,UL.Previous),metadata:{description:ore}}),Jse({id:"quickInput.previousSeparator",primary:2576,handler:ire(UL.PreviousSeparator)})),Jse({id:"quickInput.acceptInBackground",when:$d.and(Xse.when,$d.or(Q$.negate(),wse)),primary:17,weight:250,handler:e=>{const t=e.get(KL).currentQuickInput;null==t||t.accept(!0)}},{withAltMod:!0,withCtrlMod:!0,withCmdMod:!0});var sre,rre=function(e,t){return function(i,n){t(i,n,e)}};const are=Sr;let lre=sre=class extends lt{get currentQuickInput(){var e;return null!==(e=this.controller)&&void 0!==e?e:void 0}get container(){return this._container}constructor(e,t,i,n){super(),this.options=e,this.layoutService=t,this.instantiationService=i,this.contextKeyService=n,this.enabled=!0,this.onDidAcceptEmitter=this._register(new kt),this.onDidCustomEmitter=this._register(new kt),this.onDidTriggerButtonEmitter=this._register(new kt),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new kt),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new kt),this.onHide=this.onHideEmitter.event,this.inQuickInputContext=pse.bindTo(this.contextKeyService),this.quickInputTypeContext=_se.bindTo(this.contextKeyService),this.endOfQuickInputBoxContext=bse.bindTo(this.contextKeyService),this.idPrefix=e.idPrefix,this._container=e.container,this.styles=e.styles,this._register(_t.runAndSubscribe(ms,(({window:e,disposables:t})=>this.registerKeyModsListeners(e,t)),{window:s,disposables:this._store})),this._register(fs((e=>{this.ui&&ls(this.ui.container)===e&&(this.reparentUI(this.layoutService.mainContainer),this.layout(this.layoutService.mainContainerDimension,this.layoutService.mainContainerOffset.quickPickTop))})))}registerKeyModsListeners(e,t){const i=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};for(const n of[ur.KEY_DOWN,ur.KEY_UP,ur.MOUSE_DOWN])t.add(ws(e,n,i,!0))}getUI(e){if(this.ui)return e&&ls(this._container)!==ls(this.layoutService.activeContainer)&&(this.reparentUI(this.layoutService.activeContainer),this.layout(this.layoutService.activeContainerDimension,this.layoutService.activeContainerOffset.quickPickTop)),this.ui;const t=_r(this._container,are(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=Js(t),n=_r(t,are(".quick-input-titlebar")),o=this._register(new TT(n,{hoverDelegate:this.options.hoverDelegate}));o.domNode.classList.add("quick-input-left-action-bar");const s=_r(n,are(".quick-input-title")),r=this._register(new TT(n,{hoverDelegate:this.options.hoverDelegate}));r.domNode.classList.add("quick-input-right-action-bar");const a=_r(t,are(".quick-input-header")),l=_r(a,are("input.quick-input-check-all"));l.type="checkbox",l.setAttribute("aria-label",v(0,"Toggle all checkboxes")),this._register(ys(l,ur.CHANGE,(e=>{const t=l.checked;D.setAllVisibleChecked(t)}))),this._register(ws(l,ur.CLICK,(e=>{(e.x||e.y)&&u.setFocus()})));const d=_r(a,are(".quick-input-description")),c=_r(a,are(".quick-input-and-message")),h=_r(c,are(".quick-input-filter")),u=this._register(new Pse(h,this.styles.inputBox,this.styles.toggle));u.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=_r(h,are(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new cZ(g,{countFormat:v(0,"{0} Results")},this.styles.countBadge),m=_r(h,are(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new cZ(m,{countFormat:v(0,"{0} Selected")},this.styles.countBadge),_=_r(a,are(".quick-input-action")),b=this._register(new nD(_,this.styles.button));b.label=v(0,"OK"),this._register(b.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const w=_r(a,are(".quick-input-action")),C=this._register(new nD(w,{...this.styles.button,supportIcons:!0}));C.label=v(0,"Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const y=_r(c,are(`#${this.idPrefix}message.quick-input-message`)),S=this._register(new Ase(t,this.styles.progressBar));S.getContainer().classList.add("quick-input-progress");const k=_r(t,are(".quick-input-html-widget"));k.tabIndex=-1;const x=_r(t,are(".quick-input-description")),L=this.idPrefix+"list",D=this._register(this.instantiationService.createInstance(Yse,t,this.options.hoverDelegate,this.options.linkOpenerDelegate,L));u.setAttribute("aria-controls",L),this._register(D.onDidChangeFocus((()=>{var e;u.setAttribute("aria-activedescendant",null!==(e=D.getActiveDescendant())&&void 0!==e?e:"")}))),this._register(D.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(D.onChangedVisibleCount((e=>{p.setCount(e)}))),this._register(D.onChangedCheckedCount((e=>{f.setCount(e)}))),this._register(D.onLeave((()=>{setTimeout((()=>{this.controller&&(u.setFocus(),this.controller instanceof Sse&&this.controller.canSelectMany&&D.clearFocus())}),0)})));const E=fr(t);return this._register(E),this._register(ws(t,ur.FOCUS,(e=>{const t=this.getUI();if(Vs(e.relatedTarget,t.inputContainer)){const e=t.inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==e&&this.endOfQuickInputBoxContext.set(e)}Vs(e.relatedTarget,t.container)||(this.inQuickInputContext.set(!0),this.previousFocusElement=lr(e.relatedTarget)?e.relatedTarget:void 0)}),!0)),this._register(E.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(HL.Blur),this.inQuickInputContext.set(!1),this.endOfQuickInputBoxContext.set(!1),this.previousFocusElement=void 0}))),this._register(u.onKeyDown((e=>{const t=this.getUI().inputBox.isSelectionAtEnd();this.endOfQuickInputBoxContext.get()!==t&&this.endOfQuickInputBoxContext.set(t)}))),this._register(ws(t,ur.FOCUS,(e=>{u.setFocus()}))),this._register(ys(t,ur.KEY_DOWN,(e=>{if(!Vs(e.target,k))switch(e.keyCode){case 3:pr(e,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:pr(e,!0),this.hide(HL.Gesture);break;case 2:if(!e.altKey&&!e.ctrlKey&&!e.metaKey){const i=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(t.classList.contains("show-checkboxes")?i.push("input"):i.push("input[type=text]"),this.getUI().list.isDisplayed()&&i.push(".monaco-list"),this.getUI().message&&i.push(".quick-input-message a"),this.getUI().widget){if(Vs(e.target,this.getUI().widget))break;i.push(".quick-input-html-widget")}const n=t.querySelectorAll(i.join(", "));e.shiftKey&&e.target===n[0]?(pr(e,!0),D.clearFocus()):!e.shiftKey&&Vs(e.target,n[n.length-1])&&(pr(e,!0),n[0].focus())}break;case 10:e.ctrlKey&&(pr(e,!0),this.getUI().list.toggleHover())}}))),this.ui={container:t,styleSheet:i,leftActionBar:o,titleBar:n,title:s,description1:x,description2:d,widget:k,rightActionBar:r,checkAll:l,inputContainer:c,filterContainer:h,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:b,message:y,customButtonContainer:w,customButton:C,list:D,progressBar:S,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e),linkOpenerDelegate:e=>this.options.linkOpenerDelegate(e)},this.updateStyles(),this.ui}reparentUI(e){this.ui&&(this._container=e,_r(this._container,this.ui.container))}pick(e,t={},i=At.None){return new Promise(((n,o)=>{let s=e=>{var i;s=n,null===(i=t.onKeyMods)||void 0===i||i.call(t,r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept((()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton({...e,removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),o=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=o}}}))),r.onDidTriggerSeparatorButton((e=>{var i;return null===(i=t.onDidTriggerSeparatorButton)||void 0===i?void 0:i.call(t,e)})),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{ot(l),s(void 0)}))];r.title=t.title,r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.quickNavigate=t.quickNavigate,r.hideInput=!!t.hideInput,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{o(e),r.hide()}))}))}createQuickPick(){const e=this.getUI(!0);return new Sse(e)}createInputBox(){const e=this.getUI(!0);return new kse(e)}show(e){const t=this.getUI(!0);this.onShowEmitter.fire();const i=this.controller;this.controller=e,null==i||i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",br(t.widget),t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(pD.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),br(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,t.inputBox.toggles=void 0;const n=this.options.backKeybindingLabel();Cse.tooltip=n?v(0,"Back ({0})",n):v(0,"Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus(),this.quickInputTypeContext.set(e.type)}isVisible(){return!!this.ui&&"none"!==this.ui.container.style.display}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.inputContainer.style.display=e.inputBox?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList.toggle("show-checkboxes",!!e.checkBox),t.container.classList.toggle("hidden-input",!e.inputBox&&!e.description),this.updateLayout()}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.action.enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.action.enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().inputBox.enabled=e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t,i;const n=this.controller;if(!n)return;n.willHide(e);const o=null===(t=this.ui)||void 0===t?void 0:t.container,s=o&&!$s(o);if(this.controller=null,this.onHideEmitter.fire(),o&&(o.style.display="none"),!s){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=null!==(i=e.parentElement)&&void 0!==i?i:void 0;(null==e?void 0:e.offsetParent)?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}n.didHide(e)}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,sre.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,widgetBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=null!=e?e:"",this.ui.container.style.backgroundColor=null!=t?t:"",this.ui.container.style.color=null!=i?i:"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.list.style(this.styles.list);const s=[];this.styles.pickerGroup.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&s.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const r=s.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}};lre.MAX_WIDTH=600,lre=sre=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([rre(1,rne),rre(2,_d),rre(3,pc)],lre);var dre=function(e,t){return function(i,n){t(i,n,e)}};let cre=class extends qv{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get currentQuickInput(){return this.controller.currentQuickInput}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(ose))),this._quickAccess}constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.layoutService=n,this.configurationService=o,this._onShow=this._register(new kt),this._onHide=this._register(new kt),this.contexts=new Map}createController(e=this.layoutService,t){const i={idPrefix:"quickInput_",container:e.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),linkOpenerDelegate:e=>{this.instantiationService.invokeFunction((t=>{t.get(LL).open(e,{allowCommands:!0,fromUserGesture:!0})}))},returnFocus:()=>e.focus(),styles:this.computeStyles(),hoverDelegate:this._register(this.instantiationService.createInstance(xse))},n=this._register(this.instantiationService.createInstance(lre,{...i,...t}));return n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop),this._register(e.onDidLayoutActiveContainer((t=>{ls(e.activeContainer)===ls(n.container)&&n.layout(t,e.activeContainerOffset.quickPickTop)}))),this._register(e.onDidChangeActiveContainer((()=>{n.isVisible()||n.layout(e.activeContainerDimension,e.activeContainerOffset.quickPickTop)}))),this._register(n.onShow((()=>{this.resetContextKeys(),this._onShow.fire()}))),this._register(n.onHide((()=>{this.resetContextKeys(),this._onHide.fire()}))),n}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new gc(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),null==t||t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=At.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:Em(Ev),quickInputForeground:Em(Nv),quickInputTitleBackground:Em(Iv),widgetBorder:Em(Vf),widgetShadow:Em(Wf)},inputBox:ZT,toggle:GT,countBadge:QT,button:qT,progressBar:$T,keybindingLabel:jT,list:JT({listBackground:Ev,listFocusBackground:Ov,listFocusForeground:Rv,listInactiveFocusForeground:Rv,listInactiveSelectionIconForeground:Pv,listInactiveFocusBackground:Ov,listFocusOutline:jm,listInactiveFocusOutline:jm}),pickerGroup:{pickerGroupBorder:Em(Mv),pickerGroupForeground:Em(Tv)}}}};cre=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([dre(0,_d),dre(1,pc),dre(2,Vv),dre(3,rne),dre(4,Cg)],cre);var hre=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ure=function(e,t){return function(i,n){t(i,n,e)}};let gre=class extends cre{constructor(e,t,i,n,o,s){super(t,i,n,new cne(e.getContainerDomNode(),o),s),this.host=void 0;const r=mre.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get mainContainer(){return t.getDomNode()},getContainer(){return t.getDomNode()},whenContainerStylesLoaded(){},get containers(){return[t.getDomNode()]},get activeContainer(){return t.getDomNode()},get mainContainerDimension(){return e.getLayoutInfo()},get activeContainerDimension(){return e.getLayoutInfo()},get onDidLayoutMainContainer(){return e.onDidLayoutChange},get onDidLayoutActiveContainer(){return e.onDidLayoutChange},get onDidLayoutContainer(){return _t.map(e.onDidLayoutChange,(e=>({container:t.getDomNode(),dimension:e})))},get onDidChangeActiveContainer(){return _t.None},get onDidAddContainer(){return _t.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};gre=hre([ure(1,_d),ure(2,pc),ure(3,Vv),ure(4,bd),ure(5,Cg)],gre);let pre=class{get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(gre,e);this.mapEditorToService.set(e,t),Ye(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get currentQuickInput(){return this.activeService.currentQuickInput}get quickAccess(){return this.activeService.quickAccess}constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}pick(e,t={},i=At.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};pre=hre([ure(0,_d),ure(1,bd)],pre);class mre{static get(e){return e.getContribution(mre.ID)}constructor(e){this.editor=e,this.widget=new fre(this.editor)}dispose(){this.widget.dispose()}}mre.ID="editor.controller.quickInput";class fre{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return fre.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}fre.ID="editor.contrib.quickInputWidget",oh(mre.ID,mre,4);var _re=function(e,t){return function(i,n){t(i,n,e)}};let vre=class extends lt{constructor(e,t,i){super(),this._contextKeyService=e,this._layoutService=t,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new kt,this._onDidChangeReducedMotion=new kt,this._accessibilityModeEnabledContext=lk.bindTo(this._contextKeyService);const n=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(n(),this._onDidChangeScreenReaderOptimized.fire()),e.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())}))),n(),this._register(this.onDidChangeScreenReaderOptimized((()=>n())));const o=s.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=o.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(o)}initReducedMotionListeners(e){this._register(ws(e,"change",(()=>{this._systemMotionReduced=e.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()})));const t=()=>{const e=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",e),this._layoutService.mainContainer.classList.toggle("enable-motion",!e)};t(),this._register(this.onDidChangeReducedMotion((()=>t())))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const e=this._configMotionReduced;return"on"===e||"auto"===e&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};vre=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([_re(0,pc),_re(1,rne),_re(2,Cg)],vre);var bre,wre=function(e,t){return function(i,n){t(i,n,e)}};let Cre=bre=class extends lt{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(u||g)&&this.installWebKitWriteTextWorkaround(),this._register(_t.runAndSubscribe(ms,(({window:e,disposables:t})=>{t.add(ws(e.document,"copy",(()=>this.clearResources())))}),{window:s,disposables:this._store}))}installWebKitWriteTextWorkaround(){const e=()=>{const e=new ei;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,Zs().navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((async t=>{t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))};this._register(_t.runAndSubscribe(this.layoutService.onDidAddContainer,(({container:t,disposables:i})=>{i.add(ws(t,"click",e)),i.add(ws(t,"keydown",e))}),{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(e,t){if(this.writeResources([]),t)this.mapTextToType.set(t,e);else{if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return await Zs().navigator.clipboard.writeText(e)}catch(e){console.error(e)}this.fallbackWriteText(e)}}fallbackWriteText(e){const t=Gs(),i=t.activeElement,n=t.body.appendChild(Sr("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),t.execCommand("copy"),lr(i)&&i.focus(),t.body.removeChild(n)}async readText(e){if(e)return this.mapTextToType.get(e)||"";try{return await Zs().navigator.clipboard.readText()}catch(e){console.error(e)}return""}async readFindText(){return this.findText}async writeFindText(e){this.findText=e}async writeResources(e){0===e.length?this.clearResources():(this.resources=e,this.resourcesStateHash=await this.computeResourcesStateHash())}async readResources(){const e=await this.computeResourcesStateHash();return this.resourcesStateHash!==e&&this.clearResources(),this.resources}async computeResourcesStateHash(){if(0!==this.resources.length)return Jo((await this.readText()).substring(0,bre.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearResources(){this.resources=[],this.resourcesStateHash=void 0}};Cre.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3,Cre=bre=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([wre(0,rne),wre(1,Hc)],Cre);const yre="data-keybinding-context";class Sre{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}get value(){return{...this._value}}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class kre extends Sre{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}kre.INSTANCE=new kre;class xre extends Sre{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Hk.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(7===e.source){const e=Array.from(this._values,(([e])=>e));this._values.clear(),i.fire(new Ere(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...Qe.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new Ere(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(xre._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(xre._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}xre._keyPrefix="config.";class Lre{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Dre{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}allKeysContainedIn(e){return this.affectsSome(e)}}class Ere{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}allKeysContainedIn(e){return this.keys.every((t=>e.has(t)))}}class Nre{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}allKeysContainedIn(e){return this.events.every((t=>t.allKeysContainedIn(e)))}}class Ire extends lt{constructor(e){super(),this._onDidChangeContext=this._register(new Lt({merge:e=>new Nre(e)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Lre(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Mre(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new Dre(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Dre(e))}getContext(e){return this._isDisposed?kre.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(yre)){const t=e.getAttribute(yre);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}dispose(){super.dispose(),this._isDisposed=!0}}let Tre=class extends Ire{constructor(e){super(0),this._contexts=new Map,this._lastContextId=0;const t=this._register(new xre(this._myContextId,e,this._onDidChangeContext));this._contexts.set(this._myContextId,t)}getContextValuesContainer(e){return this._isDisposed?kre.INSTANCE:this._contexts.get(e)||kre.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const t=++this._lastContextId;return this._contexts.set(t,new Sre(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};Tre=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(0,Cg)],Tre);class Mre extends Ire{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=this._register(new dt),this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(yre)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(yre,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{var t;t=this._parent.getContextValuesContainer(this._myContextId).value,e.allKeysContainedIn(new Set(Object.keys(t)))||this._onDidChangeContext.fire(e)}))}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(yre),super.dispose())}getContextValuesContainer(e){return this._isDisposed?kre.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}Id.registerCommand("_setContext",(function(e,t,i){e.get(pc).createKey(String(t),function(e){return Sh(e,(e=>"object"==typeof e&&1===e.$mid?Po.revive(e).toString():e instanceof Po?e.toString():void 0))}(i))})),Id.registerCommand({id:"getContextKeyInfo",handler(){return[...gc.all()].sort(((e,t)=>e.key.localeCompare(t.key)))},metadata:{description:v(0,"A command that returns information about context keys"),args:[]}}),Id.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(const i of gc.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));class Are{constructor(e,t){this.key=e,this.data=t,this.incoming=new Map,this.outgoing=new Map}}class Rre{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(const t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(n.key,n),n.incoming.set(i.key,i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(const e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Are(t,e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){const e=[];for(const[t,i]of this._nodes)e.push(`${t}\n\t(-> incoming)[${[...i.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...i.outgoing.keys()].join(",")}]\n`);return e.join("\n")}findCycleSlow(){for(const[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(const[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}class Pre extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class Ore{constructor(e=new $B,t=!1,i,n=!1){var o;this._services=e,this._strict=t,this._parent=i,this._enableTracing=n,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(_d,this),this._globalGraph=n?null!==(o=null==i?void 0:i._globalGraph)&&void 0!==o?o:new Rre((e=>e)):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,ot(this._children),this._children.clear();for(const e of this._servicesToMaybeDispose)nt(e)&&e.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(e,t){this._throwIfDisposed();const i=this,n=new class extends Ore{dispose(){i._children.delete(n),super.dispose()}}(e,this._strict,this,this._enableTracing);return this._children.add(n),null==t||t.add(n),n}invokeFunction(e,...t){this._throwIfDisposed();const i=Fre.traceInvocation(this._enableTracing,e);let n=!1;try{return e({get:e=>{if(n)throw Me("service accessor is only valid during the invocation of its target method");const t=this._getOrCreateServiceInstance(e,i);if(!t)throw new Error(`[invokeFunction] unknown service '${e}'`);return t}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return this._throwIfDisposed(),e instanceof Dg?(i=Fre.traceCreation(this._enableTracing,e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Fre.traceCreation(this._enableTracing,e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){const n=pd.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){const n=this._getOrCreateServiceInstance(t.id,i);n||this._throwIfStrict(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`,!1),o.push(n)}const s=n.length>0?n[0].index:t.length;if(t.length!==s){console.trace(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);const i=s-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,s)}return Reflect.construct(e,t.concat(o))}_setCreatedServiceInstance(e,t){if(this._services.get(e)instanceof Dg)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setCreatedServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){const t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(e));const i=this._getServiceInstanceOrDescriptor(e);return i instanceof Dg?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){var n;const o=new Rre((e=>e.id.toString()));let s=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(o.lookupOrInsertNode(t),s++>1e3)throw new Pre(o);for(const i of pd.getServiceDependencies(t.desc.ctor)){const s=this._getServiceInstanceOrDescriptor(i.id);if(s||this._throwIfStrict(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`,!0),null===(n=this._globalGraph)||void 0===n||n.insertEdge(String(t.id),String(i.id)),s instanceof Dg){const e={id:i.id,desc:s,_trace:t._trace.branch(i.id,!0)};o.insertEdge(t,e),r.push(e)}}}for(;;){const e=o.roots();if(0===e.length){if(!o.isEmpty())throw new Pre(o);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Dg){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setCreatedServiceInstance(t.id,e)}o.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof Dg)return this._createServiceInstance(e,t,i,n,o,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t,i=[],n,o,s){if(n){const n=new Ore(void 0,this._strict,this,this._enableTracing);n._globalGraphImplicitDependency=String(e);const r=new Map,a=new Jt((()=>{const e=n._createInstance(t,i,o);for(const[t,i]of r){const n=e[t];if("function"==typeof n)for(const t of i)t.disposable=n.apply(e,t.listener)}return r.clear(),s.add(e),e}));return new Proxy(Object.create(null),{get(e,t){if(!a.isInitialized&&"string"==typeof t&&(t.startsWith("onDid")||t.startsWith("onWill"))){let e=r.get(t);e||(e=new pt,r.set(t,e));const i=(i,n,o)=>{if(a.isInitialized)return a.value[t](i,n,o);{const t={listener:[i,n,o],disposable:void 0},s=e.push(t),r=rt((()=>{var e;s(),null===(e=t.disposable)||void 0===e||e.dispose()}));return r}};return i}if(t in e)return e[t];const i=a.value;let n=i[t];return"function"!=typeof n||(n=n.bind(i),e[t]=n),n},set(e,t,i){return a.value[t]=i,!0},getPrototypeOf(e){return t.prototype}})}{const e=this._createInstance(t,i,o);return s.add(e),e}}_throwIfStrict(e,t){if(t&&console.warn(e),this._strict)throw new Error(e)}}class Fre{static traceInvocation(e,t){return e?new Fre(2,t.name||(new Error).stack.split("\n").slice(3,4).join("\n")):Fre._None}static traceCreation(e,t){return e?new Fre(1,t.name):Fre._None}constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}branch(e,t){const i=new Fre(3,e.toString());return this._dep.push([e,t,i]),i}stop(){const e=Date.now()-this._start;Fre._totals+=e;let t=!1;const i=[`${1===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){const o=[],s=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);const n=e(i+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Fre._totals.toFixed(2)}ms)`];(e>2||t)&&Fre.all.add(i.join("\n"))}}Fre.all=new Set,Fre._None=new class extends Fre{constructor(){super(0,null)}stop(){}branch(){return this}},Fre._totals=0;const Bre=new Set([qo.inMemory,qo.vscodeSourceControl,qo.walkThrough,qo.walkThroughSnippet,qo.vscodeChatCodeBlock,qo.vscodeCopilotBackingChatCodeBlock]);class Wre{constructor(){this._byResource=new da,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new da,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){const i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1;const o=this._byResource.get(e);o&&(i=o.delete(t));const s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:Qe.empty():Po.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:Qe.empty():Qe.map(Qe.concat(...this._byOwner.values()),(e=>e[1]))}}class Vre{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new da,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(Bre.has(e.scheme))return t;for(const{severity:i}of this._service.read({resource:e}))i===wM.Error?t.errors+=1:i===wM.Warning?t.warnings+=1:i===wM.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class Hre{constructor(){this._onMarkerChanged=new Dt({delay:0,merge:Hre._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Wre,this._stats=new Vre(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if($h(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const i=Hre._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:c,relatedInformation:h,tags:u}=i;if(s)return a=a>0?a:1,l=l>0?l:1,d=d>=a?d:a,c=c>0?c:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:d,endColumn:c,relatedInformation:h,tags:u}}changeAll(e,t){const i=[],n=this._data.values(e);if(n)for(const t of n){const n=Qe.first(t);n&&(i.push(n.resource),this._data.delete(n.resource,e))}if(Gh(t)){const n=new da;for(const{resource:o,marker:s}of t){const t=Hre._toMarker(e,o,s);if(!t)continue;const r=n.get(o);r?r.push(t):(n.set(o,[t]),i.push(o))}for(const[t,i]of n)this._data.set(t,e,i)}i.length>0&&this._onMarkerChanged.fire(i)}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(Hre._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),s=[];for(const t of e)for(const e of t)if(Hre._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(const t of this._data.values())for(const i of t)if(Hre._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new da;for(const i of e)for(const e of i)t.set(e,!0);return Array.from(t.keys())}}class zre extends lt{get configurationModel(){return this._configurationModel}constructor(e){super(),this.logService=e,this._configurationModel=Qne.createEmptyModel(this.logService)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=Qne.createEmptyModel(this.logService);const e=xc.as(Rg).getConfigurationProperties();this.updateConfigurationModel(Object.keys(e),e)}updateConfigurationModel(e,t){const i=this.getConfigurationDefaultOverrides();for(const n of e){const e=i[n],o=t[n];void 0!==e?this._configurationModel.addValue(n,e):o?this._configurationModel.addValue(n,o.default):this._configurationModel.removeValue(n)}}}class Ure extends lt{constructor(e,t=[]){super(),this.logger=new qc([e,...t]),this._register(e.onDidChangeLogLevel((e=>this.setLevel(e))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(e){this.logger.setLevel(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}warn(e,...t){this.logger.warn(e,...t)}error(e,...t){this.logger.error(e,...t)}}var Kre=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},jre=function(e,t){return function(i,n){t(i,n,e)}};class qre{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new kt}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let $re=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new ht(new qre(t))):Promise.reject(new Error("Model not found"))}};$re=Kre([jre(0,Cd)],$re);class Gre{show(){return Gre.NULL_PROGRESS_RUNNER}async showWhile(e,t){await e}}Gre.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Zre{info(e){return this.notify({severity:pD.Info,message:e})}warn(e){return this.notify({severity:pD.Warning,message:e})}error(e){return this.notify({severity:pD.Error,message:e})}notify(e){switch(e.severity){case pD.Error:console.error(e.message);break;case pD.Warning:console.warn(e.message);break;default:console.log(e.message)}return Zre.NO_OP}prompt(e,t,i,n){return Zre.NO_OP}status(e,t){return lt.None}}Zre.NO_OP=new class{};let Yre=class{constructor(e){this._onWillExecuteCommand=new kt,this._onDidExecuteCommand=new kt,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=Id.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}};Yre=Kre([jre(0,_d)],Yre);let Qre=class extends loe{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new at;t.add(ws(e,ur.KEY_DOWN,(e=>{const t=new Ke(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(ws(e,ur.KEY_UP,(e=>{const t=new Ke(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new Xre(e,t))},a=e=>{for(let t=0;t{e.getOption(61)||r(e.getContainerDomNode())};this._register(s.onCodeEditorAdd(l)),this._register(s.onCodeEditorRemove((e=>{e.getOption(61)||a(e.getContainerDomNode())}))),s.listCodeEditors().forEach(l);const d=e=>{r(e.getContainerDomNode())};this._register(s.onDiffEditorAdd(d)),this._register(s.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),s.listDiffEditors().forEach(d)}addDynamicKeybinding(e,t,i,n){return st(Id.registerCommand(e,i),this.addDynamicKeybindings([{keybinding:t,command:e,when:n}]))}addDynamicKeybindings(e){const t=e.map((e=>{var t;return{keybinding:Oe(e.keybinding,te),command:null!==(t=e.command)&&void 0!==t?t:null,commandArgs:e.commandArgs,when:e.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}}));return this._dynamicKeybindings=this._dynamicKeybindings.concat(t),this.updateResolver(),rt((()=>{for(let e=0;ethis._log(e)))}return this._cachedResolver}_documentHasFocus(){return s.document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const e=o.when||void 0,s=o.keybinding;if(s){const r=goe.resolveKeybinding(s,te);for(const s of r)i[n++]=new coe(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new coe(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new Be(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode);return new goe([t],te)}};Qre=Kre([jre(0,pc),jre(1,Nd),jre(2,Vc),jre(3,fD),jre(4,Hc),jre(5,bd)],Qre);class Xre extends lt{constructor(e,t){super(),this.domNode=e,this._register(t)}}function Jre(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof Po)}let eae=class{constructor(e){this.logService=e,this._onDidChangeConfiguration=new kt,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const t=new zre(e);this._configuration=new eoe(t.reload(),Qne.createEmptyModel(e),Qne.createEmptyModel(e),Qne.createEmptyModel(e),Qne.createEmptyModel(e),Qne.createEmptyModel(e),new da,Qne.createEmptyModel(e),new da,e),t.dispose()}getValue(e,t){const i="string"==typeof e?e:void 0,n=Jre(e)?e:Jre(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new toe({keys:i,overrides:[]},t,this._configuration,void 0,this.logService);e.source=8,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}};eae=Kre([jre(0,Hc)],eae);let tae=class{constructor(e,t,i){this.configurationService=e,this.modelService=t,this.languageService=i,this._onDidChangeConfiguration=new kt,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=wd.isIPosition(t)?t:null,o=n?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0,s=e?this.getLanguage(e,n):void 0;return void 0===o?this.configurationService.getValue({resource:e,overrideIdentifier:s}):this.configurationService.getValue(o,{resource:e,overrideIdentifier:s})}getLanguage(e,t){const i=this.modelService.getModel(e);return i?t?i.getLanguageIdAtPosition(t.lineNumber,t.column):i.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(e)}};tae=Kre([jre(0,Cg),jre(1,Cd),jre(2,Mu)],tae);let iae=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:j||K?"\n":"\r\n"}};iae=Kre([jre(0,Cg)],iae);class nae{constructor(){const e=Po.from({scheme:nae.SCHEME,authority:"model",path:"/"});this.workspace={id:qk,folders:[new jk({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(e){return e&&e.scheme===nae.SCHEME?this.workspace.folders[0]:null}}function oae(e,t,i){if(!t)return;if(!(e instanceof eae))return;const n=[];Object.keys(t).forEach((e=>{(function(e){return LE()[`editor.${e}`]||!1})(e)&&n.push([`editor.${e}`,t[e]]),i&&function(e){return LE()[`diffEditor.${e}`]||!1}(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}nae.SCHEME="inmemory";let sae=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}async apply(e,t){const i=Array.isArray(e)?e:Mk.convert(e),n=new Map;for(const e of i){if(!(e instanceof Ak))throw new Error("bad edit - only text edits are supported");const t=this._modelService.getModel(e.resource);if(!t)throw new Error("bad edit - model not found");if("number"==typeof e.versionId&&t.getVersionId()!==e.versionId)throw new Error("bad state - model changed in the meantime");let i=n.get(t);i||(i=[],n.set(t,i)),i.push(pj.replaceMove(hh.lift(e.textEdit.range),e.textEdit.text))}let o=0,s=0;for(const[e,t]of n)e.pushStackElement(),e.pushEditOperations([],t,(()=>[])),e.pushStackElement(),s+=1,o+=t.length;return{ariaSummary:dn(p4.bulkEditServiceSummary,o,s),isApplied:o>0}}};sae=Kre([jre(0,Cd)],sae);let rae=class extends Une{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};rae=Kre([jre(0,rne),jre(1,bd)],rae);let aae=class extends Ooe{constructor(e,t,i,n,o,s){super(e,t,i,n,o,s),this.configure({blockMouse:!1})}};var lae;aae=Kre([jre(0,Vc),jre(1,fD),jre(2,cD),jre(3,uD),jre(4,Ac),jre(5,pc)],aae),Ng(Hc,class extends Ure{constructor(){super(new jc)}},0),Ng(Cg,eae,0),Ng(_z,tae,0),Ng(vz,iae,0),Ng(zk,nae,0),Ng(vZ,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}getUriBasenameLabel(e){return Jl(e)}},0),Ng(Vc,class{publicLog2(){}},0),Ng(k7,class{async confirm(e){return{confirmed:this.doConfirm(e.message,e.detail),checkboxChecked:!1}}doConfirm(e,t){let i=e;return t&&(i=i+"\n\n"+t),s.confirm(i)}async prompt(e){var t,i;let n;if(this.doConfirm(e.message,e.detail)){const o=[...null!==(t=e.buttons)&&void 0!==t?t:[]];e.cancelButton&&"string"!=typeof e.cancelButton&&"boolean"!=typeof e.cancelButton&&o.push(e.cancelButton),n=await(null===(i=o[0])||void 0===i?void 0:i.run({checkboxChecked:!1}))}return{result:n}}async error(e,t){await this.prompt({type:pD.Error,message:e,detail:t})}},0),Ng(TW,class{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}},0),Ng(fD,Zre,0),Ng(yM,Hre,0),Ng(Mu,class extends Soe{constructor(){super()}},0),Ng(Y6,class extends lt{constructor(){super(),this._onColorThemeChange=this._register(new kt),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new kt),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new Yee,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Qee,rte(Qee)),this._knownThemes.set(Xee,rte(Xee)),this._knownThemes.set(Jee,rte(Jee)),this._knownThemes.set(ete,rte(ete));const e=this._register(function(e){const t=new at,i=t.add(new kt),n=Jz();return t.add(n.onDidChange((()=>i.fire()))),e&&t.add(e.onDidProductIconThemeChange((()=>i.fire()))),{dispose:()=>t.dispose(),onDidChange:i.event,getCSS(){const t=e?e.getProductIconTheme():new Yee,i={},o=[],s=[];for(const e of n.getIcons()){const n=t.getIcon(e);if(!n)continue;const r=n.font,a=`--vscode-icon-${e.id}-font-family`,l=`--vscode-icon-${e.id}-content`;r?(i[r.id]=r.definition,s.push(`${a}: ${Nr(r.id)};`,`${l}: '${n.fontCharacter}';`),o.push(`.codicon-${e.id}:before { content: '${n.fontCharacter}'; font-family: ${Nr(r.id)}; }`)):(s.push(`${l}: '${n.fontCharacter}'; ${a}: 'codicon';`),o.push(`.codicon-${e.id}:before { content: '${n.fontCharacter}'; }`))}for(const e in i){const t=i[e],n=t.weight?`font-weight: ${t.weight};`:"",s=t.style?`font-style: ${t.style};`:"",r=t.src.map((e=>`${Er(e.location)} format('${e.format}')`)).join(", ");o.push(`@font-face { src: ${r}; font-family: ${Nr(e)};${n}${s} font-display: block; }`)}return o.push(`:root { ${s.join(" ")} }`),o.join("\n")}}}(this));this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Qee),this._onOSSchemeChanged(),this._register(e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}))),a(s,"(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(e){return Us(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Js(void 0,(e=>{e.className="monaco-colors",e.textContent=this._allCSS})),this._styleElements.push(this._globalStyleElement)),lt.None}_registerShadowDomContainer(e){const t=Js(e,(e=>{e.className="monaco-colors",e.textContent=this._allCSS}));return this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(Qee),this._updateActualTheme(t)}_updateActualTheme(e){e&&this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const e=s.matchMedia("(forced-colors: active)").matches;if(e!==Bv(this._theme.type)){let t;t=Wv(this._theme.type)?e?Jee:Xee:e?ete:Qee,this._updateActualTheme(this._knownThemes.get(t))}}}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};ite.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of tte.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${Dm(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${n.join("\n")} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}},0),Ng(Cd,Joe,0),Ng(PM,joe,0),Ng(pc,Tre,0),Ng(FL,class{withProgress(e,t,i){return t({report:()=>{}})}},0),Ng(WL,Gre,0),Ng(vW,class extends wW{constructor(){super(),this.applicationStorage=this._register(new mW(new fW,{hint:gW.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new mW(new fW,{hint:gW.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new mW(new fW,{hint:gW.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e)))),this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(e){switch(e){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}},0),Ng(uX,Cz,0),Ng(Tk,sae,0),Ng(wte,class{constructor(){this._neverEmitter=new kt,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}},0),Ng(yd,$re,0),Ng(ak,vre,0),Ng(eG,class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new at,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new aT(Js(),"").style(XT)),this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),qs(e.getHTMLElement())&&this.setLastFocusedList(e),st(e.onDidFocus((()=>this.setLastFocusedList(e))),rt((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}},0),Ng(Nd,Yre,0),Ng(uD,Qre,0),Ng(KL,pre,0),Ng(cD,rae,0),Ng(LL,Uoe,0),Ng(OL,Cre,0),Ng(hD,aae,0),Ng(Ac,oK,0),Ng(LQ,class{async playSignal(e,t){}},0),function(e){const t=new $B;for(const[e,i]of Ig())t.set(e,i);const i=new Ore(t,!0);t.set(_d,i),e.get=function(e){n||s({});const o=t.get(e);if(!o)throw new Error("Missing service "+e);return o instanceof Dg?i.invokeFunction((t=>t.get(e))):o};let n=!1;const o=new kt;function s(e){if(n)return i;n=!0;for(const[e,i]of Ig())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=vd(i);t.get(n)instanceof Dg&&t.set(n,e[i])}const s=Iz();for(const e of s)try{i.createInstance(e)}catch(e){xe(e)}return o.fire(),i}e.initialize=s,e.withServices=function(e){if(n)return e();const t=new at,i=t.add(o.event((()=>{i.dispose(),t.add(e())})));return t}}(lae||(lae={}));var dae=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},cae=function(e,t){return function(i,n){t(i,n,e)}};let hae=0,uae=!1;let gae=class extends YB{constructor(e,t,i,n,o,r,a,l,d,c,h,u,g){const p={...t};p.ariaLabel=p.ariaLabel||u4.editorViewAccessibleLabel,p.ariaLabel=p.ariaLabel+";"+u4.accessibilityHelpMessage,super(e,p,{},i,n,o,r,d,c,h,u,g),this._standaloneKeybindingService=l instanceof Qre?l:null,function(e){if(!e){if(uae)return;uae=!0}!function(e){Xr=document.createElement("div"),Xr.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),Xr.appendChild(e),e};Jr=t(),ea=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),Xr.appendChild(e),e};ta=i(),ia=i(),e.appendChild(Xr)}(e||s.document.body)}(p.ariaContainerElement),GL=(e,t)=>i.createInstance(ij,e,t,{}),tD=a}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++hae,o=$d.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),lt.None;const t=e.id,i=e.label,n=$d.and($d.equals("editorId",this.getId()),$d.deserialize(e.precondition)),o=e.keybindings,s=$d.and(n,$d.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),d=new at,c=this.getId()+":"+t;if(d.add(Id.registerCommand(c,l)),r){const e={command:{id:c,title:i},when:n,group:r,order:a};d.add(Pc.appendMenuItem(Mc.EditorContext,e))}if(Array.isArray(o))for(const e of o)d.add(this._standaloneKeybindingService.addDynamicKeybinding(c,e,l,s));const h=new uF(c,i,i,void 0,n,((...t)=>Promise.resolve(e.run(this,...t))),this._contextKeyService);return this._actions.set(t,h),d.add(rt((()=>{this._actions.delete(t)}))),d}_triggerCommand(e,t){if(this._codeEditorService instanceof sne)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};gae=dae([cae(2,_d),cae(3,bd),cae(4,Nd),cae(5,pc),cae(6,tj),cae(7,uD),cae(8,Vv),cae(9,fD),cae(10,ak),cae(11,sp),cae(12,Pk)],gae);let pae=class extends gae{constructor(e,t,i,n,o,s,r,a,l,d,c,h,u,g,p,m){const f={...t};oae(c,f,!1);const _=l.registerEditorContainer(e);"string"==typeof f.theme&&l.setTheme(f.theme),void 0!==f.autoDetectHighContrast&&l.setAutoDetectHighContrast(Boolean(f.autoDetectHighContrast));const v=f.model;let b;if(delete f.model,super(e,f,i,n,o,s,r,a,l,d,h,p,m),this._configurationService=c,this._standaloneThemeService=l,this._register(_),void 0===v){const e=g.getLanguageIdByMimeType(f.language)||f.language||Qg;b=fae(u,g,f.value||"",e,void 0),this._ownsModel=!0}else b=v,this._ownsModel=!1;if(this._attachModel(b),b){const e={oldModelUrl:null,newModelUrl:b.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){oae(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};pae=dae([cae(2,_d),cae(3,bd),cae(4,Nd),cae(5,pc),cae(6,tj),cae(7,uD),cae(8,Y6),cae(9,fD),cae(10,Cg),cae(11,ak),cae(12,Cd),cae(13,Mu),cae(14,sp),cae(15,Pk)],pae);let mae=class extends sJ{constructor(e,t,i,n,o,s,r,a,l,d,c,h){const u={...t};oae(a,u,!0);const g=s.registerEditorContainer(e);"string"==typeof u.theme&&s.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&s.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},n,i,o,h,d),this._configurationService=a,this._standaloneThemeService=s,this._register(g)}dispose(){super.dispose()}updateOptions(e){oae(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(gae,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function fae(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let s=i;return-1!==n&&(s=i.substring(0,n)),_ae(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return _ae(e,i,t.createById(n),o)}function _ae(e,t,i,n){return e.createModel(t,i,n)}mae=dae([cae(2,_d),cae(3,pc),cae(4,bd),cae(5,Y6),cae(6,fD),cae(7,Cg),cae(8,hD),cae(9,WL),cae(10,OL),cae(11,LQ)],mae);var vae=i(1937),bae={};bae.styleTagTransform=Gr(),bae.setAttributes=Kr(),bae.insert=zr().bind(null,"head"),bae.domAPI=Vr(),bae.insertStyleElement=qr(),Br()(vae.Z,bae),vae.Z&&vae.Z.locals&&vae.Z.locals;class wae{constructor(e,t){this.viewModel=e,this.deltaScrollVertical=t}getId(){return this.viewModel}}let Cae=class extends lt{constructor(e,t,i,n){super(),this._container=e,this._overflowWidgetsDomNode=t,this._workbenchUIElementFactory=i,this._instantiationService=n,this._viewModel=uI(this,void 0),this._collapsed=fI(this,(e=>{var t;return null===(t=this._viewModel.read(e))||void 0===t?void 0:t.collapsed.read(e)})),this._editorContentHeight=uI(this,500),this.contentHeight=fI(this,(e=>(this._collapsed.read(e)?0:this._editorContentHeight.read(e))+this._outerEditorHeight)),this._modifiedContentWidth=uI(this,0),this._modifiedWidth=uI(this,0),this._originalContentWidth=uI(this,0),this._originalWidth=uI(this,0),this.maxScroll=fI(this,(e=>{const t=this._modifiedContentWidth.read(e)-this._modifiedWidth.read(e),i=this._originalContentWidth.read(e)-this._originalWidth.read(e);return t>i?{maxScroll:t,width:this._modifiedWidth.read(e)}:{maxScroll:i,width:this._originalWidth.read(e)}})),this._elements=Pr("div.multiDiffEntry",[Pr("div.header@header",[Pr("div.header-content",[Pr("div.collapse-button@collapseButton"),Pr("div.file-path",[Pr("div.title.modified.show-file-icons@primaryPath",[]),Pr("div.status.deleted@status",["R"]),Pr("div.title.original.show-file-icons@secondaryPath",[])]),Pr("div.actions@actions")])]),Pr("div.editorParent",[Pr("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(sJ,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=yae(this.editor.getModifiedEditor()),this.isOriginalFocused=yae(this.editor.getOriginalEditor()),this.isFocused=fI(this,(e=>this.isModifedFocused.read(e)||this.isOriginalFocused.read(e))),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=new at,this._headerHeight=40,this._lastScrollTop=-1,this._isSettingScrollTop=!1;const o=new nD(this._elements.collapseButton,{});this._register(SI((e=>{o.element.className="",o.icon=this._collapsed.read(e)?Ml.chevronRight:Ml.chevronDown}))),this._register(o.onDidClick((()=>{var e;null===(e=this._viewModel.get())||void 0===e||e.collapsed.set(!this._collapsed.get(),void 0)}))),this._register(SI((e=>{this._elements.editor.style.display=this._collapsed.read(e)?"none":"block"}))),this._register(this.editor.getModifiedEditor().onDidLayoutChange((e=>{const t=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(t,void 0)}))),this._register(this.editor.getOriginalEditor().onDidLayoutChange((e=>{const t=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(t,void 0)}))),this._register(this.editor.onDidContentSizeChange((e=>{dI((t=>{this._editorContentHeight.set(e.contentHeight,t),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),t),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),t)}))}))),this._register(this.editor.getOriginalEditor().onDidScrollChange((e=>{if(this._isSettingScrollTop)return;if(!e.scrollTopChanged||!this._data)return;const t=e.scrollTop-this._lastScrollTop;this._data.deltaScrollVertical(t)}))),this._register(SI((e=>{var t;const i=null===(t=this._viewModel.read(e))||void 0===t?void 0:t.isActive.read(e);this._elements.root.classList.toggle("active",i)}))),this._container.appendChild(this._elements.root),this._outerEditorHeight=this._headerHeight,this._register(this._instantiationService.createInstance(gK,this._elements.actions,Mc.MultiDiffEditorFileToolbar,{actionRunner:this._register(new PX((()=>{var e;return null===(e=this._viewModel.get())||void 0===e?void 0:e.modifiedUri}))),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:e=>e.startsWith("navigation")},actionViewItemProvider:(e,t)=>ZU(n,e,t)}))}setScrollLeft(e){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(e):this.editor.getOriginalEditor().setScrollLeft(e)}setData(e){function t(e){return{...e,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}this._data=e;const i=e.viewModel.entry.value;i.onOptionsDidChange&&this._dataStore.add(i.onOptionsDidChange((()=>{var e;this.editor.updateOptions(t(null!==(e=i.options)&&void 0!==e?e:{}))}))),dI((n=>{var o,s,r,a;null===(o=this._resourceLabel)||void 0===o||o.setUri(null!==(s=e.viewModel.modifiedUri)&&void 0!==s?s:e.viewModel.originalUri,{strikethrough:void 0===e.viewModel.modifiedUri});let l=!1,d=!1,c=!1,h="";e.viewModel.modifiedUri&&e.viewModel.originalUri&&e.viewModel.modifiedUri.path!==e.viewModel.originalUri.path?(h="R",l=!0):e.viewModel.modifiedUri?e.viewModel.originalUri||(h="A",c=!0):(h="D",d=!0),this._elements.status.classList.toggle("renamed",l),this._elements.status.classList.toggle("deleted",d),this._elements.status.classList.toggle("added",c),this._elements.status.innerText=h,null===(r=this._resourceLabel2)||void 0===r||r.setUri(l?e.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(e.viewModel,n),this.editor.setModel(e.viewModel.diffEditorViewModel,n),this.editor.updateOptions(t(null!==(a=i.options)&&void 0!==a?a:{}))}))}render(e,t,i,n){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${e.start}px`,this._elements.root.style.height=`${e.length}px`,this._elements.root.style.width=`${t}px`,this._elements.root.style.position="absolute";const o=e.length-this._headerHeight,s=Math.max(0,Math.min(n.start-e.start,o));this._elements.header.style.transform=`translateY(${s}px)`,dI((i=>{this.editor.layout({width:t-16-2,height:e.length-this._outerEditorHeight})}));try{this._isSettingScrollTop=!0,this._lastScrollTop=i,this.editor.getOriginalEditor().setScrollTop(i)}finally{this._isSettingScrollTop=!1}this._elements.header.classList.toggle("shadow",s>0||i>0),this._elements.header.classList.toggle("collapsed",s===o)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};function yae(e){return II((t=>{const i=new at;return i.add(e.onDidFocusEditorWidget((()=>t(!0)))),i.add(e.onDidBlurEditorWidget((()=>t(!1)))),i}),(()=>e.hasTextFocus()))}Cae=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(3,_d)],Cae);class Sae{constructor(e){this._create=e,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(e){var t;let i;if(0===this._unused.size)i=this._create(e),this._itemData.set(i,e);else{const n=[...this._unused.values()];i=null!==(t=n.find((t=>this._itemData.get(t).getId()===e.getId())))&&void 0!==t?t:n[0],this._unused.delete(i),this._itemData.set(i,e),i.setData(e)}return this._used.add(i),{object:i,dispose:()=>{this._used.delete(i),this._unused.size>5?i.dispose():this._unused.add(i)}}}dispose(){for(const e of this._used)e.dispose();for(const e of this._unused)e.dispose();this._used.clear(),this._unused.clear()}}var kae=function(e,t){return function(i,n){t(i,n,e)}};let xae=class extends lt{constructor(e,t,i,n,o,s){super(),this._element=e,this._dimension=t,this._viewModel=i,this._workbenchUIElementFactory=n,this._parentContextKeyService=o,this._parentInstantiationService=s,this._scrollableElements=Pr("div.scrollContent",[Pr("div@content",{style:{overflow:"hidden"}}),Pr("div.monaco-editor@overflowWidgetsDomNode",{})]),this._scrollable=this._register(new SN({forceIntegerValues:!1,scheduleAtNextAnimationFrame:e=>Ls(ls(this._element),e),smoothScrollDuration:100})),this._scrollableElement=this._register(new RN(this._scrollableElements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this._elements=Pr("div.monaco-component.multiDiffEditor",{},[Pr("div",{},[this._scrollableElement.getDomNode()]),Pr("div.placeholder@placeholder",{},[Pr("div",[v(0,"No Changed Files")])])]),this._sizeObserver=this._register(new fQ(this._element,void 0)),this._objectPool=this._register(new Sae((e=>{const t=this._instantiationService.createInstance(Cae,this._scrollableElements.content,this._scrollableElements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return t.setData(e),t}))),this.scrollTop=II(this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollTop)),this.scrollLeft=II(this._scrollableElement.onScroll,(()=>this._scrollableElement.getScrollPosition().scrollLeft)),this._viewItemsInfo=bI(this,((e,t)=>{const i=this._viewModel.read(e);if(!i)return{items:[],getItem:e=>{throw new Pe}};const n=i.items.read(e),o=new Map,s=n.map((e=>{var i;const n=t.add(new Lae(e,this._objectPool,this.scrollLeft,(e=>{this._scrollableElement.setScrollPosition({scrollTop:this._scrollableElement.getScrollPosition().scrollTop+e})}))),s=null===(i=this._lastDocStates)||void 0===i?void 0:i[n.getKey()];return s&&lI((e=>{n.setViewState(s,e)})),o.set(e,n),n}));return{items:s,getItem:e=>o.get(e)}})),this._viewItems=this._viewItemsInfo.map(this,(e=>e.items)),this._spaceBetweenPx=0,this._totalHeight=this._viewItems.map(this,((e,t)=>e.reduce(((e,i)=>e+i.contentHeight.read(t)+this._spaceBetweenPx),0))),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._register(this._parentInstantiationService.createChild(new $B([pc,this._contextKeyService]))),this._lastDocStates={},this._contextKeyService.createKey(gh.inMultiDiffEditor.key,!0),this._register(LI(((e,t)=>{const i=this._viewModel.read(e);if(i&&i.contextKeys)for(const[e,n]of Object.entries(i.contextKeys)){const i=this._contextKeyService.createKey(e,void 0);i.set(n),t.add(rt((()=>i.reset())))}})));const r=this._parentContextKeyService.createKey(gh.multiDiffEditorAllCollapsed.key,!1);this._register(SI((e=>{const t=this._viewModel.read(e);if(t){const i=t.items.read(e).every((t=>t.collapsed.read(e)));r.set(i)}}))),this._register(SI((e=>{const t=this._dimension.read(e);this._sizeObserver.observe(t)}))),this._register(SI((e=>{const t=this._viewItems.read(e);this._elements.placeholder.classList.toggle("visible",0===t.length)}))),this._scrollableElements.content.style.position="relative",this._register(SI((e=>{const t=this._sizeObserver.height.read(e);this._scrollableElements.root.style.height=`${t}px`;const i=this._totalHeight.read(e);this._scrollableElements.content.style.height=`${i}px`;const n=this._sizeObserver.width.read(e);let o=n;const s=Du(this._viewItems.read(e),su((t=>t.maxScroll.read(e).maxScroll),ru));s&&(o=n+s.maxScroll.read(e).maxScroll),this._scrollableElement.setScrollDimensions({width:n,height:t,scrollHeight:i,scrollWidth:o})}))),e.replaceChildren(this._elements.root),this._register(rt((()=>{e.replaceChildren()}))),this._register(this._register(SI((e=>{dI((t=>{this.render(e)}))}))))}render(e){const t=this.scrollTop.read(e);let i=0,n=0,o=0;const s=this._sizeObserver.height.read(e),r=wu.ofStartAndLength(t,s),a=this._sizeObserver.width.read(e);for(const l of this._viewItems.read(e)){const d=l.contentHeight.read(e),c=Math.min(d,s),h=wu.ofStartAndLength(n,c),u=wu.ofStartAndLength(o,d);if(u.isBefore(r))i-=d-c,l.hide();else if(u.isAfter(r))l.hide();else{const e=Math.max(0,Math.min(r.start-u.start,d-c));i-=e;const n=wu.ofStartAndLength(t+i,s);l.render(h,e,a,n)}n+=c+this._spaceBetweenPx,o+=d+this._spaceBetweenPx}this._scrollableElements.content.style.transform=`translateY(${-(t+i)}px)`}};xae=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([kae(4,pc),kae(5,_d)],xae);class Lae extends lt{constructor(e,t,i,n){super(),this.viewModel=e,this._objectPool=t,this._scrollLeft=i,this._deltaScrollVertical=n,this._templateRef=this._register(pI(this,void 0)),this.contentHeight=fI(this,(e=>{var t,i,n;return null!==(n=null===(i=null===(t=this._templateRef.read(e))||void 0===t?void 0:t.object.contentHeight)||void 0===i?void 0:i.read(e))&&void 0!==n?n:this.viewModel.lastTemplateData.read(e).contentHeight})),this.maxScroll=fI(this,(e=>{var t,i;return null!==(i=null===(t=this._templateRef.read(e))||void 0===t?void 0:t.object.maxScroll.read(e))&&void 0!==i?i:{maxScroll:0,scrollWidth:0}})),this.template=fI(this,(e=>{var t;return null===(t=this._templateRef.read(e))||void 0===t?void 0:t.object})),this._isHidden=uI(this,!1),this._isFocused=fI(this,(e=>{var t,i;return null!==(i=null===(t=this.template.read(e))||void 0===t?void 0:t.isFocused.read(e))&&void 0!==i&&i})),this.viewModel.setIsFocused(this._isFocused,void 0),this._register(SI((e=>{var t;const i=this._scrollLeft.read(e);null===(t=this._templateRef.read(e))||void 0===t||t.object.setScrollLeft(i)}))),this._register(SI((e=>{const t=this._templateRef.read(e);t&&this._isHidden.read(e)&&(t.object.isFocused.read(e)||this._clear())})))}dispose(){this._clear(),super.dispose()}toString(){var e;return`VirtualViewItem(${null===(e=this.viewModel.entry.value.modified)||void 0===e?void 0:e.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(e,t){var i;this.viewModel.collapsed.set(e.collapsed,t),this._updateTemplateData(t);const n=this.viewModel.lastTemplateData.get(),o=null===(i=e.selections)||void 0===i?void 0:i.map(uh.liftSelection);this.viewModel.lastTemplateData.set({...n,selections:o},t);const s=this._templateRef.get();s&&o&&s.object.editor.setSelections(o)}_updateTemplateData(e){var t;const i=this._templateRef.get();i&&this.viewModel.lastTemplateData.set({contentHeight:i.object.contentHeight.get(),selections:null!==(t=i.object.editor.getSelections())&&void 0!==t?t:void 0},e)}_clear(){const e=this._templateRef.get();e&&lI((t=>{this._updateTemplateData(t),e.object.hide(),this._templateRef.set(void 0,t)}))}hide(){this._isHidden.set(!0,void 0)}render(e,t,i,n){this._isHidden.set(!1,void 0);let o=this._templateRef.get();if(!o){o=this._objectPool.getUnusedObj(new wae(this.viewModel,this._deltaScrollVertical)),this._templateRef.set(o,void 0);const e=this.viewModel.lastTemplateData.get().selections;e&&o.object.editor.setSelections(e)}o.object.render(e,i,t,n)}}Tm("multiDiffEditor.headerBackground",{dark:"#262626",light:"tab.inactiveBackground",hcDark:"tab.inactiveBackground",hcLight:"tab.inactiveBackground"},v(0,"The background color of the diff editor's header")),Tm("multiDiffEditor.background",{dark:"editorBackground",light:"editorBackground",hcDark:"editorBackground",hcLight:"editorBackground"},v(0,"The background color of the multi file diff editor")),Tm("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},v(0,"The border color of the multi file diff editor"));let Dae=class extends lt{constructor(e,t,i){super(),this._element=e,this._workbenchUIElementFactory=t,this._instantiationService=i,this._dimension=uI(this,void 0),this._viewModel=uI(this,void 0),this._widgetImpl=bI(this,((e,t)=>(yQ(Cae,e),t.add(this._instantiationService.createInstance(yQ(xae,e),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory))))),this._register(OI(this._widgetImpl))}};function Eae(e){const t=lae.get(uD);return t instanceof Qre?t.addDynamicKeybindings(e.map((e=>({keybinding:e.keybinding,command:e.command,commandArgs:e.commandArgs,when:$d.deserialize(e.when)})))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),lt.None)}function Nae(e,t){return"boolean"==typeof e?e:t}function Iae(e,t){return"string"==typeof e?e:t}function Tae(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function Mae(e,t,i){t=t.replace(/@@/g,"");let n,o=0;do{n=!1,t=t.replace(/@(\w+)/g,(function(i,o){n=!0;let s="";if("string"==typeof e[o])s=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?Hie(e,"language definition does not contain attribute '"+o+"', used at: "+t):Hie(e,"attribute reference '"+o+"' must be a string, used at: "+t);s=e[o].source}return Bie(s)?"":"(?:"+s+")"})),o++}while(n&&o<5);t=t.replace(/\x01/g,"@");const s=(e.ignoreCase?"i":"")+(e.unicode?"u":"");if(i&&t.match(/\$[sS](\d\d?)/g)){let i=null,n=null;return o=>(n&&i===o||(i=o,n=new RegExp(function(e,t,i){let n=null;return t.replace(/\$[sS](\d\d?)/g,(function(t,o){return null===n&&(n=i.split("."),n.unshift(i)),!Bie(o)&&o=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Hie(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw Hie(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,zie(e,o,"",[],""))))throw Hie(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let o=0,s=i.length;o=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r}([function(e,t){return function(i,n){t(i,n,e)}}(2,_d)],Dae);class Pae{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if("string"==typeof t)i=t;else{if(!(t instanceof RegExp))throw Hie(e,"rules must start with a match string or regular expression: "+this.name);i=t.source}this.matchOnlyAtLineStart=i.length>0&&"^"===i[0],this.name=this.name+": "+i,this.regex=Mae(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")",!0)}setAction(e,t){this.action=Rae(e,this.name,t)}resolveRegex(e){return this.regex instanceof RegExp?this.regex:this.regex(e)}}function Oae(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=Nae(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=Nae(t.ignoreCase,!1),i.unicode=Nae(t.unicode,!1),i.tokenPostfix=Iae(t.tokenPostfix,"."+i.languageId),i.defaultToken=Iae(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw Hie(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw Hie(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new Pae(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw Hie(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Hie(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Nae(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}s.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw Hie(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(const e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Hie(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(const e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Hie(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw Hie(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:t.token+i.tokenPostfix,open:Wie(i,t.open),close:Wie(i,t.close)})}return i.brackets=s,i.noThrow=!0,i}class Fae{constructor(e,t){this._languageId=e,this._actual=t}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return Bae.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new kC(n.tokens,n.endState)}}class Bae{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let o=0,s=e.length;o0&&o[s-1]===l)continue;let d=a.startIndex;0===e?d=0:d{const i=await Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?Vae(e,i):new Xie(lae.get(Mu),lae.get(Y6),e,Oae(e,i),lae.get(Cg)):null}));return HC.registerFactory(e,i)}CE.wrappingIndent.defaultValue=0,CE.glyphMargin.defaultValue=!1,CE.autoIndent.defaultValue=3,CE.overviewRulerLanes.defaultValue=2,m2.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const zae=aH();zae.editor={create:function(e,t,i){return lae.initialize(i||{}).createInstance(pae,e,t)},getEditors:function(){return lae.get(bd).listCodeEditors()},getDiffEditors:function(){return lae.get(bd).listDiffEditors()},onDidCreateEditor:function(e){return lae.get(bd).onCodeEditorAdd((t=>{e(t)}))},onDidCreateDiffEditor:function(e){return lae.get(bd).onDiffEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return lae.initialize(i||{}).createInstance(mae,e,t)},addCommand:function(e){if("string"!=typeof e.id||"function"!=typeof e.run)throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return Id.registerCommand(e.id,e.run)},addEditorAction:function(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const t=$d.deserialize(e.precondition),i=new at;if(i.add(Id.registerCommand(e.id,((i,...n)=>Yc.runEditorCommand(i,n,t,((t,i,n)=>Promise.resolve(e.run(i,...n))))))),e.contextMenuGroupId){const n={command:{id:e.id,title:e.label},when:t,group:e.contextMenuGroupId,order:e.contextMenuOrder||0};i.add(Pc.appendMenuItem(Mc.EditorContext,n))}if(Array.isArray(e.keybindings)){const n=lae.get(uD);if(n instanceof Qre){const o=$d.and(t,$d.deserialize(e.keybindingContext));i.add(n.addDynamicKeybindings(e.keybindings.map((t=>({keybinding:t,command:e.id,when:o})))))}else console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}return i},addKeybindingRule:function(e){return Eae([e])},addKeybindingRules:Eae,createModel:function(e,t,i){const n=lae.get(Mu),o=n.getLanguageIdByMimeType(t)||t;return fae(lae.get(Cd),n,e,o,i)},setModelLanguage:function(e,t){const i=lae.get(Mu),n=i.getLanguageIdByMimeType(t)||t||Qg;e.setLanguage(i.createById(n))},setModelMarkers:function(e,t,i){e&&lae.get(yM).changeOne(t,e.uri,i)},getModelMarkers:function(e){return lae.get(yM).read(e)},removeAllMarkers:function(e){lae.get(yM).changeAll(e,[])},onDidChangeMarkers:function(e){return lae.get(yM).onMarkerChanged(e)},getModels:function(){return lae.get(Cd).getModels()},getModel:function(e){return lae.get(Cd).getModel(e)},onDidCreateModel:function(e){return lae.get(Cd).onModelAdded(e)},onWillDisposeModel:function(e){return lae.get(Cd).onModelRemoved(e)},onDidChangeModelLanguage:function(e){return lae.get(Cd).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))},createWebWorker:function(e){return function(e,t,i){return new Pie(e,t,i)}(lae.get(Cd),lae.get(sp),e)},colorizeElement:function(e,t){const i=lae.get(Mu),n=lae.get(Y6);return tne.colorizeElement(n,i,e,t).then((()=>{n.registerEditorContainer(e)}))},colorize:function(e,t,i){const n=lae.get(Mu);return lae.get(Y6).registerEditorContainer(s.document.body),tne.colorize(n,e,t,i)},colorizeModelLine:function(e,t,i=4){return lae.get(Y6).registerEditorContainer(s.document.body),tne.colorizeModelLine(e,t,i)},tokenize:function(e,t){HC.getOrCreate(t);const i=function(e){return HC.get(e)||{getInitialState:()=>UC,tokenize:(t,i,n)=>KC(e,n)}}(t),n=fn(e),o=[];let s=i.getInitialState();for(let e=0,t=n.length;e{var o;if(!i)return null;const s=null===(o=t.options)||void 0===o?void 0:o.selection;let r;return s&&"number"==typeof s.endLineNumber&&"number"==typeof s.endColumn?r=s:s&&(r={lineNumber:s.startLineNumber,column:s.startColumn}),await e.openCodeEditor(i,t.resource,r)?i:null}))},AccessibilitySupport:pV,ContentWidgetPositionPreference:wV,CursorChangeReason:CV,DefaultEndOfLine:yV,EditorAutoIndentStrategy:kV,EditorOption:xV,EndOfLinePreference:LV,EndOfLineSequence:DV,MinimapPosition:BV,MinimapSectionHeaderStyle:WV,MouseTargetType:VV,OverlayWidgetPositionPreference:UV,OverviewRulerLane:KV,GlyphMarginLane:EV,RenderLineNumbersType:$V,RenderMinimap:GV,ScrollbarVisibility:YV,ScrollType:ZV,TextEditorCursorBlinkingStyle:iH,TextEditorCursorStyle:nH,TrackedRangeStickiness:oH,WrappingIndent:sH,InjectedTextCursorStops:TV,PositionAffinity:qV,ShowLightbulbIconMode:XV,ConfigurationChangedEvent:BD,BareFontInfo:$M,FontInfo:GM,TextModelResolvedOptions:Mh,FindMatch:Ah,ApplyUpdateResult:HD,EditorZoom:jM,createMultiFileDiffEditor:function(e,t){const i=lae.initialize(t||{});return new Dae(e,{},i)},EditorType:gF,EditorOptions:CE},zae.languages={register:function(e){Yg.registerLanguage(e)},getLanguages:function(){let e=[];return e=e.concat(Yg.getLanguages()),e},onLanguage:function(e,t){return lae.withServices((()=>{const i=lae.get(Mu).onDidRequestRichLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},onLanguageEncountered:function(e,t){return lae.withServices((()=>{const i=lae.get(Mu).onDidRequestBasicLanguageFeatures((n=>{n===e&&(i.dispose(),t())}));return i}))},getEncodedLanguageId:function(e){return lae.get(Mu).languageIdCodec.encodeLanguageId(e)},setLanguageConfiguration:function(e,t){if(!lae.get(Mu).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return lae.get(sp).register(e,t,100)},setColorMap:function(e){const t=lae.get(Y6);if(e){const i=[null];for(let t=1,n=e.length;tt}):HC.register(e,Vae(e,t))},setMonarchTokensProvider:function(e,t){return Wae(t)?Hae(e,{create:()=>t}):HC.register(e,(t=>new Xie(lae.get(Mu),lae.get(Y6),e,Oae(e,t),lae.get(Cg)))(t))},registerReferenceProvider:function(e,t){return lae.get(Pk).referenceProvider.register(e,t)},registerRenameProvider:function(e,t){return lae.get(Pk).renameProvider.register(e,t)},registerNewSymbolNameProvider:function(e,t){return lae.get(Pk).newSymbolNamesProvider.register(e,t)},registerCompletionItemProvider:function(e,t){return lae.get(Pk).completionProvider.register(e,t)},registerSignatureHelpProvider:function(e,t){return lae.get(Pk).signatureHelpProvider.register(e,t)},registerHoverProvider:function(e,t){return lae.get(Pk).hoverProvider.register(e,{provideHover:async(e,i,n,o)=>{const s=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n,o)).then((e=>{if(e)return!e.range&&s&&(e.range=new hh(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)),e.range||(e.range=new hh(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return lae.get(Pk).documentSymbolProvider.register(e,t)},registerDocumentHighlightProvider:function(e,t){return lae.get(Pk).documentHighlightProvider.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return lae.get(Pk).linkedEditingRangeProvider.register(e,t)},registerDefinitionProvider:function(e,t){return lae.get(Pk).definitionProvider.register(e,t)},registerImplementationProvider:function(e,t){return lae.get(Pk).implementationProvider.register(e,t)},registerTypeDefinitionProvider:function(e,t){return lae.get(Pk).typeDefinitionProvider.register(e,t)},registerCodeLensProvider:function(e,t){return lae.get(Pk).codeLensProvider.register(e,t)},registerCodeActionProvider:function(e,t,i){return lae.get(Pk).codeActionProvider.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,documentation:null==i?void 0:i.documentation,provideCodeActions:(e,i,n,o)=>{const s=lae.get(yM).read({resource:e.uri}).filter((e=>hh.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:s,only:n.only,trigger:n.trigger},o)},resolveCodeAction:t.resolveCodeAction})},registerDocumentFormattingEditProvider:function(e,t){return lae.get(Pk).documentFormattingEditProvider.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return lae.get(Pk).documentRangeFormattingEditProvider.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return lae.get(Pk).onTypeFormattingEditProvider.register(e,t)},registerLinkProvider:function(e,t){return lae.get(Pk).linkProvider.register(e,t)},registerColorProvider:function(e,t){return lae.get(Pk).colorProvider.register(e,t)},registerFoldingRangeProvider:function(e,t){return lae.get(Pk).foldingRangeProvider.register(e,t)},registerDeclarationProvider:function(e,t){return lae.get(Pk).declarationProvider.register(e,t)},registerSelectionRangeProvider:function(e,t){return lae.get(Pk).selectionRangeProvider.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return lae.get(Pk).documentSemanticTokensProvider.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return lae.get(Pk).documentRangeSemanticTokensProvider.register(e,t)},registerInlineCompletionsProvider:function(e,t){return lae.get(Pk).inlineCompletionsProvider.register(e,t)},registerInlineEditProvider:function(e,t){return lae.get(Pk).inlineEditProvider.register(e,t)},registerInlayHintsProvider:function(e,t){return lae.get(Pk).inlayHintsProvider.register(e,t)},DocumentHighlightKind:SV,CompletionItemKind:_V,CompletionItemTag:vV,CompletionItemInsertTextRule:fV,SymbolKind:eH,SymbolTag:tH,IndentAction:IV,CompletionTriggerKind:bV,SignatureHelpTriggerKind:JV,InlayHintKind:MV,InlineCompletionTriggerKind:AV,InlineEditTriggerKind:RV,CodeActionTriggerType:mV,NewSymbolNameTag:HV,NewSymbolNameTriggerKind:zV,PartialAcceptTriggerKind:jV,HoverVerbosityAction:NV,FoldingRangeKind:WC,SelectedSuggestionInfo:MC};const Uae=zae.CancellationTokenSource,Kae=zae.Emitter,jae=zae.KeyCode,qae=zae.KeyMod,$ae=zae.Position,Gae=zae.Range,Zae=zae.Selection,Yae=zae.SelectionDirection,Qae=zae.MarkerSeverity,Xae=zae.MarkerTag,Jae=zae.Uri,ele=zae.Token,tle=zae.editor,ile=zae.languages,nle=globalThis.MonacoEnvironment;((null==nle?void 0:nle.globalAPI)||"function"==typeof define&&i.amdO)&&(globalThis.monaco=zae),void 0!==globalThis.require&&"function"==typeof globalThis.require.config&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});var ole=Object.defineProperty,sle=Object.getOwnPropertyDescriptor,rle=Object.getOwnPropertyNames,ale=Object.prototype.hasOwnProperty,lle=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of rle(t))ale.call(e,o)||o===i||ole(e,o,{get:()=>t[o],enumerable:!(n=sle(t,o))||n.enumerable});return e},dle={};lle(dle,o,"default");var cle={},hle={},ule=class e{static getOrCreate(t){return hle[t]||(hle[t]=new e(t)),hle[t]}constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,cle[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function gle(e){const t=e.id;cle[t]=e,dle.languages.register(e);const i=ule.getOrCreate(t);dle.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),dle.languages.onLanguageEncountered(t,(async()=>{const e=await i.load();dle.languages.setLanguageConfiguration(t,e.conf)}))}gle({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>i.e(5192).then(i.bind(i,5192))}),gle({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>i.e(3298).then(i.bind(i,3298))}),gle({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>i.e(8518).then(i.bind(i,8518))}),gle({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>i.e(1600).then(i.bind(i,1600))}),gle({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>i.e(5084).then(i.bind(i,5084))}),gle({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>i.e(2826).then(i.bind(i,2826))}),gle({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>i.e(5638).then(i.bind(i,5638))}),gle({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>i.e(4874).then(i.bind(i,4874))}),gle({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>i.e(8842).then(i.bind(i,8842))}),gle({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>i.e(8842).then(i.bind(i,8842))}),gle({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>i.e(2833).then(i.bind(i,2833))}),gle({id:"csp",extensions:[".csp"],aliases:["CSP","csp"],loader:()=>i.e(3301).then(i.bind(i,3301))}),gle({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>i.e(2741).then(i.bind(i,2741))});var ple=Object.defineProperty,mle=Object.getOwnPropertyDescriptor,fle=Object.getOwnPropertyNames,_le=Object.prototype.hasOwnProperty,vle=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of fle(t))_le.call(e,o)||o===i||ple(e,o,{get:()=>t[o],enumerable:!(n=mle(t,o))||n.enumerable});return e},ble={};((e,t,i)=>{vle(e,t,"default")})(ble,o);var wle=class{constructor(e,t,i){this._onDidChange=new ble.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},Cle={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}},yle={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},Sle=new wle("css",Cle,yle),kle=new wle("scss",Cle,yle),xle=new wle("less",Cle,yle);function Lle(){return i.e(5123).then(i.bind(i,5123))}ble.languages.css={cssDefaults:Sle,lessDefaults:xle,scssDefaults:kle},ble.languages.onLanguage("less",(()=>{Lle().then((e=>e.setupMode(xle)))})),ble.languages.onLanguage("scss",(()=>{Lle().then((e=>e.setupMode(kle)))})),ble.languages.onLanguage("css",(()=>{Lle().then((e=>e.setupMode(Sle)))})),gle({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>i.e(1813).then(i.bind(i,1813))}),gle({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>i.e(5801).then(i.bind(i,5801))}),gle({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>i.e(7367).then(i.bind(i,7367))}),gle({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>i.e(4331).then(i.bind(i,4331))}),gle({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>i.e(8300).then(i.bind(i,8300))}),gle({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>i.e(707).then(i.bind(i,707))}),gle({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>i.e(1318).then(i.bind(i,1318)).then((e=>e.TagAutoInterpolationDollar))}),gle({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>i.e(1318).then(i.bind(i,1318)).then((e=>e.TagAngleInterpolationDollar))}),gle({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>i.e(1318).then(i.bind(i,1318)).then((e=>e.TagBracketInterpolationDollar))}),gle({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>i.e(1318).then(i.bind(i,1318)).then((e=>e.TagAngleInterpolationBracket))}),gle({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>i.e(1318).then(i.bind(i,1318)).then((e=>e.TagBracketInterpolationBracket))}),gle({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>i.e(1318).then(i.bind(i,1318)).then((e=>e.TagAutoInterpolationDollar))}),gle({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>i.e(1318).then(i.bind(i,1318)).then((e=>e.TagAutoInterpolationBracket))}),gle({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>i.e(7765).then(i.bind(i,7765))}),gle({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>i.e(4392).then(i.bind(i,4392))}),gle({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>i.e(755).then(i.bind(i,755))}),gle({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>i.e(5484).then(i.bind(i,5484))}),gle({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>i.e(8546).then(i.bind(i,8546))}),gle({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:()=>i.e(5500).then(i.bind(i,5500))});var Dle=Object.defineProperty,Ele=Object.getOwnPropertyDescriptor,Nle=Object.getOwnPropertyNames,Ile=Object.prototype.hasOwnProperty,Tle=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of Nle(t))Ile.call(e,o)||o===i||Dle(e,o,{get:()=>t[o],enumerable:!(n=Ele(t,o))||n.enumerable});return e},Mle={};((e,t,i)=>{Tle(e,t,"default")})(Mle,o);var Ale={format:{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"},suggest:{},data:{useDefaultDataProvider:!0}};function Rle(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===Ple,documentFormattingEdits:e===Ple,documentRangeFormattingEdits:e===Ple}}var Ple="html",Ole="handlebars",Fle="razor",Ble=Kle(Ple,Ale,Rle(Ple)),Wle=Ble.defaults,Vle=Kle(Ole,Ale,Rle(Ole)),Hle=Vle.defaults,zle=Kle(Fle,Ale,Rle(Fle)),Ule=zle.defaults;function Kle(e,t=Ale,n=Rle(e)){const o=new class{constructor(e,t,i){this._onDidChange=new Mle.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}(e,t,n);let s;const r=Mle.languages.onLanguage(e,(async()=>{s=(await i.e(9313).then(i.bind(i,9313))).setupMode(o)}));return{defaults:o,dispose(){r.dispose(),s?.dispose(),s=void 0}}}Mle.languages.html={htmlDefaults:Wle,razorDefaults:Ule,handlebarDefaults:Hle,htmlLanguageService:Ble,handlebarLanguageService:Vle,razorLanguageService:zle,registerHTMLLanguageService:Kle},gle({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>i.e(5616).then(i.bind(i,5616))}),gle({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>i.e(6018).then(i.bind(i,6018))}),gle({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>i.e(9090).then(i.bind(i,9090))});var jle=Object.defineProperty,qle=Object.getOwnPropertyDescriptor,$le=Object.getOwnPropertyNames,Gle=Object.prototype.hasOwnProperty,Zle=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of $le(t))Gle.call(e,o)||o===i||jle(e,o,{get:()=>t[o],enumerable:!(n=qle(t,o))||n.enumerable});return e},Yle={};((e,t,i)=>{Zle(e,t,"default")})(Yle,o);var Qle,Xle=new class{constructor(e,t,i){this._onDidChange=new Yle.Emitter,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});function Jle(){return i.e(8821).then(i.bind(i,8821))}Yle.languages.json={jsonDefaults:Xle,getWorker:()=>Jle().then((e=>e.getWorker()))},Yle.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),Yle.languages.onLanguage("json",(()=>{Jle().then((e=>e.setupMode(Xle)))})),gle({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>i.e(4507).then(i.bind(i,4507))}),gle({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>i.e(8559).then(i.bind(i,8559))}),gle({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>i.e(6936).then(i.bind(i,6936))}),gle({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>i.e(1245).then(i.bind(i,1245))}),gle({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>i.e(6323).then(i.bind(i,6323))}),gle({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>i.e(8890).then(i.bind(i,8890))}),gle({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>i.e(7736).then(i.bind(i,7736))}),gle({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>i.e(8454).then(i.bind(i,8454))}),gle({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>i.e(177).then(i.bind(i,177))}),gle({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>i.e(1640).then(i.bind(i,1640))}),gle({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>i.e(1043).then(i.bind(i,1043))}),gle({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>i.e(6946).then(i.bind(i,6946))}),gle({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>i.e(8910).then(i.bind(i,8910))}),gle({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>i.e(3736).then(i.bind(i,3736))}),gle({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>i.e(5028).then(i.bind(i,5028))}),gle({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>i.e(4607).then(i.bind(i,4607))}),gle({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>i.e(2874).then(i.bind(i,2874))}),gle({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>i.e(4885).then(i.bind(i,4885))}),gle({id:"pla",extensions:[".pla"],loader:()=>i.e(4811).then(i.bind(i,4811))}),gle({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>i.e(779).then(i.bind(i,779))}),gle({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>i.e(6132).then(i.bind(i,6132))}),gle({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>i.e(9091).then(i.bind(i,9091))}),gle({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>i.e(436).then(i.bind(i,436))}),gle({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>i.e(3513).then(i.bind(i,3513))}),gle({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>i.e(2410).then(i.bind(i,2410))}),gle({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>i.e(2906).then(i.bind(i,2906))}),gle({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>i.e(4820).then(i.bind(i,4820))}),gle({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>i.e(3914).then(i.bind(i,3914))}),gle({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>i.e(902).then(i.bind(i,902))}),gle({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>i.e(1546).then(i.bind(i,1546))}),gle({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>i.e(4181).then(i.bind(i,4181))}),gle({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>i.e(414).then(i.bind(i,414))}),gle({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>i.e(7466).then(i.bind(i,7466))}),gle({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>i.e(5102).then(i.bind(i,5102))}),gle({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:()=>i.e(6949).then(i.bind(i,6949))}),gle({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>i.e(9774).then(i.bind(i,9774))}),gle({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>i.e(3272).then(i.bind(i,3272))}),gle({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>i.e(7299).then(i.bind(i,7299))}),gle({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>i.e(6387).then(i.bind(i,6387))}),gle({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>i.e(4697).then(i.bind(i,4697))}),gle({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>i.e(9836).then(i.bind(i,9836))}),gle({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>i.e(2409).then(i.bind(i,2409))}),gle({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>i.e(7895).then(i.bind(i,7895))}),gle({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>i.e(1662).then(i.bind(i,1662))}),gle({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>i.e(9244).then(i.bind(i,9244))}),gle({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>i.e(9244).then(i.bind(i,9244))}),gle({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>i.e(9908).then(i.bind(i,9908))}),gle({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>i.e(6809).then(i.bind(i,6809))}),gle({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>i.e(1795).then(i.bind(i,1795))}),i(8186),gle({id:"typespec",extensions:[".tsp"],aliases:["TypeSpec"],loader:()=>i.e(3797).then(i.bind(i,3797))}),gle({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>i.e(3236).then(i.bind(i,3236))}),gle({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>i.e(3394).then(i.bind(i,3394))}),gle({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\i.e(4491).then(i.bind(i,4491))}),gle({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>i.e(4318).then(i.bind(i,4318))}),self.MonacoEnvironment=(Qle={editorWorkerService:"editor.worker.js",css:"css.worker.js",html:"html.worker.js",json:"json.worker.js",typescript:"ts.worker.js",javascript:"ts.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var n=i.p,o=(n?n.replace(/\/$/,"")+"/":"")+Qle[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),r=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,r.length)!==r){/^(\/\/)/.test(o)&&(o=window.location.protocol+o);var a=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(a)}}return o}});var ede=n},8186:function(e,t,i){i.d(t,{TG:function(){return _}});var n=i(7448),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of r(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e},d={};l(d,n,"default");var c=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(c||{}),h=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(h||{}),u=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(u||{}),g=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(g||{}),p=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(p||{}),m=class{constructor(e,t,i,n,o){this._onDidChange=new d.Emitter,this._onDidExtraLibsChange=new d.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this.setModeConfiguration(o),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(e,t){let i;if(i=void 0===t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content;let n=1;this._removedExtraLibs[e]&&(n=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)}),0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},f={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},_=new m({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},f),v=new m({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},f);function b(){return i.e(2593).then(i.bind(i,2593))}d.languages.typescript={ModuleKind:c,JsxEmit:h,NewLineKind:u,ScriptTarget:g,ModuleResolutionKind:p,typescriptVersion:"5.4.5",typescriptDefaults:_,javascriptDefaults:v,getTypeScriptWorker:()=>b().then((e=>e.getTypeScriptWorker())),getJavaScriptWorker:()=>b().then((e=>e.getJavaScriptWorker()))},d.languages.onLanguage("typescript",(()=>b().then((e=>e.setupTypeScript(_))))),d.languages.onLanguage("javascript",(()=>b().then((e=>e.setupJavaScript(v)))))},322:function(e){var t=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,r,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;lD;D++)L[D]=D+1;L[15]=0;var E=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,N=Object.prototype.hasOwnProperty,I={},T={};function M(e){return!!N.call(T,e)||!N.call(I,e)&&(E.test(e)?T[e]=!0:(I[e]=!0,!1))}function A(e,t,i,n,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=i,this.propertyName=e,this.type=t,this.sanitizeURL=s}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){R[e]=new A(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];R[t]=new A(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){R[e]=new A(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){R[e]=new A(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){R[e]=new A(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){R[e]=new A(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){R[e]=new A(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){R[e]=new A(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){R[e]=new A(e,5,!1,e.toLowerCase(),null,!1)}));var P=/[\-:]([a-z])/g;function O(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(P,O);R[t]=new A(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(P,O);R[t]=new A(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(P,O);R[t]=new A(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){R[e]=new A(e,1,!1,e.toLowerCase(),null,!1)})),R.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){R[e]=new A(e,1,!1,e.toLowerCase(),null,!0)}));var F=/["'&<>]/;function B(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=F.exec(e);if(t){var i,n="",o=0;for(i=t.index;it}return!1}(e,t,n)?"":null!==n?(e=n.attributeName,3===(i=n.type)||4===i&&!0===t?e+'=""':(n.sanitizeURL&&(t=""+t),e+'="'+B(t)+'"')):M(e)?e+'="'+B(t)+'"':""}var V="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},H=null,z=null,U=null,K=!1,j=!1,q=null,$=0;function G(){if(null===H)throw Error(s(321));return H}function Z(){if(0<$)throw Error(s(312));return{memoizedState:null,queue:null,next:null}}function Y(){return null===U?null===z?(K=!1,z=U=Z()):(K=!0,U=z):null===U.next?(K=!1,U=U.next=Z()):(K=!0,U=U.next),U}function Q(e,t,i,n){for(;j;)j=!1,$+=1,U=null,i=e(t,n);return z=H=null,$=0,U=q=null,i}function X(e,t){return"function"==typeof t?t(e):t}function J(e,t,i){if(H=G(),U=Y(),K){var n=U.queue;if(t=n.dispatch,null!==q&&void 0!==(i=q.get(n))){q.delete(n),n=U.memoizedState;do{n=e(n,i.action),i=i.next}while(null!==i);return U.memoizedState=n,[n,t]}return[U.memoizedState,t]}return e=e===X?"function"==typeof t?t():t:void 0!==i?i(t):t,U.memoizedState=e,e=(e=U.queue={last:null,dispatch:null}).dispatch=ee.bind(null,H,e),[U.memoizedState,e]}function ee(e,t,i){if(!(25>$))throw Error(s(301));if(e===H)if(j=!0,e={action:i,next:null},null===q&&(q=new Map),void 0===(i=q.get(t)))q.set(t,e);else{for(t=i;null!==t.next;)t=t.next;t.next=e}}function te(){}var ie=0,ne={readContext:function(e){var t=ie;return x(e,t),e[t]},useContext:function(e){G();var t=ie;return x(e,t),e[t]},useMemo:function(e,t){if(H=G(),t=void 0===t?null:t,null!==(U=Y())){var i=U.memoizedState;if(null!==i&&null!==t){e:{var n=i[1];if(null===n)n=!1;else{for(var o=0;o=r))throw Error(s(304));var a=new Uint16Array(r);for(a.set(n),(L=a)[0]=i+1,n=i;n=a.children.length){var l=a.footer;if(""!==l&&(this.previousWasTextNode=!1),this.stack.pop(),"select"===a.type)this.currentSelectValue=null;else if(null!=a.type&&null!=a.type.type&&a.type.type.$$typeof===h)this.popProvider(a.type);else if(a.type===m){this.suspenseDepth--;var d=n.pop();if(o){o=!1;var c=a.fallbackFrame;if(!c)throw Error(s(303));this.stack.push(c),n[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}n[this.suspenseDepth]+=d}n[this.suspenseDepth]+=l}else{var u=a.children[a.childIndex++],g="";try{g+=this.render(u,a.context,a.domNamespace)}catch(e){if(null!=e&&"function"==typeof e.then)throw Error(s(294));throw e}n.length<=this.suspenseDepth&&n.push(""),n[this.suspenseDepth]+=g}}return n[0]}finally{ge.current=i,ie=t}},t.render=function(e,t,i){if("string"==typeof e||"number"==typeof e)return""==(i=""+e)?"":this.makeStaticMarkup?B(i):this.previousWasTextNode?"\x3c!-- --\x3e"+B(i):(this.previousWasTextNode=!0,B(i));if(e=(t=function(e,t,i){function r(o,r){var a=r.prototype&&r.prototype.isReactComponent,l=function(e,t,i,n){if(n&&"object"==typeof(n=e.contextType)&&null!==n)return x(n,i),n[i];if(e=e.contextTypes){for(var o in i={},e)i[o]=t[o];t=i}else t=k;return t}(r,t,i,a),d=[],c=!1,h={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===d)return null},enqueueReplaceState:function(e,t){c=!0,d=[t]},enqueueSetState:function(e,t){if(null===d)return null;d.push(t)}};if(a){if(a=new r(o.props,l,h),"function"==typeof r.getDerivedStateFromProps){var u=r.getDerivedStateFromProps.call(null,o.props,a.state);null!=u&&(a.state=n({},a.state,u))}}else if(H={},a=r(o.props,l,h),null==(a=Q(r,o.props,a,l))||null==a.render)return void we(e=a,r);if(a.props=o.props,a.context=l,a.updater=h,void 0===(h=a.state)&&(a.state=h=null),"function"==typeof a.UNSAFE_componentWillMount||"function"==typeof a.componentWillMount)if("function"==typeof a.componentWillMount&&"function"!=typeof r.getDerivedStateFromProps&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&"function"!=typeof r.getDerivedStateFromProps&&a.UNSAFE_componentWillMount(),d.length){h=d;var g=c;if(d=null,c=!1,g&&1===h.length)a.state=h[0];else{u=g?h[0]:a.state;var p=!0;for(g=g?1:0;g=d.length))throw Error(s(93));d=d[0]}l=""+d}null==l&&(l="")}a=n({},a,{value:void 0,children:""+l})}else if("select"===r)this.currentSelectValue=null!=a.value?a.value:a.defaultValue,a=n({},a,{value:void 0});else if("option"===r){d=this.currentSelectValue;var c=function(e){if(null==e)return e;var t="";return o.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(a.children);if(null!=d){var h=null!=a.value?a.value+"":c;if(l=!1,Array.isArray(d)){for(var u=0;u":(w+=">",l="");e:{if(null!=(d=a.dangerouslySetInnerHTML)){if(null!=d.__html){d=d.__html;break e}}else if("string"==typeof(d=a.children)||"number"==typeof d){d=B(d);break e}d=null}return null!=d?(a=[],pe.hasOwnProperty(r)&&"\n"===d.charAt(0)&&(w+="\n"),w+=d):a=ue(a.children),e=e.type,i=null==i||"http://www.w3.org/1999/xhtml"===i?se(e):"http://www.w3.org/2000/svg"===i&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":i,this.stack.push({domNamespace:i,type:r,children:a,childIndex:0,context:t,footer:l}),this.previousWasTextNode=!1,w},e}(),ye={renderToString:function(e){e=new Ce(e,!1);try{return e.read(1/0)}finally{e.destroy()}},renderToStaticMarkup:function(e){e=new Ce(e,!0);try{return e.read(1/0)}finally{e.destroy()}},renderToNodeStream:function(){throw Error(s(207))},renderToStaticNodeStream:function(){throw Error(s(208))},version:"16.14.0"};e.exports=ye.default||ye},6604:function(e,t,i){var n=i(2494),o=i(322),s=i(6969);function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i