diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 093eb881b00..11d48d4b294 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -35,6 +35,7 @@ body:
- Always on Top
- Awake
- ColorPicker
+ - Developer file preview
- FancyZones
- FancyZones Editor
- Image Resizer
diff --git a/.github/ISSUE_TEMPLATE/translation_issue.yml b/.github/ISSUE_TEMPLATE/translation_issue.yml
index 4161600ed32..326ceaacba6 100644
--- a/.github/ISSUE_TEMPLATE/translation_issue.yml
+++ b/.github/ISSUE_TEMPLATE/translation_issue.yml
@@ -26,6 +26,7 @@ body:
- Always on Top
- Awake
- ColorPicker
+ - Developer file preview
- FancyZones
- FancyZones Editor
- Image Resizer
diff --git a/.github/actions/spell-check/excludes.txt b/.github/actions/spell-check/excludes.txt
index 82952268eed..c3f6cd0bf36 100644
--- a/.github/actions/spell-check/excludes.txt
+++ b/.github/actions/spell-check/excludes.txt
@@ -1,4 +1,8 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-excludes
+(?:^|/)monacoSRC/
+(?:^|/)MonacoPreviewHandler/languages.json
+(?:^|/)MonacoPreviewHandler/index.html
+(?:^|/)MonacoPreviewHandler/generateLanguagesJson.html
(?:^|/)(?i)COPYRIGHT
(?:^|/)(?i)LICEN[CS]E
(?:^|/)package(?:-lock)\.json$
diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt
index 4e1346076f2..9b7319683c9 100644
--- a/.github/actions/spell-check/expect.txt
+++ b/.github/actions/spell-check/expect.txt
@@ -1,5 +1,8 @@
aaaa
+abap
+abcd
abcdef
+abcdefgh
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abgr
abi
@@ -58,6 +61,7 @@ api
APIENTRY
APIIs
APPBARDATA
+appcontainer
appdata
APPICON
appid
@@ -104,12 +108,14 @@ atlcom
atleast
atlfile
atlstr
+atop
Attribs
attrs
aumid
Aut
Authenticode
AUTHN
+autogenerate
autogenerated
autogenerates
AUTOHIDE
@@ -117,10 +123,13 @@ AUTOMATIONPROPERTIES
Autorun
AUTOUPDATE
AValid
+Awaitable
awakeness
awakeversion
AWAYMODE
AYUV
+AZCLI
+azurecr
backend
backtracer
BAEC
@@ -142,6 +151,7 @@ bigbar
bigobj
binaryformatter
binlog
+binskim
bios
bitmapimage
BITMAPINFO
@@ -175,6 +185,7 @@ Browsable
bsd
bstr
bti
+btm
Btn
BTNFACE
Bto
@@ -183,17 +194,21 @@ BUFSIZE
bugreport
Buid
BUILDARCH
+buildcommand
+buildtools
buildtransitive
BValue
bytearray
CALG
callbackptr
+cameligo
Camer
Cangjie
CANRENAME
CAPTURECHANGED
cassert
CAtl
+CCB
cch
CCom
CContext
@@ -202,9 +217,12 @@ cdecl
CDeclaration
CDEF
cdpx
+cdpxwin
+cdxml
CEBB
CENTERALIGN
CFDB
+CFFDAFADA
cguid
changecursor
Changemove
@@ -223,6 +241,7 @@ cielab
ciexyz
CImage
cinttypes
+cjs
cla
clangformat
CLASSDC
@@ -236,8 +255,10 @@ CLIENTPULL
clientside
CLIPCHILDREN
CLIPSIBLINGS
+cljs
clrcall
Cls
+cls
CLSCTX
clsid
cmder
@@ -303,10 +324,12 @@ COULDNOT
countof
cout
CPower
+CPPARM
cppblog
cppruntime
cppstd
cppwinrt
+CPPx
CProj
CREATESCHEDULEDTASK
CREATESTRUCT
@@ -329,6 +352,7 @@ cstdint
cstdlib
cstring
CStyle
+csx
CSY
CTAB
CTest
@@ -385,6 +409,7 @@ Dedup
deduplicate
DEFAULTBOOTSTRAPPERINSTALLFOLDER
DEFAULTCOLOR
+defaultcommand
DEFAULTFLAGS
DEFAULTONLY
DEFAULTTONEAREST
@@ -467,6 +492,8 @@ dshow
dst
DSVG
DText
+dupenv
+DUSTIN
dutil
DVASPECT
DVASPECTINFO
@@ -531,11 +558,14 @@ ERASEBKGND
EREOF
EResize
errc
+errorlevel
ERRORMESSAGE
ERRORTITLE
ESettings
esize
esrp
+estdir
+etcore
etl
etw
EUQ
@@ -599,6 +629,7 @@ Filterx
finalizer
findfast
findstr
+Firefox
FIXEDFILEINFO
FLASHZONES
FLASHZONESONQUICKSWITCH
@@ -606,6 +637,7 @@ flt
flyout
fmtlib
FOF
+fof
FOFX
FOLDERID
folderpath
@@ -619,6 +651,7 @@ FRAMEDOWNLOAD
franky
frankychen
Froml
+fsscript
fstream
FTYPE
func
@@ -630,6 +663,7 @@ FZE
gabime
GAC
gacutil
+Gamebar
GBarm
GBs
GCLP
@@ -655,6 +689,7 @@ globals
GNumber
google
GPTR
+graphql
Grayscale
gsuberland
gtm
@@ -978,6 +1013,7 @@ IZoom
JArray
jarro
Jarryd
+Javascript
jfif
jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi
jjw
@@ -989,6 +1025,7 @@ JSONOf
Jsons
jsonval
jsoref
+julia
junja
jxr
jyuwono
@@ -1016,13 +1053,17 @@ keyup
KILLFOCUS
Knowlden
Knownfolders
+kotlin
KSPROPERTY
+ktm
+kts
Kybd
LAlt
Lambson
lamotile
langword
Lastdevice
+LASTEXITCODE
Laute
laute
laviusmotileng
@@ -1041,6 +1082,7 @@ ldx
LEFTSCROLLBAR
lego
len
+LEQ
LError
Lessthan
LEVELID
@@ -1050,12 +1092,15 @@ lhwnd
LIBID
LIGHTORANGE
LIGHTTURQUOISE
+ligo
lindex
linkedin
+linkid
linq
LINQTo
Linux
listview
+litcoffee
lld
llkhf
Llvm
@@ -1171,12 +1216,14 @@ millis
mimetype
mindaro
Minimatch
+Minimizeallwindows
MINIMIZEBOX
miniz
minlevel
Miracast
mirophone
mjpg
+mkdir
mlcfg
mmdeviceapi
mmi
@@ -1184,6 +1231,7 @@ mmsys
mmsystem
mockapi
MODECHANGE
+moderncop
modernwpf
modulekey
MONITORINFO
@@ -1248,6 +1296,7 @@ MYICON
NAMECHANGE
nameof
namespace
+namings
NATIVEFNTCTL
NCACTIVATE
ncc
@@ -1271,6 +1320,7 @@ NCRBUTTONUP
NDEBUG
ndp
NEEDDISPATCH
+neq
NESW
netcore
netcoreapp
@@ -1297,6 +1347,7 @@ NLSTEXT
NOACTIVATE
NOAGGREGATION
NOASYNC
+nocache
NOCLOSEPROCESS
NOCOPYBITS
nodeca
@@ -1339,6 +1390,7 @@ NOTRACK
NOUPDATE
NOZORDER
NPH
+npm
npos
NResize
ntdll
@@ -1442,6 +1494,8 @@ pgp
pguid
phbm
phbmp
+php
+phps
phwnd
pici
pid
@@ -1461,7 +1515,10 @@ ploca
plocm
plugin
pluginsmodel
+plx
PMSIHANDLE
+policheck
+popd
popup
POPUPWINDOW
posix
@@ -1469,6 +1526,7 @@ Postion
powercfg
powerlauncher
powerpreview
+powerquery
powerrename
POWERRENAMETEST
POWERRENAMEUIHOST
@@ -1521,8 +1579,10 @@ propkey
propvarutil
prvpane
psapi
+psc
PSECURITY
psfgao
+psm
Psr
psrm
psrree
@@ -1538,6 +1598,7 @@ PToy
ptr
ptstr
Pui
+pushd
PVOID
pwa
pwcs
@@ -1545,6 +1606,11 @@ pwsh
PWSTR
pwsz
pwtd
+pyc
+pyd
+pyi
+pyo
+pyz
qianlifeng
Qin
qit
@@ -1577,7 +1643,10 @@ RBUTTONUP
rclsid
RCONTROL
RCtrl
+rda
+rdata
rdeveen
+rds
readme
READMODE
readonly
@@ -1656,6 +1725,7 @@ RKey
RMENU
RNumber
roadmap
+robocopy
Roboto
roslyn
royvou
@@ -1691,6 +1761,7 @@ SAVEFAILED
scancode
scanled
schedtasks
+scm
SCOOBE
SCOPEID
screenshot
@@ -1732,6 +1803,7 @@ SETWORKAREA
sfgao
SFGAOF
SFP
+SHAREIMAGELISTS
sharpkeys
SHCNE
SHCNF
@@ -1798,6 +1870,7 @@ SKIPOWNPROCESS
sku
SLGP
sln
+smallbasic
SMALLICON
SMTO
snd
@@ -1809,9 +1882,11 @@ SOURCECLIENTAREAONLY
SOURCEHEADER
sourceid
sourcesdirectory
+spamming
spdisp
spdlog
spdo
+spdth
spec'ing
specialfolder
spesi
@@ -1883,6 +1958,7 @@ strsafe
strutil
sttngs
Stubless
+stx
STYLECHANGED
STYLECHANGING
stylecop
@@ -1898,6 +1974,7 @@ SVE
SVGIn
SVGIO
svgpreviewhandler
+svh
SWC
SWFO
SWITCHEND
@@ -1925,6 +2002,7 @@ syslog
SYSMENU
systemd
SYSTEMTIME
+systemverilog
Tadele
tadele
talynone
@@ -1941,7 +2019,9 @@ taskbar
taskkill
tasklist
taskschd
+tbc
tchar
+tcl
tcscpy
TCustom
tdbuild
@@ -2029,6 +2109,7 @@ ULARGE
ULLONG
ulong
ULONGLONG
+umd
unchecks
uncomment
uncompilable
@@ -2081,9 +2162,11 @@ utf
utils
uuidof
uwp
+UWPUI
uxtheme
UYVY
validmodulename
+vbhtml
vcamp
vccorlib
vcdl
@@ -2100,6 +2183,7 @@ vec
VERBSONLY
VERBW
VERIFYCONTEXT
+verilog
verrsrc
VERSIONINFO
Versioning
@@ -2127,6 +2211,8 @@ VSCBD
vscdb
vscode
VSCROLL
+vse
+vsix
vsonline
vstemplate
VSTHRD
@@ -2147,13 +2233,19 @@ wcscpy
wcslen
wcsncmp
wcsnicmp
+WDK
+wdksetup
+wdkvsix
wdp
wdupenv
We'd
weakme
webcam
+webclient
+webpack
webpage
website
+webview
wekyb
Wevtapi
wgpocpl
@@ -2200,6 +2292,7 @@ winkey
WINL
winmd
winmm
+WINMSAPP
winnt
winres
winrt
@@ -2251,6 +2344,7 @@ wstr
wstring
wstringstream
wsz
+WTL
wtoi
WTS
wtsapi
diff --git a/.pipelines/ESRPSigning_core.json b/.pipelines/ESRPSigning_core.json
index 1af2b333653..7a07abd3eac 100644
--- a/.pipelines/ESRPSigning_core.json
+++ b/.pipelines/ESRPSigning_core.json
@@ -51,6 +51,8 @@
"modules\\FileExplorerPreview\\PowerToys.ManagedTelemetry.dll",
"modules\\FileExplorerPreview\\PowerToys.MarkdownPreviewHandler.dll",
"modules\\FileExplorerPreview\\PowerToys.MarkdownPreviewHandler.comhost.dll",
+ "modules\\FileExplorerPreview\\PowerToys.MonacoPreviewHandler.dll",
+ "modules\\FileExplorerPreview\\PowerToys.MonacoPreviewHandler.comhost.dll",
"modules\\FileExplorerPreview\\PowerToys.PdfPreviewHandler.dll",
"modules\\FileExplorerPreview\\PowerToys.PdfPreviewHandler.comhost.dll",
"modules\\FileExplorerPreview\\PowerToys.PdfThumbnailProvider.dll",
@@ -182,6 +184,10 @@
"vcomp140_app.dll",
"vcruntime140_1_app.dll",
"vcruntime140_app.dll",
+ "modules\\FileExplorerPreview\\Microsoft.Web.WebView2.Core.dll",
+ "modules\\FileExplorerPreview\\Microsoft.Web.WebView2.WinForms.dll",
+ "modules\\FileExplorerPreview\\Microsoft.Web.WebView2.Wpf.dll",
+ "modules\\FileExplorerPreview\\runtimes\\win-x64\\native\\WebView2Loader.dll",
"modules\\launcher\\e_sqlite3.dll",
"modules\\launcher\\SQLitePCLRaw.batteries_v2.dll",
"modules\\launcher\\SQLitePCLRaw.core.dll",
diff --git a/.pipelines/versionAndSignCheck.ps1 b/.pipelines/versionAndSignCheck.ps1
index 508f11af553..76409b320ef 100644
--- a/.pipelines/versionAndSignCheck.ps1
+++ b/.pipelines/versionAndSignCheck.ps1
@@ -7,7 +7,7 @@ Param(
)
$DirPath = $targetDir; #this file is in pipeline, we need root.
-$items = Get-ChildItem -Path $DirPath -File -Include *.exe,*.dll -Recurse -Force -ErrorAction SilentlyContinue
+$items = Get-ChildItem -Path $DirPath -File -Include *.exe,*.dll,*.ttf -Recurse -Force -ErrorAction SilentlyContinue
$totalFailure = 0;
Write-Host $DirPath;
diff --git a/NOTICE.md b/NOTICE.md
index 3d2d7af5410..cd51c996781 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -1,7 +1,13 @@
# NOTICES AND INFORMATION
This software incorporates material from third parties.
-## PowerToy: Color Picker
+- Color Picker
+- File Explorer Add-ins
+- ImageResizer
+- PowerToys Run
+- Installer/Runner
+
+## Utility: Color Picker
### Martin Chrzan's Color Picker
@@ -29,7 +35,37 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-## PowerToy: ImageResizer
+## Utility: File Explorer Add-ins
+
+### Monaco Editor
+
+**Source**: https://github.com/Microsoft/monaco-editor
+
+**Additional third party notifications:** https://github.com/microsoft/monaco-editor/blob/main/ThirdPartyNotices.txt
+
+The MIT License (MIT)
+
+Copyright (c) 2016 - present Microsoft Corporation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+## Utility: ImageResizer
### Brice Lams's Image Resizer License
@@ -57,7 +93,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-## PowerToy: Launcher
+## Utility: PowerToys Run
### Wox License
@@ -99,7 +135,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-## PowerToy: PowerRename
+## Utility: PowerRename
### Chris Davis's SmartRename License
diff --git a/PowerToys.sln b/PowerToys.sln
index 2b19df568a7..9ad0b0b4fc0 100644
--- a/PowerToys.sln
+++ b/PowerToys.sln
@@ -394,6 +394,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StlThumbnailProvider", "src
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests-StlThumbnailProvider", "src\modules\previewpane\UnitTests-StlThumbnailProvider\UnitTests-StlThumbnailProvider.csproj", "{F1F6B6B6-9F18-4A17-8B5C-97DF552C53DC}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonacoPreviewHandler", "src\modules\previewpane\MonacoPreviewHandler\MonacoPreviewHandler.csproj", "{04B193D7-3E21-46B8-A958-89B63A8A69DE}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -1069,6 +1071,12 @@ Global
{F1F6B6B6-9F18-4A17-8B5C-97DF552C53DC}.Release|x64.ActiveCfg = Release|x64
{F1F6B6B6-9F18-4A17-8B5C-97DF552C53DC}.Release|x64.Build.0 = Release|x64
{F1F6B6B6-9F18-4A17-8B5C-97DF552C53DC}.Release|x86.ActiveCfg = Release|x64
+ {04B193D7-3E21-46B8-A958-89B63A8A69DE}.Debug|x64.ActiveCfg = Debug|x64
+ {04B193D7-3E21-46B8-A958-89B63A8A69DE}.Debug|x64.Build.0 = Debug|x64
+ {04B193D7-3E21-46B8-A958-89B63A8A69DE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {04B193D7-3E21-46B8-A958-89B63A8A69DE}.Release|x64.ActiveCfg = Release|x64
+ {04B193D7-3E21-46B8-A958-89B63A8A69DE}.Release|x64.Build.0 = Release|x64
+ {04B193D7-3E21-46B8-A958-89B63A8A69DE}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1199,6 +1207,7 @@ Global
{EAE14C0E-7A6B-45DA-9080-A7D8C077BA6E} = {322566EF-20DC-43A6-B9F8-616AF942579A}
{F7C8C0F1-5431-4347-89D0-8E5354F93CF2} = {2F305555-C296-497E-AC20-5FA1B237996A}
{F1F6B6B6-9F18-4A17-8B5C-97DF552C53DC} = {2F305555-C296-497E-AC20-5FA1B237996A}
+ {04B193D7-3E21-46B8-A958-89B63A8A69DE} = {2F305555-C296-497E-AC20-5FA1B237996A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}
diff --git a/doc/devdocs/modules/powerpreview/monaco/readme.md b/doc/devdocs/modules/powerpreview/monaco/readme.md
new file mode 100644
index 00000000000..286eba6735d
--- /dev/null
+++ b/doc/devdocs/modules/powerpreview/monaco/readme.md
@@ -0,0 +1,22 @@
+# Developer Preview (Monaco)
+
+Developer preview is based on [Microsofts Monaco Editor](https://microsoft.github.io/monaco-editor/) which is maintained by the Visual Studio Code team.
+
+## Update monaco editor
+
+1. Download Monaco editor with npm: `npm i monaco-editor`.
+2. Delete everything except the `min` folder (the minimised code).
+3. Copy the `min` folder inside the [`monacoSRC`](/src/modules/previewpane/MonacoPreviewHandler/monacoSRC) folder.
+4. Generate the JSON file (see section below)
+
+## languages.json
+
+[`languages.json`](/src/modules/previewpane/MonacoPreviewHandler/languages.json) contains all extensions and Id's for the supported languages of Monaco. The [`FileHandler`](/src/modules/previewpane/MonacoPreviewHandler/FileHandler.cs) class and the installer are using this file.
+
+### Generate languages.json file
+
+After you updated monaco editor or adding a new language you should update the [`languages.json`](/src/modules/previewpane/MonacoPreviewHandler/languages.json) file.
+
+1. Build monaco in debug mode.
+2. Open [generateLanguagesJson.html](/src/modules/previewpane/MonacoPreviewHandler/generateLanguagesJson.html) in a browser.
+3. Replace the old JSON file.
diff --git a/installer/PowerToysSetup/PowerToys.wxs b/installer/PowerToysSetup/PowerToys.wxs
index 5e1788218f7..76450df7031 100644
--- a/installer/PowerToysSetup/PowerToys.wxs
+++ b/installer/PowerToysSetup/PowerToys.wxs
@@ -22,6 +22,7 @@
"+Oe(Le.message+"",!0)+"";throw Le}}Re.options=Re.setOptions=function(we){return Ee(Re.defaults,we),Ae(Re.defaults),Re},Re.getDefaults=Ne,Re.defaults=Pe,Re.use=function(we){var Se=Ee({},we);if(we.renderer&&function(){var oe=Re.defaults.renderer||new he,ge=function(ye){var Le=oe[ye];oe[ye]=function(){for(var ke=arguments.length,Te=new Array(ke),Be=0;Be
"+Oe(oe.message+"",!0)+"";throw oe}},Re.Parser=Ce,Re.parser=Ce.parse,Re.Renderer=he,Re.TextRenderer=re,Re.Lexer=$,Re.lexer=$.lex,Re.Tokenizer=ie,Re.Slugger=de,Re.parse=Re;var xe=Re;return xe}),define(ee[274],te([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class C{constructor(M,y=0,S=M.length,v=y-1){this.items=M,this.start=y,this.end=S,this.index=v}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()}}e.ArrayNavigator=C}),define(ee[275],te([0,1,274]),function(j,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class k{constructor(y=[],S=10){this._initialize(y),this._limit=S,this._onChange()}add(y){this._history.delete(y),this._history.add(y),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(y){return this._history.has(y)}_onChange(){this._reduceToLimit();const y=this._elements;this._navigator=new C.ArrayNavigator(y,0,y.length,y.length)}_reduceToLimit(){const y=this._elements;y.length>this._limit&&this._initialize(y.slice(y.length-this._limit))}_currentPosition(){const y=this._navigator.current();return y?this._elements.indexOf(y):-1}_initialize(y){this._history=new Set;for(const S of y)this._history.add(S)}get _elements(){const y=[];return this._history.forEach(S=>y.push(S)),y}}e.HistoryNavigator=k}),define(ee[100],te([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovingAverage=e.clamp=void 0;function C(M,y,S){return Math.min(Math.max(M,y),S)}e.clamp=C;class k{constructor(){this._n=1,this._val=0}update(y){return this._val=this._val+(y-this._val)/this._n,this._n+=1,this}get value(){return this._val}}e.MovingAverage=k}),define(ee[16],te([0,1]),function(j,e){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0}),e.isLittleEndian=e.OS=e.setImmediate=e.globals=e.userAgent=e.isIOS=e.isWeb=e.isNative=e.isLinux=e.isMacintosh=e.isWindows=e.isPreferringBrowserCodeLoad=e.browserCodeLoadingCacheStrategy=e.isElectronSandboxed=void 0;const k="en";let M=!1,y=!1,S=!1,v=!1,a=!1,g=!1,p=!1,u,c=k,o,r;const l=typeof self=="object"?self:typeof global=="object"?global:{};let s;typeof process!="undefined"?s=process:typeof l.vscode!="undefined"&&(s=l.vscode.process);const i=typeof((C=s==null?void 0:s.versions)===null||C===void 0?void 0:C.electron)=="string"&&s.type==="renderer";if(e.isElectronSandboxed=i&&(s==null?void 0:s.sandboxed),e.browserCodeLoadingCacheStrategy=(()=>{if(e.isElectronSandboxed)return"bypassHeatCheck";const _=s==null?void 0:s.env.ENABLE_VSCODE_BROWSER_CODE_LOADING;if(typeof _=="string")return _==="none"||_==="code"||_==="bypassHeatCheck"||_==="bypassHeatCheckAndEagerCompile"?_:"bypassHeatCheck"})(),e.isPreferringBrowserCodeLoad=typeof e.browserCodeLoadingCacheStrategy=="string",typeof navigator=="object"&&!i)r=navigator.userAgent,M=r.indexOf("Windows")>=0,y=r.indexOf("Macintosh")>=0,p=(r.indexOf("Macintosh")>=0||r.indexOf("iPad")>=0||r.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,S=r.indexOf("Linux")>=0,g=!0,u=navigator.language,c=u;else if(typeof s=="object"){M=s.platform==="win32",y=s.platform==="darwin",S=s.platform==="linux",v=S&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,u=k,c=k;const _=s.env.VSCODE_NLS_CONFIG;if(_)try{const m=JSON.parse(_),f=m.availableLanguages["*"];u=m.locale,c=f||k,o=m._translationsConfigFile}catch(m){}a=!0}else console.error("Unable to resolve platform.");let n=0;y?n=1:M?n=3:S&&(n=2),e.isWindows=M,e.isMacintosh=y,e.isLinux=S,e.isNative=a,e.isWeb=g,e.isIOS=p,e.userAgent=r,e.globals=l,e.setImmediate=function(){if(e.globals.setImmediate)return e.globals.setImmediate.bind(e.globals);if(typeof e.globals.postMessage=="function"&&!e.globals.importScripts){let f=[];e.globals.addEventListener("message",w=>{if(w.data&&w.data.vscodeSetImmediateId)for(let L=0,D=f.length;L
${R}
`),w.codeBlockRenderer&&(x.code=(R,F)=>{const B=w.codeBlockRenderer(F,R),K=S.defaultGenerator.nextId(),G=Promise.all([B,A]).then(J=>{const se=N.querySelector(`div[data-code="${K}"]`);se&&C.reset(se,J[0])}).catch(J=>{});return w.asyncRenderCallback&&G.then(w.asyncRenderCallback),`P+this.view.renderHeight)return null;const z=H-this.view.renderHeight;return Math.abs((P-V)/z)}getHTMLElement(){return this.view.domNode}style(U){this.styleController.style(U)}toListEvent({indexes:U,browserEvent:P}){return{indexes:U,elements:U.map(V=>this.view.element(V)),browserEvent:P}}_onFocusChange(){const U=this.focus.get();this.view.domNode.classList.toggle("element-focused",U.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var U;const P=this.focus.get();if(P.length>0){let V;((U=this.accessibilityProvider)===null||U===void 0?void 0:U.getActiveDescendantId)&&(V=this.accessibilityProvider.getActiveDescendantId(this.view.element(P[0]))),this.view.domNode.setAttribute("aria-activedescendant",V||this.view.getElementDomId(P[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const U=this.selection.get();this.view.domNode.classList.toggle("selection-none",U.length===0),this.view.domNode.classList.toggle("selection-single",U.length===1),this.view.domNode.classList.toggle("selection-multiple",U.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}Me([y.memoize],ae.prototype,"onDidChangeFocus",null),Me([y.memoize],ae.prototype,"onDidChangeSelection",null),Me([y.memoize],ae.prototype,"onContextMenu",null),e.List=ae}),define(ee[307],te([0,1,2,19,124,4,23,206]),function(j,e,C,k,M,y,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class v{constructor(c,o){this.renderer=c,this.modelProvider=o}get templateId(){return this.renderer.templateId}renderTemplate(c){return{data:this.renderer.renderTemplate(c),disposable:C.Disposable.None}}renderElement(c,o,r,l){if(r.disposable&&r.disposable.dispose(),!!r.data){const s=this.modelProvider();if(s.isResolved(c))return this.renderer.renderElement(s.get(c),c,r.data,l);const i=new S.CancellationTokenSource,n=s.resolve(c,i.token);r.disposable={dispose:()=>i.cancel()},this.renderer.renderPlaceholder(c,r.data),n.then(t=>this.renderer.renderElement(t,c,r.data,l))}}disposeTemplate(c){c.disposable&&(c.disposable.dispose(),c.disposable=void 0),c.data&&(this.renderer.disposeTemplate(c.data),c.data=void 0)}}class a{constructor(c,o){this.modelProvider=c,this.accessibilityProvider=o}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(c){const o=this.modelProvider();return o.isResolved(c)?this.accessibilityProvider.getAriaLabel(o.get(c)):null}}function g(u,c){return Object.assign(Object.assign({},c),{accessibilityProvider:c.accessibilityProvider&&new a(u,c.accessibilityProvider)})}class p{constructor(c,o,r,l,s={}){const i=()=>this.model,n=l.map(t=>new v(t,i));this.list=new M.List(c,o,r,n,g(i,s))}updateOptions(c){this.list.updateOptions(c)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return y.Event.map(this.list.onMouseDblClick,({element:c,index:o,browserEvent:r})=>({element:c===void 0?void 0:this._model.get(c),index:o,browserEvent:r}))}get onPointer(){return y.Event.map(this.list.onPointer,({element:c,index:o,browserEvent:r})=>({element:c===void 0?void 0:this._model.get(c),index:o,browserEvent:r}))}get onDidChangeFocus(){return y.Event.map(this.list.onDidChangeFocus,({elements:c,indexes:o,browserEvent:r})=>({elements:c.map(l=>this._model.get(l)),indexes:o,browserEvent:r}))}get onDidChangeSelection(){return y.Event.map(this.list.onDidChangeSelection,({elements:c,indexes:o,browserEvent:r})=>({elements:c.map(l=>this._model.get(l)),indexes:o,browserEvent:r}))}get model(){return this._model}set model(c){this._model=c,this.list.splice(0,this.list.length,k.range(c.length))}getFocus(){return this.list.getFocus()}setSelection(c,o){this.list.setSelection(c,o)}style(c){this.list.style(c)}dispose(){this.list.dispose()}}e.PagedList=p}),define(ee[308],te([10]),{}),define(ee[309],te([0,1,2,4,20,100,19,104,29,55,7,61,121,308]),function(j,e,C,k,M,y,S,v,a,g,p,u,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const o={separatorBorder:a.Color.transparent};class r{constructor(h,_,m,f){this.container=h,this.view=_,this.disposable=f,this._cachedVisibleSize=void 0,typeof m=="number"?(this._size=m,this._cachedVisibleSize=void 0,h.classList.add("visible")):(this._size=0,this._cachedVisibleSize=m.cachedVisibleSize)}set size(h){this._size=h}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(h,_){h!==this.visible&&(h?(this.size=y.clamp(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof _=="number"?_:this.size,this.size=0),this.container.classList.toggle("visible",h),this.view.setVisible&&this.view.setVisible(h))}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 snap(){return!!this.view.snap}set enabled(h){this.container.style.pointerEvents=h?"":"none"}layout(h,_){this.layoutContainer(h),this.view.layout(this.size,h,_)}dispose(){return this.disposable.dispose(),this.view}}class l extends r{layoutContainer(h){this.container.style.top=`${h}px`,this.container.style.height=`${this.size}px`}}class s extends r{layoutContainer(h){this.container.style.left=`${h}px`,this.container.style.width=`${this.size}px`}}var i;(function(d){d[d.Idle=0]="Idle",d[d.Busy=1]="Busy"})(i||(i={}));var n;(function(d){d.Distribute={type:"distribute"};function h(m){return{type:"split",index:m}}d.Split=h;function _(m){return{type:"invisible",cachedVisibleSize:m}}d.Invisible=_})(n=e.Sizing||(e.Sizing={}));class t extends C.Disposable{constructor(h,_={}){super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=i.Idle,this._onDidSashChange=this._register(new k.Emitter),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new k.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=M.isUndefined(_.orientation)?0:_.orientation,this.inverseAltBehavior=!!_.inverseAltBehavior,this.proportionalLayout=M.isUndefined(_.proportionalLayout)?!0:!!_.proportionalLayout,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),h.appendChild(this.el),this.sashContainer=p.append(this.el,p.$(".sash-container")),this.viewContainer=p.$(".split-view-container"),this.scrollable=new c.Scrollable(125,p.scheduleAtNextAnimationFrame),this.scrollableElement=this._register(new u.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?1:2,horizontal:this.orientation===1?1:2},this.scrollable)),this._register(this.scrollableElement.onScroll(m=>{this.viewContainer.scrollTop=m.scrollTop,this.viewContainer.scrollLeft=m.scrollLeft})),p.append(this.el,this.scrollableElement.getDomNode()),this.style(_.styles||o),_.descriptor&&(this.size=_.descriptor.size,_.descriptor.views.forEach((m,f)=>{const b=M.isUndefined(m.visible)||m.visible?m.size:{type:"invisible",cachedVisibleSize:m.size},w=m.view;this.doAddView(w,b,f,!0)}),this.contentSize=this.viewItems.reduce((m,f)=>m+f.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(h){for(const _ of this.sashItems)_.sash.orthogonalStartSash=h;this._orthogonalStartSash=h}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(h){for(const _ of this.sashItems)_.sash.orthogonalEndSash=h;this._orthogonalEndSash=h}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(h){this._startSnappingEnabled!==h&&(this._startSnappingEnabled=h,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(h){this._endSnappingEnabled!==h&&(this._endSnappingEnabled=h,this.updateSashEnablement())}style(h){h.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",h.separatorBorder.toString()))}addView(h,_,m=this.viewItems.length,f){this.doAddView(h,_,m,f)}layout(h,_){const m=Math.max(this.size,this.contentSize);if(this.size=h,this.layoutContext=_,this.proportions)for(let f=0;f S.width||a+i>S.height){console.warn("bad render request outside image data");return}const n=o?this.charDataLight:this.charDataNormal,t=C.getCharIndex(g,c),d=S.width*4,h=u.r,_=u.g,m=u.b,f=p.r-h,b=p.g-_,w=p.b-m,L=S.data;let D=t*l*s,N=a*d+v*4;for(let I=0;IS.width||a+l>S.height){console.warn("bad render request outside image data");return}const s=S.width*4,i=.5,n=p.r,t=p.g,d=p.b,h=g.r-n,_=g.g-t,m=g.b-d,f=n+h*i,b=t+_*i,w=d+m*i,L=S.data;let D=a*s+v*4;for(let N=0;N 0&&(this._removeLinesBefore(o,r),o.linesLength-=r)}if(o.rendLineNumberStart=p,o.rendLineNumberStart+o.linesLength-1u){const r=Math.max(0,u-o.rendLineNumberStart+1),s=o.linesLength-1-r+1;s>0&&(this._removeLinesAfter(o,s),o.linesLength-=s)}return this._finishRendering(o,!1,c),o}_renderUntouchedLines(g,p,u,c,o){const r=g.rendLineNumberStart,l=g.lines;for(let s=p;s<=u;s++){const i=r+s;l[s].layoutLine(i,c[i-o])}}_insertLinesBefore(g,p,u,c,o){const r=[];let l=0;for(let s=p;s<=u;s++)r[l++]=this.host.createVisibleLine();g.lines=r.concat(g.lines)}_removeLinesBefore(g,p){for(let u=0;u =0;l--){const s=g.lines[l];c[l]&&(s.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(g,p,u){const c=document.createElement("div");v._ttPolicy&&(p=v._ttPolicy.createHTML(p)),c.innerHTML=p;for(let o=0;o {let h=l[d];h>t&&(t=h,n=d)}),n===4&&l[4]>0&&l[2]>0&&l[2]>=l[4]/2&&(n=2)}return{insertSpaces:i,tabSize:n}}e.guessIndentation=M}),define(ee[364],te([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.getNodeIsInOverviewRuler=e.getNodeColor=void 0;function C(W){return(W.metadata&1)>>>0}e.getNodeColor=C;function k(W,R){W.metadata=W.metadata&254|R<<0}function M(W){return(W.metadata&2)>>>1==1}function y(W,R){W.metadata=W.metadata&253|(R?1:0)<<1}function S(W){return(W.metadata&4)>>>2==1}function v(W,R){W.metadata=W.metadata&251|(R?1:0)<<2}function a(W){return(W.metadata&8)>>>3==1}e.getNodeIsInOverviewRuler=a;function g(W,R){W.metadata=W.metadata&247|(R?1:0)<<3}function p(W){return(W.metadata&48)>>>4}function u(W,R){W.metadata=W.metadata&207|R<<4}function c(W){return(W.metadata&64)>>>6==1}function o(W,R){W.metadata=W.metadata&191|(R?1:0)<<6}class r{constructor(R,F,B){this.metadata=0,this.parent=this,this.left=this,this.right=this,k(this,1),this.start=F,this.end=B,this.delta=0,this.maxEnd=B,this.id=R,this.ownerId=0,this.options=null,v(this,!1),u(this,1),g(this,!1),o(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=F,this.cachedAbsoluteEnd=B,this.range=null,y(this,!1)}reset(R,F,B,K){this.start=F,this.end=B,this.maxEnd=B,this.cachedVersionId=R,this.cachedAbsoluteStart=F,this.cachedAbsoluteEnd=B,this.range=K}setOptions(R){this.options=R;let F=this.options.className;v(this,F==="squiggly-error"||F==="squiggly-warning"||F==="squiggly-info"),u(this,this.options.stickiness),g(this,!!(this.options.overviewRuler&&this.options.overviewRuler.color)),o(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(R,F,B){this.cachedVersionId!==B&&(this.range=null),this.cachedVersionId=B,this.cachedAbsoluteStart=R,this.cachedAbsoluteEnd=F}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=r,e.SENTINEL=new r(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,k(e.SENTINEL,0);class l{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(R,F,B,K,G){return this.root===e.SENTINEL?[]:f(this,R,F,B,K,G)}search(R,F,B){return this.root===e.SENTINEL?[]:m(this,R,F,B)}collectNodesFromOwner(R){return h(this,R)}collectNodesPostOrder(){return _(this)}insert(R){b(this,R),this._normalizeDeltaIfNecessary()}delete(R){L(this,R),this._normalizeDeltaIfNecessary()}resolveNode(R,F){const B=R;let K=0;for(;R!==this.root;)R===R.parent.right&&(K+=R.parent.delta),R=R.parent;const G=B.start+K,J=B.end+K;B.setCachedOffsets(G,J,F)}acceptReplace(R,F,B,K){const G=t(this,R,R+F);for(let J=0,se=G.length;J a&&(n=a-t);const d=l.color;let h=this._color2Id[d];h||(h=++this._lastAssignedId,this._color2Id[d]=h,this._id2Color[h]=d);const _=new C(n-t,n+t,h);l.setColorZone(_),c.push(_)}return this._colorZonesInvalid=!1,c.sort(C.compare),c}}e.OverviewZoneManager=M}),define(ee[109],te([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class C{constructor(g,p){this._viewLayout=g,this.viewportData=p,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const u=this._viewLayout.getCurrentViewport();this.scrollTop=u.top,this.scrollLeft=u.left,this.viewportWidth=u.width,this.viewportHeight=u.height}getScrolledTopFromAbsoluteTop(g){return g-this.scrollTop}getVerticalOffsetForLineNumber(g){return this._viewLayout.getVerticalOffsetForLineNumber(g)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=C;class k extends C{constructor(g,p,u){super(g,p);this._viewLines=u}linesVisibleRangesForRange(g,p){return this._viewLines.linesVisibleRangesForRange(g,p)}visibleRangeForPosition(g){return this._viewLines.visibleRangeForPosition(g)}}e.RenderingContext=k;class M{constructor(g,p,u){this.outsideRenderedLine=g,this.lineNumber=p,this.ranges=u}}e.LineVisibleRanges=M;class y{constructor(g,p){this.left=Math.round(g),this.width=Math.round(p)}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=y;class S{constructor(g,p){this.outsideRenderedLine=g,this.left=Math.round(p)}}e.HorizontalPosition=S;class v{constructor(g,p){this.outsideRenderedLine=g,this.ranges=p}}e.VisibleRanges=v}),define(ee[378],te([0,1,109]),function(j,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class k{constructor(S,v){this.left=S,this.width=v}toString(){return`[${this.left},${this.width}]`}static compare(S,v){return S.left-v.left}}class M{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(S,v){S.selectNodeContents(v)}static _readClientRects(S,v,a,g,p){const u=this._createRange();try{return u.setStart(S,v),u.setEnd(a,g),u.getClientRects()}catch(c){return null}finally{this._detachRange(u,p)}}static _mergeAdjacentRanges(S){if(S.length===1)return[new C.HorizontalRange(S[0].left,S[0].width)];S.sort(k.compare);let v=[],a=0,g=S[0].left,p=S[0].width;for(let u=1,c=S.length;u r)return null;if(v=Math.min(r,Math.max(o,v)),g=Math.min(r,Math.max(o,g)),v===g&&a===p&&a===0){const n=S.children[v].getClientRects();return this._createHorizontalRangesFromClientRects(n,u)}v!==g&&g>0&&p===0&&(g--,p=1073741824);let l=S.children[v].firstChild,s=S.children[g].firstChild;if((!l||!s)&&(!l&&a===0&&v>0&&(l=S.children[v-1].firstChild,a=1073741824),!s&&p===0&&g>0&&(s=S.children[g-1].firstChild,p=1073741824)),!l||!s)return null;a=Math.min(l.textContent.length,Math.max(0,a)),p=Math.min(s.textContent.length,Math.max(0,p));const i=this._readClientRects(l,a,s,p,c);return this._createHorizontalRangesFromClientRects(i,u)}}e.RangeUtil=M}),define(ee[379],te([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=e.EditorTheme=void 0;class C{constructor(y){this._theme=y}get type(){return this._theme.type}update(y){this._theme=y}getColor(y){return this._theme.getColor(y)}}e.EditorTheme=C;class k{constructor(y,S,v){this.configuration=y,this.theme=new C(S),this.model=v,this.viewLayout=v.viewLayout}addEventHandler(y){this.model.addViewEventHandler(y)}removeEventHandler(y){this.model.removeViewEventHandler(y)}}e.ViewContext=k}),define(ee[169],te([0,1]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZonesChangedEvent=e.ViewTokensColorsChangedEvent=e.ViewTokensChangedEvent=e.ViewThemeChangedEvent=e.ViewScrollChangedEvent=e.ViewRevealRangeRequestEvent=e.ViewLinesInsertedEvent=e.ViewLinesDeletedEvent=e.ViewLinesChangedEvent=e.ViewLineMappingChangedEvent=e.ViewLanguageConfigurationEvent=e.ViewFocusChangedEvent=e.ViewFlushedEvent=e.ViewDecorationsChangedEvent=e.ViewCursorStateChangedEvent=e.ViewConfigurationChangedEvent=e.ViewCompositionEndEvent=e.ViewCompositionStartEvent=void 0;class C{constructor(){this.type=0}}e.ViewCompositionStartEvent=C;class k{constructor(){this.type=1}}e.ViewCompositionEndEvent=k;class M{constructor(h){this.type=2,this._source=h}hasChanged(h){return this._source.hasChanged(h)}}e.ViewConfigurationChangedEvent=M;class y{constructor(h,_){this.type=3,this.selections=h,this.modelSelections=_}}e.ViewCursorStateChangedEvent=y;class S{constructor(h){this.type=4,h?(this.affectsMinimap=h.affectsMinimap,this.affectsOverviewRuler=h.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}e.ViewDecorationsChangedEvent=S;class v{constructor(){this.type=5}}e.ViewFlushedEvent=v;class a{constructor(h){this.type=6,this.isFocused=h}}e.ViewFocusChangedEvent=a;class g{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=g;class p{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=p;class u{constructor(h,_){this.type=9,this.fromLineNumber=h,this.toLineNumber=_}}e.ViewLinesChangedEvent=u;class c{constructor(h,_){this.type=10,this.fromLineNumber=h,this.toLineNumber=_}}e.ViewLinesDeletedEvent=c;class o{constructor(h,_){this.type=11,this.fromLineNumber=h,this.toLineNumber=_}}e.ViewLinesInsertedEvent=o;class r{constructor(h,_,m,f,b,w){this.type=12,this.source=h,this.range=_,this.selections=m,this.verticalType=f,this.revealHorizontal=b,this.scrollType=w}}e.ViewRevealRangeRequestEvent=r;class l{constructor(h){this.type=13,this.scrollWidth=h.scrollWidth,this.scrollLeft=h.scrollLeft,this.scrollHeight=h.scrollHeight,this.scrollTop=h.scrollTop,this.scrollWidthChanged=h.scrollWidthChanged,this.scrollLeftChanged=h.scrollLeftChanged,this.scrollHeightChanged=h.scrollHeightChanged,this.scrollTopChanged=h.scrollTopChanged}}e.ViewScrollChangedEvent=l;class s{constructor(){this.type=14}}e.ViewThemeChangedEvent=s;class i{constructor(h){this.type=15,this.ranges=h}}e.ViewTokensChangedEvent=i;class n{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=n;class t{constructor(){this.type=17}}e.ViewZonesChangedEvent=t}),define(ee[170],te([0,1,8]),function(j,e,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class k{constructor(a,g,p,u){this.startColumn=a,this.endColumn=g,this.className=p,this.type=u}static _equals(a,g){return a.startColumn===g.startColumn&&a.endColumn===g.endColumn&&a.className===g.className&&a.type===g.type}static equalsArr(a,g){const p=a.length,u=g.length;if(p!==u)return!1;for(let c=0;c =c||(r[l++]=new k(Math.max(1,s.startColumn-u+1),Math.min(o+1,s.endColumn-u+1),s.className,s.type));return r}static filter(a,g,p,u){if(a.length===0)return[];let c=[],o=0;for(let r=0,l=a.length;r a&&(this._arr[g].afterLineNumber-=a-v+1)}}onLinesInserted(v,a){this._checkPendingChanges(),v=v|0,a=a|0,this._lineCount+=a-v+1;for(let g=0,p=this._arr.length;g =a.length||a[o+1].afterLineNumber>=v)return o;g=o+1|0}else p=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(v){v=v|0;const g=this._findLastWhitespaceBeforeLineNumber(v)+1;return gs?1:0}e.strcmp=u;class c{constructor(s,i,n){this._fontStyle=s,this._foreground=i,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new c(this._fontStyle,this._foreground,this._background)}acceptOverwrite(s,i,n){s!==-1&&(this._fontStyle=s),i!==0&&(this._foreground=i),n!==0&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}e.ThemeTrieElementRule=c;class o{constructor(s){this._mainRule=s,this._children=new Map}match(s){if(s==="")return this._mainRule;let i=s.indexOf("."),n,t;i===-1?(n=s,t=""):(n=s.substring(0,i),t=s.substring(i+1));let d=this._children.get(n);return typeof d!="undefined"?d.match(t):this._mainRule}insert(s,i,n,t){if(s===""){this._mainRule.acceptOverwrite(i,n,t);return}let d=s.indexOf("."),h,_;d===-1?(h=s,_=""):(h=s.substring(0,d),_=s.substring(d+1));let m=this._children.get(h);typeof m=="undefined"&&(m=new o(this._mainRule.clone()),this._children.set(h,m)),m.insert(_,i,n,t)}}e.ThemeTrieElement=o;function r(l){let s=[];for(let i=1,n=l.length;i
0?this._tokens[S-1<<1]:0}getMetadata(S){return this._tokens[(S<<1)+1]}getLanguageId(S){const v=this._tokens[(S<<1)+1];return C.TokenMetadata.getLanguageId(v)}getStandardTokenType(S){const v=this._tokens[(S<<1)+1];return C.TokenMetadata.getTokenType(v)}getForeground(S){const v=this._tokens[(S<<1)+1];return C.TokenMetadata.getForeground(v)}getClassName(S){const v=this._tokens[(S<<1)+1];return C.TokenMetadata.getClassNameFromMetadata(v)}getInlineStyle(S,v){const a=this._tokens[(S<<1)+1];return C.TokenMetadata.getInlineStyleFromMetadata(a,v)}getEndOffset(S){return this._tokens[S<<1]}findTokenIndexAtOffset(S){return k.findIndexInTokensArray(this._tokens,S)}inflate(){return this}sliceAndInflate(S,v,a){return new M(this,S,v,a)}static convertToEndOffset(S,v){const g=(S.length>>>1)-1;for(let p=0;p p||_ p.getLineMinColumn(u)?c=c-y.prevCharLength(p.getLineContent(u),c-1):u>1&&(u=u-1,c=p.getLineMaxColumn(u)),new k.Position(u,c)}static leftPositionAtomicSoftTabs(p,u,c,o){const r=p.getLineMinColumn(u),l=p.getLineContent(u),s=S.AtomicTabMoveOperations.atomicPosition(l,c-1,o,0);return s===-1||s+1 =v+1&&this.lastAddedCursorIndex--,this.secondaryCursors[v].dispose(this.context),this.secondaryCursors.splice(v,1)}_getAll(){let v=[];v[0]=this.primaryCursor;for(let a=0,g=this.secondaryCursors.length;a=n.length+1)return!1;const t=n.charAt(i.column-2),d=u.get(t);if(!d)return!1;if(M.isQuote(t)){if(p==="never")return!1}else if(g==="never")return!1;const h=n.charAt(i.column-1);let _=!1;for(const m of d)m.open===t&&m.close===h&&(_=!0);if(!_)return!1}return!0}static _runAutoClosingPairDelete(g,p,u){let c=[];for(let o=0,r=u.length;o=0;s--){let i=c.charCodeAt(s),n=o.get(i);if(n===1||r===1&&n===2||r===2&&n===0)return s+1}return 0}static moveWordLeft(c,o,r,l){let s=r.lineNumber,i=r.column;i===1&&s>1&&(s=s-1,i=o.getLineMaxColumn(s));let n=a._findPreviousWordOnLine(c,o,new S.Position(s,i));if(l===0)return new S.Position(s,n?n.start+1:1);if(l===1)return n&&n.wordType===2&&n.end-n.start==1&&n.nextCharClass===0&&(n=a._findPreviousWordOnLine(c,o,new S.Position(s,n.start+1))),new S.Position(s,n?n.start+1:1);if(l===3){for(;n&&n.wordType===2;)n=a._findPreviousWordOnLine(c,o,new S.Position(s,n.start+1));return new S.Position(s,n?n.start+1:1)}return n&&i<=n.end+1&&(n=a._findPreviousWordOnLine(c,o,new S.Position(s,n.start+1))),new S.Position(s,n?n.end+1:1)}static _moveWordPartLeft(c,o){const r=o.lineNumber,l=c.getLineMaxColumn(r);if(o.column===1)return r>1?new S.Position(r-1,c.getLineMaxColumn(r-1)):o;const s=c.getLineContent(r);for(let i=o.column-1;i>1;i--){const n=s.charCodeAt(i-2),t=s.charCodeAt(i-1);if(n===95&&t!==95)return new S.Position(r,i);if(C.isLowerAsciiLetter(n)&&C.isUpperAsciiLetter(t))return new S.Position(r,i);if(C.isUpperAsciiLetter(n)&&C.isUpperAsciiLetter(t)&&i+11&&this._charAtIsWhitespace(l,m-2);)m--;return n(m,f)},d=a._findPreviousWordOnLine(c,o,r);if(d&&i(d))return t(d);const h=a._findNextWordOnLine(c,o,r);return h&&i(h)?t(h):d&&h?n(d.end+1,h.start+1):d?n(d.start+1,d.end+1):h?n(h.start+1,h.end+1):n(1,s+1)}static _deleteWordPartLeft(c,o){if(!o.isEmpty())return o;const r=o.getPosition(),l=a._moveWordPartLeft(c,r);return new v.Range(r.lineNumber,r.column,l.lineNumber,l.column)}static _findFirstNonWhitespaceChar(c,o){let r=c.length;for(let l=o;l