diff --git a/src/AddForkBaseRemote.bat b/src/AddForkBaseRemote.bat new file mode 100644 index 00000000..9ef0153f --- /dev/null +++ b/src/AddForkBaseRemote.bat @@ -0,0 +1,4 @@ +@echo off +git remote add upstream2 https://github.com/SamProf/MatBlazor.git +echo IMPORTANT: now fetch upstream2 from sync window in visual studio +pause \ No newline at end of file diff --git a/src/MatBlazor.Demo.ClientApp/MatBlazor.Demo.ClientApp.csproj b/src/MatBlazor.Demo.ClientApp/MatBlazor.Demo.ClientApp.csproj index 56667cb1..f0b82060 100644 --- a/src/MatBlazor.Demo.ClientApp/MatBlazor.Demo.ClientApp.csproj +++ b/src/MatBlazor.Demo.ClientApp/MatBlazor.Demo.ClientApp.csproj @@ -17,6 +17,7 @@ + diff --git a/src/MatBlazor.Demo.ClientApp/Program.cs b/src/MatBlazor.Demo.ClientApp/Program.cs index 63806419..a604f022 100644 --- a/src/MatBlazor.Demo.ClientApp/Program.cs +++ b/src/MatBlazor.Demo.ClientApp/Program.cs @@ -1,5 +1,8 @@ using MatBlazor.Demo.Models; using MatBlazor.Demo.Services; +using MatBlazor.Demo.Pages; +using MatBlazor.Doc; +using MatBlazor.Doc.Demo; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Microsoft.Extensions.DependencyInjection; using System; @@ -13,27 +16,24 @@ public class Program public static async Task Main(string[] args) { var builder = WebAssemblyHostBuilder.CreateDefault(args); - builder.RootComponents.Add("app"); - - builder.Services.AddTransient(sp => new HttpClient + builder.RootComponents.Add("app"); + var services = builder.Services; + services.AddTransient(sp => new HttpClient {BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)}); - - builder.Services.AddMatBlazor(); - builder.Services.AddSingleton(); - builder.Services.AddScoped(); - builder.Services.AddScoped(); - builder.Services.AddMatToaster(config => - { - //example MatToaster customizations - config.PreventDuplicates = false; - config.NewestOnTop = true; - config.ShowCloseButton = true; - }); - await builder - .Build() - .RunAsync(); + var useDocFrameModel = Environment.GetEnvironmentVariable("USE_DOC_APPFRAME_DEMO") == "true"; + AppModel appModel = useDocFrameModel ? + new DocFrameAppModel() : + new MatBlazorDocumentationAppModel(); + + services.AddDocApp(appModel); + + //builder.Services.AddDocApp(new AppModel(typeof(Pages.Index), DemoNavModel.Default())); + services.AddScoped(); + + + await builder.Build().RunAsync(); } } } \ No newline at end of file diff --git a/src/MatBlazor.Demo.ClientApp/Properties/launchSettings.json b/src/MatBlazor.Demo.ClientApp/Properties/launchSettings.json index fd15af62..8aa2a48c 100644 --- a/src/MatBlazor.Demo.ClientApp/Properties/launchSettings.json +++ b/src/MatBlazor.Demo.ClientApp/Properties/launchSettings.json @@ -22,6 +22,16 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "applicationUrl": "http://localhost:62766/" + }, + "MatBlazor.Demo.ClientApp_new": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "USE_DOC_APPFRAME_DEMO": "true" + }, + "applicationUrl": "http://localhost:62766/" } + } } \ No newline at end of file diff --git a/src/MatBlazor.Demo.ClientApp/wwwroot/index.html b/src/MatBlazor.Demo.ClientApp/wwwroot/index.html index 38e6cec9..82c9faef 100644 --- a/src/MatBlazor.Demo.ClientApp/wwwroot/index.html +++ b/src/MatBlazor.Demo.ClientApp/wwwroot/index.html @@ -22,11 +22,11 @@ - + - - + + diff --git a/src/MatBlazor.Demo.ServerApp/App.razor b/src/MatBlazor.Demo.ServerApp/App.razor deleted file mode 100644 index 0b2bb3b0..00000000 --- a/src/MatBlazor.Demo.ServerApp/App.razor +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - -

Page not found

-

Sorry, but there's nothing here!

-
-
-
- - -@code -{ - - MatTheme theme = new MatTheme() - { - Primary = "#5d2f91", - Background = "#fafafa", - Surface = "#ffffff" - }; - - private string _test1; - - [Parameter] - public string Test1 - { - get => _test1; - set - { - _test1 = value; - } - } - -} \ No newline at end of file diff --git a/src/MatBlazor.Demo.ServerApp/MatBlazor.Demo.ServerApp.csproj b/src/MatBlazor.Demo.ServerApp/MatBlazor.Demo.ServerApp.csproj index f1a08565..ea07676d 100644 --- a/src/MatBlazor.Demo.ServerApp/MatBlazor.Demo.ServerApp.csproj +++ b/src/MatBlazor.Demo.ServerApp/MatBlazor.Demo.ServerApp.csproj @@ -3,7 +3,7 @@ 9 true - net5.0;netcoreapp3.1 + net5.0 @@ -19,6 +19,7 @@ + diff --git a/src/MatBlazor.Demo.ServerApp/Pages/_Host.cshtml b/src/MatBlazor.Demo.ServerApp/Pages/_Host.cshtml index 98cdeb97..df43e810 100644 --- a/src/MatBlazor.Demo.ServerApp/Pages/_Host.cshtml +++ b/src/MatBlazor.Demo.ServerApp/Pages/_Host.cshtml @@ -6,4 +6,4 @@ } -@(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) \ No newline at end of file +@(await Html.RenderComponentAsync(RenderMode.ServerPrerendered)) \ No newline at end of file diff --git a/src/MatBlazor.Demo.ServerApp/Pages/_Layout.cshtml b/src/MatBlazor.Demo.ServerApp/Pages/_Layout.cshtml index 7791782d..3e9ca90e 100644 --- a/src/MatBlazor.Demo.ServerApp/Pages/_Layout.cshtml +++ b/src/MatBlazor.Demo.ServerApp/Pages/_Layout.cshtml @@ -25,11 +25,11 @@ - + - - + + diff --git a/src/MatBlazor.Demo.ServerApp/Properties/launchSettings.json b/src/MatBlazor.Demo.ServerApp/Properties/launchSettings.json index 82cdfc59..fb1366a7 100644 --- a/src/MatBlazor.Demo.ServerApp/Properties/launchSettings.json +++ b/src/MatBlazor.Demo.ServerApp/Properties/launchSettings.json @@ -23,6 +23,15 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "applicationUrl": "https://localhost:5001;http://localhost:5000" + }, + "MatBlazor.Demo.ServerApp_new": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "USE_DOC_APPFRAME_DEMO": "true" + }, + "applicationUrl": "https://localhost:5001;http://localhost:5000" } } } \ No newline at end of file diff --git a/src/MatBlazor.Demo.ServerApp/Startup.cs b/src/MatBlazor.Demo.ServerApp/Startup.cs index f41a30dd..0f1bb9a1 100644 --- a/src/MatBlazor.Demo.ServerApp/Startup.cs +++ b/src/MatBlazor.Demo.ServerApp/Startup.cs @@ -1,5 +1,7 @@ using MatBlazor.Demo.Models; using MatBlazor.Demo.Services; +using MatBlazor.Doc.Demo; +using MatBlazor.Demo.Pages; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpOverrides; @@ -33,18 +35,14 @@ public void ConfigureServices(IServiceCollection services) }); + var useDocFrameModel = Environment.GetEnvironmentVariable("USE_DOC_APPFRAME_DEMO") == "true"; + AppModel appModel = useDocFrameModel ? + new DocFrameAppModel() : + new MatBlazorDocumentationAppModel(); + services.AddDocApp(appModel); - services.AddSingleton(); - services.AddScoped(); - services.AddScoped(); - services.AddMatToaster(config => - { - //example MatToaster customizations - config.PreventDuplicates = false; - config.NewestOnTop = true; - config.ShowCloseButton = true; - }); + services.AddScoped(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/src/MatBlazor.Demo.ServerApp/_Imports.razor b/src/MatBlazor.Demo.ServerApp/_Imports.razor deleted file mode 100644 index 1bbf63a1..00000000 --- a/src/MatBlazor.Demo.ServerApp/_Imports.razor +++ /dev/null @@ -1,6 +0,0 @@ -@using System.Net.Http -@using Microsoft.AspNetCore.Components.Forms -@using Microsoft.AspNetCore.Components.Routing -@using Microsoft.JSInterop -@using Microsoft.AspNetCore.Components.Web -@using MatBlazor \ No newline at end of file diff --git a/src/MatBlazor.Demo/Demo/DemoAutocomplete.razor b/src/MatBlazor.Demo/Demo/DemoAutocomplete.razor index aeb474e0..165e7fcd 100644 --- a/src/MatBlazor.Demo/Demo/DemoAutocomplete.razor +++ b/src/MatBlazor.Demo/Demo/DemoAutocomplete.razor @@ -25,7 +25,7 @@ - @code diff --git a/src/MatBlazor.Demo/Pages/Index.razor b/src/MatBlazor.Demo/IndexPage.razor similarity index 100% rename from src/MatBlazor.Demo/Pages/Index.razor rename to src/MatBlazor.Demo/IndexPage.razor diff --git a/src/MatBlazor.Demo/MatBlazor.Demo.csproj b/src/MatBlazor.Demo/MatBlazor.Demo.csproj index 53b8a8e4..6c30dc54 100644 --- a/src/MatBlazor.Demo/MatBlazor.Demo.csproj +++ b/src/MatBlazor.Demo/MatBlazor.Demo.csproj @@ -4,29 +4,30 @@ Library true 9 - 3.0 - true - net5.0;netstandard2.1 + net5.0 - - - - - - - - - - - - + + + + 3.0 + true + + + + + + + + + + + + + + - - - - diff --git a/src/MatBlazor.Demo/Shared/DemoDrawerContent.razor b/src/MatBlazor.Demo/MatBlazorDocumentationAppModel.cs similarity index 74% rename from src/MatBlazor.Demo/Shared/DemoDrawerContent.razor rename to src/MatBlazor.Demo/MatBlazorDocumentationAppModel.cs index c7288b1a..b7871059 100644 --- a/src/MatBlazor.Demo/Shared/DemoDrawerContent.razor +++ b/src/MatBlazor.Demo/MatBlazorDocumentationAppModel.cs @@ -1,415 +1,394 @@ -@using Microsoft.AspNetCore.Components -@inject NavigationManager Url - - - -   Home - - @foreach (var groupModel in model) - { - - - @groupModel.Group.Name - - - @foreach (var navItem in groupModel.Items) - { - - @navItem.Name - - } - - - } - - - - -@code -{ - - class NavItem - { - public NavGroup Group; - public string Name; - public string Url; - public int Order; - } - - class NavGroup - { - public string Name; - public int Order; - - public NavGroup(string name, int order = int.MaxValue) - { - Name = name; - Order = order; - } - } - - class NavGroupModel - { - public NavGroup Group; - public NavItem[] Items; - } - - NavGroupModel[] model; - - protected async override Task OnInitializedAsync() - { - await base.OnInitializedAsync(); - - var groups = new - { - FormControls = new NavGroup("Form Controls", 1), - Navigation = new NavGroup("Navigation", 2), - Layout = new NavGroup("Layout", 3), - ButtonsAndIndicators = new NavGroup("Buttons & Indicators", 4), - PopupsAndModals = new NavGroup("Popups & Modals", 5), - DataTable = new NavGroup("Data Table", 6), - Other = new NavGroup("Other", 10), - }; - var navItems = new[] - { - new NavItem() - { - Name = "Validation via EditContext", - Url = "EditContext", - Group = groups.FormControls, - Order = 1 - }, - // new NavItem() - // { - // Name = "Autocomplete", - // Url = "Autocomplete", - // Group = groups.FormControls, - // }, - new NavItem() - { - Name = "AutocompleteList", - Url = "AutocompleteList", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "Checkbox", - Url = "Checkbox", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "TextField", - Url = "TextField", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "RadioButton", - Url = "RadioButton", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "Select", - Url = "Select", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "SelectItem", - Url = "SelectItem", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "SelectValue", - Url = "SelectValue", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "Slider", - Url = "Slider", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "SlideToggle", - Url = "SlideToggle", - Group = groups.FormControls, - }, - new NavItem() - { - Name = "Drawer", - Url = "Drawer", - Group = groups.Navigation - }, - new NavItem() - { - Name = "AppBar", - Url = "AppBar", - Group = groups.Navigation - }, - new NavItem() - { - Name = "ButtonLink", - Url = "ButtonLink", - Group = groups.Navigation - }, - new NavItem() - { - Name = "Dialog", - Url = "Dialog", - Group = groups.PopupsAndModals - }, - new NavItem() - { - Name = "Snackbar", - Url = "Snackbar", - Group = groups.PopupsAndModals - }, - new NavItem() - { - Name = "Menu", - Url = "Menu", - Group = groups.Layout - }, - new NavItem() - { - Name = "Card", - Url = "Card", - Group = groups.Layout - }, - new NavItem() - { - Name = "Divider", - Url = "Divider", - Group = groups.Layout - }, - new NavItem() - { - Name = "List", - Url = "List", - Group = groups.Layout - }, - new NavItem() - { - Name = "TreeView", - Url = "TreeView", - Group = groups.Layout - }, - new NavItem() - { - Name = "Button", - Url = "Button", - Group = groups.ButtonsAndIndicators - }, - new NavItem() - { - Name = "Ripple", - Url = "Ripple", - Group = groups.ButtonsAndIndicators - }, - new NavItem() - { - Name = "IconButton", - Url = "IconButton", - Group = groups.ButtonsAndIndicators - }, - new NavItem() - { - Name = "Icon", - Url = "Icon", - Group = groups.ButtonsAndIndicators - }, - new NavItem() - { - Name = "Chip", - Url = "Chip", - Group = groups.ButtonsAndIndicators - }, - new NavItem() - { - Name = "ProgressBar", - Url = "ProgressBar", - Group = groups.ButtonsAndIndicators - }, - new NavItem() - { - Name = "ProgressCircle", - Url = "ProgressCircle", - Group = groups.ButtonsAndIndicators - }, - new NavItem() - { - Name = "Paper & Elevation", - Url = "Paper", - Group = groups.Layout - }, - new NavItem() - { - Name = "Typography", - Url = "Typography", - Group = groups.Layout - }, - new NavItem() - { - Name = "Layout Grid", - Url = "LayoutGrid", - Group = groups.Layout - }, - new NavItem() - { - Name = "Tab", - Url = "Tab", - Group = groups.Layout - }, - new NavItem() - { - Name = "DatePicker", - Url = "DatePicker", - Group = groups.FormControls - }, - new NavItem() - { - Name = "FileUpload", - Url = "FileUpload", - Group = groups.FormControls - }, - new NavItem() - { - Name = "Themes", - Url = "Themes", - Group = groups.Layout - }, - new NavItem() - { - Name = "FAB", - Url = "FAB", - Group = groups.ButtonsAndIndicators - }, - new NavItem() - { - Name = "Expansion Panel", - Url = "ExpansionPanel", - Group = groups.Layout - }, - new NavItem() - { - Name = "Toast", - Url = "Toast", - Group = groups.PopupsAndModals - }, - new NavItem() - { - Name = "Tooltip", - Url = "Tooltip", - Group = groups.PopupsAndModals - }, - new NavItem() - { - Name = "Hidden", - Url = "Hidden", - Group = groups.Layout - }, - new NavItem() - { - Name = "NumericUpDownField", - Url = "NumericUpDownField", - Group = groups.FormControls - }, - new NavItem() - { - Name = "Nav Menu", - Url = "NavMenu", - Group = groups.Navigation - }, - new NavItem() - { - Name = "Table", - Url = "Table", - Group = groups.DataTable - }, - new NavItem() - { - Name = "Paginator", - Url = "Paginator", - Group = groups.DataTable - }, - new NavItem() - { - Name = "SortHeader", - Url = "SortHeader", - Group = groups.DataTable - }, - // new NavItem() - // { - // Name = "DataTable", - // Url = "DataTable", - // Group = groups.DataTable - // }, - new NavItem() - { - Name = "BaseComponent", - Url = "BaseComponent", - Group = groups.Other - }, - new NavItem() - { - Name = "ForwardRef & RefBack", - Url = "ForwardRef", - Group = groups.Other - }, - new NavItem() - { - Name = "Virtual Scroll", - Url = "VirtualScroll", - Group = groups.Layout - }, - - new NavItem() - { - Name = "ForwardRefContext", - Url = "ForwardRefContext", - Group = groups.Other - }, - - new NavItem() - { - Name = "DialogService", - Url = "DialogService", - Group = groups.PopupsAndModals - }, - // new NavItem() - // { - // Name = "Test", - // Url = "Test", - // Group = groups.Other - // }, - }; - - - model = navItems - .GroupBy(i => i.Group) - .OrderBy(i => i.Key.Order) - .ThenBy(i => i.Key.Name) - .Select(g => - { - return new NavGroupModel() - { - Group = g.Key, - Items = g - .OrderBy(i => i.Order) - .ThenBy(i => i.Name) - .ToArray(), - }; - }) - .ToArray(); - } - -} +using MatBlazor.Demo.Models; +using MatBlazor.Demo.Pages; +using System; +using System.Linq; + +namespace MatBlazor.Demo +{ + public class MatBlazorDocumentationAppModel : AppModel + { + public MatBlazorDocumentationAppModel() : base( + typeof(IndexPage), GetNavModel(), true,true,null, FilterType) + { + } + + private static bool FilterType(Type componentType) + { + + if (componentType.Name.StartsWith("Base") || componentType.Name.EndsWith("Internal") || componentType.Name.EndsWith("Internal`1")) + { + return false; + } + + + if (componentType == typeof(MatSelectItem<>)) + { + + } + + return true; + + } + private static NavModel GetNavModel() + { + NavItem[] navItems = CreateNavItems(); + + var groupModels = navItems + .GroupBy(i => i.Group) + .OrderBy(i => i.Key.Order) + .ThenBy(i => i.Key.Name) + .Select(g => + { + return new NavGroupModel() + { + Group = g.Key, + Items = g + .OrderBy(i => i.Order) + .ThenBy(i => i.Name) + .ToArray(), + }; + }) + .ToArray(); + + var model = new NavModel( + "MatBlazor - Material Design components for Blazor and Razor Components", + ("http://samprof.com", "Samprof.com", "fa fa-user-circle"), + ("https://github.com/SamProf/MatBlazor", "Github", "fa fa-github")); + model.NavGroups = groupModels; + return model; + } + + private static NavItem[] CreateNavItems() + { + var groups = new + { + FormControls = new NavGroup("Form Controls", 1), + Navigation = new NavGroup("Navigation", 2), + Layout = new NavGroup("Layout", 3), + ButtonsAndIndicators = new NavGroup("Buttons & Indicators", 4), + PopupsAndModals = new NavGroup("Popups & Modals", 5), + DataTable = new NavGroup("Data Table", 6), + Other = new NavGroup("Other", 10), + }; + var navItems = new[] + { + new NavItem() + { + Name = "Validation via EditContext", + Url = "EditContext", + Group = groups.FormControls, + Order = 1 + }, + new NavItem() + { + Name = "Autocomplete", + Url = "Autocomplete", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "AutocompleteList", + Url = "AutocompleteList", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "Checkbox", + Url = "Checkbox", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "TextField", + Url = "TextField", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "RadioButton", + Url = "RadioButton", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "Select", + Url = "Select", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "SelectItem", + Url = "SelectItem", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "SelectValue", + Url = "SelectValue", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "Slider", + Url = "Slider", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "SlideToggle", + Url = "SlideToggle", + Group = groups.FormControls, + }, + new NavItem() + { + Name = "Drawer", + Url = "Drawer", + Group = groups.Navigation + }, + new NavItem() + { + Name = "AppBar", + Url = "AppBar", + Group = groups.Navigation + }, + new NavItem() + { + Name = "ButtonLink", + Url = "ButtonLink", + Group = groups.Navigation + }, + new NavItem() + { + Name = "Dialog", + Url = "Dialog", + Group = groups.PopupsAndModals + }, + new NavItem() + { + Name = "Snackbar", + Url = "Snackbar", + Group = groups.PopupsAndModals + }, + new NavItem() + { + Name = "Menu", + Url = "Menu", + Group = groups.Layout + }, + new NavItem() + { + Name = "Card", + Url = "Card", + Group = groups.Layout + }, + new NavItem() + { + Name = "Divider", + Url = "Divider", + Group = groups.Layout + }, + new NavItem() + { + Name = "List", + Url = "List", + Group = groups.Layout + }, + new NavItem() + { + Name = "TreeView", + Url = "TreeView", + Group = groups.Layout + }, + new NavItem() + { + Name = "Button", + Url = "Button", + Group = groups.ButtonsAndIndicators + }, + new NavItem() + { + Name = "Ripple", + Url = "Ripple", + Group = groups.ButtonsAndIndicators + }, + new NavItem() + { + Name = "IconButton", + Url = "IconButton", + Group = groups.ButtonsAndIndicators + }, + new NavItem() + { + Name = "Icon", + Url = "Icon", + Group = groups.ButtonsAndIndicators + }, + new NavItem() + { + Name = "Chip", + Url = "Chip", + Group = groups.ButtonsAndIndicators + }, + new NavItem() + { + Name = "ProgressBar", + Url = "ProgressBar", + Group = groups.ButtonsAndIndicators + }, + new NavItem() + { + Name = "ProgressCircle", + Url = "ProgressCircle", + Group = groups.ButtonsAndIndicators + }, + new NavItem() + { + Name = "Paper & Elevation", + Url = "Paper", + Group = groups.Layout + }, + new NavItem() + { + Name = "Typography", + Url = "Typography", + Group = groups.Layout + }, + new NavItem() + { + Name = "Layout Grid", + Url = "LayoutGrid", + Group = groups.Layout + }, + new NavItem() + { + Name = "Tab", + Url = "Tab", + Group = groups.Layout + }, + new NavItem() + { + Name = "DatePicker", + Url = "DatePicker", + Group = groups.FormControls + }, + new NavItem() + { + Name = "FileUpload", + Url = "FileUpload", + Group = groups.FormControls + }, + new NavItem() + { + Name = "Themes", + Url = "Themes", + Group = groups.Layout + }, + new NavItem() + { + Name = "FAB", + Url = "FAB", + Group = groups.ButtonsAndIndicators + }, + new NavItem() + { + Name = "Expansion Panel", + Url = "ExpansionPanel", + Group = groups.Layout + }, + new NavItem() + { + Name = "Toast", + Url = "Toast", + Group = groups.PopupsAndModals + }, + new NavItem() + { + Name = "Tooltip", + Url = "Tooltip", + Group = groups.PopupsAndModals + }, + new NavItem() + { + Name = "Hidden", + Url = "Hidden", + Group = groups.Layout + }, + new NavItem() + { + Name = "NumericUpDownField", + Url = "NumericUpDownField", + Group = groups.FormControls + }, + new NavItem() + { + Name = "Nav Menu", + Url = "NavMenu", + Group = groups.Navigation + }, + new NavItem() + { + Name = "Table", + Url = "Table", + Group = groups.DataTable + }, + new NavItem() + { + Name = "Paginator", + Url = "Paginator", + Group = groups.DataTable + }, + new NavItem() + { + Name = "SortHeader", + Url = "SortHeader", + Group = groups.DataTable + }, + // new NavItem() + // { + // Name = "DataTable", + // Url = "DataTable", + // Group = groups.DataTable + // }, + new NavItem() + { + Name = "BaseComponent", + Url = "BaseComponent", + Group = groups.Other + }, + new NavItem() + { + Name = "ForwardRef & RefBack", + Url = "ForwardRef", + Group = groups.Other + }, + new NavItem() + { + Name = "Virtual Scroll", + Url = "VirtualScroll", + Group = groups.Layout + }, + + new NavItem() + { + Name = "ForwardRefContext", + Url = "ForwardRefContext", + Group = groups.Other + }, + + new NavItem() + { + Name = "DialogService", + Url = "DialogService", + Group = groups.PopupsAndModals + }, + // new NavItem() + // { + // Name = "Test", + // Url = "Test", + // Group = groups.Other + // }, + }; + return navItems; + } + } +} \ No newline at end of file diff --git a/src/MatBlazor.Demo/Models/AppModel.cs b/src/MatBlazor.Demo/Models/AppModel.cs deleted file mode 100644 index 311baea1..00000000 --- a/src/MatBlazor.Demo/Models/AppModel.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; - -namespace MatBlazor.Demo.Models -{ - public class AppModel - { - private readonly object syncObj = new object(); - private int userCount = 0; - - public event EventHandler UserCountChanged; - - public int GetUserCount() - { - lock (syncObj) - { - return userCount; - } - } - - - public void AddUserCount(int value) - { - lock (syncObj) - { - userCount += value; - OnUserCountChanged(userCount); - } - } - - protected virtual void OnUserCountChanged(int e) - { - UserCountChanged?.Invoke(this, e); - } - } -} \ No newline at end of file diff --git a/src/MatBlazor.Demo/Services/DemoUserService.cs b/src/MatBlazor.Demo/Services/DemoUserService.cs index 6590474e..0767049a 100644 --- a/src/MatBlazor.Demo/Services/DemoUserService.cs +++ b/src/MatBlazor.Demo/Services/DemoUserService.cs @@ -1,5 +1,6 @@ namespace MatBlazor.Demo.Services { + public class DemoUserService { public int activeTabIndex = 0; diff --git a/src/MatBlazor.Demo/_Imports.razor b/src/MatBlazor.Demo/_Imports.razor index 7a6b82ef..ad2a0f73 100644 --- a/src/MatBlazor.Demo/_Imports.razor +++ b/src/MatBlazor.Demo/_Imports.razor @@ -3,12 +3,13 @@ @using Microsoft.AspNetCore.Components.Routing @using Microsoft.JSInterop @using Microsoft.AspNetCore.Components.Web -@using MatBlazor.Demo.BlazorFiddle -@using MatBlazor.Demo.Components +@using MatBlazor.Doc.BlazorFiddle +@using MatBlazor.Doc.Components @using MatBlazor.Demo.Demo -@using MatBlazor.Demo.DemoContainer +@using MatBlazor.Doc.DemoContainer @using MatBlazor.Demo.Doc @using MatBlazor @using MatBlazor.Demo.Shared @using MatBlazor.Demo.Frames -@using MatBlazor.Demo.Pages \ No newline at end of file +@using MatBlazor.Demo.Pages +@using MatBlazor.Doc \ No newline at end of file diff --git a/src/MatBlazor.Demo/wwwroot/blazorFiddleLoader.js b/src/MatBlazor.Demo/wwwroot/blazorFiddleLoader.js deleted file mode 100644 index 49b5b730..00000000 --- a/src/MatBlazor.Demo/wwwroot/blazorFiddleLoader.js +++ /dev/null @@ -1,6 +0,0 @@ -(function() { - var script = document.createElement("script"); // create a script DOM node - script.src = "https://blazorfiddle.com/scripts/blazorFiddle.js"; // set its src to the provided URL - - document.head.appendChild(script); -})(); \ No newline at end of file diff --git a/src/MatBlazor.DevUtils/Core/MatDocumenationGenerator.cs b/src/MatBlazor.DevUtils/Core/MatDocumenationGenerator.cs deleted file mode 100644 index 7fdc7389..00000000 --- a/src/MatBlazor.DevUtils/Core/MatDocumenationGenerator.cs +++ /dev/null @@ -1,304 +0,0 @@ -using Microsoft.AspNetCore.Components; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Web; -using System.Xml.Linq; - -namespace MatBlazor.DevUtils.Core -{ - public class MatDocumenationGenerator - { - public Assembly Assembly; - public string XmlPath; - public string OutputPath; - - - public void Generate() - { - var xml = XDocument.Load(XmlPath); - - foreach (var fileInfo in new DirectoryInfo(OutputPath).GetFiles("*.razor", SearchOption.TopDirectoryOnly)) - { - fileInfo.Delete(); - } - - - foreach (var type in Assembly.ExportedTypes) - { - try - { -// if (!type.IsSubclassOf(typeof(ComponentBase))) -// { -// continue; -// } - - - if (type.Name.StartsWith("Base") || type.Name.EndsWith("Internal") || type.Name.EndsWith("Internal`1")) - { - continue; - } - - - if (type == typeof(MatSelectItem<>)) - { - - } - - var typeName = GetTypeName(type, true); - - Console.WriteLine(typeName); - - var outFilePath = Path.Combine(OutputPath, $"Doc{GetFileName(typeName)}.razor"); - - var sb = new StringBuilder(); - - sb.AppendLine($"@inherits MatBlazor.Demo.Components.BaseDocComponent"); - sb.AppendLine(); - sb.AppendLine("@* THIS FILE IS AUTOGENERATED FROM C# XML Comments! *@"); - sb.AppendLine("@* ALL MANUAL CHANGES WILL BE REMOVED! *@"); - sb.AppendLine(); - sb.AppendLine(); - //@if (Secondary) {

MatProgressBar

} else {

MatProgressBar

} - sb.AppendLine( - $"@if (!Secondary) {{

@Header

}} else {{
@Header
}}"); - sb.AppendLine(); - var typeXml = FindDocXml(xml, type); - if (typeXml != null) - { - sb.AppendLine($"

{HtmlEncode(ParseXmlMember(typeXml))}

"); - sb.AppendLine(); - } - - - var includeFields = new HashSet(StringComparer.InvariantCultureIgnoreCase) - { - nameof(BaseMatDomComponent.Ref) - }; - - - var parameters = type - .GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) - .Where(prop => - (type.IsSubclassOf(typeof(ComponentBase)) && - prop.GetCustomAttributes(typeof(ParameterAttribute)).Any()) - || - (!type.IsSubclassOf(typeof(ComponentBase)) && - prop.DeclaringType.Assembly == Assembly) - ) - .OrderBy(i => i.Name) - .Union( - type.GetProperties(BindingFlags.Instance | BindingFlags.Public) - .Where(i => includeFields.Contains(i.Name)) - .OrderBy(i => i.Name) - ) - .ToArray(); - - -// sb.AppendLine($"
Documentation
"); - - sb.AppendLine($"
"); - sb.AppendLine($"\t"); - sb.AppendLine($"\t\t"); - sb.AppendLine($"\t\t"); - sb.AppendLine($"\t\t"); - sb.AppendLine($"\t"); - - - if (type.IsGenericType) - { - foreach (var genericArgument in type.GetGenericArguments()) - { - var propXml = FindDocXml(xml, type); - - sb.AppendLine($"\t"); - sb.AppendLine( - $"\t\t"); - sb.AppendLine($"\t\t"); - sb.AppendLine( - $"\t\t"); - sb.AppendLine($"\t"); - } - } - - - foreach (var prop in parameters) - { - var propXml = FindDocXml(xml, prop); - var propText = ParseXmlMember(propXml); - - if (prop.Name == "ChildContent" && string.IsNullOrEmpty(propText)) - { - propText = "Child content of " + typeName; - } - - sb.AppendLine($"\t"); - sb.AppendLine($"\t\t"); - sb.AppendLine($"\t\t"); - sb.AppendLine($"\t\t"); - sb.AppendLine($"\t"); - } - - sb.AppendLine($"
NameTypeDescription
{HtmlEncode(genericArgument.Name)}Generic argument{HtmlEncode(ParseXmlMember(typeXml, "typeparam", genericArgument.Name))}
{HtmlEncode(prop.Name)}{HtmlEncode(GetTypeName(prop.PropertyType, false))}{HtmlEncode(propText)}
"); - - - sb.AppendLine(""); - sb.AppendLine(""); - sb.AppendLine("@code"); - sb.AppendLine("{"); - sb.AppendLine(""); - sb.AppendLine("\t[Parameter]"); - sb.AppendLine($"\tpublic string Header {{ get; set; }} = \"{typeName}\";"); - sb.AppendLine(""); - sb.AppendLine("}"); - - - File.WriteAllText(outFilePath, sb.ToString()); - } - catch (Exception e) - { - Console.WriteLine(e); - throw; - } - } - } - - - private string HtmlEncode(string v) - { - if (v == null) - { - return ""; - } - - return string.Join("
", - v.Trim().Split("\n").Select(i => i.Trim()).Select(i => HttpUtility.HtmlEncode(i))); - } - - private XElement FindDocXml(XDocument xml, Type type) - { - if (xml.Root != null) - { - var membersEl = xml.Root.Element("members"); - if (membersEl != null) - { - while (type != null && type.Assembly == Assembly) - { - var key = $"T:{type.Namespace}.{type.Name}"; - var el = membersEl.Elements("member").FirstOrDefault(i => i.Attribute("name").Value == key); - if (el != null) - { - return el; - } - - if (type.IsGenericType) - { - type = type.BaseType; - } - else - { - type = type.BaseType; - } - } - } - } - - return null; - } - - private XElement FindDocXml(XDocument xml, MemberInfo member) - { - if (xml.Root != null) - { - var membersEl = xml.Root.Element("members"); - if (membersEl != null) - { - string key; - if (member.DeclaringType.IsGenericType) - { - key = $"P:{member.DeclaringType.GetGenericTypeDefinition().FullName}.{member.Name}"; - } - else - { - key = $"P:{member.DeclaringType}.{member.Name}"; - } - - var el = membersEl.Elements("member").FirstOrDefault(i => i.Attribute("name").Value == key); - return el; - } - } - - return null; - } - - private string ParseXmlMember(XElement xmlEl, string element = "summary", string name = null) - { - if (xmlEl != null) - { - var summaryXmlEls = xmlEl.Elements(element); - - if (name != null) - { - summaryXmlEls = summaryXmlEls.Where(i => i.Attribute("name").Value == name); - } - - return summaryXmlEls.FirstOrDefault()?.Value; - } - - return null; - } - - private string GetFileName(string n) - { - foreach (var ch in Path.GetInvalidFileNameChars()) - { - n = n.Replace("" + ch, ""); - } - - return n; - } - - private string GetTypeName(Type t, bool disableGeneric) - { - if (!t.IsGenericType) - { - return t.Name; - } - - string genericTypeName = t.GetGenericTypeDefinition().Name; - genericTypeName = genericTypeName.Substring(0, - genericTypeName.IndexOf('`')); - - if (disableGeneric) - { - return genericTypeName; - } - else - { - string genericArgs = string.Join(",", - t.GetGenericArguments() - .Select(ta => GetTypeName(ta, disableGeneric)).ToArray()); - return genericTypeName + "<" + genericArgs + ">"; - } - } - - public MatDocumenationGenerator(Assembly assembly, string outputPath) - { - Assembly = assembly; - XmlPath = Path.ChangeExtension(assembly.Location, ".xml"); - if (!File.Exists(XmlPath)) - { - throw new Exception("Xml not found"); - } - - OutputPath = outputPath; - if (!Directory.Exists(OutputPath)) - { - throw new Exception("OutputPath not exists"); - } - } - } -} \ No newline at end of file diff --git a/src/MatBlazor.DevUtils/DemoContentGenerator.cs b/src/MatBlazor.DevUtils/DemoContentGenerator.cs index c90771e4..3d1ea93b 100644 --- a/src/MatBlazor.DevUtils/DemoContentGenerator.cs +++ b/src/MatBlazor.DevUtils/DemoContentGenerator.cs @@ -25,11 +25,8 @@ public void Run() public void GenerateDocumentation() { var config = Config.GetConfig(); - var gen = new MatDocumenationGenerator(typeof(BaseMatDomComponent).Assembly, + var gen = new AssemblyDocumentationGenerator(typeof(BaseMatDomComponent).Assembly, Path.Combine(config.Path, "MatBlazor.Demo", "Doc")); - { - } - ; gen.Generate(); } diff --git a/src/MatBlazor.DevUtils/MatBlazor.DevUtils.csproj b/src/MatBlazor.DevUtils/MatBlazor.DevUtils.csproj index aa9f645a..51d06f41 100644 --- a/src/MatBlazor.DevUtils/MatBlazor.DevUtils.csproj +++ b/src/MatBlazor.DevUtils/MatBlazor.DevUtils.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 Exe MatBlazor.DevUtils.Program @@ -19,7 +19,12 @@
+ + + + + diff --git a/src/MatBlazor.Doc.Demo/DocFrameAppModel.cs b/src/MatBlazor.Doc.Demo/DocFrameAppModel.cs new file mode 100644 index 00000000..bb49a34c --- /dev/null +++ b/src/MatBlazor.Doc.Demo/DocFrameAppModel.cs @@ -0,0 +1,17 @@ +using MatBlazor.Demo.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MatBlazor.Doc.Demo +{ + public class DocFrameAppModel : AppModel + { + public DocFrameAppModel() + : base(typeof(IndexPage), new NavModel("My Library - Documentation"), false, false, _ => Task.Delay(2000)) + { + } + } +} diff --git a/src/MatBlazor.Doc.Demo/IndexPage.razor b/src/MatBlazor.Doc.Demo/IndexPage.razor new file mode 100644 index 00000000..75d9e61c --- /dev/null +++ b/src/MatBlazor.Doc.Demo/IndexPage.razor @@ -0,0 +1,49 @@ +@page "/" + +@using System.Diagnostics +@implements IDisposable + + + + +
+
+ +
+

MatBlazor

+

Material Design components for Blazor (@(GetVersion()))

+
+ + +
+
+ + +@code +{ + + public void Dispose() + { + Console.WriteLine("My Dispose 2"); + } + + + string GetVersion() + { + var assembly = typeof(BaseMatComponent).Assembly; + try + { + return FileVersionInfo.GetVersionInfo(assembly.Location).ProductVersion; + } + catch (Exception e) + { + return assembly.GetName().Version.ToString(2); + } + } + +} \ No newline at end of file diff --git a/src/MatBlazor.Doc.Demo/MatBlazor.Doc.Demo.csproj b/src/MatBlazor.Doc.Demo/MatBlazor.Doc.Demo.csproj new file mode 100644 index 00000000..8eba4835 --- /dev/null +++ b/src/MatBlazor.Doc.Demo/MatBlazor.Doc.Demo.csproj @@ -0,0 +1,44 @@ + + + + Library + true + 9 + net5.0 + + + + + + 3.0 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/MatBlazor.Doc.Demo/Pages/MatAutocompleteListSamples.razor b/src/MatBlazor.Doc.Demo/Pages/MatAutocompleteListSamples.razor new file mode 100644 index 00000000..ef0730b2 --- /dev/null +++ b/src/MatBlazor.Doc.Demo/Pages/MatAutocompleteListSamples.razor @@ -0,0 +1,113 @@ +@page "/MatAutocompleteList" +@attribute [RouteDisplay("Form Controls")] + + + +
Examples
+ + + + + + @code + { + + string[] options = new[] + { + "One", + "Two", + "Three" + }; + + } + + + + + + + + + + + +

+ + +

+
@context.Name
+
@context.Price$
+
+ + +

+

+ Selected value: @(value?.Name) +

+ + @code + { + + public class Car + { + public string Name { get; set; } + public double Price { get; set; } + + public Car(string name, double price) + { + Name = name; + Price = price; + } + } + + Car value = null; + + Car[] options2 = new[] + { + new Car("Volkswagen Golf", 10000), + new Car("Volkswagen Passat", 11000), + new Car("Volkswagen Polo", 12000), + new Car("Ford Focus", 13000), + new Car("Ford Fiesta", 14000), + new Car("Ford Fusion", 15000), + new Car("Ford Mondeo", 16000), + }; + + } +
+ + + + +
+
@context.Name
+
@context.Price$
+
+
+
+
+ + + + + + + Submit + + @code + { + class AutocompleteContextModel + { + public List Options { get; set; } = new List() { "A test option", "Another test option", "One more option" }; + + [System.ComponentModel.DataAnnotations.Required] + public string SelectedOption { get; set; } + } + AutocompleteContextModel model = new AutocompleteContextModel(); + + void HandleValidSubmit() + { + Console.WriteLine("On Valid Submit"); + } + } + \ No newline at end of file diff --git a/src/MatBlazor.Doc.Demo/Pages/MatAutocompleteSamples.razor b/src/MatBlazor.Doc.Demo/Pages/MatAutocompleteSamples.razor new file mode 100644 index 00000000..612e8ece --- /dev/null +++ b/src/MatBlazor.Doc.Demo/Pages/MatAutocompleteSamples.razor @@ -0,0 +1,24 @@ +@page "/Autocomplete"; +@attribute [RouteDisplay( "MyGroup","My AutoComplete", false)] + + +This component is in progress, use MatAutocompleteList instead! + + + + + @code + { + + string value; + + string[] options = new[] + { + "One", + "Two", + "Three" + }; + + } + + diff --git a/src/MatBlazor.Doc.Demo/Pages/MatBlazorVirtualScrollSamples.razor b/src/MatBlazor.Doc.Demo/Pages/MatBlazorVirtualScrollSamples.razor new file mode 100644 index 00000000..b596b36b --- /dev/null +++ b/src/MatBlazor.Doc.Demo/Pages/MatBlazorVirtualScrollSamples.razor @@ -0,0 +1,52 @@ +@page "/MatBlazorVirtualScroll"; +@attribute [RouteDisplay("Layout")] + + + + +

VirtualScroll with @items.Count() items

+ + + +
@context
+
+
+ + @code + { + public ICollection items = Enumerable.Range(0, 333000).Select(i => i.ToString()).ToArray(); + } +
+ +

Complex Item scroll with @complexItems.Count() items

+ + + + + + + + @code + { + private class ValueContainer + { + public T Value { get; set; } + } + + private ICollection> complexItems = Enumerable.Range(0, 333000).Select(i => new ValueContainer { Value = DateTime.Today - TimeSpan.FromDays(i) }).ToArray(); + } +
+ + + + + +
@context
+
+
+ + @code + { + public ICollection notVirtualizedItems = Enumerable.Range(0, 200).Select(i => i.ToString()).ToArray(); + } +
\ No newline at end of file diff --git a/src/MatBlazor.Doc.Demo/Pages/Net5/MatBlazorVirtualScrollSamples_Net5Only.razor b/src/MatBlazor.Doc.Demo/Pages/Net5/MatBlazorVirtualScrollSamples_Net5Only.razor new file mode 100644 index 00000000..60d4f0da --- /dev/null +++ b/src/MatBlazor.Doc.Demo/Pages/Net5/MatBlazorVirtualScrollSamples_Net5Only.razor @@ -0,0 +1,37 @@ +@page "/MatBlazorVirtualScroll_Net5"; +@attribute [RouteDisplay("Layout", "MatBlazorVirtualScroll (>.NET5.0)")] +@using Microsoft.AspNetCore.Components.Web.Virtualization + + + + +

Lazy loaded Virtualize with @TotalCount items

+ + + + + + + + + + + @code + { + private class ValueContainer + { + public T Value { get; set; } + + } + + private int TotalCount { get; } = 33300; + private async ValueTask>> LoadDates( + ItemsProviderRequest request) + { + await Task.Delay(1000); + var dates = Enumerable.Range(request.StartIndex, request.Count).Select( + i => new ValueContainer { Value = DateTime.Today - TimeSpan.FromDays(i) }); + return new ItemsProviderResult>(dates, TotalCount); + } + } +
diff --git a/src/MatBlazor.Doc.Demo/_Imports.razor b/src/MatBlazor.Doc.Demo/_Imports.razor new file mode 100644 index 00000000..c11fb6ec --- /dev/null +++ b/src/MatBlazor.Doc.Demo/_Imports.razor @@ -0,0 +1,11 @@ +@using System.Net.Http +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Routing +@using Microsoft.JSInterop +@using Microsoft.AspNetCore.Components.Web +@using MatBlazor.Doc.BlazorFiddle +@using MatBlazor.Doc.Components +@using MatBlazor.Doc.DemoContainer +@using MatBlazor +@using MatBlazor.Doc +@using MatBlazor.Demo.Models \ No newline at end of file diff --git a/src/MatBlazor.Demo/BlazorFiddle/BaseBlazorFiddle.cs b/src/MatBlazor.Doc/BlazorFiddle/BaseBlazorFiddle.cs similarity index 95% rename from src/MatBlazor.Demo/BlazorFiddle/BaseBlazorFiddle.cs rename to src/MatBlazor.Doc/BlazorFiddle/BaseBlazorFiddle.cs index fab1eb17..77717b05 100644 --- a/src/MatBlazor.Demo/BlazorFiddle/BaseBlazorFiddle.cs +++ b/src/MatBlazor.Doc/BlazorFiddle/BaseBlazorFiddle.cs @@ -2,7 +2,7 @@ using System; using System.Threading.Tasks; -namespace MatBlazor.Demo.BlazorFiddle +namespace MatBlazor.Doc.BlazorFiddle { public class BaseBlazorFiddle : BaseMatDomComponent { diff --git a/src/MatBlazor.Demo/BlazorFiddle/BlazorFiddle.razor b/src/MatBlazor.Doc/BlazorFiddle/BlazorFiddle.razor similarity index 100% rename from src/MatBlazor.Demo/BlazorFiddle/BlazorFiddle.razor rename to src/MatBlazor.Doc/BlazorFiddle/BlazorFiddle.razor diff --git a/src/MatBlazor.Demo/Components/AnchorHeader.razor b/src/MatBlazor.Doc/Components/AnchorHeader.razor similarity index 100% rename from src/MatBlazor.Demo/Components/AnchorHeader.razor rename to src/MatBlazor.Doc/Components/AnchorHeader.razor diff --git a/src/MatBlazor.Demo/Components/BaseDocComponent.cs b/src/MatBlazor.Doc/Components/BaseDocComponent.cs similarity index 100% rename from src/MatBlazor.Demo/Components/BaseDocComponent.cs rename to src/MatBlazor.Doc/Components/BaseDocComponent.cs diff --git a/src/MatBlazor.Demo/DemoContainer/DemoContainer.razor b/src/MatBlazor.Doc/Components/DemoContainer.razor similarity index 92% rename from src/MatBlazor.Demo/DemoContainer/DemoContainer.razor rename to src/MatBlazor.Doc/Components/DemoContainer.razor index 2756dc35..0240ff83 100644 --- a/src/MatBlazor.Demo/DemoContainer/DemoContainer.razor +++ b/src/MatBlazor.Doc/Components/DemoContainer.razor @@ -1,6 +1,6 @@ @using Microsoft.AspNetCore.Components @inject IJSRuntime JsRuntime - +@inject AppModel Model @if (Header != null) { @@ -16,6 +16,8 @@ @SourceContent + @if (Model.ShowAds) + {
+ } @@ -49,7 +52,7 @@ protected override void OnAfterRender(bool firstRender) { base.OnAfterRender(firstRender); - if (firstRender) + if (firstRender && this.Model.ShowAds) { JsRuntime.InvokeAsync("matBlazorDemo.initAd"); } diff --git a/src/MatBlazor.Doc/Components/DemoDrawerContent.razor b/src/MatBlazor.Doc/Components/DemoDrawerContent.razor new file mode 100644 index 00000000..4f0944d7 --- /dev/null +++ b/src/MatBlazor.Doc/Components/DemoDrawerContent.razor @@ -0,0 +1,31 @@ +@using Microsoft.AspNetCore.Components +@inject NavigationManager Url +@inject NavModel NavModel + + + +   Home + + @foreach (var groupModel in NavModel.NavGroups) + { + + + @groupModel.Group.Name + + + @foreach (var navItem in groupModel.Items) + { + + @navItem.Name + + } + + + } + + + \ No newline at end of file diff --git a/src/MatBlazor.Demo/Components/DemoMetadata.razor b/src/MatBlazor.Doc/Components/DemoMetadata.razor similarity index 100% rename from src/MatBlazor.Demo/Components/DemoMetadata.razor rename to src/MatBlazor.Doc/Components/DemoMetadata.razor diff --git a/src/MatBlazor.Demo/Shared/MainLayout.razor b/src/MatBlazor.Doc/Components/MainLayout.razor similarity index 74% rename from src/MatBlazor.Demo/Shared/MainLayout.razor rename to src/MatBlazor.Doc/Components/MainLayout.razor index d45ddef7..fd32c6da 100644 --- a/src/MatBlazor.Demo/Shared/MainLayout.razor +++ b/src/MatBlazor.Doc/Components/MainLayout.razor @@ -6,14 +6,17 @@ @inject AppModel AppModel @inject UserAppModel UserAppModel @inject IJSRuntime Js +@inject IServiceProvider ServiceProvider +@if(this.IsInitialized) +{ - MatBlazor - Material Design components for Blazor and Razor Components + @AppModel.NavModel.Title MatBlazor @@ -23,23 +26,35 @@ - + @foreach(var navBarLink in this.AppModel.NavModel.NavBarLinks) + { + + + + } + @* - + *@ - + @foreach(var navBarLink in this.AppModel.NavModel.NavBarLinks) + { + + @navBarLink.Text + + } + @* Samprof.com Github - + *@ Select Theme @@ -91,7 +106,11 @@ - +} +else +{ +

Loading...

+} @code { @@ -115,6 +134,8 @@ } + private bool IsInitialized {get; set; } + protected void ModelDrawerHiddenChanged(bool hidden) { if (!hidden) @@ -146,6 +167,15 @@ protected override async Task OnAfterRenderAsync(bool firstRender) { + if (firstRender) + { + if (!this.IsInitialized && this.AppModel.PreRenderingInitializationAsync != null) + { + this.IsInitialized = true; + await this.AppModel.PreRenderingInitializationAsync(this.ServiceProvider); + this.StateHasChanged(); + } + } await base.OnAfterRenderAsync(firstRender); } @@ -153,12 +183,17 @@ { await base.OnInitializedAsync(); - Task.Run(async () => + this.IsInitialized |= this.AppModel.PreRenderingInitializationAsync == null ; + + if (this.AppModel.ShowRatingSnackBar) { - await Task.Delay(TimeSpan.FromSeconds(5)); - this.lazySnackbarIsOpen = true; - await InvokeAsync(() => { this.StateHasChanged(); }); - }); + Task.Run(async () => + { + await Task.Delay(TimeSpan.FromSeconds(5)); + this.lazySnackbarIsOpen = true; + await InvokeAsync(() => { this.StateHasChanged(); }); + }); + } } private BaseMatIconButton SmallMenuButton; diff --git a/src/MatBlazor.Demo/Components/ThemeColorSelector.razor b/src/MatBlazor.Doc/Components/ThemeColorSelector.razor similarity index 100% rename from src/MatBlazor.Demo/Components/ThemeColorSelector.razor rename to src/MatBlazor.Doc/Components/ThemeColorSelector.razor diff --git a/src/MatBlazor.Demo.ClientApp/App.razor b/src/MatBlazor.Doc/DocApp.razor similarity index 70% rename from src/MatBlazor.Demo.ClientApp/App.razor rename to src/MatBlazor.Doc/DocApp.razor index 49c86d7c..83a507eb 100644 --- a/src/MatBlazor.Demo.ClientApp/App.razor +++ b/src/MatBlazor.Doc/DocApp.razor @@ -1,9 +1,10 @@ - +@inject AppModel AppModel + - + - +

Page not found

diff --git a/src/MatBlazor.Doc/MatBlazor.Doc.csproj b/src/MatBlazor.Doc/MatBlazor.Doc.csproj new file mode 100644 index 00000000..3ab7a657 --- /dev/null +++ b/src/MatBlazor.Doc/MatBlazor.Doc.csproj @@ -0,0 +1,40 @@ + + + + Library + true + 9 + 3.0 + true + net5.0 + + + + + + 3.0 + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/MatBlazor.Doc/Models/AppModel.cs b/src/MatBlazor.Doc/Models/AppModel.cs new file mode 100644 index 00000000..04815a84 --- /dev/null +++ b/src/MatBlazor.Doc/Models/AppModel.cs @@ -0,0 +1,89 @@ +using Microsoft.AspNetCore.Components; +using System; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using Microsoft.JSInterop; + +namespace MatBlazor.Demo.Models +{ + + public class AppModel + { + private readonly object syncObj = new object(); + private int userCount = 0; + + public Assembly AppAssembly => DocAppIndexComponentType.Assembly; + public Type DocAppIndexComponentType { get; } + public NavModel NavModel { get; } + public bool ShowAds { get; } + public bool ShowRatingSnackBar { get; } + public Func PreRenderingInitializationAsync { get; } + + public Func ApiTypeFilter { get; } + + public event EventHandler UserCountChanged; + + public int GetUserCount() + { + lock (syncObj) + { + return userCount; + } + } + + public AppModel(Type docAppIndexComponentType,NavModel navModel, bool showAds = true, bool showRatingSnackBar = true, Func preRenderingInitializationAsync = null, Func apiTypeFilter = null) + { + DocAppIndexComponentType = docAppIndexComponentType; + NavModel = navModel; + ShowAds = showAds; + ShowRatingSnackBar = showRatingSnackBar; + PreRenderingInitializationAsync = preRenderingInitializationAsync; + ApiTypeFilter = apiTypeFilter; + if (navModel.NavGroups == null) + navModel.NavGroups = GenerateNavModel(docAppIndexComponentType); + } + + private static NavGroupModel[] GenerateNavModel(Type docAppIndexComponentType) + { + var navGroupModels = docAppIndexComponentType.Assembly.GetTypes() + .Where(t => t!= docAppIndexComponentType && typeof(ComponentBase).IsAssignableFrom(t)) + .Select(t => (Type: t, Route: t.GetCustomAttribute(), DisplayInfo: t.GetCustomAttribute())) + .Where(x => x.Route != null && (x.DisplayInfo?.Visible ?? true)) + .GroupBy(x => x.DisplayInfo?.Group) + .Select(group => + { + var navGroup = new NavGroup(group.Key); + navGroup.Order = group.Min(x => x.DisplayInfo.GroupPriority); + var navGroupItems = group.Select( + i => new NavItem + { + Order = i.DisplayInfo?.Priority ?? 0, + Group = navGroup, + Name = i.DisplayInfo?.Text ?? i.Route.Template.Trim('/'), + Url = i.Route.Template + }) + .OrderBy(x=>x.Order).ThenBy(x=>x.Name).ToArray(); + + var navGroupModel = new NavGroupModel() { Group = navGroup, Items = navGroupItems }; + return navGroupModel; + }).OrderBy(x=>x.Group.Order).ThenBy(x=>x.Group.Name).ToArray(); + return navGroupModels; + } + + + public void AddUserCount(int value) + { + lock (syncObj) + { + userCount += value; + OnUserCountChanged(userCount); + } + } + + protected virtual void OnUserCountChanged(int e) + { + UserCountChanged?.Invoke(this, e); + } + } +} \ No newline at end of file diff --git a/src/MatBlazor.Doc/Models/AssemblyDocumentationGenerator.cs b/src/MatBlazor.Doc/Models/AssemblyDocumentationGenerator.cs new file mode 100644 index 00000000..2a42647e --- /dev/null +++ b/src/MatBlazor.Doc/Models/AssemblyDocumentationGenerator.cs @@ -0,0 +1,369 @@ +using Microsoft.AspNetCore.Components; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Web; +using System.Xml.Linq; + +namespace MatBlazor.DevUtils.Core +{ + public class AssemblyDocumentationGenerator + { + public Assembly Assembly; + public string OutputPath { get; } + + public Lazy XmlDocumentation { get; } + + public AssemblyDocumentationGenerator(Assembly assembly, string outputPath, Func filter = null) + : this(assembly,filter) + { + OutputPath = outputPath; + this.XmlDocumentation = new Lazy( + () => + { + var xmlPath = Path.ChangeExtension(this.Assembly.Location, ".xml"); + if (!File.Exists(xmlPath)) + { + throw new Exception("Xml not found"); + } + + if (!Directory.Exists(outputPath)) + { + throw new Exception("OutputPath not exists"); + } + + var xml = XDocument.Load(xmlPath); + return xml; + }); + } + + public AssemblyDocumentationGenerator(Assembly assembly, Assembly docFileContainer, Func filter = null) + : this(assembly,filter) + { + this.XmlDocumentation = new Lazy(() => + { + using var docfileStream = docFileContainer.GetManifestResourceStream( + docFileContainer.GetManifestResourceNames().Single(rn => rn.EndsWith(this.Assembly.GetName().Name + ".xml"))); + var xml = XDocument.Load(docfileStream); + return xml; + }); + } + public Lazy TypeDocumentations { get; } + public Func Filter { get; } + + private AssemblyDocumentationGenerator(Assembly assembly,Func filter = null) + { + this.Assembly = assembly; + Filter = filter; + this.TypeDocumentations = new(() => this.GetTypeDocumentationContainers().ToArray()); + } + + public void Generate() + { + foreach (var fileInfo in new DirectoryInfo(this.OutputPath).GetFiles("*.razor", SearchOption.TopDirectoryOnly)) + { + fileInfo.Delete(); + } + try + { + foreach (var output in GetTypeDocumentationContainers()) + { + File.WriteAllText(output.OutputFilePath, output.Documentation.Value); + } + } + catch(Exception ex) + { + Console.WriteLine(ex); + throw; + } + } + + public TypeDocumentation[] GenerateDynamically() + { + var result = GetTypeDocumentationContainers().ToArray(); + return result; + } + + public TypeDocumentation GetDocumentationFor(Type type) + { + return this.TypeDocumentations.Value.Single(td => td.Type == type); + } + + + private IEnumerable GetTypeDocumentationContainers() + { + foreach (var type in Assembly.ExportedTypes) + { + if (this.Filter?.Invoke(type) ?? true) + { + yield return new TypeDocumentation(this, type); + } + } + + + } + + + + public XElement FindDocXml( Type type) + { + var xml = this.XmlDocumentation.Value; + if (xml.Root != null) + { + var membersEl = xml.Root.Element("members"); + if (membersEl != null) + { + while (type != null && type.Assembly == Assembly) + { + var key = $"T:{type.Namespace}.{type.Name}"; + var el = membersEl.Elements("member").FirstOrDefault(i => i.Attribute("name").Value == key); + if (el != null) + { + return el; + } + + if (type.IsGenericType) + { + type = type.BaseType; + } + else + { + type = type.BaseType; + } + } + } + } + + return null; + } + + public XElement FindDocXml( MemberInfo member) + { + var xml = this.XmlDocumentation.Value; + if (xml.Root != null) + { + var membersEl = xml.Root.Element("members"); + if (membersEl != null) + { + string key; + if (member.DeclaringType.IsGenericType) + { + key = $"P:{member.DeclaringType.GetGenericTypeDefinition().FullName}.{member.Name}"; + } + else + { + key = $"P:{member.DeclaringType}.{member.Name}"; + } + + var el = membersEl.Elements("member").FirstOrDefault(i => i.Attribute("name").Value == key); + return el; + } + } + + return null; + } + + + + + } + public class TypeDocumentation + { + public Lazy TypeName { get; } + public Lazy Documentation { get; } + + public TypeDocumentation(AssemblyDocumentationGenerator assemblyDocumentation, Type type) + { + AssemblyDocumentation = assemblyDocumentation; + Type = type; + this.TypeName = new(() => this.GetTypeName(type, true)); + this.Documentation = new(() => this.GetDocumentationAsync()); + } + public string OutputFilePath => Path.Combine(this.AssemblyDocumentation.OutputPath ?? "", $"Doc{GetFileName(this.TypeName.Value)}.razor"); + + + public AssemblyDocumentationGenerator AssemblyDocumentation { get; } + public Type Type { get; } + + private string GetFileName(string n) + { + foreach (var ch in Path.GetInvalidFileNameChars()) + { + n = n.Replace("" + ch, ""); + } + + return n; + } + private string ParseXmlMember(XElement xmlEl, string element = "summary", string name = null) + { + if (xmlEl != null) + { + var summaryXmlEls = xmlEl.Elements(element); + + if (name != null) + { + summaryXmlEls = summaryXmlEls.Where(i => i.Attribute("name").Value == name); + } + + return summaryXmlEls.FirstOrDefault()?.Value; + } + + return null; + } + + private string HtmlEncode(string v) + { + if (v == null) + { + return ""; + } + + return string.Join("
", + v.Trim().Split("\n").Select(i => i.Trim()).Select(i => HttpUtility.HtmlEncode(i))); + } + + private string GetTypeName(Type t, bool disableGeneric) + { + if (!t.IsGenericType) + { + return t.Name; + } + + string genericTypeName = t.GetGenericTypeDefinition().Name; + genericTypeName = genericTypeName.Substring(0, + genericTypeName.IndexOf('`')); + + if (disableGeneric) + { + return genericTypeName; + } + else + { + string genericArgs = string.Join(",", + t.GetGenericArguments() + .Select(ta => GetTypeName(ta, disableGeneric)).ToArray()); + return genericTypeName + "<" + genericArgs + ">"; + } + } + + private string GetDocumentationAsync() + { + var type = this.Type; + var typeName = this.TypeName.Value; + + Console.WriteLine(typeName); + + + var generateComponentFrame = this.AssemblyDocumentation.OutputPath != null; + var sb = new StringBuilder(); + if (generateComponentFrame) + { + sb.AppendLine($"@inherits MatBlazor.Demo.Components.BaseDocComponent"); + sb.AppendLine(); + sb.AppendLine("@* THIS FILE IS AUTOGENERATED FROM C# XML Comments! *@"); + sb.AppendLine("@* ALL MANUAL CHANGES WILL BE REMOVED! *@"); + sb.AppendLine(); + sb.AppendLine(); + //@if (Secondary) {

MatProgressBar

} else {

MatProgressBar

} + sb.AppendLine( + $"@if (!Secondary) {{

@Header

}} else {{
@Header
}}"); + sb.AppendLine(); + } + var typeXml = this.AssemblyDocumentation.FindDocXml(type); + if (typeXml != null) + { + sb.AppendLine($"

{HtmlEncode(ParseXmlMember(typeXml))}

"); + sb.AppendLine(); + } + + + var includeFields = new HashSet(StringComparer.InvariantCultureIgnoreCase) + { + nameof(BaseMatDomComponent.Ref) + }; + + var isBlazorComponent = type.IsSubclassOf(typeof(ComponentBase)); + var parameters = type + .GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) + .Where(prop => + isBlazorComponent && + prop.GetCustomAttributes(typeof(ParameterAttribute)).Any() + || + !isBlazorComponent && + prop.DeclaringType.Assembly == this.AssemblyDocumentation.Assembly + ) + .OrderBy(i => i.Name) + .Union( + type.GetProperties(BindingFlags.Instance | BindingFlags.Public) + .Where(i => includeFields.Contains(i.Name)) + .OrderBy(i => i.Name) + ) + .ToArray(); + + + // sb.AppendLine($"
Documentation
"); + + sb.AppendLine($"
"); + sb.AppendLine($"\t"); + sb.AppendLine($"\t\t"); + sb.AppendLine($"\t\t"); + sb.AppendLine($"\t\t"); + sb.AppendLine($"\t"); + + + if (type.IsGenericType) + { + foreach (var genericArgument in type.GetGenericArguments()) + { + var propXml = this.AssemblyDocumentation.FindDocXml(type); + + sb.AppendLine($"\t"); + sb.AppendLine( + $"\t\t"); + sb.AppendLine($"\t\t"); + sb.AppendLine( + $"\t\t"); + sb.AppendLine($"\t"); + } + } + + + foreach (var prop in parameters) + { + var propXml = this.AssemblyDocumentation.FindDocXml(prop); + var propText = ParseXmlMember(propXml); + + if (prop.Name == "ChildContent" && string.IsNullOrEmpty(propText)) + { + propText = "Child content of " + typeName; + } + + sb.AppendLine($"\t"); + sb.AppendLine($"\t\t"); + sb.AppendLine($"\t\t"); + sb.AppendLine($"\t\t"); + sb.AppendLine($"\t"); + } + + sb.AppendLine($"
NameTypeDescription
{HtmlEncode(genericArgument.Name)}Generic argument{HtmlEncode(ParseXmlMember(typeXml, "typeparam", genericArgument.Name))}
{HtmlEncode(prop.Name)}{HtmlEncode(GetTypeName(prop.PropertyType, false))}{HtmlEncode(propText)}
"); + + if (generateComponentFrame) + { + sb.AppendLine(""); + sb.AppendLine(""); + sb.AppendLine("@code"); + sb.AppendLine("{"); + sb.AppendLine(""); + sb.AppendLine("\t[Parameter]"); + sb.AppendLine($"\tpublic string Header {{ get; set; }} = \"{typeName}\";"); + sb.AppendLine(""); + sb.AppendLine("}"); + } + return sb.ToString(); + } + } + +} \ No newline at end of file diff --git a/src/MatBlazor.Doc/Models/NavGroup.cs b/src/MatBlazor.Doc/Models/NavGroup.cs new file mode 100644 index 00000000..60d64e76 --- /dev/null +++ b/src/MatBlazor.Doc/Models/NavGroup.cs @@ -0,0 +1,14 @@ +namespace MatBlazor.Demo.Models +{ + public class NavGroup + { + public string Name; + public float Order; + + public NavGroup(string name, float order = float.MaxValue) + { + Name = name; + Order = order; + } + } +} \ No newline at end of file diff --git a/src/MatBlazor.Doc/Models/NavGroupModel.cs b/src/MatBlazor.Doc/Models/NavGroupModel.cs new file mode 100644 index 00000000..b94a6c72 --- /dev/null +++ b/src/MatBlazor.Doc/Models/NavGroupModel.cs @@ -0,0 +1,8 @@ +namespace MatBlazor.Demo.Models +{ + public class NavGroupModel + { + public NavGroup Group; + public NavItem[] Items; + } +} \ No newline at end of file diff --git a/src/MatBlazor.Doc/Models/NavItem.cs b/src/MatBlazor.Doc/Models/NavItem.cs new file mode 100644 index 00000000..d5e0277e --- /dev/null +++ b/src/MatBlazor.Doc/Models/NavItem.cs @@ -0,0 +1,10 @@ +namespace MatBlazor.Demo.Models +{ + public class NavItem + { + public NavGroup Group; + public string Name; + public string Url; + public float Order; + } +} \ No newline at end of file diff --git a/src/MatBlazor.Doc/Models/NavModel.cs b/src/MatBlazor.Doc/Models/NavModel.cs new file mode 100644 index 00000000..ef1f7293 --- /dev/null +++ b/src/MatBlazor.Doc/Models/NavModel.cs @@ -0,0 +1,36 @@ +namespace MatBlazor.Demo.Models +{ + public class NavBarLinkModel + { + public string Url { get; } + public string Text { get; } + public NavBarLinkModel(string url,string text, string icon) + { + Url = url; + Text = text; + FontAwesomeIconId = icon; + } + + public string FontAwesomeIconId { get; } + + public static implicit operator NavBarLinkModel((string url, string text, string icon) x) + { + return new NavBarLinkModel(x.url, x.text, x.icon); + } + } + public class NavModel + { + public string Title { get; } + + public NavModel(string title, params NavBarLinkModel[] navBarLinks) + { + Title = title; + this.NavBarLinks = navBarLinks; + } + + public NavBarLinkModel[] NavBarLinks { get; } + + + public NavGroupModel[] NavGroups { get; set; } + } +} \ No newline at end of file diff --git a/src/MatBlazor.Doc/Models/RouteDisplayAttribute.cs b/src/MatBlazor.Doc/Models/RouteDisplayAttribute.cs new file mode 100644 index 00000000..8ae1adc5 --- /dev/null +++ b/src/MatBlazor.Doc/Models/RouteDisplayAttribute.cs @@ -0,0 +1,25 @@ +using System; + +namespace MatBlazor.Demo.Models +{ + public class RouteDisplayAttribute :Attribute + { + public RouteDisplayAttribute(string group = null, string text = null, bool visible = true, float priority = float.MaxValue, float groupPriority = float.MaxValue) + { + Text = text; + Group = group; + Priority = priority; + GroupPriority = groupPriority; + Visible = visible; + } + + public string Text { get; } + + public string Group { get; } + + public float Priority { get; } + + public float GroupPriority { get; } + public bool Visible { get; } + } +} \ No newline at end of file diff --git a/src/MatBlazor.Demo/Models/UserAppModel.cs b/src/MatBlazor.Doc/Models/UserAppModel.cs similarity index 100% rename from src/MatBlazor.Demo/Models/UserAppModel.cs rename to src/MatBlazor.Doc/Models/UserAppModel.cs diff --git a/src/MatBlazor.Doc/RazorDocContainer.razor b/src/MatBlazor.Doc/RazorDocContainer.razor new file mode 100644 index 00000000..62f64610 --- /dev/null +++ b/src/MatBlazor.Doc/RazorDocContainer.razor @@ -0,0 +1,30 @@ +
@this.DocInfo.SectionText
+ + + @ChildContent + + + + + + +@code{ + + [Parameter] + public RenderFragment ChildContent { get; set; } + + [Parameter] + public DocInfo DocInfo { get; set; } + + [Parameter] + public Func OnFirstRenderedAsync { get; set; } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender && OnFirstRenderedAsync != null) + { + await OnFirstRenderedAsync(); + } + } + +} diff --git a/src/MatBlazor.Doc/XmlDocContainer.razor b/src/MatBlazor.Doc/XmlDocContainer.razor new file mode 100644 index 00000000..aec5d60f --- /dev/null +++ b/src/MatBlazor.Doc/XmlDocContainer.razor @@ -0,0 +1,21 @@ +@inherits MatBlazor.Demo.Components.BaseDocComponent +@inject Func DocGeneratorFactory +@if (!Secondary) +{

@Header

} +else +{
@Header
} + +@((MarkupString)this.TypeDocumentation.Documentation.Value) + +@code{ + [Parameter] + public Type ComponentType { get; set; } + + [Parameter] + public Type DocComponentType { get; set; } + + private MatBlazor.DevUtils.Core.TypeDocumentation TypeDocumentation => DocGeneratorFactory(ComponentType.Assembly).GetDocumentationFor(ComponentType); + + private string Header => TypeDocumentation.TypeName.Value; + +} diff --git a/src/MatBlazor.Demo.ClientApp/_Imports.razor b/src/MatBlazor.Doc/_Imports.razor similarity index 53% rename from src/MatBlazor.Demo.ClientApp/_Imports.razor rename to src/MatBlazor.Doc/_Imports.razor index fd4be8c6..aa13f21e 100644 --- a/src/MatBlazor.Demo.ClientApp/_Imports.razor +++ b/src/MatBlazor.Doc/_Imports.razor @@ -1,7 +1,10 @@ -@using System.Net.Http +@using System.Net.Http @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.JSInterop @using Microsoft.AspNetCore.Components.Web -@using MatBlazor.Demo.ClientApp +@using MatBlazor.Doc.BlazorFiddle +@using MatBlazor.Doc.Components +@using MatBlazor.Doc.DemoContainer +@using MatBlazor.Demo.Models @using MatBlazor \ No newline at end of file diff --git a/src/MatBlazor.Doc/_global/ServiceExtensions.cs b/src/MatBlazor.Doc/_global/ServiceExtensions.cs new file mode 100644 index 00000000..8c542f39 --- /dev/null +++ b/src/MatBlazor.Doc/_global/ServiceExtensions.cs @@ -0,0 +1,43 @@ +using MatBlazor; +using MatBlazor.Demo.Models; +using MatBlazor.DevUtils.Core; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +public static class DotnetExtensions +{ + public static float ToMajorMinorFloat(this Version version) => float.Parse($"{version.Major}.{version.Minor}", CultureInfo.InvariantCulture); +} + public static class ServiceExtensions + { + public static void AddDocApp(this IServiceCollection services, AppModel appModel) + { + services.AddMatBlazor(); + services.AddSingleton(_ => appModel); + services.AddSingleton(sp => appModel.NavModel); + + var generatorCache = new ConcurrentDictionary(); + + services.AddSingleton(_ => new Func(a => generatorCache.GetOrAdd( + a.FullName, aa => new AssemblyDocumentationGenerator(a, appModel.AppAssembly,appModel.ApiTypeFilter)))); + + services.AddScoped(); + services.AddMatToaster(config => + { + //example MatToaster customizations + config.PreventDuplicates = false; + config.NewestOnTop = true; + config.ShowCloseButton = true; + }); + } + + + + } diff --git a/src/MatBlazor.Doc/_global/TypeExtensions.cs b/src/MatBlazor.Doc/_global/TypeExtensions.cs new file mode 100644 index 00000000..c8754424 --- /dev/null +++ b/src/MatBlazor.Doc/_global/TypeExtensions.cs @@ -0,0 +1,68 @@ +using MatBlazor.DevUtils.Core; +using Microsoft.AspNetCore.Components; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MatBlazor.Doc.DemoContainer +{ + public record DocInfo + { + public string Code { get; set; } + public string SectionText { get; internal set; } + } + public static class TypeExtensions + { + //public static string GetTypeDocu(this Type docComponentType, Type typeToDocument) + //{ + // var generator = new AssemblyDocumentationGenerator(typeToDocument.Assembly); + // var allDocs = generator.GenerateDynamically(docComponentType.Assembly); + // var finalDoc = allDocs.Single(x => x.Type == typeToDocument).Documentation; + // return finalDoc; + //} + + private static ConcurrentDictionary<(Type Type, string Section), DocInfo> Cache { get; } = new(); + public static DocInfo GetDocInfo(this ComponentBase component, string uniqueSectionText) + { + var componentType = component.GetType(); + return Cache.GetOrAdd((componentType, uniqueSectionText), x => + { + var resourceName = x.Type.Assembly.GetManifestResourceNames().SingleOrDefault( + n => n.EndsWith($".{x.Type.Name}.razor")); + if (resourceName == null) + { + throw new ApplicationException( + $"The embedded resource for the documentation razor page " + + $"'{x.Type.Name}' wasn't found. Make sure that the razor files " + + $"are embedded as resource by applying an item group in the project " + + $"file similar to "); + } + using var stream = x.Type.Assembly.GetManifestResourceStream(resourceName); + using var reader = new StreamReader(stream); + var code = string.Empty; + bool start = false; + while (true) + { + var line = reader.ReadLine(); + if (line.Contains($"{nameof(GetDocInfo)}(\"{x.Section}\"")) + { + start = true; + } + else if (start) + { + if (line.Contains($"1)&&u.fire(e),a=0},n)})},onLastListenerRemove:function(){o.dispose()}});return u.event}function r(e,t){return function(n,i,o){return void 0===i&&(i=null),e(function(e){return n.call(i,t(e))},null,o)}}function s(e,t){return function(n,i,o){return void 0===i&&(i=null),e(function(e){return t(e)&&n.call(i,e)},null,o)}}n.d(t,"b",function(){return a}),n.d(t,"a",function(){return h}),n.d(t,"c",function(){return f}),t.g=i,t.e=o,t.f=r,n.d(t,"d",function(){return p});var a,u=n(13),l=n(143),c=n(0),d=n(102);!function(e){var t={dispose:function(){}};e.None=function(){return t}}(a||(a={}));var h=function(){function e(e){void 0===e&&(e=null),this._options=e,this._event=null,this._disposed=!1,this._deliveryQueue=null,this._listeners=null}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,i,o){t._listeners||(t._listeners=new d.a);var r=t._listeners.isEmpty();r&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s=t._listeners.push(i?[n,i]:n);r&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,i);var a;return a={dispose:function(){if(a.dispose=e._noop,!t._disposed&&(s(),t._options&&t._options.onLastListenerRemove)){t._listeners&&!t._listeners.isEmpty()||t._options.onLastListenerRemove(t)}}},Array.isArray(o)&&o.push(a),a}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){var i=this._deliveryQueue.shift(),o=i[0],r=i[1];try{"function"==typeof o?o.call(void 0,r):o[0].call(o[1],r)}catch(n){Object(u.d)(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=null),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}(),f=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new h({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);var i=function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)};return Object(c.e)(Object(l.a)(i))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener&&e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}(),p=(function(){function e(){this.buffers=[]}e.prototype.wrapEvent=function(e){var t=this;return function(n,i,o){return e(function(e){var o=t.buffers[t.buffers.length-1];o?o.push(function(){return n.call(i,e)}):n.call(i,e)},void 0,o)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t);var n=e();return this.buffers.pop(),t.forEach(function(e){return e()}),n}}(),function(){function e(e){this._event=e}Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(r(this._event,t))},e.prototype.filter=function(t){return new e(s(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)}}(),function(){function e(){var e=this;this.listening=!1,this.inputEvent=a.None,this.inputEventListener=c.a.None,this.emitter=new h({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter)},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose()}}),this.event=this.emitter.event}return Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(4),o=function(){function e(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,o,r,s;return n.startLineNumbert.endLineNumber?(r=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(r=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(i,o,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var i=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return il?(r=l,s=c):r===l&&(s=Math.min(s,c)),i>r?null:i===r&&o>s?null:new e(i,o,r,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new i.a(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new i.a(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}()},function(e,t,n){"use strict";function i(e){return!e||"string"!=typeof e||0===e.trim().length}function o(e){for(var t=[],n=1;n=t.length?e:t[i]})}function r(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function s(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function a(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var i=0;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function u(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t}function c(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=s(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),new RegExp(e,i)}function d(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function h(e){for(var t=0,n=e.length;t=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1}function g(e){return e>=97&&e<=122}function m(e){return e>=65&&e<=90}function v(e){return g(e)||m(e)}function _(e,t){return(e?e.length:0)===(t?t.length:0)&&y(e,t)}function y(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var i=0;ie.length)&&y(e,t,n)}function C(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function E(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function M(e){return btoa(encodeURIComponent(e))}n.d(t,"h",function(){return k}),t.q=i,t.n=o,t.k=r,t.l=s,t.x=a,t.A=u,t.i=l,t.g=c,t.y=d,t.m=h,t.o=f,t.w=p,t.u=g,t.v=m,t.j=_,t.B=b,t.b=C,t.c=w,t.s=S,t.t=L,t.f=x,t.d=I,t.p=N,t.e=D,t.r=O,n.d(t,"a",function(){return W}),t.C=E,t.z=M;var k="",T=/{(\d+)}/g,A=/(?:[\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-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/,R=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/,P=/^[\t\n\r\x20-\x7E]*$/,W=String.fromCharCode(65279)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.with=function(t,n){return void 0===t&&(t=this.lineNumber),void 0===n&&(n=this.column),t===this.lineNumber&&n===this.column?this:new e(t,n)},e.prototype.delta=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),this.with(this.lineNumber+e,this.column+t)},e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumber=0;o--)t.sheet.deleteRule(i[o])}}function N(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}function D(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}function O(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}function E(e){return new Ce(e)}function M(e){for(var t=[],n=1;n=0;){if(r=s+o,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===i)return this._lastStart=0,void(this._lastEnd=r)}this._lastStart=-1},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i0;){t.sort(ce.sort);t.shift().execute()}i=!1};V=function(t,i){void 0===i&&(i=0);var r=new ce(t,i);return e.push(r),n||(n=!0,c(o)),r},j=function(e,n){if(i){var o=new ce(e,n);return t.push(o),o}return V(e,n)}}();var de=16,he=function(e,t){return t},fe=function(e){function t(t,n,i,o,r){void 0===o&&(o=he),void 0===r&&(r=de);var a=e.call(this)||this,u=null,l=0,c=a._register(new G.d),d=function(){l=(new Date).getTime(),i(u),u=null};return a._register(s(t,n,function(e){u=o(u,e);var t=(new Date).getTime()-l;t>=r?(c.cancel(),d()):c.setIfNotSet(d,r-t)})),a}return Q(t,e),t}(Y.a),pe=function(){return function(e,t){return parseFloat(t)||0}}(),ge={getBorderLeftWidth:function(e){return f(e,"border-left-width","borderLeftWidth")},getBorderRightWidth:function(e){return f(e,"border-right-width","borderRightWidth")},getBorderTopWidth:function(e){return f(e,"border-top-width","borderTopWidth")},getBorderBottomWidth:function(e){return f(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return f(e,"padding-left","paddingLeft")},getPaddingRight:function(e){return f(e,"padding-right","paddingRight")},getPaddingTop:function(e){return f(e,"padding-top","paddingTop")},getPaddingBottom:function(e){return f(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return f(e,"margin-left","marginLeft")},getMarginTop:function(e){return f(e,"margin-top","marginTop")},getMarginRight:function(e){return f(e,"margin-right","marginRight")},getMarginBottom:function(e){return f(e,"margin-bottom","marginBottom")},__commaSentinel:!1},me=function(){function e(e,t){this.width=e,this.height=t}return e}(),ve=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}()),_e=null,ye={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",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:z.n?"webkitAnimationStart":"animationstart",ANIMATION_END:z.n?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:z.n?"webkitAnimationIteration":"animationiteration"},be={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},Ce=function(){function e(e){var t=this;this._onDidFocus=new q.a,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new q.a,this.onDidBlur=this._onDidBlur.event,this.disposables=[];var n=C(document.activeElement,e),i=!1,o=function(){i=!1,n||(n=!0,t._onDidFocus.fire())},r=function(){n&&(i=!0,window.setTimeout(function(){i&&(i=!1,n=!1,t._onDidBlur.fire())},0))};Object(B.a)(e,ye.FOCUS,!0)(o,null,this.disposables),Object(B.a)(e,ye.BLUR,!0)(r,null,this.disposables)}return e.prototype.dispose=function(){this.disposables=Object(Y.d)(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()},e}(),we=/([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/},function(e,t,n){"use strict";(function(e,i){function o(t){return null===S&&(S=w.setImmediate?w.setImmediate.bind(w):void 0!==e&&"function"==typeof e.nextTick?e.nextTick.bind(e):w.setTimeout.bind(w)),S(t)}n.d(t,"g",function(){return m}),n.d(t,"d",function(){return v}),n.d(t,"c",function(){return _}),n.d(t,"e",function(){return y}),n.d(t,"f",function(){return b}),n.d(t,"b",function(){return w}),t.h=o,n.d(t,"a",function(){return L});var r=!1,s=!1,a=!1,u=!1,l=!1,c=void 0,d=void 0!==e&&void 0!==e.versions&&void 0!==e.versions.electron&&"renderer"===e.type;if("object"!=typeof navigator||d){if("object"==typeof e){r="win32"===e.platform,s="darwin"===e.platform,a="linux"===e.platform,c="en","en";var h=e.env.VSCODE_NLS_CONFIG;if(h)try{var f=JSON.parse(h),p=f.availableLanguages["*"];c=f.locale,p||"en",f._translationsConfigFile}catch(e){}u=!0}}else{var g=navigator.userAgent;r=g.indexOf("Windows")>=0,s=g.indexOf("Macintosh")>=0,a=g.indexOf("Linux")>=0,l=!0,c=navigator.language,c}var m=r,v=s,_=a,y=u,b=l,C="object"==typeof self?self:"object"==typeof i?i:{},w=C,S=null,L=s?2:r?1:3}).call(t,n(100),n(99))},function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=i(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([r]).join("\n")}return[n].join("\n")}function i(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=n(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o=0&&y.splice(t,1)}function a(e){var t=document.createElement("style");return e.attrs.type="text/css",l(t,e.attrs),r(e,t),t}function u(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",l(t,e.attrs),r(e,t),t}function l(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function c(e,t){var n,i,o,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var l=_++;n=v||(v=a(t)),i=d.bind(null,n,l,!1),o=d.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),i=f.bind(null,n,t),o=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),i=h.bind(null,n),o=function(){s(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}function d(e,t,n,i){var o=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=C(t,o);else{var r=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function h(e,t){var n=t.css,i=t.media;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t,n){var i=n.css,o=n.sourceMap,r=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||r)&&(i=b(i)),o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([i],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}var p={},g=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),m=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),v=null,_=0,y=[],b=n(141);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=g()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=o(e,t);return i(n,t),function(e){for(var r=[],s=0;s>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e.getClassNameFromMetadata=function(e){var t=this.getForeground(e),n="mtk"+t,i=this.getFontStyle(e);return 1&i&&(n+=" mtki"),2&i&&(n+=" mtkb"),4&i&&(n+=" mtku"),n},e.getInlineStyleFromMetadata=function(e,t){var n=this.getForeground(e),i=this.getFontStyle(e),o="color: "+t[n]+";";return 1&i&&(o+="font-style: italic;"),2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o},e}();(function(){var e=Object.create(null);e[0]="method",e[1]="function",e[2]="constructor",e[3]="field",e[4]="variable",e[5]="class",e[6]="struct",e[7]="interface",e[8]="module",e[9]="property",e[10]="event",e[11]="operator",e[12]="unit",e[13]="value",e[14]="constant",e[15]="enum",e[16]="enum-member",e[17]="keyword",e[25]="snippet",e[18]="text",e[19]="color",e[20]="file",e[21]="reference",e[22]="customcolor",e[23]="folder",e[24]="type-parameter"})(),function(){var e=Object.create(null);e.method=0,e.function=1,e.constructor=2,e.field=3,e.variable=4,e.class=5,e.struct=6,e.interface=7,e.module=8,e.property=9,e.event=10,e.operator=11,e.unit=12,e.value=13,e.constant=14,e.enum=15,e["enum-member"]=16,e.keyword=17,e.snippet=25,e.text=18,e.color=19,e.file=20,e.reference=21,e.customcolor=22,e.folder=23,e["type-parameter"]=24}();!function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(o||(o={}));var c;!function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(c||(c={}));var d=(function(){var e=Object.create(null);e[0]="file",e[1]="module",e[2]="namespace",e[3]="package",e[4]="class",e[5]="method",e[6]="property",e[7]="field",e[8]="constructor",e[9]="enum",e[10]="interface",e[11]="function",e[12]="variable",e[13]="constant",e[14]="string",e[15]="number",e[16]="boolean",e[17]="array",e[18]="object",e[19]="key",e[20]="null",e[21]="enum-member",e[22]="struct",e[23]="event",e[24]="operator",e[25]="type-parameter"}(),function(){function e(e){this.value=e}return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e}()),h=new s.a,f=new s.a,p=new s.a,g=new s.a,m=new s.a,v=new s.a,_=new s.a,y=new s.a,b=new s.a,C=new s.a,w=new s.a,S=new s.a,L=new s.a,x=new s.a,I=new s.a,N=new s.a,D=new s.a,O=new s.a,E=new a.a},function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return a});var i=n(12),o=n(52),r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),s=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._context.addEventHandler(n),n}return r(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t}(o.a),a=function(){function e(){}return e.write=function(e,t){i.a,e.setAttribute("data-mprt",String(t))},e.read=function(e){var t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)},e.collect=function(e,t){for(var n=[],i=0;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[i++]=this.read(e)),e=e.parentElement;for(var o=new Uint8Array(i),r=0;r=0){var t=e.split("!=");return new c(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){var t=e.split("==");return new l(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("=~")>=0){var t=e.split("=~");return new h(t[0].trim(),this._deserializeRegexValue(t[1]))}return/^\!\s*/.test(e)?new d(e.substr(1).trim()):new u(e)},e._deserializeValue=function(e){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e._deserializeRegexValue=function(e){if(Object(o.q)(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),n=e.lastIndexOf("/");if(t===n||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null;var i=e.slice(t+1,n),r="i"===e[n+1]?"i":"";try{return new RegExp(i,r)}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null}},e}(),u=function(){function e(e){this.key=e}return e.prototype.getType=function(){return 1},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),l=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return 3},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new u(this.key):new d(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),c=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return 4},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e.getValue(this.key)!=this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new d(this.key):new u(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),d=function(){function e(e){this.key=e}return e.prototype.getType=function(){return 2},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),h=function(){function e(e,t){this.key=e,this.regexp=t}return e.prototype.getType=function(){return 6},e.prototype.cmp=function(e){if(this.keye.key)return 1;var t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0},e.prototype.equals=function(t){if(t instanceof e){var n=this.regexp?this.regexp.source:"",i=t.regexp?t.regexp.source:"";return this.key===t.key&&n===i}return!1},e.prototype.evaluate=function(e){var t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),f=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return 5},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1},t.prototype.setEndPosition=function(e,n){return 0===this.getDirection()?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new i.a(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return 0===this.getDirection()?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n=12&&t<=16)return!1}return!0}t.d=i,t.c=o,t.p=r,t.b=s,t.a=a,t.o=u,n.d(t,"k",function(){return f}),n.d(t,"g",function(){return p}),n.d(t,"h",function(){return g}),n.d(t,"j",function(){return m}),n.d(t,"n",function(){return v}),n.d(t,"f",function(){return _}),n.d(t,"m",function(){return y}),n.d(t,"l",function(){return b}),n.d(t,"i",function(){return C}),t.e=l;var c=n(1),d=function(){function e(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new c.a,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._accessibilitySupport=0,this._onDidChangeAccessibilitySupport=new c.a,this.onDidChangeAccessibilitySupport=this._onDidChangeAccessibilitySupport.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.getTimeSinceLastZoomLevelChanged=function(){return Date.now()-this._lastZoomLevelChangeTime},e.prototype.getPixelRatio=function(){var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},e.prototype.getAccessibilitySupport=function(){return this._accessibilitySupport},e.INSTANCE=new e,e}(),h=navigator.userAgent,f=h.indexOf("Trident")>=0,p=h.indexOf("Edge/")>=0,g=f||p,m=h.indexOf("Firefox")>=0,v=h.indexOf("AppleWebKit")>=0,_=h.indexOf("Chrome")>=0,y=-1===h.indexOf("Chrome")&&h.indexOf("Safari")>=0,b=h.indexOf("iPad")>=0,C=p&&h.indexOf("WebView/")>=0},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(17),o=n(73),r=function(){function e(){this.data={}}return e.prototype.add=function(e,t){o.a(i.g(e)),o.a(i.f(t)),o.a(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.as=function(e){return this.data[e]||null},e}(),s=new r},function(e,t,n){"use strict";function i(e){return"'"===e||'"'===e||"`"===e}n.d(t,"b",function(){return p}),n.d(t,"f",function(){return g}),n.d(t,"c",function(){return m}),n.d(t,"d",function(){return y}),n.d(t,"e",function(){return b}),n.d(t,"a",function(){return C}),t.g=i;var o=n(13),r=n(3),s=n(4),a=n(2),u=n(19),l=n(67),c=n(38),d=function(e){return!0},h=function(e){return!1},f=function(e){return" "===e||"\t"===e},p=function(){function e(t,n,i,o){this._languageIdentifier=t;var r=o.editor;this.readOnly=r.readOnly,this.tabSize=i.tabSize,this.insertSpaces=i.insertSpaces,this.oneIndent=n,this.pageSize=Math.max(1,Math.floor(r.layoutInfo.height/r.fontInfo.lineHeight)-2),this.lineHeight=r.lineHeight,this.useTabStops=r.useTabStops,this.wordSeparators=r.wordSeparators,this.emptySelectionClipboard=r.emptySelectionClipboard,this.copyWithSyntaxHighlighting=r.copyWithSyntaxHighlighting,this.multiCursorMergeOverlapping=r.multiCursorMergeOverlapping,this.autoClosingBrackets=r.autoClosingBrackets,this.autoClosingQuotes=r.autoClosingQuotes,this.autoSurround=r.autoSurround,this.autoIndent=r.autoIndent,this.autoClosingPairsOpen={},this.autoClosingPairsClose={},this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:e._getShouldAutoClose(t,this.autoClosingQuotes),bracket:e._getShouldAutoClose(t,this.autoClosingBrackets)};var s=e._getAutoClosingPairs(t);if(s)for(var a=0;a=i.length)&&r.t(i.charCodeAt(n))},e.isHighSurrogate=function(e,t,n){var i=e.getLineContent(t);return!(n<0||n>=i.length)&&r.s(i.charCodeAt(n))},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2)},e.visibleColumnFromColumn=function(e,t,n){var i=e.length;i>t-1&&(i=t-1);for(var o=0,s=0;s=t){return u-ts?s:o},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}()},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return u}),n.d(t,"c",function(){return l});var i=n(20),o=n(104),r=n(7),s=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=function(){function e(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);var t=o.a.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}return e.prototype.preventDefault=function(){this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}(),u=function(e){function t(t){var n=e.call(this,t)||this;return n.dataTransfer=t.dataTransfer,n}return s(t,e),t}(a),l=function(){function e(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=n,this.deltaX=t,e){var o=e,s=e;void 0!==o.wheelDeltaY?this.deltaY=o.wheelDeltaY/120:void 0!==s.VERTICAL_AXIS&&s.axis===s.VERTICAL_AXIS&&(this.deltaY=-s.detail/3),void 0!==o.wheelDeltaX?i.m&&r.g?this.deltaX=-o.wheelDeltaX/120:this.deltaX=o.wheelDeltaX/120:void 0!==s.HORIZONTAL_AXIS&&s.axis===s.HORIZONTAL_AXIS&&(this.deltaX=-e.detail/3),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}()},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return u});var i=n(0),o=n(17),r=n(5),s=n(102),a=Object(r.c)("commandService"),u=new(function(){function e(){this._commands=new Map}return e.prototype.registerCommand=function(e,t){var n=this;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.description){for(var r=[],a=0,u=e.description.args;a=2?(S=v?2:4,k=2/y):(S=v?1:3,k=1/y),x=Math.max(0,Math.floor((M-d-2)*k/(l+k)));x/k>_&&(x=Math.floor(_*k)),I=M-x,"left"===m?(L=0,N+=x,D+=x,O+=x,E+=x):L=t-x-d}else L=0,x=0,S=0,I=M;var T=Math.max(1,Math.floor((I-d-2)/l)),A=h?f:0;return{width:t,height:n,glyphMarginLeft:N,glyphMarginWidth:w,glyphMarginHeight:n,lineNumbersLeft:D,lineNumbersWidth:b,lineNumbersHeight:n,decorationsLeft:O,decorationsWidth:u,decorationsHeight:n,contentLeft:E,contentWidth:I,contentHeight:n,renderMinimap:S,minimapLeft:L,minimapWidth:x,viewportColumn:T,verticalScrollbarWidth:d,horizontalScrollbarHeight:p,overviewRuler:{top:A,width:d,height:n-2*A,right:0}}},e}(),I={fontFamily:y.d?"Menlo, Monaco, 'Courier New', monospace":y.c?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:y.d?12:14,lineHeight:0,letterSpacing:0},N={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},D={inDiffEditor:!1,wordSeparators:b.b,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:1,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:"languageDefined",autoClosingQuotes:"languageDefined",autoSurround:"languageDefined",autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,copyWithSyntaxHighlighting:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:m.a("editorViewAccessibleLabel","Editor content"),renderLineNumbers:1,renderCustomLineNumbers:null,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:1,mouseWheelZoom:!1,cursorStyle:g.Line,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderIndentGuides:!0,highlightActiveIndentGuide:!0,renderLineHighlight:"line",scrollbar:{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},fixedOverflowWidgets:!1},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,sticky:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:{enabled:!0,cycle:!1},iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!0,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,tabCompletion:"off",suggest:{filterGraceful:!0,snippets:"inline",snippetsPreventQuickSuggestions:!0,localityBonus:!1},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1},colorDecorators:!0,lightbulbEnabled:!0,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}}},function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]}function o(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var i=0,o=e.length;ii?e[u]=r[a++]:a>o?e[u]=r[s++]:t(r[a],r[s])<0?e[u]=r[a++]:e[u]=r[s++]}function a(e,t,n,i,o){if(!(i<=n)){var r=n+(i-n)/2|0;a(e,t,n,r,o),a(e,t,r+1,i,o),t(e[r],e[r+1])<=0||s(e,t,n,r,i,o)}}function u(e){return!Array.isArray(e)||0===e.length}function l(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n=Object.create(null);return e.filter(function(e){var i=t(e);return!n[i]&&(n[i]=!0,!0)})}function c(e,t){for(var n=0;n=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=C[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function s(e){for(var t=void 0,n=0;n1&&"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)?e.path[1].toLowerCase()+e.path.substr(2):e.path,c.g&&(t=t.replace(/\//g,"\\")),t}function u(e,t){var n=t?s:r,i="",o=e.scheme,a=e.authority,u=e.path,l=e.query,c=e.fragment;if(o&&(i+=o,i+=":"),(a||"file"===o)&&(i+=v,i+=v),a){var d=a.indexOf("@");if(-1!==d){var h=a.substr(0,d);a=a.substr(d+1),d=h.indexOf(":"),-1===d?i+=n(h,!1):(i+=n(h.substr(0,d),!1),i+=":",i+=n(h.substr(d+1),!1)),i+="@"}a=a.toLowerCase(),d=a.indexOf(":"),-1===d?i+=n(a,!1):(i+=n(a.substr(0,d),!1),i+=a.substr(d))}if(u){if(u.length>=3&&47===u.charCodeAt(0)&&58===u.charCodeAt(2)){var f=u.charCodeAt(1);f>=65&&f<=90&&(u="/"+String.fromCharCode(f+32)+":"+u.substr(3))}else if(u.length>=2&&58===u.charCodeAt(1)){var f=u.charCodeAt(0);f>=65&&f<=90&&(u=String.fromCharCode(f+32)+":"+u.substr(2))}i+=n(u,!0)}return l&&(i+="?",i+=n(l,!1)),c&&(i+="#",i+=t?c:r(c,!1)),i}n.d(t,"a",function(){return y});var l,c=n(7),d=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),h=/^\w[\w\d+.-]*$/,f=/^\//,p=/^\/\//,g=!0,m="",v="/",_=/^(([^:\/?#]+?):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,y=function(){function e(e,t,n,r,s){"object"==typeof e?(this.scheme=e.scheme||m,this.authority=e.authority||m,this.path=e.path||m,this.query=e.query||m,this.fragment=e.fragment||m):(this.scheme=e||m,this.authority=t||m,this.path=o(this.scheme,n||m),this.query=r||m,this.fragment=s||m,i(this))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return a(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=m),void 0===n?n=this.authority:null===n&&(n=m),void 0===i?i=this.path:null===i&&(i=m),void 0===o?o=this.query:null===o&&(o=m),void 0===r?r=this.fragment:null===r&&(r=m),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new b(t,n,i,o,r)},e.parse=function(e){var t=_.exec(e);return t?new b(t[2]||m,decodeURIComponent(t[4]||m),decodeURIComponent(t[5]||m),decodeURIComponent(t[7]||m),decodeURIComponent(t[9]||m)):new b(m,m,m,m,m)},e.file=function(e){var t=m;if(c.g&&(e=e.replace(/\\/g,v)),e[0]===v&&e[1]===v){var n=e.indexOf(v,2);-1===n?(t=e.substring(2),e=v):(t=e.substring(2,n),e=e.substring(n)||v)}return new b("file",t,e,m,m)},e.from=function(e){return new b(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),u(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new b(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}(),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return d(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=a(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?u(this,!0):(this._formatted||(this._formatted=u(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),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},t}(y),C=(l={},l[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l)},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(5),o=Object(i.c)("codeEditorService")},function(e,t,n){"use strict";function i(e,t,n,i,o){return h.registerColor(e,t,n,i,o)}function o(e,t){return function(n){var i=s(e,n);return i?i.transparent(t):null}}function r(e,t,n,i){return function(o){var r=s(e,o);if(r){var a=s(t,o);return a?r.isDarkerThan(a)?u.a.getLighterColor(r,a,n).transparent(i):u.a.getDarkerColor(r,a,n).transparent(i):r.transparent(n*i)}return null}}function s(e,t){return null===e?null:"string"==typeof e?"#"===e[0]?u.a.fromHex(e):t.getColor(e):e instanceof u.a?e:"function"==typeof e?e(t):null}n.d(t,"a",function(){return c}),t.Z=i,n.d(t,"s",function(){return f}),n.d(t,"e",function(){return g}),n.d(t,"b",function(){return m}),n.d(t,"_4",function(){return v}),n.d(t,"t",function(){return _}),n.d(t,"v",function(){return y}),n.d(t,"u",function(){return b}),n.d(t,"z",function(){return C}),n.d(t,"B",function(){return w}),n.d(t,"A",function(){return S}),n.d(t,"C",function(){return L}),n.d(t,"E",function(){return x}),n.d(t,"D",function(){return I}),n.d(t,"w",function(){return N}),n.d(t,"y",function(){return D}),n.d(t,"x",function(){return O}),n.d(t,"I",function(){return k}),n.d(t,"J",function(){return T}),n.d(t,"F",function(){return A}),n.d(t,"G",function(){return R}),n.d(t,"N",function(){return P}),n.d(t,"O",function(){return W}),n.d(t,"M",function(){return F}),n.d(t,"K",function(){return H}),n.d(t,"L",function(){return j}),n.d(t,"H",function(){return V}),n.d(t,"X",function(){return z}),n.d(t,"W",function(){return B}),n.d(t,"c",function(){return U}),n.d(t,"d",function(){return K}),n.d(t,"_0",function(){return G}),n.d(t,"_2",function(){return Z}),n.d(t,"_3",function(){return q}),n.d(t,"_1",function(){return Y}),n.d(t,"Y",function(){return J}),n.d(t,"Q",function(){return Q}),n.d(t,"R",function(){return X}),n.d(t,"P",function(){return $}),n.d(t,"U",function(){return ee}),n.d(t,"S",function(){return te}),n.d(t,"T",function(){return ne}),n.d(t,"V",function(){return ie}),n.d(t,"m",function(){return oe}),n.d(t,"n",function(){return re}),n.d(t,"p",function(){return ue}),n.d(t,"q",function(){return le}),n.d(t,"o",function(){return ce}),n.d(t,"r",function(){return de}),n.d(t,"f",function(){return he}),n.d(t,"g",function(){return fe}),n.d(t,"i",function(){return pe}),n.d(t,"k",function(){return ge}),n.d(t,"j",function(){return me}),n.d(t,"l",function(){return ve}),n.d(t,"h",function(){return _e});var a=n(21),u=n(43),l=n(11),c={ColorContribution:"base.contributions.colors"},d=function(){function e(){this.colorSchema={type:"object",description:l.a("schema.colors","Colors used in the workbench."),properties:{},additionalProperties:!1},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}return e.prototype.registerColor=function(e,t,n,i,o){void 0===i&&(i=!1);var r={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:o};this.colorsById[e]=r;var s={type:"string",description:n,format:"color-hex",default:"#ff0000"};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),e},e.prototype.resolveDefaultColor=function(e,t){var n=this.colorsById[e];if(n&&n.defaults){return s(n.defaults[t.type],t)}return null},e.prototype.toString=function(){var e=this,t=function(e,t){var n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)};return Object.keys(this.colorsById).sort(t).map(function(t){return"- `"+t+"`: "+e.colorsById[t].description}).join("\n")},e}(),h=new d;a.a.add(c.ColorContribution,h);var f=i("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},l.a("foreground","Overall foreground color. This color is only used if not overridden by a component.")),p=(i("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},l.a("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),i("focusBorder",{dark:u.a.fromHex("#0E639C").transparent(.8),light:u.a.fromHex("#007ACC").transparent(.4),hc:"#F38518"},l.a("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component."))),g=i("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},l.a("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),m=i("contrastActiveBorder",{light:null,dark:null,hc:p},l.a("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),v=(i("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},l.a("textLinkForeground","Foreground color for links in text.")),i("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:u.a.black},l.a("textCodeBlockBackground","Background color for code blocks in text.")),i("widget.shadow",{dark:"#000000",light:"#A8A8A8",hc:null},l.a("widgetShadow","Shadow color of widgets such as find/replace inside the editor."))),_=i("input.background",{dark:"#3C3C3C",light:u.a.white,hc:u.a.black},l.a("inputBoxBackground","Input box background.")),y=i("input.foreground",{dark:f,light:f,hc:f},l.a("inputBoxForeground","Input box foreground.")),b=i("input.border",{dark:null,light:null,hc:g},l.a("inputBoxBorder","Input box border.")),C=(i("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hc:m},l.a("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),i("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:u.a.black},l.a("inputValidationInfoBackground","Input validation background color for information severity."))),w=i("inputValidation.infoForeground",{dark:null,light:null,hc:null},l.a("inputValidationInfoForeground","Input validation foreground color for information severity.")),S=i("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:g},l.a("inputValidationInfoBorder","Input validation border color for information severity.")),L=i("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:u.a.black},l.a("inputValidationWarningBackground","Input validation background color for warning severity.")),x=i("inputValidation.warningForeground",{dark:null,light:null,hc:null},l.a("inputValidationWarningForeground","Input validation foreground color for warning severity.")),I=i("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:g},l.a("inputValidationWarningBorder","Input validation border color for warning severity.")),N=i("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:u.a.black},l.a("inputValidationErrorBackground","Input validation background color for error severity.")),D=i("inputValidation.errorForeground",{dark:null,light:null,hc:null},l.a("inputValidationErrorForeground","Input validation foreground color for error severity.")),O=i("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:g},l.a("inputValidationErrorBorder","Input validation border color for error severity.")),E=i("dropdown.background",{dark:"#3C3C3C",light:u.a.white,hc:u.a.black},l.a("dropdownBackground","Dropdown background.")),M=i("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:u.a.white},l.a("dropdownForeground","Dropdown foreground.")),k=i("list.focusBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},l.a("listFocusBackground","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.")),T=i("list.focusForeground",{dark:null,light:null,hc:null},l.a("listFocusForeground","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.")),A=i("list.activeSelectionBackground",{dark:"#094771",light:"#2477CE",hc:null},l.a("listActiveSelectionBackground","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.")),R=i("list.activeSelectionForeground",{dark:u.a.white,light:u.a.white,hc:null},l.a("listActiveSelectionForeground","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.")),P=i("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},l.a("listInactiveSelectionBackground","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.")),W=i("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},l.a("listInactiveSelectionForeground","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.")),F=i("list.inactiveFocusBackground",{dark:"#313135",light:"#d8dae6",hc:null},l.a("listInactiveFocusBackground","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.")),H=i("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},l.a("listHoverBackground","List/Tree background when hovering over items using the mouse.")),j=i("list.hoverForeground",{dark:null,light:null,hc:null},l.a("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),V=i("list.dropBackground",{dark:k,light:k,hc:null},l.a("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),z=(i("list.highlightForeground",{dark:"#0097fb",light:"#0066BF",hc:p},l.a("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),i("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:u.a.white},l.a("pickerGroupForeground","Quick picker color for grouping labels."))),B=i("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:u.a.white},l.a("pickerGroupBorder","Quick picker color for grouping borders.")),U=i("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:u.a.black},l.a("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),K=i("badge.foreground",{dark:u.a.white,light:"#333",hc:u.a.white},l.a("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),G=i("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},l.a("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),Z=i("scrollbarSlider.background",{dark:u.a.fromHex("#797979").transparent(.4),light:u.a.fromHex("#646464").transparent(.4),hc:o(g,.6)},l.a("scrollbarSliderBackground","Scrollbar slider background color.")),q=i("scrollbarSlider.hoverBackground",{dark:u.a.fromHex("#646464").transparent(.7),light:u.a.fromHex("#646464").transparent(.7),hc:o(g,.8)},l.a("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),Y=i("scrollbarSlider.activeBackground",{dark:u.a.fromHex("#BFBFBF").transparent(.4),light:u.a.fromHex("#000000").transparent(.6),hc:g},l.a("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),J=i("progressBar.background",{dark:u.a.fromHex("#0E70C0"),light:u.a.fromHex("#0E70C0"),hc:g},l.a("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Q=i("menu.border",{dark:null,light:null,hc:g},l.a("menuBorder","Border color of menus.")),X=i("menu.foreground",{dark:M,light:M,hc:M},l.a("menuForeground","Foreground color of menu items.")),$=i("menu.background",{dark:E,light:E,hc:E},l.a("menuBackground","Background color of menu items.")),ee=i("menu.selectionForeground",{dark:R,light:R,hc:R},l.a("menuSelectionForeground","Foreground color of the selected menu item in menus.")),te=i("menu.selectionBackground",{dark:A,light:A,hc:A},l.a("menuSelectionBackground","Background color of the selected menu item in menus.")),ne=i("menu.selectionBorder",{dark:null,light:null,hc:m},l.a("menuSelectionBorder","Border color of the selected menu item in menus.")),ie=i("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:g},l.a("menuSeparatorBackground","Color of a separator menu item in menus.")),oe=i("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:u.a.black},l.a("editorBackground","Editor background color.")),re=i("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:u.a.white},l.a("editorForeground","Editor default foreground color.")),se=i("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},l.a("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),ae=i("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:g},l.a("editorWidgetBorder","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.")),ue=(i("editorWidget.resizeBorder",{light:null,dark:null,hc:null},l.a("editorWidgetResizeBorder","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.")),i("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},l.a("editorSelectionBackground","Color of the editor selection."))),le=i("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},l.a("editorSelectionForeground","Color of the selected text for high contrast.")),ce=i("editor.inactiveSelectionBackground",{light:o(ue,.5),dark:o(ue,.5),hc:o(ue,.5)},l.a("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque to not hide underlying decorations."),!0),de=i("editor.selectionHighlightBackground",{light:r(ue,oe,.3,.6),dark:r(ue,oe,.3,.6),hc:null},l.a("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque to not hide underlying decorations."),!0),he=(i("editor.selectionHighlightBorder",{light:null,dark:null,hc:m},l.a("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),i("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},l.a("editorFindMatch","Color of the current search match.")),i("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},l.a("findMatchHighlight","Color of the other search matches. The color must not be opaque to not hide underlying decorations."),!0),i("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},l.a("findRangeHighlight","Color of the range limiting the search. The color must not be opaque to not hide underlying decorations."),!0),i("editor.findMatchBorder",{light:null,dark:null,hc:m},l.a("editorFindMatchBorder","Border color of the current search match.")),i("editor.findMatchHighlightBorder",{light:null,dark:null,hc:m},l.a("findMatchHighlightBorder","Border color of the other search matches.")),i("editor.findRangeHighlightBorder",{dark:null,light:null,hc:o(m,.4)},l.a("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque to not hide underlying decorations."),!0),i("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},l.a("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque to not hide underlying decorations."),!0),i("editorHoverWidget.background",{light:se,dark:se,hc:se},l.a("hoverBackground","Background color of the editor hover.")),i("editorHoverWidget.border",{light:ae,dark:ae,hc:ae},l.a("hoverBorder","Border color of the editor hover.")),i("editorLink.activeForeground",{dark:"#4E94CE",light:u.a.blue,hc:u.a.cyan},l.a("activeLinkForeground","Color of active links.")),new u.a(new u.b(155,185,85,.2))),fe=new u.a(new u.b(255,0,0,.2)),pe=i("diffEditor.insertedTextBackground",{dark:he,light:he,hc:null},l.a("diffEditorInserted","Background color for text that got inserted. The color must not be opaque to not hide underlying decorations."),!0),ge=i("diffEditor.removedTextBackground",{dark:fe,light:fe,hc:null},l.a("diffEditorRemoved","Background color for text that got removed. The color must not be opaque to not hide underlying decorations."),!0),me=i("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},l.a("diffEditorInsertedOutline","Outline color for the text that got inserted.")),ve=i("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},l.a("diffEditorRemovedOutline","Outline color for text that got removed.")),_e=i("diffEditor.border",{dark:null,light:null,hc:g},l.a("diffEditorBorder","Border color between the two text editors.")),ye=(i("editor.snippetTabstopHighlightBackground",{dark:new u.a(new u.b(124,124,124,.3)),light:new u.a(new u.b(10,50,100,.2)),hc:new u.a(new u.b(124,124,124,.3))},l.a("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),i("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},l.a("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),i("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},l.a("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),i("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new u.a(new u.b(10,50,100,.5)),hc:"#525252"},l.a("snippetFinalTabstopHighlightBorder","Highlight border color of the final stabstop of a snippet.")),new u.a(new u.b(246,185,77,.7)));i("editorOverviewRuler.findMatchForeground",{dark:ye,light:ye,hc:ye},l.a("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque to not hide underlying decorations."),!0),i("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},l.a("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque to not hide underlying decorations."),!0)},function(e,t,n){"use strict";function i(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){e[n]&&"object"==typeof e[n]?t[n]=i(e[n]):t[n]=e[n]}),t}function o(e){if(!e||"object"!=typeof e)return e;for(var t=[e];t.length>0;){var n=t.shift();Object.freeze(n);for(var i in n)if(c.call(n,i)){var o=n[i];"object"!=typeof o||Object.isFrozen(o)||t.push(o)}}return e}function r(e,t,n){return void 0===n&&(n=!0),Object(l.f)(e)?(Object(l.f)(t)&&Object.keys(t).forEach(function(i){i in e?n&&(Object(l.f)(e[i])&&Object(l.f)(t[i])?r(e[i],t[i],n):e[i]=t[i]):e[i]=t[i]}),e):t}function s(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===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;var n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n"),r}function s(e,n){return r(t,e,n)}function a(e){var t,n,o=c.uninitialized;return{setName:function(e){t=e},get:function(){switch(o){case c.initialized:return n;case c.uninitialized:o=c.working;try{i("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{i("WinJS.Namespace._lazy:"+t+",StopTM"),o=c.uninitialized}return e=null,o=c.initialized,n;case c.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(o){case c.working:throw"Illegal: reentrancy on initialization";default:o=c.initialized,n=e}},enumerable:!0,configurable:!0}}function u(e,i,r){var s=[e],a=null;return i&&(a=n(t,i),s.push(a)),o(s,r,i||""),a}var l=e;l.Namespace||(l.Namespace=Object.create(Object.prototype));var c={uninitialized:1,working:2,initialized:3};Object.defineProperties(l.Namespace,{defineWithParent:{value:r,writable:!0,enumerable:!0,configurable:!0},define:{value:s,writable:!0,enumerable:!0,configurable:!0},_lazy:{value:a,writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:u,writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,i){return e=e||function(){},n.markSupportedForProcessing(e),t&&o(e.prototype,t),i&&o(e,i),e}function i(e,i,r,s){if(e){i=i||function(){};var a=e.prototype;return i.prototype=Object.create(a),n.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),r&&o(i.prototype,r),s&&o(i,s),i}return t(i,r,s)}function r(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t>>0)>>>0}function o(e,t){if(0===e)return null;var n=(65535&e)>>>0,i=(4294901760&e)>>>16;return 0!==i?new h(r(n,t),r(i,t)):r(n,t)}function r(e,t){var n=!!(2048&e),i=!!(256&e);return new d(2===t?i:n,!!(1024&e),!!(512&e),2===t?n:i,255&e)}n.d(t,"b",function(){return c}),t.a=i,t.f=o,n.d(t,"e",function(){return d}),n.d(t,"d",function(){return f}),n.d(t,"c",function(){return p});var s=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e]},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0},e}(),a=new s,u=new s,l=new s;!function(){function e(e,t,n,i){void 0===n&&(n=t),void 0===i&&(i=n),a.define(e,t),u.define(e,n),l.define(e,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}();var c;!function(e){function t(e){return a.keyCodeToStr(e)}function n(e){return a.strToKeyCode(e)}function i(e){return u.keyCodeToStr(e)}function o(e){return l.keyCodeToStr(e)}function r(e){return u.strToKeyCode(e)||l.strToKeyCode(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=i,e.toUserSettingsGeneral=o,e.fromUserSettings=r}(c||(c={}));var d=function(){function e(e,t,n,i,o){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=o}return e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}(),h=function(){function e(e,t){this.type=2,this.firstPart=e,this.chordPart=t}return e}(),f=function(){function e(e,t,n,i,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=o,this.keyAriaLabel=r}return e}(),p=function(){function e(){}return e}()},function(e,t,n){"use strict";function i(e){return e&&"string"==typeof e.id}t.c=i,n.d(t,"a",function(){return o}),n.d(t,"b",function(){return r});var o={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},r={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",Type:"type",ReplacePreviousChar:"replacePreviousChar",CompositionStart:"compositionStart",CompositionEnd:"compositionEnd",Paste:"paste",Cut:"cut",Undo:"undo",Redo:"redo"}},function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"d",function(){return o}),n.d(t,"b",function(){return r}),n.d(t,"a",function(){return s});var i;!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(i||(i={}));var o=function(){function e(e){this.tabSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}return e.prototype.equals=function(e){return this.tabSize===e.tabSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace},e.prototype.createChangeEvent=function(e){return{tabSize:this.tabSize!==e.tabSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}},e}(),r=function(){function e(e,t){this.range=e,this.matches=t}return e}(),s=function(){function e(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n}return e}()},function(e,t,n){"use strict";function i(e,t,n,i){return new r.b([new r.a(i,"",e)],n)}function o(e,t,n,i){var o=new Uint32Array(2);return o[0]=i,o[1]=(16384|e<<0|2<<23)>>>0,new r.c(o,null===n?u:n)}n.d(t,"c",function(){return u}),n.d(t,"b",function(){return l}),n.d(t,"a",function(){return c}),t.d=i,t.e=o;var r=n(56),s=n(15),a=function(){function e(){}return e.prototype.clone=function(){return this},e.prototype.equals=function(e){return this===e},e}(),u=new a,l="vs.editor.nullMode",c=new s.n(l,0)},function(e,t,n){"use strict";n.d(t,"a",function(){return _});var i=n(13),o=n(1),r=n(0),s=n(3),a=n(2),u=n(55),l=n(48),c=n(76),d=n(156),h=n(157),f=n(158),p=n(159),g=n(77),m=function(){function e(t,n,i){this._languageIdentifier=t,this._brackets=null,this._electricCharacter=null;var o=null;n&&(o=n._conf),this._conf=e._mergeConf(o,i),this.onEnter=e._handleOnEnter(this._conf),this.comments=e._handleComments(this._conf),this.characterPair=new d.a(this._conf),this.wordDefinition=this._conf.wordPattern||u.a,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules&&(this.indentRulesSupport=new f.a(this._conf.indentationRules)),this.foldingRules=this._conf.folding||{}}return Object.defineProperty(e.prototype,"brackets",{get:function(){return!this._brackets&&this._conf.brackets&&(this._brackets=new g.b(this._languageIdentifier,this._conf.brackets)),this._brackets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"electricCharacter",{get:function(){if(!this._electricCharacter){var e=[];this._conf.autoClosingPairs?e=this._conf.autoClosingPairs:this._conf.brackets&&(e=this._conf.brackets.map(function(e){return{open:e[0],close:e[1]}})),this._electricCharacter=new h.a(this.brackets,e,this._conf.__electricCharacterSupport)}return this._electricCharacter},enumerable:!0,configurable:!0}),e._mergeConf=function(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,autoCloseBefore:e?t.autoCloseBefore||e.autoCloseBefore:t.autoCloseBefore,folding:e?t.folding||e.folding:t.folding,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}},e._handleOnEnter=function(e){var t={},n=!0;return e.brackets&&(n=!1,t.brackets=e.brackets),e.indentationRules&&(n=!1),e.onEnterRules&&(n=!1,t.regExpRules=e.onEnterRules),n?null:new p.a(t)},e._handleComments=function(e){var t=e.comments;if(!t)return null;var n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){var i=t.blockComment,o=i[0],r=i[1];n.blockCommentStartToken=o,n.blockCommentEndToken=r}return n},e}(),v=(function(){function e(){}}(),function(){function e(){this._onDidChange=new o.a,this.onDidChange=this._onDidChange.event,this._entries=[]}return e.prototype.register=function(e,t){var n=this,i=this._getRichEditSupport(e.id),o=new m(e,i,t);return this._entries[e.id]=o,this._onDidChange.fire({languageIdentifier:e}),Object(r.e)(function(){n._entries[e.id]===o&&(n._entries[e.id]=i,n._onDidChange.fire({languageIdentifier:e}))})},e.prototype._getRichEditSupport=function(e){return this._entries[e]||null},e.prototype._getElectricCharacterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.electricCharacter||null:null},e.prototype.getElectricCharacters=function(e){var t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]},e.prototype.onElectricCharacter=function(e,t,n){var i=Object(c.a)(t,n-1),o=this._getElectricCharacterSupport(i.languageId);return o?o.onElectricCharacter(e,i,n-i.firstCharOffset):null},e.prototype.getComments=function(e){var t=this._getRichEditSupport(e);return t?t.comments||null:null},e.prototype._getCharacterPairSupport=function(e){var t=this._getRichEditSupport(e);return t?t.characterPair||null:null},e.prototype.getAutoClosingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]},e.prototype.getAutoCloseBeforeSet=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():d.a.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED},e.prototype.getSurroundingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]},e.prototype.shouldAutoClosePair=function(e,t,n){var i=Object(c.a)(t,n-1),o=this._getCharacterPairSupport(i.languageId);return!!o&&o.shouldAutoClosePair(e,i,n-i.firstCharOffset)},e.prototype.getWordDefinition=function(e){var t=this._getRichEditSupport(e);return t?Object(u.c)(t.wordDefinition||null):Object(u.c)(null)},e.prototype.getFoldingRules=function(e){var t=this._getRichEditSupport(e);return t?t.foldingRules:{}},e.prototype.getIndentRulesSupport=function(e){var t=this._getRichEditSupport(e);return t?t.indentRulesSupport||null:null},e.prototype.getPrecedingValidLine=function(e,t,n){var i=e.getLanguageIdAtPosition(t,0);if(t>1){var o=t-1,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);{if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n){void 0===n&&(n=!0);var i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!i)return null;if(t<=1)return{indentation:"",action:null};var o=this.getPrecedingValidLine(e,t,i);if(o<0)return null;if(o<1)return{indentation:"",action:null};var r=e.getLineContent(o);if(i.shouldIncrease(r)||i.shouldIndentNextLine(r))return{indentation:s.o(r),action:l.a.Indent,line:o};if(i.shouldDecrease(r))return{indentation:s.o(r),action:null,line:o};if(1===o)return{indentation:s.o(e.getLineContent(o)),action:null,line:o};var a=o-1,u=i.getIndentMetadata(e.getLineContent(a));if(!(3&u)&&4&u){for(var c=0,d=a-1;d>0;d--)if(!i.shouldIndentNextLine(e.getLineContent(d))){c=d;break}return{indentation:s.o(e.getLineContent(c+1)),action:null,line:c+1}}if(n)return{indentation:s.o(e.getLineContent(o)),action:null,line:o};for(var d=o;d>0;d--){var h=e.getLineContent(d);if(i.shouldIncrease(h))return{indentation:s.o(h),action:l.a.Indent,line:d};if(i.shouldIndentNextLine(h)){for(var c=0,f=d-1;f>0;f--)if(!i.shouldIndentNextLine(e.getLineContent(d))){c=f;break}return{indentation:s.o(e.getLineContent(c+1)),action:null,line:c+1}}if(i.shouldDecrease(h))return{indentation:s.o(h),action:null,line:d}}return{indentation:s.o(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,o){var r=this.getIndentRulesSupport(t);if(!r)return null;var a=this.getInheritIndentForLine(e,n),u=e.getLineContent(n);if(a){var c=a.line;if(void 0!==c){var d=this._getOnEnterSupport(t),h=null;try{d&&(h=d.onEnter("",e.getLineContent(c),""))}catch(e){Object(i.d)(e)}if(h){var f=s.o(e.getLineContent(c));return h.removeText&&(f=f.substring(0,f.length-h.removeText)),h.indentAction===l.a.Indent||h.indentAction===l.a.IndentOutdent?f=o.shiftIndent(f):h.indentAction===l.a.Outdent&&(f=o.unshiftIndent(f)),r.shouldDecrease(u)&&(f=o.unshiftIndent(f)),h.appendText&&(f+=h.appendText),s.o(f)}}return r.shouldDecrease(u)?a.action===l.a.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===l.a.Indent?o.shiftIndent(a.indentation):a.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){e.forceTokenization(t.startLineNumber);var o,r,a=e.getLineTokens(t.startLineNumber),u=Object(c.a)(a,t.startColumn-1),d=u.getLineContent(),h=!1;if(u.firstCharOffset>0&&a.getLanguageId(0)!==u.languageId?(h=!0,o=d.substr(0,t.startColumn-1-u.firstCharOffset)):o=a.getLineContent().substring(0,t.startColumn-1),t.isEmpty())r=d.substr(t.startColumn-1-u.firstCharOffset);else{r=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-u.firstCharOffset)}var f=this.getIndentRulesSupport(u.languageId);if(!f)return null;var p=o,g=s.o(o);if(!i&&!h){var m=this.getInheritIndentForLine(e,t.startLineNumber);f.shouldDecrease(o)&&m&&(g=m.indentation,m.action!==l.a.Indent&&(g=n.unshiftIndent(g))),p=g+s.x(s.x(o," "),"\t")}var v={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,n){return e.getLanguageIdAtPosition(t,n)},getLineContent:function(n){return n===t.startLineNumber?p:e.getLineContent(n)}},_=s.o(a.getLineContent()),y=this.getInheritIndentForLine(v,t.startLineNumber+1);if(!y){var b=h?_:g;return{beforeEnter:b,afterEnter:b}}var C=h?_:y.indentation;return y.action===l.a.Indent&&(C=n.shiftIndent(C)),f.shouldDecrease(r)&&(C=n.unshiftIndent(C)),{beforeEnter:h?_:g,afterEnter:C}},e.prototype.getIndentActionForType=function(e,t,n,i){var o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this.getIndentRulesSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),u=a.substr(0,t.startColumn-1-o.firstCharOffset);if(t.isEmpty())s=a.substr(t.startColumn-1-o.firstCharOffset);else{s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset)}if(!r.shouldDecrease(u+s)&&r.shouldDecrease(u+n+s)){var c=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!c)return null;var d=c.indentation;return c.action!==l.a.Indent&&(d=i.unshiftIndent(d)),d}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null},e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.onEnter||null:null},e.prototype.getRawEnterActionAtPosition=function(e,t,n){var i=this.getEnterAction(e,new a.a(t,n,t,n));return i?i.enterAction:null},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this._getOnEnterSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),u=a.substr(0,t.startColumn-1-o.firstCharOffset);if(t.isEmpty())s=a.substr(t.startColumn-1-o.firstCharOffset);else{s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset)}var c=t.startLineNumber,d="";if(c>1&&0===o.firstCharOffset){var h=this.getScopedLineTokens(e,c-1);h.languageId===o.languageId&&(d=h.getLineContent())}var f=null;try{f=r.onEnter(d,u,s)}catch(e){Object(i.d)(e)}return f?(f.appendText||(f.indentAction===l.a.Indent||f.indentAction===l.a.IndentOutdent?f.appendText="\t":f.appendText=""),f.removeText&&(n=n.substring(0,n.length-f.removeText)),{enterAction:f,indentation:n}):null},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=s.o(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=void 0===n?e.getLineMaxColumn(t)-1:n-1;return Object(c.a)(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t?t.brackets||null:null},e}()),_=new v},function(e,t,n){"use strict";n.d(t,"f",function(){return o}),n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"d",function(){return a}),n.d(t,"a",function(){return u}),n.d(t,"e",function(){return l});var i=n(3),o=function(){function e(e,t,n,i){this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i}return e}(),r=function(){function e(e,t){this.tabSize=e,this.data=t}return e}(),s=function(){function e(e,t,n,i,o){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=n,this.maxColumn=i,this.tokens=o}return e}(),a=function(){function e(t,n,i,o,r,s,a,u,l){this.minColumn=t,this.maxColumn=n,this.content=i,this.continuesWithWrappedLine=o,this.isBasicASCII=e.isBasicASCII(i,s),this.containsRTL=e.containsRTL(i,this.isBasicASCII,r),this.tokens=a,this.inlineDecorations=u,this.tabSize=l}return e.isBasicASCII=function(e,t){return!t||i.p(e)},e.containsRTL=function(e,t,n){return!(t||!n)&&i.f(e)},e}(),u=function(){function e(e,t,n){this.range=e,this.inlineClassName=t,this.type=n}return e}(),l=function(){function e(e,t){this.range=e,this.options=t}return e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return s});var i=n(85),o=n(5),r=(i.a,Object(o.c)("notificationService")),s=function(){function e(){}return e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var i=n(20),o=n(1),r=n(0),s=n(7),a=n(184),u=n(185),l=n(110),c=n(74),d=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),h=function(){function e(){this._keys=Object.create(null),this._values=Object.create(null)}return e.prototype.has=function(e){var t=e.getId();return!!this._values[t]},e.prototype.get=function(e){var t=e.getId();return this._values[t]},e.prototype.put=function(e,t){var n=e.getId();this._keys[n]=e,this._values[n]=t},e.prototype.remove=function(e){var t=e.getId();delete this._keys[t],delete this._values[t]},e.prototype.getValues=function(){var e=this;return Object.keys(this._keys).map(function(t){return e._values[t]})},e}(),f=function(e){function t(){var t=e.call(this)||this;return t._onDidChange=t._register(new o.a),t.onDidChange=t._onDidChange.event,t._cache=new h,t._evictUntrustedReadingsTimeout=-1,t}return d(t,e),t.prototype.dispose=function(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),e.prototype.dispose.call(this)},t.prototype._writeToCache=function(e,t){var n=this;this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout(function(){n._evictUntrustedReadingsTimeout=-1,n._evictUntrustedReadings()},5e3))},t.prototype._evictUntrustedReadings=function(){for(var e=this._cache.getValues(),t=!1,n=0,i=e.length;n.001){w=!1;break}}var N=!0;w&&b.width!==S&&(N=!1),b.width>y.width&&(N=!1);var D=i.c()>2e3;return new c.b({zoomLevel:i.d(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:w,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:s.width,maxDigitWidth:C},D)},t.INSTANCE=new t,t}(r.a),p=function(e){function t(t,n){void 0===n&&(n=null);var o=e.call(this,t)||this;return o._elementSizeObserver=o._register(new u.a(n,function(){return o._onReferenceDomElementSizeChanged()})),o._register(f.INSTANCE.onDidChange(function(){return o._onCSSBasedConfigurationChanged()})),o._validatedOptions.automaticLayout&&o._elementSizeObserver.startObserving(),o._register(i.p(function(e){return o._recomputeOptions()})),o._register(i.o(function(){return o._recomputeOptions()})),o._recomputeOptions(),o}return d(t,e),t.applyFontInfoSlow=function(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"},t.applyFontInfo=function(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)},t.prototype._onReferenceDomElementSizeChanged=function(){this._recomputeOptions()},t.prototype._onCSSBasedConfigurationChanged=function(){this._recomputeOptions()},t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getExtraEditorClassName=function(){var e="";return i.k?e+="ie ":i.j?e+="ff ":i.g?e+="edge ":i.m&&(e+="safari "),s.d&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:i.n||i.j,pixelRatio:i.b(),zoomLevel:i.d(),accessibilitySupport:i.a()}},t.prototype.readConfiguration=function(e){return f.INSTANCE.readConfiguration(e)},t}(l.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(52),o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(i.a)},function(e,t,n){"use strict";function i(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,"b",function(){return o}),n.d(t,"a",function(){return a});var o=function(){function e(e,t,n,o){void 0===o&&(o=1),this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=i(Math.max(Math.min(1,o),0),3)}return e.equals=function(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a},e}(),r=function(){function e(e,t,n,o){this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.l=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,o),0),3)}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a},e.fromRGBA=function(t){var n=t.r/255,i=t.g/255,o=t.b/255,r=t.a,s=Math.max(n,i,o),a=Math.min(n,i,o),u=0,l=0,c=(a+s)/2,d=s-a;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case n:u=(i-o)/d+(i1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},e.toRGBA=function(t){var n,i,r,s=t.h/360,a=t.s,u=t.l,l=t.a;if(0===a)n=i=r=u;else{var c=u<.5?u*(1+a):u+a-u*a,d=2*u-c;n=e._hue2rgb(d,c,s+1/3),i=e._hue2rgb(d,c,s),r=e._hue2rgb(d,c,s-1/3)}return new o(Math.round(255*n),Math.round(255*i),Math.round(255*r),l)},e}(),s=function(){function e(e,t,n,o){this.h=0|Math.max(Math.min(360,e),0),this.s=i(Math.max(Math.min(1,t),0),3),this.v=i(Math.max(Math.min(1,n),0),3),this.a=i(Math.max(Math.min(1,o),0),3)}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a},e.fromRGBA=function(t){var n,i=t.r/255,o=t.g/255,r=t.b/255,s=Math.max(i,o,r),a=Math.min(i,o,r),u=s-a,l=0===s?0:u/s;return n=0===u?0:s===i?((o-r)/u%6+6)%6:s===o?(r-i)/u+2:(i-o)/u+4,new e(Math.round(60*n),l,s,t.a)},e.toRGBA=function(e){var t=e.h,n=e.s,i=e.v,r=e.a,s=i*n,a=s*(1-Math.abs(t/60%2-1)),u=i-s,l=[0,0,0],c=l[0],d=l[1],h=l[2];return t<60?(c=s,d=a):t<120?(c=a,d=s):t<180?(d=s,h=a):t<240?(d=a,h=s):t<300?(c=a,h=s):t<360&&(c=s,h=a),c=Math.round(255*(c+u)),d=Math.round(255*(d+u)),h=Math.round(255*(h+u)),new o(c,d,h,r)},e}(),a=function(){function e(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof r)this._hsla=e,this.rgba=r.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.toRGBA(e)}}return e.fromHex=function(t){return e.Format.CSS.parseHex(t)||e.red},Object.defineProperty(e.prototype,"hsla",{get:function(){return this._hsla?this._hsla:r.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&o.equals(this.rgba,e.rgba)&&r.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)},e.prototype.getRelativeLuminance=function(){return i(.2126*e._relativeLuminanceForComponent(this.rgba.r)+.7152*e._relativeLuminanceForComponent(this.rgba.g)+.0722*e._relativeLuminanceForComponent(this.rgba.b),4)},e._relativeLuminanceForComponent=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},e.prototype.isLighter=function(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128},e.prototype.isLighterThan=function(e){return this.getRelativeLuminance()>e.getRelativeLuminance()},e.prototype.isDarkerThan=function(e){return this.getRelativeLuminance()0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,o=t.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},c=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},d=function(){function e(){this.id=String(e.ID++)}return e.ID=1,e.EditorContext=new e,e.CommandPalette=new e,e.MenubarEditMenu=new e,e.MenubarSelectionMenu=new e,e.MenubarGoMenu=new e,e}(),h=Object(r.c)("menuService"),f=new(function(){function e(){this._commands=Object.create(null),this._menuItems=Object.create(null)}return e.prototype.addCommand=function(e){var t=this._commands[e.id];return this._commands[e.id]=e,void 0!==t},e.prototype.getCommand=function(e){return this._commands[e]},e.prototype.getCommands=function(){var e=Object.create(null);for(var t in this._commands)e[t]=this.getCommand(t);return e},e.prototype.appendMenuItem=function(e,t){var n=e.id,i=this._menuItems[n];return i?i.push(t):this._menuItems[n]=i=[t],{dispose:function(){var e=i.indexOf(t);e>=0&&i.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id,n=this._menuItems[t]||[];return t===d.CommandPalette.id&&this._appendImplicitItems(n),n},e.prototype._appendImplicitItems=function(e){for(var t=new Set,n=e.filter(function(e){return i(e)}),o=0,r=n;o=n?r:{done:!1,value:e[t++]}}}}function i(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()}function o(e,t){return{next:function(){var n=e.next();return n.done?r:{done:!1,value:t(n.value)}}}}function s(e,t){return{next:function(){for(;;){var n=e.next();if(n.done)return r;if(t(n.value))return{done:!1,value:n.value}}}}}function a(e,t){for(var n=e.next();!n.done;n=e.next())t(n.value)}function u(e){var t=[];return a(e,function(e){return t.push(e)}),t}var l={next:function(){return r}};e.empty=t,e.fromArray=n,e.from=i,e.map=o,e.filter=s,e.forEach=a,e.collect=u}(i||(i={}));var s=function(){function e(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===i&&(i=t-1),this.items=e,this.start=t,this.end=n,this.index=i}return e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}(),a=(function(e){function t(t,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=t.length),void 0===o&&(o=n-1),e.call(this,t,n,i,o)||this}o(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null}}(s),function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}())},function(e,t,n){"use strict";function i(e){var t=u;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}function o(e,t,n,i){var o=e-1-i,r=n.lastIndexOf(" ",o-1)+1,s=n.indexOf(" ",o);-1===s&&(s=n.length),t.lastIndex=r;for(var a;a=t.exec(n);){var u=a.index||0;if(u<=o&&t.lastIndex>=o)return{word:a[0],startColumn:i+1+u,endColumn:i+1+t.lastIndex}}return null}function r(e,t,n,i){var o=e-1-i;t.lastIndex=0;for(var r;r=t.exec(n);){var s=r.index||0;if(s>o)return null;if(t.lastIndex>=o)return{word:r[0],startColumn:i+1+s,endColumn:i+1+t.lastIndex}}return null}function s(e,t,n,i){t.lastIndex=0;var s=t.exec(n);if(!s)return null;var a=s[0].indexOf(" ")>=0?r(e,t,n,i):o(e,t,n,i);return t.lastIndex=0,a}n.d(t,"b",function(){return a}),n.d(t,"a",function(){return u}),t.c=i,t.d=s;var a="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",u=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0;n=0||(t+="\\"+a[n]);return t+="\\s]+)",new RegExp(t,"g")}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return r});var i=function(){function e(e,t,n){this.offset=0|e,this.type=t,this.language=n}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}(),o=function(){function e(e,t){this.tokens=e,this.endState=t}return e}(),r=function(){function e(e,t){this.tokens=e,this.endState=t}return e}()},function(e,t,n){"use strict";function i(e,t){void 0===t&&(t=p);var n=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===n)return".";if(0==~n)return e[0];if(~n==e.length-1)return i(e.substring(0,e.length-1));var o=e.substring(0,~n);return d.g&&":"===o[o.length-1]&&(o+=t),o}function o(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?o(e.substring(0,e.length-1)):e.substr(1+~t)}function r(e){e=o(e);var t=~e.lastIndexOf(".");return t?e.substring(~t):""}function s(e,t){return t?!m.test(e):!g.test(e)}function a(e,t){if(null===e||void 0===e)return e;var n=e.length;if(0===n)return".";var i=!(!d.g||!t);if(s(e,i))return e;for(var o=i?"\\":"/",r=l(e,o),a=r.length,c=!1,h="",f=r.length;f<=n;f++)if(f===n||47===e.charCodeAt(f)||92===e.charCodeAt(f)){if(u(e,a,f,"..")){var p=h.lastIndexOf(o),g=h.slice(p+1);(r||g.length>0)&&".."!==g&&(h=-1===p?"":h.slice(0,p),c=!0)}else u(e,a,f,".")&&(r||h||f=65&&i<=90||i>=97&&i<=122)&&58===e.charCodeAt(1))return i=e.charCodeAt(2),47===i||92===i?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://");if(-1!==s)for(s+=3;se.length)return!1;if(n){if(!Object(h.B)(e,t))return!1;if(t.length===e.length)return!0;var o=t.length;return t.charAt(t.length-1)===i&&o--,e.charAt(o)===i}return t.charAt(t.length-1)!==i&&(t+=i),0===e.indexOf(t)}n.d(t,"h",function(){return f}),n.d(t,"f",function(){return p}),t.b=i,t.a=o,t.c=r,t.g=a,n.d(t,"e",function(){return v}),t.d=c;var d=n(7),h=n(3),f="/",p=d.g?"\\":"/",g=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,m=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/,v=function(){for(var e="",t=0;t0){var i=e.charCodeAt(e.length-1);if(47!==i&&92!==i){var o=n.charCodeAt(0);47!==o&&92!==o&&(e+=f)}}e+=n}return a(e)}},function(e,t,n){"use strict";function i(e){var t=[];return e.forEach(function(e,n){return t.push(n)}),t}t.d=i,n.d(t,"c",function(){return u}),n.d(t,"b",function(){return l}),n.d(t,"a",function(){return d});var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.hasNext=function(){return this._pos0)n.left||(n.left=new a,n.left.segment=i.value()),n=n.left;else if(o<0)n.right||(n.right=new a,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new a,n.mid.segment=i.value()),n=n.mid}}var r=n.value;return n.value=t,n.key=e,r},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0},e.prototype.findSubstr=function(e){for(var t=this._iter.reset(e),n=this._root,i=void 0;n;){var o=t.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i},e.prototype.forEach=function(e){this._forEach(this._root,e)},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))},e}(),l=function(){function e(){this.map=new Map,this.ignoreCase=!1}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e}(),c=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){void 0===t&&(t=0);var n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=0);var i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:default:this.addItemLast(i)}this._map.set(e,i),this._size++}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.trimOld=function(e){if(!(e>=this.size)){if(0===e)return void this.clear();for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0)}},e.prototype.addItemFirst=function(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},e.prototype.addItemLast=function(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},e.prototype.touch=function(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;var n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(2===t){if(e===this._tail)return;var n=e.next,i=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),e},e}(),d=function(e){function t(t,n){void 0===n&&(n=1);var i=e.call(this)||this;return i._limit=t,i._ratio=Math.min(Math.max(0,n),1),i}return o(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,t,2)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,2),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(c)},function(e,t,n){"use strict";function i(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}n.d(t,"a",function(){return r}),t.b=i;var o=n(5),r=Object(o.c)("modelService")},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(5),o=Object(i.c)("editorWorkerService")},function(e,t,n){"use strict";function i(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}function r(e){for(var t=e.length,n=new Uint32Array(t),i=0;i>>1,this._text=t}return e.prototype.equals=function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount)},e.prototype.slicedEquals=function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var i=t<<1,o=i+(n<<1),r=i;r0?this._tokens[e-1<<1]:0},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return i.t.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return i.t.getTokenType(t)},e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return i.t.getForeground(t)},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return i.t.getClassNameFromMetadata(t)},e.prototype.getInlineStyle=function(e,t){var n=this._tokens[1+(e<<1)];return i.t.getInlineStyleFromMetadata(n,t)},e.prototype.getEndOffset=function(e){return this._tokens[e<<1]},e.prototype.findTokenIndexAtOffset=function(t){return e.findIndexInTokensArray(this._tokens,t)},e.prototype.inflate=function(){return this},e.prototype.sliceAndInflate=function(e,t,n){return new r(this,e,t,n)},e.convertToEndOffset=function(e,t){for(var n=e.length>>>1,i=n-1,o=0;o>>1)-1;nt&&(i=o)}return n},e}(),r=function(){function e(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var o=this._firstTokenIndex,r=e.getCount();o=n)break;this._tokensCount++}}return e.prototype.equals=function(t){return t instanceof e&&(this._startOffset===t._startOffset&&this._endOffset===t._endOffset&&this._deltaOffset===t._deltaOffset&&this._source.slicedEquals(t._source,this._firstTokenIndex,this._tokensCount))},e.prototype.getCount=function(){return this._tokensCount},e.prototype.getForeground=function(e){return this._source.getForeground(this._firstTokenIndex+e)},e.prototype.getEndOffset=function(e){var t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset},e.prototype.getClassName=function(e){return this._source.getClassName(this._firstTokenIndex+e)},e.prototype.getInlineStyle=function(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)},e.prototype.findTokenIndexAtOffset=function(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex},e}()},function(e,t,n){"use strict";function i(e,t){if(0===e.lineContent.length){var n=0,i=" ";if(e.lineDecorations.length>0){for(var o=[],s=0,a=e.lineDecorations.length;s')}return t.appendASCIIString(i),new v(new m(0,0),!1,n)}return c(r(e),t)}function o(e){var t=Object(h.a)(1e4),n=i(e,t);return new _(n.characterMapping,t.build(),n.containsRTL,n.containsForeignElements)}function r(e){var t,n,i=e.useMonospaceOptimizations,o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0){for(var d=0,h=e.lineDecorations.length;d0&&(i[o++]=new p(t,""));for(var r=0,s=e.getCount();r=n){i[o++]=new p(n,u);break}i[o++]=new p(a,u)}}return i}function a(e,t,n){var i=0,o=[],r=0;if(n)for(var s=0,a=t.length;s=50&&(o[r++]=new p(d+1,c),h=d+1,d=-1);h!==l&&(o[r++]=new p(l,c))}else o[r++]=u;i=l}else for(var s=0,a=t.length;s50){for(var c=u.type,m=Math.ceil(g/50),f=1;fu)w=!0;else if(9===b)w=!0;else if(32===b)if(a)if(C)w=!0;else{var S=y+1=r)&&(l[c++]=new p(y,"vs-whitespace"),_%=r):(y===g||w&&y>o)&&(l[c++]=new p(y,f),_%=r),9===b?_=r:d.r(b)?_+=2:_++,C=w,y===g&&++h0?e.charCodeAt(t-1):0,I=t>1?e.charCodeAt(t-2):0,N=32===x&&32!==I&&9!==I;N||(L=!0)}else L=!0;return l[c++]=new p(t,L?"vs-whitespace":f),l}function l(e,t,n,i){i.sort(f.a.compare);for(var o=f.b.normalize(e,i),r=o.length,s=0,a=[],u=0,l=0,c=0,d=n.length;cl&&(l=v.startOffset,a[u++]=new p(l,m)),!(v.endOffset+1<=g)){l=g,a[u++]=new p(l,m+" "+v.className);break}l=v.endOffset+1,a[u++]=new p(l,m+" "+v.className),s++}g>l&&(l=g,a[u++]=new p(l,m))}var _=n[n.length-1].endIndex;if(s");for(var S=0,L=u.length;S=0;if(b=0,t.appendASCIIString('0&&(!i||T>1?t.write1(8594):t.write1(65515),T--);T>0;)t.write1(160),T--}else t.write1(183);b++}C=O}else{var O=0;for(c&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);_0;)t.write1(160),O++,T--;break;case 32:t.write1(160),O++;break;case 60:t.appendASCIIString("<"),O++;break;case 62:t.appendASCIIString(">"),O++;break;case 38:t.appendASCIIString("&"),O++;break;case 0:t.appendASCIIString("�"),O++;break;case 65279:case 8232:t.write1(65533),O++;break;default:d.r(k)&&y++,p&&k<32?(t.write1(9216+k),O++):(t.write1(k),O++)}b++}C=O}t.appendASCIIString("")}return g.setPartData(s,u.length-1,b,w),a&&t.appendASCIIString(""),t.appendASCIIString(""),new v(g,c,o)}n.d(t,"b",function(){return g}),n.d(t,"a",function(){return m}),t.c=i,t.d=o;var d=n(3),h=n(82),f=n(83),p=function(){function e(e,t){this.endIndex=e,this.type=t}return e}(),g=function(){function e(e,t,n,i,o,r,s,a,u,l,c,d,h,f,p){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=o,this.containsRTL=r,this.fauxIndentLength=s,this.lineTokens=a,this.lineDecorations=u,this.tabSize=l,this.spaceWidth=c,this.stopRenderingLineAfter=d,this.renderWhitespace="all"===h?2:"boundary"===h?1:0,this.renderControlCharacters=f,this.fontLigatures=p}return e.prototype.equals=function(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.spaceWidth===e.spaceWidth&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&f.a.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)},e}(),m=function(){function e(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}return e.getPartIndex=function(e){return(4294901760&e)>>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n,i){var o=(t<<16|n<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=i+n},e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var o=(t<<16|i<<0)>>>0,r=0,s=this.length-1;r+1>>1,u=this._data[a];if(u===o)return a;u>o?s=a:r=a}if(r===s)return r;var l=this._data[r],c=this._data[s];if(l===o)return r;if(c===o)return s;var d,h=e.getPartIndex(l),f=e.getCharIndex(l),p=e.getPartIndex(c);return d=h!==p?n:e.getCharIndex(c),i-f<=d-i?r:s},e}(),v=function(){function e(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}return e}(),_=function(){function e(e,t,n,i){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=i}return e}(),y=function(){function e(e,t,n,i,o,r,s,a,u,l,c,d){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.len=i,this.isOverflowing=o,this.parts=r,this.containsForeignElements=s,this.tabSize=a,this.containsRTL=u,this.spaceWidth=l,this.renderWhitespace=c,this.renderControlCharacters=d}return e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return c});var i,o=n(27),r=n(0),s=n(6),a=n(188),u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(i||(i={}));var c=function(e){function t(){var t=e.call(this)||this;return t.activeTouches={},t.handle=null,t.targets=[],t._register(s.g(document,"touchstart",function(e){return t.onTouchStart(e)})),t._register(s.g(document,"touchend",function(e){return t.onTouchEnd(e)})),t._register(s.g(document,"touchmove",function(e){return t.onTouchMove(e)})),t}return u(t,e),t.addTarget=function(e){t.isTouchDevice()&&(t.INSTANCE||(t.INSTANCE=new t),t.INSTANCE.targets.push(e))},t.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0},t.prototype.dispose=function(){this.handle&&(this.handle.dispose(),this.handle=null),e.prototype.dispose.call(this)},t.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,o=e.targetTouches.length;n=t.HOLD_DELAY&&Math.abs(c.initialPageX-o.g(c.rollingPageX))<30&&Math.abs(c.initialPageY-o.g(c.rollingPageY))<30){var h=s.newGestureEvent(i.Contextmenu,c.initialTarget);h.pageX=o.g(c.rollingPageX),h.pageY=o.g(c.rollingPageY),s.dispatchEvent(h)}else if(1===r){var f=o.g(c.rollingPageX),p=o.g(c.rollingPageY),g=o.g(c.rollingTimestamps)-c.rollingTimestamps[0],m=f-c.rollingPageX[0],v=p-c.rollingPageY[0],_=s.targets.filter(function(e){return c.initialTarget instanceof Node&&e.contains(c.initialTarget)});s.inertia(_,n,Math.abs(m)/g,m>0?1:-1,f,Math.abs(v)/g,v>0?1:-1,p)}s.dispatchEvent(s.newGestureEvent(i.End,c.initialTarget)),delete s.activeTouches[l.identifier]}(a);this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},t.prototype.newGestureEvent=function(e,t){var n=document.createEvent("CustomEvent");return n.initEvent(e,!1,!0),n.initialTarget=t,n},t.prototype.dispatchEvent=function(e){var t=this;this.targets.forEach(function(n){e.initialTarget instanceof Node&&n.contains(e.initialTarget)&&(n.dispatchEvent(e),t.dispatched=!0)})},t.prototype.inertia=function(e,n,o,r,a,u,l,c){var d=this;this.handle=s.K(function(){var s=Date.now(),h=s-n,f=0,p=0,g=!0;o+=t.SCROLL_FRICTION*h,u+=t.SCROLL_FRICTION*h,o>0&&(g=!1,f=r*o*h),u>0&&(g=!1,p=l*u*h);var m=d.newGestureEvent(i.Change);m.translationX=f,m.translationY=p,e.forEach(function(e){return e.dispatchEvent(m)}),g||d.inertia(e,s,o,r,a+f,u,l,c+p)})},t.prototype.onTouchMove=function(e){for(var t=Date.now(),n=0,r=e.changedTouches.length;n3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(s.pageX),a.rollingPageY.push(s.pageY),a.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",s)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},t.SCROLL_FRICTION=-.005,t.HOLD_DELAY=700,l([a.a],t,"isTouchDevice",null),t}(r.a)},function(e,t,n){"use strict";function i(e,t){var n=new s.b(t);return n.preventDefault(),{leftButton:n.leftButton,posx:n.posx,posy:n.posy}}t.b=i,n.d(t,"a",function(){return l});var o=n(6),r=n(104),s=n(23),a=n(0),u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(e){function t(){var t=e.call(this)||this;return t.hooks=[],t.mouseMoveEventMerger=null,t.mouseMoveCallback=null,t.onStopCallback=null,t}return u(t,e),t.prototype.dispose=function(){this.stopMonitoring(!1),e.prototype.dispose.call(this)},t.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=Object(a.d)(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t&&t()}},t.prototype.isMonitoring=function(){return this.hooks.length>0},t.prototype.startMonitoring=function(e,t,n){var i=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var a=r.a.getSameOriginWindowChain(),u=0;ut.LARGE_FILE_SIZE_THRESHOLD||l>t.LARGE_FILE_LINE_COUNT_THRESHOLD:u._isTooLargeForTokenization=!1,u._isTooLargeForSyncing=d>t.MODEL_SYNC_LIMIT,u._setVersionId(1),u._isDisposed=!1,u._isDisposing=!1,u._languageIdentifier=o||E.a,u._tokenizationListener=D.u.onDidChange(function(e){-1!==e.changedLanguages.indexOf(u._languageIdentifier.language)&&(u._resetTokenizationState(),u.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:u.getLineCount()}]}),u._shouldAutoTokenize()&&u._warmUpTokens())}),u._revalidateTokensTimeout=-1,u._languageRegistryListener=O.a.onDidChange(function(e){e.languageIdentifier.id===u._languageIdentifier.id&&u._onDidChangeLanguageConfiguration.fire({})}),u._resetTokenizationState(),u._instanceId=s(A),u._lastDecorationId=0,u._decorations=Object.create(null),u._decorationsTree=new W,u._commandManager=new b.a(u),u._isUndoing=!1,u._isRedoing=!1,u._trimAutoWhitespaceLines=null,u}return T(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o)},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=Object(C.a)(e,t.tabSize,t.insertSpaces);return new y.d({tabSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new y.d({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent(function(t){return e(t.rawContentChangedEvent)})},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent(function(t){return e(t.rawContentChangedEvent)})},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent(function(t){return e(t.contentChangedEvent)})},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._tokenizationListener.dispose(),this._languageRegistryListener.dispose(),this._clearTimers(),this._isDisposed=!0,e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new L.a(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=r(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._resetTokenizationState(),this._decorations=Object.create(null),this._decorationsTree=new W,this._commandManager=new b.a(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new L.b([new L.d],this._versionId,!1,!1),this._createContentChanged2(new v.a(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new L.b([new L.c],this._versionId,!1,!1),this._createContentChanged2(new v.a(1,1,o,r),0,i,this.getValue(),!1,!1,!1))}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=1e4?t+=o:e+=o}return t>e},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new y.d({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var r=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(r)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=Object(C.a)(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;if(o<1)t=1,n=1;else if(o>i)t=i,n=this.getLineMaxColumn(t);else if(t=0|o,r<=1)n=1;else{var s=this.getLineMaxColumn(t);n=r>=s?s:0|r}var a,u,l=e.endLineNumber,c=e.endColumn;if(l<1)a=1,u=1;else if(l>i)a=i,u=this.getLineMaxColumn(a);else if(a=0|l,c<=1)u=1;else{var s=this.getLineMaxColumn(a);u=c>=s?s:0|c}return o===t&&r===n&&l===a&&c===u&&e instanceof v.a&&!(e instanceof _.a)?e:new v.a(t,n,a,u)},t.prototype._isValidPosition=function(e,t,n){if(isNaN(e))return!1;if(e<1)return!1;if(e>this._buffer.getLineCount())return!1;if(isNaN(t))return!1;if(t<1)return!1;if(t>this.getLineMaxColumn(e))return!1;if(n&&t>1){var i=this._buffer.getLineCharCode(e,t-2);if(f.s(i))return!1}return!0},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new m.a(1,1);if(i>r)return new m.a(r,this.getLineMaxColumn(r));if(o<=1)return new m.a(i,1);var s=this.getLineMaxColumn(i);if(o>=s)return new m.a(i,s);if(n){var a=this._buffer.getLineCharCode(i,o-2);if(f.s(a))return new m.a(i,o-1)}return new m.a(i,o)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof m.a&&this._isValidPosition(e.lineNumber,e.column,!0)?e:this._validatePosition(e.lineNumber,e.column,!0)},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,!1))return!1;if(!this._isValidPosition(o,r,!1))return!1;if(t){var s=i>1?this._buffer.getLineCharCode(n,i-2):0,a=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,u=f.s(s),l=f.s(a);return!u&&!l}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof v.a&&!(e instanceof _.a)&&this._isValidRange(e,!0))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),i=t.lineNumber,o=t.column,r=n.lineNumber,s=n.column,a=o>1?this._buffer.getLineCharCode(i,o-2):0,u=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,l=f.s(a),c=f.s(u);return l||c?i===r&&o===s?new v.a(i,o-1,r,s-1):l&&c?new v.a(i,o-1,r,s+1):l?new v.a(i,o-1,r,s):new v.a(i,o,r,s+1):new v.a(i,o,r,s)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new v.a(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},t.prototype.findMatches=function(e,t,n,i,o,r,s){void 0===s&&(s=999),this._assertNotDisposed();var a;if(a=v.a.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new x.a(e,n,i,o),l=u.parseSearchRequest();return l?this.findMatchesLineByLine(a,l,r,s):[]}return x.c.findMatches(this,new x.a(e,n,i,o),a,r,s)},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new x.a(e,n,i,o),u=a.parseSearchRequest();if(!u)return null;var l=this.getLineCount(),c=new v.a(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),d=this.findMatchesLineByLine(c,u,r,1);return x.c.findNextMatch(this,new x.a(e,n,i,o),s,r),d.length>0?d[0]:(c=new v.a(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),d=this.findMatchesLineByLine(c,u,r,1),d.length>0?d[0]:null)}return x.c.findNextMatch(this,new x.a(e,n,i,o),s,r)},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return x.c.findPreviousMatch(this,new x.a(e,n,i,o),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map(function(e){return{range:i.validateRange(e.range),text:e.text}}),r=!0,s=0,a=e.length;su.endLineNumber,p=u.startLineNumber>h.endLineNumber;if(!f&&!p){l=!0;break}}if(!l){r=!1;break}}if(r)for(var s=0,a=this._trimAutoWhitespaceLines.length;sh.endLineNumber)&&!(g===h.startLineNumber&&h.startColumn===m&&h.isEmpty()&&y&&y.length>0&&"\n"===y.charAt(0)||g===h.startLineNumber&&1===h.startColumn&&h.isEmpty()&&y&&y.length>0&&"\n"===y.charAt(y.length-1))){_=!1;break}}_&&t.push({range:new v.a(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t._eolCount=function(e){for(var t=0,n=0,i=0,o=e.length;i=0;b--){var C=p+b,w=s-l-y+C;u.push(new L.e(C,this.getLineContent(w)))}if(_this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new v.a(r,1,s,a),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i)},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;t0)for(;o>0&&s>=1;){var u=this.getLineFirstNonWhitespaceColumn(s);if(0!==u){if(u=0;c--){var d=this._tokens._tokenizeText(this._buffer,r[c],l);l=d?d.endState.clone():a.clone()}var h=Math.floor(.4*this._tokens.inValidLineStartIndex);t=Math.min(this.getLineCount(),t+h);for(var f=e;f<=t;f++){var p=this.getLineContent(f),d=this._tokens._tokenizeText(this._buffer,p,l);d?(this._tokens._setTokens(this._tokens.languageIdentifier.id,f-1,p.length,d.tokens),this._tokens._setIsInvalid(f-1,!1),this._tokens._setState(f-1,l),l=d.endState.clone(),i.registerChangedTokens(f)):l=a.clone()}var g=i.build();g&&this._onDidChangeTokens.fire(g)}},t.prototype.forceTokenization=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");var t=new I.b;this._tokens._updateTokensUntilLine(this._buffer,t,e);var n=t.build();n&&this._onDidChangeTokens.fire(n)},t.prototype.isCheapToTokenize=function(e){return!!this._tokens.isCheapToTokenize(e)&&(ethis.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},t.prototype._getLineTokens=function(e){var t=this._buffer.getLineContent(e);return this._tokens.getTokens(this._languageIdentifier.id,e-1,t)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._resetTokenizationState(),this.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]}),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},t.prototype.getLanguageIdAtPosition=function(e,t){if(!this._tokens.tokenizationSupport)return this._languageIdentifier.id;var n=this.validatePosition({lineNumber:e,column:t}),i=n.lineNumber,o=n.column,r=this._getLineTokens(i);return r.getLanguageId(r.findTokenIndexAtOffset(o-1))},t.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize()&&-1===this._revalidateTokensTimeout&&(this._revalidateTokensTimeout=setTimeout(function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow()},0))},t.prototype._warmUpTokens=function(){var e=Math.min(100,this.getLineCount());this._revalidateTokensNow(e),this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization()},t.prototype._revalidateTokensNow=function(e){void 0===e&&(e=this._buffer.getLineCount());for(var t=new I.b,n=h.a.create(!1);this._tokens.hasLinesToTokenize(this._buffer)&&!(n.elapsed()>20);){if(this._tokens._tokenizeOneLine(this._buffer,t)>=e)break}this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();var i=t.build();i&&this._onDidChangeTokens.fire(i)},t.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e)},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=Object(N.d)(n.column,O.a.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),d=c[0],h=c[1],f=Object(N.d)(n.column,O.a.getWordDefinition(o.getLanguageId(r-1)),i.substring(d,h),d);if(f&&f.startColumn<=e.column&&e.column<=f.endColumn)return f}return null},t._findLanguageBoundaries=function(e,t){for(var n=e.getLanguageId(t),i=0,o=t;o>=0&&e.getLanguageId(o)===n;o--)i=e.getStartOffset(o);for(var r=e.getLineContent().length,o=t,s=e.getCount();o0&&n.getStartOffset(o)===e.column-1){var a=n.getStartOffset(o);o--;var h=O.a.getBracketsSupport(n.getLanguageId(o));if(h&&!Object(M.b)(n.getStandardTokenType(o))){var s=Math.max(n.getStartOffset(o),e.column-1-h.maxBracketLength),l=k.a.findPrevBracketInToken(h.reversedRegex,t,i,s,a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn){var c=i.substring(l.startColumn-1,l.endColumn-1);c=c.toLowerCase();var d=this._matchFoundBracket(l,h.textIsBracket[c],h.textIsOpenBracket[c]);if(d)return d}}}return null},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;if(n){var i=this._findMatchingBracketDown(t,e.getEndPosition());if(i)return[e,i]}else{var i=this._findMatchingBracketUp(t,e.getStartPosition());if(i)return[e,i]}return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=t.lineNumber;r>=1;r--){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=a-1,c=-1;for(r===t.lineNumber&&(l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1);l>=0;l--){var d=s.getLanguageId(l),h=s.getStandardTokenType(l),f=s.getStartOffset(l),p=s.getEndOffset(l);if(-1===c&&(c=p),d===n&&!Object(M.b)(h))for(;;){var g=k.a.findPrevBracketInToken(i,r,u,f,c);if(!g)break;var m=u.substring(g.startColumn-1,g.endColumn-1);if(m=m.toLowerCase(),m===e.open?o++:m===e.close&&o--,0===o)return g;c=g.startColumn-1}c=-1}}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=t.lineNumber,s=this.getLineCount();r<=s;r++){var a=this._getLineTokens(r),u=a.getCount(),l=this._buffer.getLineContent(r),c=0,d=0;for(r===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),d=t.column-1);co)throw new Error("Illegal value for lineNumber");for(var r=O.a.getFoldingRules(this._languageIdentifier.id),s=Boolean(r&&r.offSide),a=-2,u=-1,l=-2,c=-1,d=-2,h=-1,f=-2,p=-1,g=0,m=!0,v=0,_=!0,y=0,b=0;m||_;b++){var C=e-b,w=e+b;if(0!==b&&(C<1||Co||w>n)&&(_=!1),b>5e4&&(m=!1,_=!1),m){var S=void 0,L=this._computeIndentLevel(C-1);if(L>=0?(l=C-1,c=L,S=Math.ceil(L/this._options.tabSize)):(!function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break}}}if(-2===l){l=-1,c=-1;for(var t=e;t=0){l=t,c=r;break}}}}(C),S=this._getIndentLevelForWhitespaceLine(s,u,c)),0===b){if(g=C,v=w,0===(y=S))return{startLineNumber:g,endLineNumber:v,indent:y};continue}S>=y?g=C:m=!1}if(_){var x=void 0,L=this._computeIndentLevel(w-1);L>=0?(d=w-1,h=L,x=Math.ceil(L/this._options.tabSize)):(!function(e){if(-2===d){d=-1,h=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){d=t,h=n;break}}}if(-1!==f&&(-2===f||f=0){f=t,p=r;break}}}}(w),x=this._getIndentLevelForWhitespaceLine(s,h,p)),x>=y?v=w:_=!1}}return{startLineNumber:g,endLineNumber:v,indent:y}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=O.a.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide),r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var d=c-e,h=this._computeIndentLevel(c-1);if(h>=0)s=c-1,a=h,r[d]=Math.ceil(h/this._options.tabSize);else{if(-2===s){s=-1,a=-1;for(var f=c-2;f>=0;f--){var p=this._computeIndentLevel(f);if(p>=0){s=f,a=p;break}}}if(-1!==u&&(-2===u||u=0){u=f,l=p;break}}}r[d]=this._getIndentLevelForWhitespaceLine(o,a,l)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0)return void(this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e);this._fastEmitter.fire(e),this._slowEmitter.fire(e)},t}(d.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(){for(var e=[],t=0;tn?n:e}function s(e,t){return"string"!=typeof e?t:e}n.d(t,"a",function(){return h}),n.d(t,"b",function(){return f});var a=n(7),u=n(26),l=n(75),c=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),d=a.d?1.5:1.35,h=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}return e.createFromRawSettings=function(t,n){var a=s(t.fontFamily,u.b.fontFamily),c=s(t.fontWeight,u.b.fontWeight),h=i(t.fontSize,u.b.fontSize);h=r(h,0,100),0===h?h=u.b.fontSize:h<8&&(h=8);var f=o(t.lineHeight,0);f=r(f,0,150),0===f?f=Math.round(d*h):f<8&&(f=8);var p=i(t.letterSpacing,0);p=r(p,-5,20);var g=1+.1*l.a.getZoomLevel();return h*=g,f*=g,new e({zoomLevel:n,fontFamily:a,fontWeight:c,fontSize:h,lineHeight:f,letterSpacing:p})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e.prototype.getMassagedFontFamily=function(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?'"'+this.fontFamily+'"':this.fontFamily},e}(),f=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isTrusted=n,i.isMonospace=t.isMonospace,i.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,i.canUseHalfwidthRightwardsArrow=t.canUseHalfwidthRightwardsArrow,i.spaceWidth=t.spaceWidth,i.maxDigitWidth=t.maxDigitWidth,i}return c(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(h)},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(1),o=new(function(){function e(){this._zoomLevel=0,this._onDidChangeZoomLevel=new i.a,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.setZoomLevel=function(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))},e}())},function(e,t,n){"use strict";function i(e,t){for(var n=e.getCount(),i=e.findTokenIndexAtOffset(t),o=e.getLanguageId(i),s=i;s+10&&e.getLanguageId(a-1)===o;)a--;return new r(e,o,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}function o(e){return 0!=(7&e)}t.a=i,t.b=o;var r=function(){function e(e,t,n,i,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}return e.prototype.getLineContent=function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}()},function(e,t,n){"use strict";function i(e,t){var n={};return function(i){var o=e(i);return n.hasOwnProperty(o)||(n[o]=t(i)),n[o]}}function o(e){var t=/^[\w]+$/.test(e);return e=s.l(e),t?"\\b"+e+"\\b":e}function r(e){var t="("+e.map(o).join(")|(")+")";return s.g(t,!0)}n.d(t,"b",function(){return l}),n.d(t,"a",function(){return g});var s=n(3),a=n(2),u=function(){function e(e,t,n,i,o){this.languageIdentifier=e,this.open=t,this.close=n,this.forwardRegex=i,this.reversedRegex=o}return e}(),l=function(){function e(e,t){var n=this;this.brackets=t.map(function(t){return new u(e,t[0],t[1],c({open:t[0],close:t[1]}),d({open:t[0],close:t[1]}))}),this.forwardRegex=h(this.brackets),this.reversedRegex=f(this.brackets),this.textIsBracket={},this.textIsOpenBracket={};var i=0;this.brackets.forEach(function(e){n.textIsBracket[e.open.toLowerCase()]=e,n.textIsBracket[e.close.toLowerCase()]=e,n.textIsOpenBracket[e.open.toLowerCase()]=!0,n.textIsOpenBracket[e.close.toLowerCase()]=!1,i=Math.max(i,e.open.length),i=Math.max(i,e.close.length)}),this.maxBracketLength=i}return e}(),c=i(function(e){return e.open+";"+e.close},function(e){return r([e.open,e.close])}),d=i(function(e){return e.open+";"+e.close},function(e){return r([p(e.open),p(e.close)])}),h=i(function(e){return e.map(function(e){return e.open+";"+e.close}).join(";")},function(e){var t=[];return e.forEach(function(e){t.push(e.open),t.push(e.close)}),r(t)}),f=i(function(e){return e.map(function(e){return e.open+";"+e.close}).join(";")},function(e){var t=[];return e.forEach(function(e){t.push(p(e.open)),t.push(p(e.close))}),r(t)}),p=function(){function e(e){for(var t="",n=e.length-1;n>=0;n--)t+=e.charAt(n);return t}var t=null,n=null;return function(i){return t!==i&&(t=i,n=e(t)),n}}(),g=function(){function e(){}return e._findPrevBracketInText=function(e,t,n,i){var o=n.match(e);if(!o)return null;var r=n.length-(o.index||0),s=o[0].length,u=i+r;return new a.a(t,u-s+1,t,u+1)},e.findPrevBracketInToken=function(e,t,n,i,o){var r=p(n),s=r.substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,s,i)},e.findNextBracketInText=function(e,t,n,i){var o=n.match(e);if(!o)return null;var r=o.index||0,s=o[0].length;if(0===s)return null;var u=i+r;return new a.a(t,u+1,t,u+1+s)},e.findNextBracketInToken=function(e,t,n,i,o){var r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)},e}()},function(e,t,n){"use strict";function i(e){return{getLength:function(){return e.length},getElementAtIndex:function(t){return e.charCodeAt(t)}}}function o(e,t,n){return new l(i(e),i(t)).ComputeDiff(n)}t.b=o,n.d(t,"a",function(){return l});var r=n(161),s=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}(),a=function(){function e(){}return e.Copy=function(e,t,n,i,o){for(var r=0;r0||this.m_modifiedCount>0)&&this.m_changes.push(new r.a(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),l=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,i,o){var r=[!1],s=this.ComputeDiffRecursive(e,t,n,i,r);return o?this.PrettifyChanges(s):s},e.prototype.ComputeDiffRecursive=function(e,t,n,i,o){for(o[0]=!1;e<=t&&n<=i&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){var a=void 0;return n<=i?(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new r.a(e,0,n,i-n+1)]):e<=t?(s.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[new r.a(e,t-e+1,n,0)]):(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var u=[0],l=[0],c=this.ComputeRecursionPoint(e,t,n,i,u,l,o),d=u[0],h=l[0];if(null!==c)return c;if(!o[0]){var f=this.ComputeDiffRecursive(e,d,n,h,o),p=[];return p=o[0]?[new r.a(d+1,t-(d+1)+1,h+1,i-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,i,o),this.ConcatenateChanges(f,p)}return[new r.a(e,t-e+1,n,i-n+1)]},e.prototype.WALKTRACE=function(e,t,n,i,o,s,a,l,c,d,h,f,p,g,m,v,_,y){var b,C=null,w=null,S=new u,L=t,x=n,I=p[0]-v[0]-i,N=Number.MIN_VALUE,D=this.m_forwardHistory.length-1;do{b=I+e,b===L||b=0&&(c=this.m_forwardHistory[D],e=c[0],L=1,x=c.length-1)}while(--D>=-1);if(C=S.getReverseChanges(),y[0]){var O=p[0]+1,E=v[0]+1;if(null!==C&&C.length>0){var M=C[C.length-1];O=Math.max(O,M.getOriginalEnd()),E=Math.max(E,M.getModifiedEnd())}w=[new r.a(O,f-O+1,E,m-E+1)]}else{S=new u,L=s,x=a,I=p[0]-v[0]-l,N=Number.MAX_VALUE,D=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{b=I+o,b===L||b=d[b+1]?(h=d[b+1]-1,g=h-I-l,h>N&&S.MarkNextChange(),N=h+1,S.AddOriginalElement(h+1,g+1),I=b+1-o):(h=d[b-1],g=h-I-l,h>N&&S.MarkNextChange(),N=h,S.AddModifiedElement(h+1,g+1),I=b-1-o),D>=0&&(d=this.m_reverseHistory[D],o=d[0],L=1,x=d.length-1)}while(--D>=-1);w=S.getChanges()}return this.ConcatenateChanges(C,w)},e.prototype.ComputeRecursionPoint=function(e,t,n,i,o,s,u){var l,c=0,d=0,h=0,f=0,p=0,g=0;e--,n--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var m=t-e+(i-n),v=m+1,_=new Array(v),y=new Array(v),b=i-n,C=t-e,w=e-n,S=t-i,L=C-b,x=L%2==0;_[b]=e,y[C]=t,u[0]=!1;var I,N;for(l=1;l<=m/2+1;l++){var D=0,O=0;for(h=this.ClipDiagonalBound(b-l,l,b,v),f=this.ClipDiagonalBound(b+l,l,b,v),I=h;I<=f;I+=2){for(c=I===h||ID+O&&(D=c,O=d),!x&&Math.abs(I-C)<=l-1&&c>=y[I])return o[0]=c,s[0]=d,N<=y[I]&&l<=1448?this.WALKTRACE(b,h,f,w,C,p,g,S,_,y,c,t,o,d,i,s,x,u):null}var E=(D-e+(O-n)-l)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(D,this.OriginalSequence,E))return u[0]=!0,o[0]=D,s[0]=O,E>0&&l<=1448?this.WALKTRACE(b,h,f,w,C,p,g,S,_,y,c,t,o,d,i,s,x,u):(e++,n++,[new r.a(e,t-e+1,n,i-n+1)]);for(p=this.ClipDiagonalBound(C-l,l,C,v),g=this.ClipDiagonalBound(C+l,l,C,v),I=p;I<=g;I+=2){for(c=I===p||I=y[I+1]?y[I+1]-1:y[I-1],d=c-(I-C)-S,N=c;c>e&&d>n&&this.ElementsAreEqual(c,d);)c--,d--;if(y[I]=c,x&&Math.abs(I-b)<=l&&c<=_[I])return o[0]=c,s[0]=d,N>=_[I]&&l<=1448?this.WALKTRACE(b,h,f,w,C,p,g,S,_,y,c,t,o,d,i,s,x,u):null}if(l<=1447){var M=new Array(f-h+2);M[0]=b-h+1,a.Copy(_,h,M,1,f-h+1),this.m_forwardHistory.push(M),M=new Array(g-p+2),M[0]=C-p+1,a.Copy(y,p,M,1,g-p+1),this.m_reverseHistory.push(M)}}return this.WALKTRACE(b,h,f,w,C,p,g,S,_,y,c,t,o,d,i,s,x,u)},e.prototype.PrettifyChanges=function(e){for(var t=0;t0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;t--){var n=e[t],i=0,o=0;if(t>0){var u=e[t-1];u.originalLength>0&&(i=u.originalStart+u.originalLength),u.modifiedLength>0&&(o=u.modifiedStart+u.modifiedLength)}for(var r=n.originalLength>0,s=n.modifiedLength>0,l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var h=n.originalStart-d,f=n.modifiedStart-d;if(hc&&(c=p,l=d)}n.originalStart-=l,n.modifiedStart-=l}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var i=new Array(e.length+t.length-1);return a.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],a.Copy(t,1,i,e.length,t.length-1),i}var i=new Array(e.length+t.length);return a.Copy(e,0,i,0,e.length),a.Copy(t,0,i,e.length,t.length),i},e.prototype.ChangesOverlap=function(e,t,n){if(s.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),s.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){var i=e.originalStart,o=e.originalLength,a=e.modifiedStart,u=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(u=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new r.a(i,o,a,u),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=Object(i.b)(e),t=Object(i.b)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var r=n.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=Object(i.b)(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();for(var t=0,n=this.values.length-1,i=0,r=0,s=0;t<=n;)if(i=t+(n-t)/2|0,r=this.prefixSum[i],s=r-this.values[i],e=r))break;t=i+1}return new o(i,e-s)},e}(),s=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new r(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();!function(){function e(){this._actual=new o(0)}e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)}}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return r});var i=n(5),o=Object(i.c)("textResourceConfigurationService"),r=Object(i.c)("textResourcePropertiesService")},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i,o=n(3);i="undefined"!=typeof TextDecoder?function(e){return new r(e)}:function(e){return new s};var r=function(){function e(e){this._decoder=new TextDecoder("UTF-16LE"),this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}return e.prototype.reset=function(){this._completedStrings=null,this._bufferLength=0},e.prototype.build=function(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()},e.prototype._buildBuffer=function(){if(0===this._bufferLength)return"";var e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return this._decoder.decode(e)},e.prototype._flushBuffer=function(){var e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e},e.prototype.write1=function(e){var t=this._capacity-this._bufferLength;t<=1&&(0===t||o.s(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCII=function(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e},e.prototype.appendASCIIString=function(e){var t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;nn)&&(!c.isEmpty()||0!==l.type&&3!==l.type)){var d=c.startLineNumber===n?c.startColumn:i,h=c.endLineNumber===n?c.endColumn:o;r[s++]=new e(d,h,l.inlineClassName,l.type)}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}(),r=function(){function e(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n}return e}(),s=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),a=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var n=[],o=new s,r=0,a=0,u=t.length;a1){var f=e.charCodeAt(c-2);i.s(f)&&c--}if(d>1){var f=e.charCodeAt(d-2);i.s(f)&&d--}var p=c-1,g=d-2;r=o.consumeLowerThan(p,r,n),0===o.count&&(r=p),o.insert(g,h)}return o.consumeLowerThan(1073741824,r,n),n},e}()},function(e,t,n){"use strict";function i(e,t,n){return Object(m.a)(e)?t(e):n(e)}function o(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof p.a)}function r(e,t,n){t&&e instanceof B&&Object.keys(t).forEach(function(i){Object(v.c)(i)&&e.updateValue("editor."+i,t[i]),n&&Object(v.b)(i)&&e.updateValue("diffEditor."+i,t[i])})}n.d(t,"d",function(){return W}),n.d(t,"g",function(){return F}),n.d(t,"c",function(){return H}),n.d(t,"f",function(){return j}),n.d(t,"l",function(){return V}),n.d(t,"m",function(){return z}),n.d(t,"b",function(){return B}),n.d(t,"h",function(){return U}),n.d(t,"i",function(){return K}),n.d(t,"e",function(){return G}),n.d(t,"n",function(){return Z}),n.d(t,"k",function(){return q}),t.o=r,n.d(t,"a",function(){return Y}),n.d(t,"j",function(){return J});var s=n(11),a=n(6),u=n(44),l=n(1),c=n(34),d=n(0),h=n(7),f=n(85),p=n(28),g=n(33),m=n(167),v=n(110),_=n(169),y=n(4),b=n(2),C=n(15),w=n(170),S=n(24),L=n(32),x=n(171),I=n(172),N=n(111),D=n(112),O=n(173),E=n(174),M=n(40),k=n(113),T=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),A=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},R=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},P=function(){function e(e){this.model=e,this._onDispose=new l.a}return Object.defineProperty(e.prototype,"textEditorModel",{get:function(){return this.model},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose.fire()},e}(),W=function(){function e(){}return e.prototype.setEditor=function(e){this.editor=e},e.prototype.createModelReference=function(e){var t,n=this;return t=i(this.editor,function(t){return n.findModel(t,e)},function(t){return n.findModel(t.getOriginalEditor(),e)||n.findModel(t.getModifiedEditor(),e)}),t?g.b.as(new d.b(new P(t))):g.b.as(new d.b(null))},e.prototype.findModel=function(e,t){var n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n},e}(),F=function(){function e(){}return e.prototype.showWhile=function(e,t){return null},e}(),H=function(){function e(){}return e}(),j=function(){function e(){}return e.prototype.info=function(e){return this.notify({severity:f.a.Info,message:e})},e.prototype.warn=function(e){return this.notify({severity:f.a.Warning,message:e})},e.prototype.error=function(e){return this.notify({severity:f.a.Error,message:e})},e.prototype.notify=function(t){switch(t.severity){case f.a.Error:console.error(t.message);break;case f.a.Warning:console.warn(t.message);break;default:console.log(t.message)}return e.NO_OP},e.NO_OP=new M.b,e}(),V=function(){function e(e){this._onWillExecuteCommand=new l.a,this._instantiationService=e,this._dynamicCommands=Object.create(null)}return e.prototype.addCommand=function(e){var t=this,n=e.id;return this._dynamicCommands[n]=e,Object(d.e)(function(){delete t._dynamicCommands[n]})},e.prototype.executeCommand=function(e){for(var t=[],n=1;n=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o){return this._lines.splice(e-this._rendLineNumberStart,o-e+1)}for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}(),s=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new r(function(){return t._host.createVisibleLine()})}return e.prototype._createDomNode=function(){var e=Object(i.b)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt){var s=t,a=Math.min(n,o.rendLineNumberStart-1);s<=a&&(this._insertLinesBefore(o,s,a,i,t),o.linesLength+=a-s+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,u),o.linesLength-=u)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s=Math.max(0,n-o.rendLineNumberStart+1),a=o.linesLength-1,u=a-s+1;u>0&&(this._removeLinesAfter(o,u),o.linesLength-=u)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}(),y=function(e){function t(t,n,o){var r=e.call(this)||this;r._onScroll=r._register(new h.a),r.onScroll=r._onScroll.event,t.style.overflow="hidden",r._options=i(n),r._scrollable=o,r._register(r._scrollable.onScroll(function(e){r._onDidScroll(e),r._onScroll.fire(e)}));var a={onMouseWheel:function(e){return r._onMouseWheel(e)},onDragStart:function(){return r._onDragStart()},onDragEnd:function(){return r._onDragEnd()}};return r._verticalScrollbar=r._register(new l.a(r._scrollable,r._options,a)),r._horizontalScrollbar=r._register(new u.a(r._scrollable,r._options,a)),r._domNode=document.createElement("div"),r._domNode.className="monaco-scrollable-element "+r._options.className,r._domNode.setAttribute("role","presentation"),r._domNode.style.position="relative",r._domNode.style.overflow="hidden",r._domNode.appendChild(t),r._domNode.appendChild(r._horizontalScrollbar.domNode.domNode),r._domNode.appendChild(r._verticalScrollbar.domNode.domNode),r._options.useShadows&&(r._leftShadowDomNode=Object(s.b)(document.createElement("div")),r._leftShadowDomNode.setClassName("shadow"),r._domNode.appendChild(r._leftShadowDomNode.domNode),r._topShadowDomNode=Object(s.b)(document.createElement("div")),r._topShadowDomNode.setClassName("shadow"),r._domNode.appendChild(r._topShadowDomNode.domNode),r._topLeftShadowDomNode=Object(s.b)(document.createElement("div")),r._topLeftShadowDomNode.setClassName("shadow top-left-corner"),r._domNode.appendChild(r._topLeftShadowDomNode.domNode)),r._listenOnDomNode=r._options.listenOnDomNode||r._domNode,r._mouseWheelToDispose=[],r._setListeningToMouseWheel(r._options.handleMouseWheel),r.onmouseover(r._listenOnDomNode,function(e){return r._onMouseOver(e)}),r.onnonbubblingmouseout(r._listenOnDomNode,function(e){return r._onMouseOut(e)}),r._hideTimeout=r._register(new d.d),r._isDragging=!1,r._mouseIsOver=!1,r._shouldRender=!0,r._revealOnScroll=!0,r}return m(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=Object(f.d)(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,p.d&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=i(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Object(f.d)(this._mouseWheelToDispose),e)){var n=function(e){var n=new a.c(e);t._onMouseWheel(n)};this._mouseWheelToDispose.push(r.g(this._listenOnDomNode,"mousewheel",n)),this._mouseWheelToDispose.push(r.g(this._listenOnDomNode,"DOMMouseScroll",n))}},t.prototype._onMouseWheel=function(e){var t,n=_.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(t=[o,i],i=t[0],o=t[1]);var r=!p.d&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=i,i=0);var s=this._scrollable.getFutureScrollPosition(),a={};if(i){var u=s.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(a,u)}if(o){var l=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,l)}if(a=this._scrollable.validateScrollPosition(a),s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop){this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),this._shouldRender=!0}}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},t.prototype._onDidScroll=function(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()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(function(){return e._hide()},500)},t}(c.a),b=function(e){function t(t,n){var i=this;n=n||{},n.mouseWheelSmoothScroll=!1;var o=new g.a(0,function(e){return r.K(e)});return i=e.call(this,t,n,o)||this,i._register(o),i}return m(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(y),C=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return m(t,e),t}(y),w=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll(function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)}),i.scanDomNode(),i}return m(t,e),t.prototype.scanDomNode=function(){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})},t}(b)},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return u});var i=n(65),o=n(91),r=n(14),s=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=11,u=function(e){function t(t){var n=e.call(this)||this;return n._onActivate=t.onActivate,n.bgDomNode=document.createElement("div"),n.bgDomNode.className="arrow-background",n.bgDomNode.style.position="absolute",n.bgDomNode.style.width=t.bgWidth+"px",n.bgDomNode.style.height=t.bgHeight+"px",void 0!==t.top&&(n.bgDomNode.style.top="0px"),void 0!==t.left&&(n.bgDomNode.style.left="0px"),void 0!==t.bottom&&(n.bgDomNode.style.bottom="0px"),void 0!==t.right&&(n.bgDomNode.style.right="0px"),n.domNode=document.createElement("div"),n.domNode.className=t.className,n.domNode.style.position="absolute",n.domNode.style.width=a+"px",n.domNode.style.height=a+"px",void 0!==t.top&&(n.domNode.style.top=t.top+"px"),void 0!==t.left&&(n.domNode.style.left=t.left+"px"),void 0!==t.bottom&&(n.domNode.style.bottom=t.bottom+"px"),void 0!==t.right&&(n.domNode.style.right=t.right+"px"),n._mouseMoveMonitor=n._register(new i.a),n.onmousedown(n.bgDomNode,function(e){return n._arrowMouseDown(e)}),n.onmousedown(n.domNode,function(e){return n._arrowMouseDown(e)}),n._mousedownRepeatTimer=n._register(new r.b),n._mousedownScheduleRepeatTimer=n._register(new r.d),n}return s(t,e),t.prototype._arrowMouseDown=function(e){var t=this,n=function(){t._mousedownRepeatTimer.cancelAndSet(function(){return t._onActivate()},1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(n,200),this._mouseMoveMonitor.startMonitoring(i.b,function(e){},function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(6),o=n(44),r=n(23),s=n(0),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.onclick=function(e,t){this._register(i.g(e,i.c.CLICK,function(e){return t(new r.b(e))}))},t.prototype.onmousedown=function(e,t){this._register(i.g(e,i.c.MOUSE_DOWN,function(e){return t(new r.b(e))}))},t.prototype.onmouseover=function(e,t){this._register(i.g(e,i.c.MOUSE_OVER,function(e){return t(new r.b(e))}))},t.prototype.onnonbubblingmouseout=function(e,t){this._register(i.h(e,function(e){return t(new r.b(e))}))},t.prototype.onkeydown=function(e,t){this._register(i.g(e,i.c.KEY_DOWN,function(e){return t(new o.a(e))}))},t.prototype.onkeyup=function(e,t){this._register(i.g(e,i.c.KEY_UP,function(e){return t(new o.a(e))}))},t.prototype.oninput=function(e,t){this._register(i.g(e,i.c.INPUT,t))},t.prototype.onblur=function(e,t){this._register(i.g(e,i.c.BLUR,t))},t.prototype.onfocus=function(e,t){this._register(i.g(e,i.c.FOCUS,t))},t.prototype.onchange=function(e,t){this._register(i.g(e,i.c.CHANGE,t))},t}(s.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return u});var i=n(230),o=(n.n(i),n(42)),r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),s=function(){function e(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}return e}(),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){i[o-e]=[]}if(0===n.length)return i;n.sort(function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',u=[],l=t;l<=n;l++){var c=l-t,d=i[c];0===d.length?u[c]="":u[c]='
=this._renderResult.length?"":this._renderResult[n]},t}(a)},function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return a});var i=n(1),o=n(247),r=n(15),s=function(){function e(){var e=this;this._onDidChange=new i.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),r.u.onDidChange(function(t){t.changedColorMap&&e._updateColorMap()})}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e),this._INSTANCE},e.prototype._updateColorMap=function(){var e=r.u.getColorMap();if(!e)return this._colors=[o.a.Empty],void(this._backgroundIsLight=!0);this._colors=[o.a.Empty];for(var t=1;t=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}(),a=function(){function e(t,n){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==n.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=n,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(n,50/60)}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;it.width||i+4>t.height)return void console.warn("bad render request outside image data");var u=a?this.x2charDataLight:this.x2charData,l=e._getChIndex(o),c=4*t.width,d=s.r,h=s.g,f=s.b,p=r.r-d,g=r.g-h,m=r.b-f,v=t.data,_=4*l*2,y=i*c+4*n,b=u[_]/255;v[y+0]=d+p*b,v[y+1]=h+g*b,v[y+2]=f+m*b;var b=u[_+1]/255;v[y+4]=d+p*b,v[y+5]=h+g*b,v[y+6]=f+m*b,y+=c;var b=u[_+2]/255;v[y+0]=d+p*b,v[y+1]=h+g*b,v[y+2]=f+m*b;var b=u[_+3]/255;v[y+4]=d+p*b,v[y+5]=h+g*b,v[y+6]=f+m*b,y+=c;var b=u[_+4]/255;v[y+0]=d+p*b,v[y+1]=h+g*b,v[y+2]=f+m*b;var b=u[_+5]/255;v[y+4]=d+p*b,v[y+5]=h+g*b,v[y+6]=f+m*b,y+=c;var b=u[_+6]/255;v[y+0]=d+p*b,v[y+1]=h+g*b,v[y+2]=f+m*b;var b=u[_+7]/255;v[y+4]=d+p*b,v[y+5]=h+g*b,v[y+6]=f+m*b},e.prototype.x1RenderChar=function(t,n,i,o,r,s,a){if(n+1>t.width||i+2>t.height)return void console.warn("bad render request outside image data");var u=a?this.x1charDataLight:this.x1charData,l=e._getChIndex(o),c=4*t.width,d=s.r,h=s.g,f=s.b,p=r.r-d,g=r.g-h,m=r.b-f,v=t.data,_=2*l*1,y=i*c+4*n,b=u[_]/255;v[y+0]=d+p*b,v[y+1]=h+g*b,v[y+2]=f+m*b,y+=c;var b=u[_+1]/255;v[y+0]=d+p*b,v[y+1]=h+g*b,v[y+2]=f+m*b},e.prototype.x2BlockRenderChar=function(e,t,n,i,o,r){if(t+2>e.width||n+4>e.height)return void console.warn("bad render request outside image data");var s=4*e.width,a=o.r,u=o.g,l=o.b,c=i.r-a,d=i.g-u,h=i.b-l,f=a+.5*c,p=u+.5*d,g=l+.5*h,m=e.data,v=n*s+4*t;m[v+0]=f,m[v+1]=p,m[v+2]=g,m[v+4]=f,m[v+5]=p,m[v+6]=g,v+=s,m[v+0]=f,m[v+1]=p,m[v+2]=g,m[v+4]=f,m[v+5]=p,m[v+6]=g,v+=s,m[v+0]=f,m[v+1]=p,m[v+2]=g,m[v+4]=f,m[v+5]=p,m[v+6]=g,v+=s,m[v+0]=f,m[v+1]=p,m[v+2]=g,m[v+4]=f,m[v+5]=p,m[v+6]=g},e.prototype.x1BlockRenderChar=function(e,t,n,i,o,r){if(t+1>e.width||n+2>e.height)return void console.warn("bad render request outside image data");var s=4*e.width,a=o.r,u=o.g,l=o.b,c=i.r-a,d=i.g-u,h=i.b-l,f=a+.5*c,p=u+.5*d,g=l+.5*h,m=e.data,v=n*s+4*t;m[v+0]=f,m[v+1]=p,m[v+2]=g,v+=s,m[v+0]=f,m[v+1]=p,m[v+2]=g},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(5),o=Object(i.c)("themeService")},function(e,t,n){"use strict";n.d(t,"a",function(){return c}),n.d(t,"b",function(){return d});var i=n(11),o=n(1),r=n(15),s=n(38),a=n(21),u={ModesRegistry:"editor.modesRegistry"},l=function(){function e(){this._onDidAddLanguages=new o.a,this.onDidAddLanguages=this._onDidAddLanguages.event,this._languages=[]}return e.prototype.registerLanguage=function(e){this._languages.push(e),this._onDidAddLanguages.fire([e])},e.prototype.getLanguages=function(){return this._languages.slice(0)},e}(),c=new l;a.a.add(u.ModesRegistry,c);var d=new r.n("plaintext",1);c.registerLanguage({id:"plaintext",extensions:[".txt",".gitignore"],aliases:[i.a("plainText.alias","Plain Text"),"text"],mimetypes:["text/plain"]}),s.a.register(d,{brackets:[["(",")"],["[","]"],["{","}"]]})},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"a",function(){return u});var i,o=n(5),r=n(11),s=n(85);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(i||(i={})),function(e){function t(e,t){return t-e}function n(e){return o[e]||""}function i(t){switch(t){case s.a.Error:return e.Error;case s.a.Warning:return e.Warning;case s.a.Info:return e.Info;case s.a.Ignore:return e.Hint}}e.compare=t;var o=Object.create(null);o[e.Error]=Object(r.a)("sev.error","Error"),o[e.Warning]=Object(r.a)("sev.warning","Warning"),o[e.Info]=Object(r.a)("sev.info","Info"),e.toString=n,e.fromSeverity=i}(i||(i={}));var a;!function(e){function t(e){var t=[n];return e.source?t.push(e.source.replace("¦","¦")):t.push(n),e.code?t.push(e.code.replace("¦","¦")):t.push(n),void 0!==e.severity&&null!==e.severity?t.push(i.toString(e.severity)):t.push(n),e.message?t.push(e.message.replace("¦","¦")):t.push(n),void 0!==e.startLineNumber&&null!==e.startLineNumber?t.push(e.startLineNumber.toString()):t.push(n),void 0!==e.startColumn&&null!==e.startColumn?t.push(e.startColumn.toString()):t.push(n),void 0!==e.endLineNumber&&null!==e.endLineNumber?t.push(e.endLineNumber.toString()):t.push(n),void 0!==e.endColumn&&null!==e.endColumn?t.push(e.endColumn.toString()):t.push(n),t.push(n),t.join("¦")}var n="";e.makeKey=t}(a||(a={}));var u=Object(o.c)("markerService")},function(e,t,n){"use strict";n.d(t,"b",function(){return u}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return c}),n.d(t,"a",function(){return d}),n.d(t,"e",function(){return h});var i=n(7),o=n(13),r=n(6),s=n(34),a=function(){function e(){this._arr=[]}return e.prototype.set=function(e,t){this._arr.push({keybinding:Object(s.f)(e,i.a),callback:t})},e.prototype.dispatch=function(e){for(var t=this._arr.length-1;t>=0;t--){var n=this._arr[t];if(e.equals(n.keybinding))return n.callback}return null},e}(),u=function(){function e(e){void 0===e&&(e={clickBehavior:0,keyboardSupport:!0,openMode:0});var t=this;this.options=e,this.downKeyBindingDispatcher=new a,this.upKeyBindingDispatcher=new a,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,function(e,n){return t.onUp(e,n)}),this.downKeyBindingDispatcher.set(18,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(15,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(17,function(e,n){return t.onRight(e,n)}),i.d&&(this.downKeyBindingDispatcher.set(2064,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(300,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(302,function(e,n){return t.onUp(e,n)})),this.downKeyBindingDispatcher.set(11,function(e,n){return t.onPageUp(e,n)}),this.downKeyBindingDispatcher.set(12,function(e,n){return t.onPageDown(e,n)}),this.downKeyBindingDispatcher.set(14,function(e,n){return t.onHome(e,n)}),this.downKeyBindingDispatcher.set(13,function(e,n){return t.onEnd(e,n)}),this.downKeyBindingDispatcher.set(10,function(e,n){return t.onSpace(e,n)}),this.downKeyBindingDispatcher.set(9,function(e,n){return t.onEscape(e,n)}),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),0===this.options.clickBehavior&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(r.o(n.target,"scrollbar","monaco-tree"))return!1;if(r.o(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,n){return i.d&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(0!==this.options.clickBehavior||!n.leftButton&&!n.middleButton)&&this.onLeftClick(e,t,n)},e.prototype.onLeftClick=function(e,t,n,i){void 0===i&&(i="mouse");var r=n,s={origin:i,originalEvent:n,didClickOnTwistie:this.isClickOnTwistie(r)};if(e.getInput()===t)e.clearFocus(s),e.clearSelection(s);else{n&&r.browserEvent&&"mousedown"===r.browserEvent.type&&1===r.browserEvent.detail||n.preventDefault(),n.stopPropagation(),e.domFocus(),e.setSelection([t],s),e.setFocus(t,s),this.shouldToggleExpansion(t,r,i)&&(e.isExpanded(t)?e.collapse(t).then(null,o.d):e.expand(t).then(null,o.d))}return!0},e.prototype.shouldToggleExpansion=function(e,t,n){var i="mouse"===n&&2===t.detail;return this.openOnSingleClick||i||this.isClickOnTwistie(t)},e.prototype.setOpenMode=function(e){this.options.openMode=e},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return 0===this.options.openMode},enumerable:!0,configurable:!0}),e.prototype.isClickOnTwistie=function(e){var t=e.target;if(!r.x(t,"content"))return!1;var n=window.getComputedStyle(t,":before");if("none"===n.backgroundImage||"none"===n.display)return!1;var i=parseInt(n.width)+parseInt(n.paddingRight);return e.browserEvent.offsetX<=i},e.prototype.onContextMenu=function(e,t,n){return(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(n&&(n.preventDefault(),n.stopPropagation()),!1)},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return(!i||!i.tagName||"input"!==i.tagName.toLowerCase())&&this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,n){var i=e.dispatch(n.toKeybinding());return!(!i||!i(t,n))&&(n.preventDefault(),n.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus()).then(null,o.d)),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n),e.reveal(e.getFocus()).then(null,o.d)),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus()).then(null,o.d)),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus()).then(null,o.d)),!0},e.prototype.onHome=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusFirst(n),e.reveal(e.getFocus()).then(null,o.d)),!0},e.prototype.onEnd=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusLast(n),e.reveal(e.getFocus()).then(null,o.d)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.collapse(i).then(function(t){if(i&&!t)return e.focusParent(n),e.reveal(e.getFocus())}).then(null,o.d)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.expand(i).then(function(t){if(i&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())}).then(null,o.d)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.toggleExpansion(n),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(n),!0):e.getSelection().length?(e.clearSelection(n),!0):!!e.getFocus()&&(e.clearFocus(n),!0)},e}(),l=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,n){},e.prototype.onDragOver=function(e,t,n,i){return null},e.prototype.drop=function(e,t,n,i){},e}(),c=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}(),d=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}(),h=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",n=[];e.listFocusBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),e.listFocusAndSelectionForeground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listDropBackground&&n.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"),e.listFocusOutline&&n.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t");var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)},e}()},function(e,t,n){"use strict";function i(e){return Object(s.f)(e)&&"function"==typeof e.done}n.d(t,"a",function(){return a});var o=n(33),r=n(7),s=n(14),a=function(){function e(e){i(e)?this._winjsPromise=e:this._winjsPromise=new o.a(function(t,n){var i=!0;e(function(e){i?r.h(function(){return t(e)}):t(e)},function(e){i?r.h(function(){return n(e)}):n(e)}),i=!1})}return e.all=function(t){return new e(o.a.join(t).then(null,function(e){for(var t in e)if(e.hasOwnProperty(t))return e[t]}))},e.race=function(t){return new e(o.a.any(t).then(function(e){return e.value},function(e){return e.value}))},e.resolve=function(t){return new e(o.a.wrap(t))},e.reject=function(t){return new e(o.a.wrapError(t))},e.prototype.then=function(t,n){var i=!0,s=new e(this._winjsPromise.then(t&&function(e){return i?new o.a(function(n,i){r.h(function(){var o;try{o=t(e)}catch(e){return void i(e)}n(o)})}):t(e)},n&&function(e){return i?new o.a(function(t,i){r.h(function(){var o;try{o=n(e)}catch(e){return void i(e)}t(o)})}):n(e)}));return i=!1,s},e.prototype.catch=function(e){return this.then(null,e)},e}()},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function r(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function s(){g&&f&&(g=!1,f.length?p=f.concat(p):m=-1,p.length&&a())}function a(){if(!g){var e=o(s);g=!0;for(var t=p.length;t;){for(f=p,p=[];++m1)for(var n=1;n1&&"file"===e.scheme?"//"+e.authority+e.path:c.g&&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)?e.path.substr(1):e.path,c.g&&(t=t.replace(/\//g,"\\")),t}t.a=i,t.b=o;var s,a=n(57),u=n(28),l=(n(3),n(45)),c=n(7);!function(e){function t(t){var n=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(function(e){var t=e.split(":"),i=t[0],o=t[1];i&&o&&n.set(i,o)});var i=t.path.substring(0,t.path.indexOf(";"));return i&&n.set(e.META_DATA_MIME,i),n}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t}(s||(s={}))},function(e,t,n){"use strict";function i(e){switch(e){case 0:return"";case 1:return N+"*?";default:return"(?:"+I+"|"+N+"+"+I+"|"+I+N+"+)*?"}}function o(e,t){if(!e)return[];for(var n,i=[],o=!1,r=!1,s="",a=0;a0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break}t=e.substr(n)}var s=o.indexOf(t);return-1!==s?i[s]:null};a.basenames=o,a.patterns=i,a.allBasenames=o;var u=e.filter(function(e){return!e.basenames});return u.push(a),u}t.a=f;var y=n(27),b=n(3),C=n(57),w=n(58),S=n(14),L="**",x="/",I="[/\\\\]",N="[^/\\\\]",D=/\//g,O=/^\*\*\/\*\.[\w\.-]+$/,E=/^\*\*\/([\w\.-]+)\/?$/,M=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,k=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,T=/^\*\*((\/[\w\.-]+)+)\/?$/,A=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,R=new w.a(1e4),P=function(){return!1},W=function(){return null}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(5),o=Object(i.c)("textModelService")},function(e,t,n){"use strict";function i(e,t){var n=e.getModel(t);return!!n&&!n.isTooLargeForSyncing()}n.d(t,"b",function(){return _}),n.d(t,"a",function(){return S});var o=n(14),r=n(0),s=n(109),a=n(155),u=n(15),l=n(38),c=n(160),d=n(59),h=n(81),f=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),p=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},g=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},m=6e4,v=3e5,_=function(e){function t(t,n){var o=e.call(this)||this;return o._modelService=t,o._workerManager=o._register(new b(o._modelService)),o._register(u.o.register("*",{provideLinks:function(e,t){return i(o._modelService,e.uri)?o._workerManager.withWorker().then(function(t){return t.computeLinks(e.uri)}):Promise.resolve([])}})),o._register(u.d.register("*",new y(o._workerManager,n,o._modelService))),o}return f(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.canComputeDiff=function(e,t){return i(this._modelService,e)&&i(this._modelService,t)},t.prototype.computeDiff=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.computeDiff(e,t,n)})},t.prototype.computeMoreMinimalEdits=function(e,t){return Array.isArray(t)&&0!==t.length&&i(this._modelService,e)?this._workerManager.withWorker().then(function(n){return n.computeMoreMinimalEdits(e,t)}):Promise.resolve(t)},t.prototype.canNavigateValueSet=function(e){return i(this._modelService,e)},t.prototype.navigateValueSet=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.navigateValueSet(e,t,n)})},t.prototype.canComputeWordRanges=function(e){return i(this._modelService,e)},t.prototype.computeWordRanges=function(e,t){return this._workerManager.withWorker().then(function(n){return n.computeWordRanges(e,t)})},t=p([g(0,d.a),g(1,h.a)],t)}(r.a),y=function(){function e(e,t,n){this._workerManager=e,this._configurationService=t,this._modelService=n}return e.prototype.provideCompletionItems=function(e,t){if(this._configurationService.getValue(e.uri,t,"editor").wordBasedSuggestions&&i(this._modelService,e.uri))return this._workerManager.withWorker().then(function(n){return n.textualSuggest(e.uri,t)})},e}(),b=function(e){function t(t){var n=e.call(this)||this;return n._modelService=t,n._editorWorkerClient=null,n._register(new o.b).cancelAndSet(function(){return n._checkStopIdleWorker()},Math.round(v/2)),n._register(n._modelService.onModelRemoved(function(e){return n._checkStopEmptyWorker()})),n}return f(t,e),t.prototype.dispose=function(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),e.prototype.dispose.call(this)},t.prototype._checkStopEmptyWorker=function(){if(this._editorWorkerClient){0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype._checkStopIdleWorker=function(){if(this._editorWorkerClient){(new Date).getTime()-this._lastWorkerUsedTime>v&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype.withWorker=function(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new S(this._modelService,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)},t}(r.a),C=function(e){function t(t,n,i){var r=e.call(this)||this;if(r._syncedModels=Object.create(null),r._syncedModelsLastUsedTime=Object.create(null),r._proxy=t,r._modelService=n,!i){var s=new o.b;s.cancelAndSet(function(){return r._checkStopModelSync()},Math.round(m/2)),r._register(s)}return r}return f(t,e),t.prototype.dispose=function(){for(var t in this._syncedModels)Object(r.d)(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),e.prototype.dispose.call(this)},t.prototype.esureSyncedResources=function(e){for(var t=0;tm&&t.push(n)}for(var i=0;i console.log` because `log` has been completed recently."),s.a("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:s.a("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,markdownDescription:s.a("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,markdownDescription:s.a("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.")},"editor.tabCompletion":{type:"string",default:"off",enum:["on","off","onlySnippets"],enumDescriptions:[s.a("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),s.a("tabCompletion.off","Disable tab completions."),s.a("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:s.a("tabCompletion","Enables tab completions.")},"editor.suggest.filterGraceful":{type:"boolean",default:!0,description:s.a("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:!1,description:s.a("suggest.localityBonus","Controls whether sorting favours words that appear close to the cursor.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:!0,description:s.a("suggest.snippetsPreventQuickSuggestions","Control whether an active snippet prevents quick suggestions.")},"editor.selectionHighlight":{type:"boolean",default:v.contribInfo.selectionHighlight,description:s.a("selectionHighlight","Controls whether the editor should highlight matches similar to the selection")},"editor.occurrencesHighlight":{type:"boolean",default:v.contribInfo.occurrencesHighlight,description:s.a("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")},"editor.overviewRulerLanes":{type:"integer",default:3,description:s.a("overviewRulerLanes","Controls the number of decorations that can show up at the same position in the overview ruler.")},"editor.overviewRulerBorder":{type:"boolean",default:v.viewInfo.overviewRulerBorder,description:s.a("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:d.h(v.viewInfo.cursorBlinking),description:s.a("cursorBlinking","Control the cursor animation style.")},"editor.mouseWheelZoom":{type:"boolean",default:v.viewInfo.mouseWheelZoom,markdownDescription:s.a("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:d.i(v.viewInfo.cursorStyle),description:s.a("cursorStyle","Controls the cursor style.")},"editor.cursorWidth":{type:"integer",default:v.viewInfo.cursorWidth,markdownDescription:s.a("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")},"editor.fontLigatures":{type:"boolean",default:v.viewInfo.fontLigatures,description:s.a("fontLigatures","Enables/Disables font ligatures.")},"editor.hideCursorInOverviewRuler":{type:"boolean",default:v.viewInfo.hideCursorInOverviewRuler,description:s.a("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],enumDescriptions:["",s.a("renderWhiteSpace.boundary","Render whitespace characters except for single spaces between words."),""],default:v.viewInfo.renderWhitespace,description:s.a("renderWhitespace","Controls how the editor should render whitespace characters.")},"editor.renderControlCharacters":{type:"boolean",default:v.viewInfo.renderControlCharacters,description:s.a("renderControlCharacters","Controls whether the editor should render control characters.")},"editor.renderIndentGuides":{type:"boolean",default:v.viewInfo.renderIndentGuides,description:s.a("renderIndentGuides","Controls whether the editor should render indent guides.")},"editor.highlightActiveIndentGuide":{type:"boolean",default:v.viewInfo.highlightActiveIndentGuide,description:s.a("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",s.a("renderLineHighlight.all","Highlights both the gutter and the current line.")],default:v.viewInfo.renderLineHighlight,description:s.a("renderLineHighlight","Controls how the editor should render the current line highlight.")},"editor.codeLens":{type:"boolean",default:v.contribInfo.codeLens,description:s.a("codeLens","Controls whether the editor shows CodeLens")},"editor.folding":{type:"boolean",default:v.contribInfo.folding,description:s.a("folding","Controls whether the editor has code folding enabled")},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:v.contribInfo.foldingStrategy,markdownDescription:s.a("foldingStrategy","Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.")},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:v.contribInfo.showFoldingControls,description:s.a("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")},"editor.matchBrackets":{type:"boolean",default:v.contribInfo.matchBrackets,description:s.a("matchBrackets","Highlight matching brackets when one of them is selected.")},"editor.glyphMargin":{type:"boolean",default:v.viewInfo.glyphMargin,description:s.a("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")},"editor.useTabStops":{type:"boolean",default:v.useTabStops,description:s.a("useTabStops","Inserting and deleting whitespace follows tab stops.")},"editor.trimAutoWhitespace":{type:"boolean",default:y.trimAutoWhitespace,description:s.a("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:s.a("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.dragAndDrop":{type:"boolean",default:v.dragAndDrop,description:s.a("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[s.a("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),s.a("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),s.a("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:v.accessibilitySupport,description:s.a("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:v.showUnused,description:s.a("showUnused","Controls fading out of unused code.")},"editor.links":{type:"boolean",default:v.contribInfo.links,description:s.a("links","Controls whether the editor should detect links and make them clickable.")},"editor.colorDecorators":{type:"boolean",default:v.contribInfo.colorDecorators,description:s.a("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")},"editor.lightbulb.enabled":{type:"boolean",default:v.contribInfo.lightbulbEnabled,description:s.a("codeActions","Enables the code action lightbulb in the editor.")},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:s.a("codeActionsOnSave.organizeImports","Controls whether organize imports action should be run on file save.")}},additionalProperties:{type:"boolean"},default:v.contribInfo.codeActionsOnSave,description:s.a("codeActionsOnSave","Code action kinds to be run on save.")},"editor.codeActionsOnSaveTimeout":{type:"number",default:v.contribInfo.codeActionsOnSaveTimeout,description:s.a("codeActionsOnSaveTimeout","Timeout in milliseconds after which the code actions that are run on save are cancelled.")},"editor.selectionClipboard":{type:"boolean",default:v.contribInfo.selectionClipboard,description:s.a("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:c.c},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:s.a("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:s.a("ignoreTrimWhitespace","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.")},"editor.largeFileOptimizations":{type:"boolean",default:y.largeFileOptimizations,description:s.a("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:s.a("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")}}},x=null;S.registerConfiguration(L)},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(18),o=function(){function e(t,n){this._defaultKeybindings=t,this._defaultBoundCommands=new Map;for(var i=0,o=t.length;i=0;c--)this._isTargetedForRemoval(e[c],a,u,s,l)&&e.splice(c,1);else n.push(r)}return e.concat(n)},e.prototype._addKeyPress=function(t,n){var i=this._map.get(t);if(void 0===i)return this._map.set(t,[n]),void this._addToLookupMap(n);for(var o=i.length-1;o>=0;o--){var r=i[o];if(r.command!==n.command){var s=null!==r.keypressChordPart,a=null!==n.keypressChordPart;s&&a&&r.keypressChordPart!==n.keypressChordPart||e.whenIsEntirelyIncluded(r.when,n.when)&&this._removeFromLookupMap(r)}}i.push(n),this._addToLookupMap(n)},e.prototype._addToLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}},e.prototype._removeFromLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);if(void 0!==t)for(var n=0,i=t.length;n=0;i--){var o=n[i];if(e.contextMatchesRules(t,o.when))return o}return null},e.contextMatchesRules=function(e,t){return!t||t.evaluate(e)},e}()},function(e,t,n){"use strict";function i(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}n.d(t,"a",function(){return l});var o=n(34),r=n(7),s=n(24),a=n(21),u=function(){function e(){this._keybindings=[],this._keybindingsSorted=!0}return e.bindToCurrentPlatform=function(e){if(1===r.a){if(e&&e.win)return e.win}else if(2===r.a){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t,n){void 0===n&&(n=0);var i=e.bindToCurrentPlatform(t);if(i&&i.primary){var s=Object(o.f)(i.primary,r.a);s&&this._registerDefaultKeybinding(s,t.id,t.weight,0,t.when,n)}if(i&&Array.isArray(i.secondary))for(var a=0,u=i.secondary.length;a=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))},e.prototype._assertNoCtrlAlt=function(t,n){t.ctrlKey&&t.altKey&&!t.metaKey&&e._mightProduceChar(t.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",t," for ",n)},e.prototype._registerDefaultKeybinding=function(e,t,n,i,o,s){0===s&&1===r.a&&(2===e.type?this._assertNoCtrlAlt(e.firstPart,t):this._assertNoCtrlAlt(e,t)),this._keybindings.push({keybinding:e,command:t,commandArgs:void 0,when:o,weight1:n,weight2:i}),this._keybindingsSorted=!1},e.prototype.getDefaultKeybindings=function(){return this._keybindingsSorted||(this._keybindings.sort(i),this._keybindingsSorted=!0),this._keybindings.slice(0)},e}(),l=new u,c={EditorModes:"platform.keybindingsRegistry"};a.a.add(c.EditorModes,l)},function(e,t,n){"use strict";n.d(t,"a",function(){return u}),n.d(t,"b",function(){return c});var i,o=n(28),r=n(105),s=n(5),a=n(58),u=Object(s.c)("contextService");!function(e){function t(e){return e&&"object"==typeof e&&"string"==typeof e.id&&Array.isArray(e.folders)}e.isIWorkspace=t}(i||(i={}));var l;!function(e){function t(e){return e&&"object"==typeof e&&o.a.isUri(e.uri)&&"string"==typeof e.name&&"function"==typeof e.toResource}e.isIWorkspaceFolder=t}(l||(l={}));var c=(function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=null),this._id=e,this._configuration=n,this._foldersMap=a.c.forPaths(),this.folders=t}Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders},set:function(e){this._folders=e,this.updateFoldersMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e?this._foldersMap.findSubstr(e.toString()):null},e.prototype.updateFoldersMap=function(){this._foldersMap=a.c.forPaths();for(var e=0,t=this.folders;e=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},W=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},F=0,H="showUnused",j=function(){function e(e,t,n,i,o,r){this.model=e,this.viewModel=t,this.cursor=n,this.view=i,this.hasRealView=o,this.listenersToRemove=r}return e.prototype.dispose=function(){Object(d.d)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.cursor.dispose(),this.viewModel.dispose()},e}(),V=function(e){function t(t,n,i,o,r,s,a,u,d){var h=e.call(this)||this;h._onDidDispose=h._register(new c.a),h.onDidDispose=h._onDidDispose.event,h._onDidChangeModelContent=h._register(new c.a),h.onDidChangeModelContent=h._onDidChangeModelContent.event,h._onDidChangeModelLanguage=h._register(new c.a),h.onDidChangeModelLanguage=h._onDidChangeModelLanguage.event,h._onDidChangeModelLanguageConfiguration=h._register(new c.a),h.onDidChangeModelLanguageConfiguration=h._onDidChangeModelLanguageConfiguration.event,h._onDidChangeModelOptions=h._register(new c.a),h.onDidChangeModelOptions=h._onDidChangeModelOptions.event,h._onDidChangeModelDecorations=h._register(new c.a),h.onDidChangeModelDecorations=h._onDidChangeModelDecorations.event,h._onDidChangeConfiguration=h._register(new c.a),h.onDidChangeConfiguration=h._onDidChangeConfiguration.event,h._onDidChangeModel=h._register(new c.a),h.onDidChangeModel=h._onDidChangeModel.event,h._onDidChangeCursorPosition=h._register(new c.a),h.onDidChangeCursorPosition=h._onDidChangeCursorPosition.event,h._onDidChangeCursorSelection=h._register(new c.a),h.onDidChangeCursorSelection=h._onDidChangeCursorSelection.event,h._onDidAttemptReadOnlyEdit=h._register(new c.a),h.onDidAttemptReadOnlyEdit=h._onDidAttemptReadOnlyEdit.event,h._onDidLayoutChange=h._register(new c.a),h.onDidLayoutChange=h._onDidLayoutChange.event,h._editorTextFocus=h._register(new z),h.onDidFocusEditorText=h._editorTextFocus.onDidChangeToTrue,h.onDidBlurEditorText=h._editorTextFocus.onDidChangeToFalse,h._editorWidgetFocus=h._register(new z),h.onDidFocusEditorWidget=h._editorWidgetFocus.onDidChangeToTrue,h.onDidBlurEditorWidget=h._editorWidgetFocus.onDidChangeToFalse,h._onWillType=h._register(new c.a),h.onWillType=h._onWillType.event,h._onDidType=h._register(new c.a),h.onDidType=h._onDidType.event,h._onCompositionStart=h._register(new c.a),h.onCompositionStart=h._onCompositionStart.event,h._onCompositionEnd=h._register(new c.a),h.onCompositionEnd=h._onCompositionEnd.event,h._onDidPaste=h._register(new c.a),h.onDidPaste=h._onDidPaste.event,h._onMouseUp=h._register(new c.a),h.onMouseUp=h._onMouseUp.event,h._onMouseDown=h._register(new c.a),h.onMouseDown=h._onMouseDown.event,h._onMouseDrag=h._register(new c.a),h.onMouseDrag=h._onMouseDrag.event,h._onMouseDrop=h._register(new c.a),h.onMouseDrop=h._onMouseDrop.event,h._onContextMenu=h._register(new c.a),h.onContextMenu=h._onContextMenu.event,h._onMouseMove=h._register(new c.a),h.onMouseMove=h._onMouseMove.event,h._onMouseLeave=h._register(new c.a),h.onMouseLeave=h._onMouseLeave.event,h._onKeyUp=h._register(new c.a),h.onKeyUp=h._onKeyUp.event,h._onKeyDown=h._register(new c.a),h.onKeyDown=h._onKeyDown.event,h._onDidScrollChange=h._register(new c.a),h.onDidScrollChange=h._onDidScrollChange.event,h._onDidChangeViewZones=h._register(new c.a),h.onDidChangeViewZones=h._onDidChangeViewZones.event,h._domElement=t,h._id=++F,h._decorationTypeKeysToIds={},h._decorationTypeSubtypes={},h.isSimpleWidget=i.isSimpleWidget||!1,h._telemetryData=i.telemetryData||null,n=n||{},h._configuration=h._register(h._createConfiguration(n)),h._register(h._configuration.onDidChange(function(e){h._onDidChangeConfiguration.fire(e),e.layoutInfo&&h._onDidLayoutChange.fire(h._configuration.editor.layoutInfo),h._configuration.editor.showUnused?h._domElement.classList.add(H):h._domElement.classList.remove(H)})),h._contextKeyService=h._register(a.createScoped(h._domElement)),h._notificationService=d,h._codeEditorService=r,h._commandService=s,h._themeService=u,h._register(new B(h,h._contextKeyService)),h._register(new U(h,h._contextKeyService)),h._instantiationService=o.createChild(new k.a([E.c,h._contextKeyService])),h._attachModel(null),h._contributions={},h._actions={},h._focusTracker=new K(t),h._focusTracker.onChange(function(){h._editorWidgetFocus.setValue(h._focusTracker.hasFocus())}),h._contentWidgets={},h._overlayWidgets={};var f;f=Array.isArray(i.contributions)?i.contributions:p.d.getEditorContributions();for(var g=0,m=f.length;g1),this._hasNonEmptySelection.set(e.some(function(e){return!e.isEmpty()}))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))},t}(d.a),U=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._langId=x.a.languageId.bindTo(n),i._hasCompletionItemProvider=x.a.hasCompletionItemProvider.bindTo(n),i._hasCodeActionsProvider=x.a.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=x.a.hasCodeLensProvider.bindTo(n),i._hasDefinitionProvider=x.a.hasDefinitionProvider.bindTo(n),i._hasImplementationProvider=x.a.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=x.a.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=x.a.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=x.a.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=x.a.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=x.a.hasReferenceProvider.bindTo(n),i._hasRenameProvider=x.a.hasRenameProvider.bindTo(n),i._hasDocumentFormattingProvider=x.a.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=x.a.hasDocumentSelectionFormattingProvider.bindTo(n),i._hasSignatureHelpProvider=x.a.hasSignatureHelpProvider.bindTo(n),i._isInWalkThrough=x.a.isInEmbeddedEditor.bindTo(n);var o=function(){return i._update()};return i._register(t.onDidChangeModel(o)),i._register(t.onDidChangeModelLanguage(o)),i._register(I.d.onDidChange(o)),i._register(I.a.onDidChange(o)),i._register(I.b.onDidChange(o)),i._register(I.e.onDidChange(o)),i._register(I.m.onDidChange(o)),i._register(I.v.onDidChange(o)),i._register(I.l.onDidChange(o)),i._register(I.g.onDidChange(o)),i._register(I.i.onDidChange(o)),i._register(I.q.onDidChange(o)),i._register(I.r.onDidChange(o)),i._register(I.f.onDidChange(o)),i._register(I.h.onDidChange(o)),i._register(I.s.onDidChange(o)),o(),i}return R(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.reset=function(){this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.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._isInWalkThrough.reset()},t.prototype._update=function(){var e=this._editor.getModel();if(!e)return void this.reset();this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(I.d.has(e)),this._hasCodeActionsProvider.set(I.a.has(e)),this._hasCodeLensProvider.set(I.b.has(e)),this._hasDefinitionProvider.set(I.e.has(e)),this._hasImplementationProvider.set(I.m.has(e)),this._hasTypeDefinitionProvider.set(I.v.has(e)),this._hasHoverProvider.set(I.l.has(e)),this._hasDocumentHighlightProvider.set(I.g.has(e)),this._hasDocumentSymbolProvider.set(I.i.has(e)),this._hasReferenceProvider.set(I.q.has(e)),this._hasRenameProvider.set(I.r.has(e)),this._hasSignatureHelpProvider.set(I.s.has(e)),this._hasDocumentFormattingProvider.set(I.f.has(e)||I.h.has(e)),this._hasDocumentSelectionFormattingProvider.set(I.h.has(e)),this._isInWalkThrough.set(e.uri.scheme===h.a.walkThroughSnippet)},t}(d.a),K=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new c.a),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(u.N(t)),n._register(n._domFocusTracker.onDidFocus(function(){n._hasFocus=!0,n._onChange.fire(void 0)})),n._register(n._domFocusTracker.onDidBlur(function(){n._hasFocus=!1,n._onChange.fire(void 0)})),n}return R(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(d.a),G=encodeURIComponent(""),q=encodeURIComponent('');Object(A.e)(function(e,t){var n=e.getColor(N.e);n&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+n+"; }");var r=e.getColor(N.f);r&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+i(r)+'") repeat-x bottom left; }');var s=e.getColor(N.s);s&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+s+"; }");var a=e.getColor(N.t);a&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+i(a)+'") repeat-x bottom left; }');var u=e.getColor(N.j);u&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+u+"; }");var l=e.getColor(N.k);l&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+i(l)+'") repeat-x bottom left; }');var c=e.getColor(N.g);c&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+c+"; }");var d=e.getColor(N.h);d&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+o(d)+'") no-repeat bottom left; }');var h=e.getColor(N.r);h&&t.addRule("."+H+" .monaco-editor .squiggly-inline-unnecessary { opacity: "+h.rgba.a+"; will-change: opacity; }");var f=e.getColor(N.q);f&&t.addRule("."+H+" .monaco-editor .squiggly-unnecessary { border-bottom: 2px dashed "+f+"; }")})},function(e,t,n){"use strict";function i(e){return{isAfterLines:!1,horizontalDistanceToText:e}}n.d(t,"b",function(){return d}),n.d(t,"a",function(){return f}),n.d(t,"c",function(){return v});var o=n(20),r=n(87),s=n(16),a=n(116),u=n(4),l=n(2),c=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),d=function(){function e(e,t,n,i,o,r){void 0===n&&(n=0),void 0===i&&(i=null),void 0===o&&(o=null),void 0===r&&(r=null),this.element=e,this.type=t,this.mouseColumn=n,this.position=i,!o&&i&&(o=new l.a(i.lineNumber,i.column,i.lineNumber,i.column)),this.range=o,this.detail=r}return e._typeToString=function(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"},e.toString=function(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail},e.prototype.toString=function(){return e.toString(this)},e}(),h=function(){function e(){}return e.isTextArea=function(e){return 2===e.length&&3===e[0]&&6===e[1]},e.isChildOfViewLines=function(e){return e.length>=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),f=function(){function e(e,t,n){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var i=n.verticalOffset+n.height/2,o=e.model.getLineCount(),r=null,s=void 0,a=null;return n.afterLineNumber!==o&&(a=new u.a(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(r=new u.a(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,v._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}return e}(),g=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._ctx=t,o?(r.target=o,r.targetPath=s.a.collect(o,t.viewDomNode)):(r.target=null,r.targetPath=new Uint8Array(0)),r}return c(t,e),t.prototype.toString=function(){return"pos("+this.pos.x+","+this.pos.y+"), editorPos("+this.editorPos.x+","+this.editorPos.y+"), mouseVerticalOffset: "+this.mouseVerticalOffset+", mouseContentHorizontalOffset: "+this.mouseContentHorizontalOffset+"\n\ttarget: "+(this.target?this.target.outerHTML:null)},t.prototype.fulfill=function(e,t,n,i){return void 0===t&&(t=null),void 0===n&&(n=null),void 0===i&&(i=null),new d(this.target,e,this.mouseColumn,t,n,i)},t.prototype.withTarget=function(e){return new t(this._ctx,this.editorPos,this.pos,e)},t}(p),m={isAfterLines:!0},v=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=s.a.collect(t,this._viewHelper.viewDomNode);return!(!h.isChildOfContentWidgets(n)&&!h.isChildOfOverflowingContentWidgets(n))||!!h.isChildOfOverlayWidgets(n)},e.prototype.createMouseTarget=function(t,n,i,o){var r=new f(this._context,this._viewHelper,t),s=new g(r,n,i,o);try{return e._createMouseTarget(r,s,!1)}catch(e){return s.fulfill(0)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(0);var o=e._doHitTest(t,n);return o.position?e.createMouseTargetFromHitTestPosition(t,n,o.position.lineNumber,o.position.column):this._createMouseTarget(t,n.withTarget(o.hitTarget),!0)}var r=n,s=null;return s=s||e._hitTestContentWidget(t,r),s=s||e._hitTestOverlayWidget(t,r),s=s||e._hitTestMinimap(t,r),s=s||e._hitTestScrollbarSlider(t,r),s=s||e._hitTestViewZone(t,r),s=s||e._hitTestMargin(t,r),s=s||e._hitTestViewCursor(t,r),s=s||e._hitTestTextArea(t,r),s=s||e._hitTestViewLines(t,r,i),(s=s||e._hitTestScrollbar(t,r))||n.fulfill(0)},e._hitTestContentWidget=function(e,t){if(h.isChildOfContentWidgets(t.targetPath)||h.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(9,null,null,n):t.fulfill(0)}return null},e._hitTestOverlayWidget=function(e,t){if(h.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(12,null,null,n):t.fulfill(0)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=e.lastViewCursorsRenderData,i=0,o=n.length;ir.contentLeft+r.width)){var u=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(u<=a&&a<=u+r.height)return t.fulfill(6,r.position)}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?8:5;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return h.isTextArea(t.targetPath)?t.fulfill(1):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),o=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return(o-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,i,n.range,r))}return null},e._hitTestViewLines=function(t,n,o){if(!h.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var r=t.model.getLineCount(),s=t.model.getLineMaxColumn(r);return n.fulfill(7,new u.a(r,s),void 0,m)}if(o){if(h.isStrictChildOfViewLines(n.targetPath)){var a=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(a)){var l=t.getLineWidth(a),c=i(n.mouseContentHorizontalOffset-l);return n.fulfill(7,new u.a(a,1),void 0,c)}}return n.fulfill(0)}var d=e._doHitTest(t,n);return d.position?e.createMouseTargetFromHitTestPosition(t,n,d.position.lineNumber,d.position.column):this._createMouseTarget(t,n.withTarget(d.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(h.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new u.a(n,i))}return null},e._hitTestScrollbarSlider=function(e,t){if(h.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(11,new u.a(i,o))}}return null},e._hitTestScrollbar=function(e,t){if(h.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new u.a(n,i))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.editor.layoutInfo,o=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(o,this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){return e<0?1:Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,n,r){var s=new u.a(n,r),a=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>a){if(o.g&&1===s.column){var c=i(t.mouseContentHorizontalOffset-a);return t.fulfill(7,new u.a(n,e.model.getLineMaxColumn(n)),void 0,c)}var d=i(t.mouseContentHorizontalOffset-a);return t.fulfill(7,s,void 0,d)}var h=e.visibleRangeForPosition2(n,r);if(!h)return t.fulfill(0,s);var f=h.left;if(t.mouseContentHorizontalOffset===f)return t.fulfill(6,s);var p=[];if(p.push({offset:h.left,column:r}),r>1){var g=e.visibleRangeForPosition2(n,r-1);g&&p.push({offset:g.left,column:r-1})}if(r=t.editorPos.y+e.layoutInfo.height&&(s=t.editorPos.y+e.layoutInfo.height-1);var a=new r.e(t.pos.x,s),u=this._actualDoHitTestWithCaretRangeFromPoint(e,a.toClientCoordinates());return u.position?u:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(!n||!n.startContainer)return{position:null,hitTarget:null};var i=n.startContainer,o=null;if(i.nodeType===i.TEXT_NODE){var r=i.parentNode,s=r?r.parentNode:null,u=s?s.parentNode:null;if((u&&u.nodeType===u.ELEMENT_NODE?u.className:null)===a.b.CLASS_NAME){var l=e.getPositionFromDOMInfo(r,n.startOffset);return{position:l,hitTarget:null}}o=i.parentNode}else if(i.nodeType===i.ELEMENT_NODE){var r=i.parentNode,s=r?r.parentNode:null,c=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(c===a.b.CLASS_NAME){var l=e.getPositionFromDOMInfo(i,i.textContent.length);return{position:l,hitTarget:null}}o=i}return{position:null,hitTarget:o}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){var i=n.offsetNode.parentNode,o=i?i.parentNode:null,r=o?o.parentNode:null;if((r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===a.b.CLASS_NAME){return{position:e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset),hitTarget:null}}return{position:null,hitTarget:n.offsetNode.parentNode}}return{position:null,hitTarget:n.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var n=null,i=null,o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}o.collapse(!0);var r=o?o.parentElement():null,s=r?r.parentNode:null,u=s?s.parentNode:null;if((u&&u.nodeType===u.ELEMENT_NODE?u.className:"")===a.b.CLASS_NAME){var l=o.duplicate();l.moveToElementText(r),l.setEndPoint("EndToStart",o),n=e.getPositionFromDOMInfo(r,l.text.length),l.moveToElementText(e.viewDomNode)}else i=r;return o.moveToElementText(e.viewDomNode),{position:n,hitTarget:i}},e._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}},e}()},function(e,t,n){"use strict";function i(e,t,n,i,o){return new C(e,t,n,i,o)}function o(e,t,n,i,o){return new b(e,t,n,i,o)}n.d(t,"a",function(){return m}),n.d(t,"c",function(){return v}),n.d(t,"b",function(){return _});var r=n(20),s=n(12),a=n(7),u=n(190),l=n(53),c=n(83),d=n(63),h=n(10),f=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),p=function(){return!!a.e||!(a.c||r.j||r.m)}(),g=r.h,m=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}(),v=function(){function e(e,t){this.themeType=t,this.renderWhitespace=e.editor.viewInfo.renderWhitespace,this.renderControlCharacters=e.editor.viewInfo.renderControlCharacters,this.spaceWidth=e.editor.fontInfo.spaceWidth,this.useMonospaceOptimizations=e.editor.fontInfo.isMonospace&&!e.editor.viewInfo.disableMonospaceOptimizations,this.canUseHalfwidthRightwardsArrow=e.editor.fontInfo.canUseHalfwidthRightwardsArrow,this.lineHeight=e.editor.lineHeight,this.stopRenderingLineAfter=e.editor.viewInfo.stopRenderingLineAfter,this.fontLigatures=e.editor.viewInfo.fontLigatures}return e.prototype.equals=function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),_=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Object(s.b)(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e},e.prototype.onSelectionChanged=function(){return!(!g&&this._options.themeType!==h.b)&&(this._isMaybeInvalid=!0,!0)},e.prototype.renderLine=function(t,n,i,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=i.getViewLineRenderingData(t),s=this._options,a=c.a.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn);if(g||s.themeType===h.b)for(var u=i.selections,l=0,f=u.length;lt)){var v=m.startLineNumber===t?m.startColumn:r.minColumn,_=m.endLineNumber===t?m.endColumn:r.maxColumn;v<_&&a.push(new c.a(v,_,"inline-selected-text",0))}}var b=new d.b(s.useMonospaceOptimizations,s.canUseHalfwidthRightwardsArrow,r.content,r.continuesWithWrappedLine,r.isBasicASCII,r.containsRTL,r.minColumn-1,r.tokens,a,r.tabSize,s.spaceWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures);if(this._renderedViewLine&&this._renderedViewLine.input.equals(b))return!1;o.appendASCIIString('
');var C=Object(d.c)(b,o);o.appendASCIIString("
");var S=null;return p&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===C.containsForeignElements&&r.content.length<300&&b.lineTokens.getCount()<100&&(S=new y(this._renderedViewLine?this._renderedViewLine.domNode:null,b,C.characterMapping)),S||(S=w(this._renderedViewLine?this._renderedViewLine.domNode:null,b,C.characterMapping,C.containsRTL,C.containsForeignElements)),this._renderedViewLine=S,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,n){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==i&&e>i&&t>i?null:(-1!==i&&e>i&&(e=i),-1!==i&&t>i&&(t=i),this._renderedViewLine.getVisibleRangesForRange(e,t,n))},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1},e.CLASS_NAME="view-line",e}(),y=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),o=this._getCharPosition(t);return[new l.a(i,o-i)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),b=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(e,n);if(-1===i)return null;var o=this._readPixelOffset(t,n);return-1===o?null:[new l.a(i,o-i)]}return this._readVisibleRangesForRange(e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return-1===i?null:[new l.a(i,0)]}return this._readRawVisibleRangesForRange(e,t,n)},e.prototype._readPixelOffset=function(e,t){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth()}if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(-1!==n)return n;var i=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=i,i}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var n=u.a.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return n&&0!==n.length?n[0].left:-1}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(e-1),o=d.a.getPartIndex(i),r=d.a.getCharIndex(i),s=u.a.readHorizontalRanges(this._getReadingTarget(),o,r,o,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new l.a(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(e-1),o=d.a.getPartIndex(i),r=d.a.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(t-1),a=d.a.getPartIndex(s),c=d.a.getCharIndex(s);return u.a.readHorizontalRanges(this._getReadingTarget(),o,r,a,c,n.clientRectDeltaLeft,n.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i){var o=e.prototype._readVisibleRangesForRange.call(this,t,n,i);if(!o||0===o.length||t===n||1===t&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){var r=this._readPixelOffset(n,i);if(-1!==r){var s=o[o.length-1];s.left, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null)},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){var t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){var t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,n){for(var i=0,o=-1;-1!==(o=t.indexOf("\n",o+1));)i++;return[e,n*t.length,i]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,n,o){if(!e)return{text:"",replaceCharCnt:0};var r=e.value,s=e.selectionStart,a=e.selectionEnd,u=t.value,l=t.selectionStart,c=t.selectionEnd;o&&r.length>0&&s===a&&l===c&&!i.A(u,r)&&i.i(u,r)&&(s=0,a=0);var d=r.substring(a),h=u.substring(c),f=i.c(d,h);u=u.substring(0,u.length-f),r=r.substring(0,r.length-f);var p=r.substring(0,s),g=u.substring(0,l),m=i.b(p,g);if(u=u.substring(m),r=r.substring(m),l-=m,s-=m,c-=m,a-=m,n&&l===c&&r.length>0){var v=null;if(l===u.length?i.A(u,r)&&(v=u.substring(r.length)):i.i(u,r)&&(v=u.substring(0,u.length-r.length)),null!==v&&v.length>0&&(/\uFE0F/.test(v)||i.d(v)))return{text:v,replaceCharCnt:0}}if(l===c){if(r===u&&0===s&&a===r.length&&l===u.length&&-1===u.indexOf("\n")&&i.e(u))return{text:"",replaceCharCnt:0};return{text:u,replaceCharCnt:p.length-m}}return{text:u,replaceCharCnt:a-s}},e.EMPTY=new e("",0,0,null,null),e}(),a=function(){function e(){}return e._getPageOfLine=function(t){return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var n=t*e._LINES_PER_PAGE,i=n+1,o=n+e._LINES_PER_PAGE;return new r.a(i,1,o+1,1)},e.fromEditorSelection=function(t,n,i,a){var u,l=e._getPageOfLine(i.startLineNumber),c=e._getRangeForPage(l),d=e._getPageOfLine(i.endLineNumber),h=e._getRangeForPage(d),f=c.intersectRanges(new r.a(1,1,i.startLineNumber,i.startColumn)),p=n.getValueInRange(f,1),g=n.getLineCount(),m=n.getLineMaxColumn(g),v=h.intersectRanges(new r.a(i.endLineNumber,i.endColumn,g,m)),_=n.getValueInRange(v,1);if(l===d||l+1===d)u=n.getValueInRange(i,1);else{var y=c.intersectRanges(i),b=h.intersectRanges(i);u=n.getValueInRange(y,1)+String.fromCharCode(8230)+n.getValueInRange(b,1)}if(a){p.length>500&&(p=p.substring(p.length-500,p.length)),_.length>500&&(_=_.substring(0,500)),u.length>1e3&&(u=u.substring(0,500)+String.fromCharCode(8230)+u.substring(u.length-500,u.length))}return new s(p+u+_,p.length,p.length+u.length,new o.a(i.startLineNumber,i.startColumn),new o.a(i.endLineNumber,i.endColumn))},e._LINES_PER_PAGE=10,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(195),o=(n.n(i),n(7)),r=n(42),s=n(4),a=n(25),u=n(10),l=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),c=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._readConfig(),n._lastCursorModelPosition=new s.a(1,1),n._renderResult=null,n._context.addEventHandler(n),n}return l(t,e),t.prototype._readConfig=function(){var e=this._context.configuration.editor;this._lineHeight=e.lineHeight,this._renderLineNumbers=e.viewInfo.renderLineNumbers,this._renderCustomLineNumbers=e.viewInfo.renderCustomLineNumbers,this._lineNumbersLeft=e.layoutInfo.lineNumbersLeft,this._lineNumbersWidth=e.layoutInfo.lineNumbersWidth},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return this._readConfig(),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getLineRenderLineNumber=function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new s.a(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){var i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===i?''+n+"":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n?String(n):n%10==0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);for(var n=o.c?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s='
',a=[],u=i;u<=r;u++){var l=u-i,c=this._getLineRenderLineNumber(u);a[l]=c?s+c+"
":""}this._renderResult=a},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(r.a);Object(u.e)(function(e,t){var n=e.getColor(a.n);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var i=e.getColor(a.b);i&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+i+"; }")})},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(12),o=n(16),r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),s=function(e){function t(t){var n=e.call(this,t)||this;return n._canUseLayerHinting=n._context.configuration.editor.canUseLayerHinting,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._glyphMarginLeft=n._context.configuration.editor.layoutInfo.glyphMarginLeft,n._glyphMarginWidth=n._context.configuration.editor.layoutInfo.glyphMarginWidth,n._domNode=n._createDomNode(),n}return r(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._createDomNode=function(){var e=Object(i.b)(document.createElement("div"));return e.setClassName(t.OUTER_CLASS_NAME),e.setPosition("absolute"),e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Object(i.b)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME),e.appendChild(this._glyphMarginBackgroundDomNode),e},t.prototype.onConfigurationChanged=function(e){return e.canUseLayerHinting&&(this._canUseLayerHinting=this._context.configuration.editor.canUseLayerHinting),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,this._glyphMarginLeft=this._context.configuration.editor.layoutInfo.glyphMarginLeft,this._glyphMarginWidth=this._context.configuration.editor.layoutInfo.glyphMarginWidth),!0},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollTopChanged},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setLayerHinting(this._canUseLayerHinting);var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n)},t.CLASS_NAME="glyph-margin",t.OUTER_CLASS_NAME="margin",t}(o.b)},function(e,t,n){"use strict";function i(e){var t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}function o(e,t){void 0===t&&(t=!0);for(var n=[0],o=1,r=0,s=e.length;r126)&&(a=!1)}var h=new d(i(e),o,r,s,a);return e.length=0,h}t.d=o,t.c=r,n.d(t,"b",function(){return f}),n.d(t,"a",function(){return g});var s=n(4),a=n(2),u=n(36),l=n(205),c=n(121),d=function(){function e(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o}return e}(),h=function(){function e(e,t,n,i,o){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=o}return e}(),f=function(){function e(e,t){this.buffer=e,this.lineStarts=t}return e}(),p=function(){function e(e){this._limit=e,this._cache=[]}return e.prototype.get=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=this._cache,i=0;i=e)&&(n[i]=null,t=!0)}if(t){for(var r=[],i=0;i0){e[r].lineStarts||(e[r].lineStarts=o(e[r].buffer));var a=new h(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),i=this.rbInsertRight(i,a)}this._searchCache=new p(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,n=65535-Math.floor(21845),i=2*n,r="",s=0,a=[];if(this.iterate(this.root,function(u){var l=t.getNodeContent(u),c=l.length;if(s<=n||s+c0){var u=r.replace(/\r\n|\r|\n/g,e);a.push(new f(u,o(u)))}this.create(a,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==l.a;)if(i.left!==l.a&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;var o=this.getAccumulatedValue(i,e-i.lf_left-2);return n+=o+t-1}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,i=e;t!==l.a;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=this.getOffsetAt(n+1,1),a=i-r;return new s.a(n+1,a+1)}return new s.a(n+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===l.a){var r=this.getOffsetAt(n+1,1),a=i-e-r;return new s.a(n+1,a+1)}t=t.right}return new s.a(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==l.a;){var c=this._buffers[r.piece.bufferIndex].buffer,d=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=c.substring(d,d+t.remainder);break}u+=c.substr(d,r.piece.length),r=r.next()}return u},e.prototype.getLinesContent=function(){return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/)},e.prototype.getLength=function(){return this._length},e.prototype.getLineCount=function(){return this._lineCnt},e.prototype.getLineContent=function(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)},e.prototype.getLineCharCode=function(e,t){var n=this.nodeAt2(e,t+1);if(n.remainder===n.node.piece.length){var i=n.node.next();if(!i)return 0;var o=this._buffers[i.piece.bufferIndex],r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o.buffer.charCodeAt(r)}var o=this._buffers[n.node.piece.bufferIndex],r=this.offsetInBuffer(n.node.piece.bufferIndex,n.node.piece.start),s=r+n.remainder;return o.buffer.charCodeAt(s)},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength},e.prototype.findMatchesInNode=function(e,t,n,i,o,r,s,u,l,d,h){var f,p=this._buffers[e.piece.bufferIndex],g=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),m=this.offsetInBuffer(e.piece.bufferIndex,o),v=this.offsetInBuffer(e.piece.bufferIndex,r);t.reset(m);var _={line:0,column:0};do{if(f=t.next(p.buffer)){if(f.index>=v)return d;this.positionInBuffer(e,f.index-g,_);var y=this.getLineFeedCnt(e.piece.bufferIndex,o,_),b=_.line===o.line?_.column-o.column+i:_.column+1,C=b+f[0].length;if(h[d++]=Object(c.d)(new a.a(n+y,b,n+y,C),f,u),f.index+f[0].length>=v)return d;if(d>=l)return d}}while(f);return d},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new c.b(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),d=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,d,t,n,i,r,o),o;for(var h=e.startLineNumber,f=a.node;f!==u.node;){var p=this.getLineFeedCnt(f.piece.bufferIndex,l,f.piece.end);if(p>=1){var g=this._buffers[f.piece.bufferIndex].lineStarts,m=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),v=g[l.line+p],_=h===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(f,s,h,_,l,this.positionInBuffer(f,v-m),t,n,i,r,o))>=i)return o;h+=p}var y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){var b=this.getLineContent(h).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,y,r,o,n,i),o}if((r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(y),h,y,r,o,n,i))>=i)return o;h++,a=this.nodeAt2(h,1),f=a.node,l=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){var C=h===e.startLineNumber?e.startColumn-1:0,b=this.getLineContent(h).substring(C,e.endColumn-1);return r=this._findMatchesInLine(t,s,b,e.endLineNumber,C,r,o,n,i),o}var w=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,h,w,l,d,t,n,i,r,o),o},e.prototype._findMatchesInLine=function(e,t,n,i,o,r,s,l,d){var h=e.wordSeparators;if(!l&&e.simpleSearch){for(var f=e.simpleSearch,p=f.length,g=n.length,m=-p;-1!==(m=n.indexOf(f,m+p));)if((!h||Object(c.e)(h,n,g,m,p))&&(s[r++]=new u.b(new a.a(i,m+1+o,i,m+1+p+o),null),r>=d))return r;return r}var v;t.reset(0);do{if((v=t.next(n))&&(s[r++]=Object(c.d)(new a.a(i,v.index+1+o,i,v.index+1+v[0].length+o),v,l),r>=d))return r}while(v);return r},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==l.a){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,c=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<65535)return this.appendToNode(o,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,o),this._searchCache.valdiate(e);else if(s+o.piece.length>e){var d=[],f=new h(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)){var p=this.nodeCharCodeAt(o,r);if(10===p){var g={line:f.start.line+1,column:0};f=new h(f.bufferIndex,g,f.end,this.getLineFeedCnt(f.bufferIndex,g,f.end),f.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){var m=this.nodeCharCodeAt(o,r-1);if(13===m){var v=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,v),t="\r"+t,0===o.piece.length&&d.push(o)}else this.deleteNodeTail(o,c)}else this.deleteNodeTail(o,c);var _=this.createNewPieces(t);f.length>0&&this.rbInsertRight(o,f);for(var y=o,b=0;b<_.length;b++)y=this.rbInsertRight(y,_[b]);this.deleteNodes(d)}else this.insertContentToNodeRight(t,o)}else for(var C=this.createNewPieces(t),o=this.rbInsertLeft(null,C[0]),b=1;b=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=d))break;u=c+1}return n?(n.line=c,n.column=a-h,null):{line:c,column:a-h}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;t65535){for(var t=[];e.length>65535;){var n=e.charCodeAt(65534),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,65535),e=e.substring(65535));var r=o(i);t.push(new h(this._buffers.length,{line:0,column:0},{line:r.length-1,column:i.length-r[r.length-1]},r.length-1,i.length)),this._buffers.push(new f(i,r))}var s=o(e);return t.push(new h(this._buffers.length,{line:0,column:0},{line:s.length-1,column:e.length-s[s.length-1]},s.length-1,e.length)),this._buffers.push(new f(e,s)),t}var a=this._buffers[0].buffer.length,u=o(e,!1),l=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===a&&0!==a&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},l=this._lastChangeBufferPos;for(var c=0;c=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return c+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:c,nodeStartLineNumber:d-(e-1-n.lf_left)}),s.substring(a+r,a+u-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){var r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=s.substring(a+r,a+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,c+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==l.a;){var s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){var u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=s.substring(a,a+u-t)}var a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=s.substr(a,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==l.a;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,c=s-o,d=n.length+c;e.piece=new h(n.bufferIndex,n.start,r,a,d),Object(l.g)(this,e,c,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=this.offsetInBuffer(n.bufferIndex,r),u=s-i,c=o-a,d=n.length+c;e.piece=new h(n.bufferIndex,r,n.end,s,d),Object(l.g)(this,e,c,u)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,c=this.getLineFeedCnt(i.bufferIndex,i.start,u),d=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new h(i.bufferIndex,i.start,u,c,d),Object(l.g)(this,e,d-s,c-a);var f=new h(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),p=this.rbInsertRight(e,f);this.validateCRLFWithPrevNode(p)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var r=o(t,!1),s=0;se)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==l.a;)if(n.left!==l.a&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2);if(o+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==l.a;){if(n.piece.lineFeedCnt>0){var r=this.getAccumulatedValue(n,0),s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(n.piece.length>=t-1){return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)}}t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===l.a||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&(!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o))},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==l.a&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new h(e.piece.bufferIndex,e.piece.start,n,s,r),Object(l.g)(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new h(t.piece.bufferIndex,a,t.piece.end,c,u),Object(l.g)(this,t,-1,-1),0===t.piece.length&&i.push(t);var d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(var f=0;f=n)break;var i=e.charCodeAt(t);if(110===i||114===i||87===i)return!0}}return!1}function o(e,t,n){if(!n)return new h.b(e,null);for(var i=[],o=0,r=t.length;o0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0}return!1}function s(e,t,n,i,o){if(i+o===n)return!0;var r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i+o-1);if(0!==e.get(s))return!0}return!1}function a(e,t,n,i,o){return r(e,t,n,i,o)&&s(e,t,n,i,o)}n.d(t,"a",function(){return f}),t.d=o,n.d(t,"c",function(){return m}),t.e=a,n.d(t,"b",function(){return v});var u=n(3),l=n(66),c=n(4),d=n(2),h=n(36),f=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i}return e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var e;e=this.isRegex?i(this.searchString):this.searchString.indexOf("\n")>=0;var t=null;try{t=u.g(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0})}catch(e){return null}if(!t)return null;var n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new p(t,this.wordSeparators?Object(l.a)(this.wordSeparators):null,n?this.searchString:null)},e}(),p=function(){function e(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}return e}(),g=function(){function e(e){for(var t=[],n=0,i=0,o=e.length;i>0);t[o]>=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1}return n+1},e}(),m=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new v(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,o,r){var s,a=0;i?(a=i.findLineFeedCountBeforeOffset(o),s=t+o+a):s=t+o;var u;if(i){var l=i.findLineFeedCountBeforeOffset(o+r.length),c=l-a;u=s+r.length+c}else u=s+r.length;var h=e.getPositionAt(s),f=e.getPositionAt(u);return new d.a(h.lineNumber,h.column,f.lineNumber,f.column)},e._doFindMatchesMultiline=function(e,t,n,i,r){var s,a=e.getOffsetAt(t.getStartPosition()),u=e.getValueInRange(t,1),l="\r\n"===e.getEOL()?new g(u):null,c=[],d=0;for(n.reset(0);s=n.next(u);)if(c[d++]=o(this._getMultilineMatchRange(e,a,u,l,s.index,s[0]),s,i),d>=r)return c;return c},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}var u=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,u,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var l=t.startLineNumber+1;l=l))return r;return r}var _,y=new v(e.wordSeparators,e.regex);y.reset(0);do{if((_=y.next(t))&&(s[r++]=o(new d.a(n,_.index+1+i,n,_.index+1+_[0].length+i),_,u),r>=l))return r}while(_);return r},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new v(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)},e._doFindNextMatchMultiline=function(e,t,n,i){var r=new c.a(t.lineNumber,1),s=e.getOffsetAt(r),a=e.getLineCount(),u=e.getValueInRange(new d.a(r.lineNumber,r.column,a,e.getLineMaxColumn(a)),1),l="\r\n"===e.getEOL()?new g(u):null;n.reset(t.column-1);var h=n.next(u);return h?o(this._getMultilineMatchRange(e,s,u,l,h.index,h[0]),h,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new c.a(1,1),n,i):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var u=1;u<=o;u++){var l=(r+u-1)%o,c=e.getLineContent(l+1),d=this._findFirstMatchInLine(n,c,l+1,1,i);if(d)return d}return null},e._findFirstMatchInLine=function(e,t,n,i,r){e.reset(i-1);var s=e.next(t);return s?o(new d.a(n,s.index+1,n,s.index+1+s[0].length),s,r):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new v(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)},e._doFindPreviousMatchMultiline=function(e,t,n,i){var o=this._doFindMatchesMultiline(e,new d.a(1,1,t.lineNumber,t.column),n,i,9990);if(o.length>0)return o[o.length-1];var r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new c.a(r,e.getLineMaxColumn(r)),n,i):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var u=1;u<=o;u++){var l=(o+r-u-1)%o,c=e.getLineContent(l+1),d=this._findLastMatchInLine(n,c,l+1,i);if(d)return d}return null},e._findLastMatchInLine=function(e,t,n,i){var r,s=null;for(e.reset(0);r=e.next(t);)s=o(new d.a(n,r.index+1,n,r.index+1+r[0].length),r,i);return s},e}(),v=function(){function e(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var i=t.index,o=t[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength)return null;if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||a(this._wordSeparators,e,n,i,o))return t}while(t);return null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(3),o=n(123),r=n(22),s=n(124),a=n(2),u=function(){function e(){}return e.deleteRight=function(e,t,n,i){for(var r=[],u=3!==e,l=0,c=i.length;l1){var m=n.getLineContent(g.lineNumber),v=i.m(m),_=-1===v?m.length+1:v+1;if(g.column<=_){var y=r.a.visibleColumnFromColumn2(t,n,g),b=r.a.prevTabStop(y,t.tabSize),C=r.a.columnFromVisibleColumn2(t,n,g.lineNumber,b);p=new a.a(g.lineNumber,C,g.lineNumber,g.column)}else p=new a.a(g.lineNumber,g.column-1,g.lineNumber,g.column)}else{var w=s.a.left(t,n,g.lineNumber,g.column);p=new a.a(w.lineNumber,w.column,g.lineNumber,g.column)}}p.isEmpty()?l[d]=null:(p.startLineNumber!==p.endLineNumber&&(c=!0),l[d]=new o.a(p,""))}return[c,l]},e.cut=function(e,t,n){for(var i=[],s=0,u=n.length;s1?(d=c.lineNumber-1,h=t.getLineMaxColumn(c.lineNumber-1),f=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber)):(d=c.lineNumber,h=1,f=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber));var g=new a.a(d,h,f,p);g.isEmpty()?i[s]=null:i[s]=new o.a(g,"")}else i[s]=null;else i[s]=new o.a(l,"")}return new r.e(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"c",function(){return r}),n.d(t,"b",function(){return s});var i=n(19),o=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),o=n[0].range;return new i.a(o.endLineNumber,o.endColumn,o.endLineNumber,o.endColumn)},e}(),r=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),o=n[0].range;return new i.a(o.startLineNumber,o.startColumn,o.startLineNumber,o.startColumn)},e}(),s=function(){function e(e,t,n,i,o){void 0===o&&(o=!1),this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=o}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),o=n[0].range;return new i.a(o.endLineNumber+this._lineNumberDeltaOffset,o.endColumn+this._columnDeltaOffset,o.endLineNumber+this._lineNumberDeltaOffset,o.endColumn+this._columnDeltaOffset)},e}();!function(){function e(e,t,n){this._range=e,this._text=t,this._initialSelection=n}e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._range,this._text),this._selectionId=t.trackSelection(this._initialSelection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)}}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(22),o=n(4),r=n(2),s=function(){function e(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}return e}(),a=function(){function e(){}return e.left=function(e,t,n,o){return o>t.getLineMinColumn(n)?i.a.isLowSurrogate(t,n,o-2)?o-=2:o-=1:n>1&&(n-=1,o=t.getLineMaxColumn(n)),new s(n,o,0)},e.moveLeft=function(t,n,i,o,r){var s,a;if(i.hasSelection()&&!o)s=i.selection.startLineNumber,a=i.selection.startColumn;else{var u=e.left(t,n,i.position.lineNumber,i.position.column-(r-1));s=u.lineNumber,a=u.column}return i.move(o,s,a,0)},e.right=function(e,t,n,o){return oc?(n=c,u?o=t.getLineMaxColumn(n):(o=Math.min(t.getLineMaxColumn(n),o),i.a.isInsideSurrogatePair(t,n,o)&&(o-=1))):(o=i.a.columnFromVisibleColumn2(e,t,n,l),i.a.isInsideSurrogatePair(t,n,o)&&(o-=1)),r=l-i.a.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),new s(n,o,r)},e.moveDown=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.down(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateDown=function(t,n,s){var a=s.selection,u=e.down(t,n,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),l=e.down(t,n,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new i.f(new r.a(u.lineNumber,u.column,u.lineNumber,u.column),u.leftoverVisibleColumns,new o.a(l.lineNumber,l.column),l.leftoverVisibleColumns)},e.up=function(e,t,n,o,r,a,u){var l=i.a.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize)+r;return n-=a,n<1?(n=1,u?o=t.getLineMinColumn(n):(o=Math.min(t.getLineMaxColumn(n),o),i.a.isInsideSurrogatePair(t,n,o)&&(o-=1))):(o=i.a.columnFromVisibleColumn2(e,t,n,l),i.a.isInsideSurrogatePair(t,n,o)&&(o-=1)),r=l-i.a.visibleColumnFromColumn(t.getLineContent(n),o,e.tabSize),new s(n,o,r)},e.moveUp=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.up(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns)},e.translateUp=function(t,n,s){var a=s.selection,u=e.up(t,n,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),l=e.up(t,n,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new i.f(new r.a(u.lineNumber,u.column,u.lineNumber,u.column),u.leftoverVisibleColumns,new o.a(l.lineNumber,l.column),l.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,n,i){var o,r=n.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s;return o=n.position.column===a?s:a,n.move(i,r,o,0)},e.moveToEndOfLine=function(e,t,n,i){var o=n.position.lineNumber,r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e.moveToBeginningOfBuffer=function(e,t,n,i){return n.move(i,1,1,0)},e.moveToEndOfBuffer=function(e,t,n,i){var o=t.getLineCount(),r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return f});var i=n(13),o=n(3),r=n(123),s=n(211),a=n(212),u=n(22),l=n(66),c=n(2),d=n(48),h=n(38),f=function(){function e(){}return e.indent=function(e,t,n){for(var i=[],o=0,r=n.length;o1){var u=i-1;for(u=i-1;u>=1;u--){var l=n.getLineContent(u),f=o.w(l);if(f>=0)break}if(u<1)return null;var p=n.getLineMaxColumn(u),g=h.a.getEnterAction(n,new c.a(u,p,u,p));g&&(s=g.indentation,(r=g.enterAction)&&(s+=r.appendText))}return r&&(r===d.a.Indent&&(s=e.shiftIndent(t,s)),r===d.a.Outdent&&(s=e.unshiftIndent(t,s)),s=t.normalizeIndentation(s)),s||null},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",s=n.getStartPosition();if(e.insertSpaces)for(var a=u.a.visibleColumnFromColumn2(e,t,s),l=e.tabSize,c=l-a%l,d=0;d=0?s.setEndPosition(s.endLineNumber,Math.max(s.endColumn,O+1)):s.setEndPosition(s.endLineNumber,n.getLineMaxColumn(s.endLineNumber)),i)return new r.c(s,N+t.normalizeIndentation(w.afterEnter),!0);var E=0;return I<=O+1&&(t.insertSpaces||(x=Math.ceil(x/t.tabSize)),E=Math.min(x+1-t.normalizeIndentation(w.afterEnter).length-1,0)),new r.b(s,N+t.normalizeIndentation(w.afterEnter),0,E,!0)}return e._typeCommand(s,"\n"+t.normalizeIndentation(L),i)},e._isAutoIndentType=function(e,t,n){if(!e.autoIndent)return!1;for(var i=0,o=n.length;i1){var m=Object(l.a)(t.wordSeparators),v=g.charCodeAt(p.column-2);if(0===m.get(v))return!1}var _=g.charAt(p.column-1);if(_){if(!e._isBeforeClosingBrace(t,r,_)&&!a(_))return!1}if(!n.isCheapToTokenize(p.lineNumber))return!1;n.forceTokenization(p.lineNumber);var y=n.getLineTokens(p.lineNumber),b=!1;try{b=h.a.shouldAutoClosePair(r,y,p.column)}catch(e){Object(i.d)(e)}if(!b)return!1}return!0},e._runAutoClosingOpenCharType=function(e,t,n,i,o){for(var s=[],a=0,l=i.length;a2){var v=Object(l.a)(n.wordSeparators),_=f.charCodeAt(d.column-3),y=v.get(_);if(0===y)continue}var b=f.charAt(d.column-1);if(b){var C=e._isBeforeClosingBrace(n,p,b),w=Object(u.g)(p)?n.shouldAutoCloseBefore.quote:n.shouldAutoCloseBefore.bracket;if(C)continue;if(!w(b))continue}if(!o.isCheapToTokenize(d.lineNumber))continue;o.forceTokenization(d.lineNumber);var S=o.getLineTokens(d.lineNumber),L=!1;try{L=h.a.shouldAutoClosePair(p,S,d.column-1)}catch(e){Object(i.d)(e)}if(L){var x=n.autoClosingPairsOpen[p];a[c]=new r.b(s[c],x,0,-x.length)}}}return new u.e(1,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e.typeWithInterceptors=function(t,n,i,o,s){if("\n"===s){for(var a=[],l=0,c=o.length;l140)return void n._setDesiredScrollPositionNow(s.getScrollPosition());var a=n._sliderMousePosition(e),u=a-i;n._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(u))},function(){n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t()}),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(u.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(e,t,n){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=0,this._scrollSize=0,this._scrollPosition=0,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}return e.prototype.clone=function(){var t=new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize);return t.setVisibleSize(this._visibleSize),t.setScrollSize(this._scrollSize),t.setScrollPosition(this._scrollPosition),t},e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)},e._computeValues=function(e,t,n,i,o){var r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var u=Math.round(Math.max(20,Math.floor(n*s/i))),l=(s-u)/(i-n),c=o*l;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(u),computedSliderRatio:l,computedSliderPosition:Math.round(c)}},e.prototype._refreshComputedValues=function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getScrollPosition=function(){return this._scrollPosition},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize},e.prototype.isNeeded=function(){return this._computedIsNeeded},e.prototype.getSliderSize=function(){return this._computedSliderSize},e.prototype.getSliderPosition=function(){return this._computedSliderPosition},e.prototype.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)},e}()},function(e,t,n){"use strict";function i(e,t){var n=t-e;return function(t){return e+n*s(t)}}function o(e,t,n){return function(i){return it&&(n=t-e),n<0&&(n=0),i<0&&(i=0),r+i>o&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.withScrollDimensions=function(t){return new e(void 0!==t.width?t.width:this.width,void 0!==t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,void 0!==t.height?t.height:this.height,void 0!==t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop)},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,void 0!==t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,void 0!==t.scrollTop?t.scrollTop:this.scrollTop)},e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}},e}(),d=function(e){function t(t,n){var i=e.call(this)||this;return i._onScroll=i._register(new a.a),i.onScroll=i._onScroll.event,i._smoothScrollDuration=t,i._scheduleAtNextAnimationFrame=n,i._state=new c(0,0,0,0,0,0),i._smoothScrolling=null,i}return l(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this)},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e},t.prototype.validateScrollPosition=function(e){return this._state.withScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._state},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)},t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state},t.prototype.getCurrentScrollPosition=function(){return this._state},t.prototype.setScrollPositionNow=function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)},t.prototype.setScrollPositionSmooth=function(e){var t=this;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};var n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;var i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i}else{var n=this._state.withScrollPosition(e);this._smoothScrolling=f.start(this._state,n,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())})},t.prototype._performSmoothScrolling=function(){var e=this;if(this._smoothScrolling){var t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())})}},t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(u.a),h=function(){function e(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}return e}(),f=function(){function e(e,t,n,i){this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations()}return e.prototype._initAnimations=function(){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)},e.prototype._initAnimation=function(e,t,n){if(Math.abs(e-t)>2.5*n){var r=void 0,s=void 0;return en&&(p=n-g);var m=c.color,v=this._color2Id[m];v||(v=++this._lastAssignedId,this._color2Id[m]=v,this._id2Color[v]=m);var _=new i(p-g,p+g,v);c.setColorZone(_),a.push(_)}return this._colorZonesInvalid=!1,a.sort(i.compare),a},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(e,t,n,i,o,r){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=o,this._contextKeyService=r}return e.prototype.isSupported=function(){return this._contextKeyService.contextMatchesRules(this._precondition)},e.prototype.run=function(){if(!this.isSupported())return Promise.resolve(void 0);var e=this._run();return e||Promise.resolve(void 0)},e}()},function(e,t,n){"use strict";function i(e,t,n,i,o,r,s){var a=e.createLineMapping(t,n,i,o,r);return null===a?s?f.INSTANCE:p.INSTANCE:new g(a,s)}n.d(t,"b",function(){return c}),n.d(t,"c",function(){return h}),n.d(t,"a",function(){return v});var o=n(4),r=n(2),s=n(67),a=n(46),u=n(79),l=n(39),c=function(){function e(e,t){this.outputLineIndex=e,this.outputOffset=t}return e}(),d=function(){function e(e){this._lines=e}return e.prototype.convertViewPositionToModelPosition=function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)},e.prototype.convertViewRangeToModelRange=function(e){var t=this._lines.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this._lines.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new r.a(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.validateViewPosition=function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)},e.prototype.validateViewRange=function(e,t){var n=this._lines.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this._lines.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new r.a(n.lineNumber,n.column,i.lineNumber,i.column)},e.prototype.convertModelPositionToViewPosition=function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)},e.prototype.convertModelRangeToViewRange=function(e){var t=this._lines.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this._lines.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return new r.a(t.lineNumber,t.column,n.lineNumber,n.column)},e.prototype.modelPositionIsVisible=function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)},e}(),h=function(){function e(e,t,n,i,o,r){this.model=e,this._validModelVersionId=-1,this.tabSize=n,this.wrappingColumn=i,this.columnsForFullWidthChar=o,this.wrappingIndent=r,this.linePositionMapperFactory=t,this._constructLines(!0)}return e.prototype.dispose=function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])},e.prototype.createCoordinatesConverter=function(){return new d(this)},e.prototype._ensureValidState=function(){if(this.model.getVersionId()!==this._validModelVersionId)throw new Error("ViewModel is out of sync with Model!");this.lines.length!==this.model.getLineCount()&&this._constructLines(!1)},e.prototype._constructLines=function(e){var t=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var n=this.model.getLinesContent(),o=n.length,s=new Uint32Array(o),a=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e)}).sort(r.a.compareRangesUsingStarts),l=1,c=0,d=-1,h=d+1=l&&p<=c,m=i(this.linePositionMapperFactory,n[f],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!g);s[f]=m.getViewLineCount(),this.lines[f]=m}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new u.b(s)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map(function(t){return e.model.getDecorationRange(t)})},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map(function(e){return t.model.validateRange(e)}).sort(r.a.compareRangesUsingStarts),i=[],o=n[0].startLineNumber,s=n[0].endLineNumber,a=1,u=n.length;as+1?(i.push(new r.a(o,1,s,1)),o=l.startLineNumber,s=l.endLineNumber):l.endLineNumber>s&&(s=l.endLineNumber)}return i.push(new r.a(o,1,s,1)),i},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),i=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e)}).sort(r.a.compareRangesUsingStarts);if(n.length===i.length){for(var o=!1,a=0;a=c&&g<=d?this.lines[a].isVisible()&&(this.lines[a]=this.lines[a].setVisible(!1),m=!0):(p=!0,this.lines[a].isVisible()||(this.lines[a]=this.lines[a].setVisible(!0),m=!0)),m){var v=this.lines[a].getViewLineCount();this.prefixSumComputer.changeValue(a,v)}}return p||this.setHiddenAreas([]),!0},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),!0)},e.prototype.setWrappingSettings=function(e,t,n){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==n)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=n,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,n){if(e<=this._validModelVersionId)return null;var i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new a.j(i,o)},e.prototype.onModelLinesInserted=function(e,t,n,r){if(e<=this._validModelVersionId)return null;for(var s=this.getHiddenAreas(),u=!1,l=new o.a(t,1),c=0;cl?(d=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,h=d+l-1,g=h+1,m=g+(r-l)-1,c=!0):rt?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getActiveIndentGuide=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),u=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:u.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),r=[],s=[],a=[],u=n.lineNumber-1,l=i.lineNumber-1,c=null,d=u;d<=l;d++){var h=this.lines[d];if(h.isVisible()){var f=h.getViewLineNumberOfModelPosition(0,d===u?n.column:1),p=h.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(d+1)),g=p-f+1,m=0;g>1&&1===h.getViewLineMinColumn(this.model,d+1,p)&&(m=0===f?1:2),s.push(g),a.push(m),null===c&&(c=new o.a(d+1,0))}else null!==c&&(r=r.concat(this.model.getLinesIndentGuides(c.lineNumber,d)),c=null)}null!==c&&(r=r.concat(this.model.getLinesIndentGuides(c.lineNumber,i.lineNumber)),c=null);for(var v=t-e+1,_=new Array(v),y=0,b=0,C=r.length;bt&&(f=!0,h=t-o+1);var p=d+h;if(c.getViewLinesData(this.model,u+1,d,p,o-e,n,a),o+=h,f)break}}return a},e.prototype.validateViewPosition=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),r=i.index,s=i.remainder,a=this.lines[r],u=a.getViewLineMinColumn(this.model,r+1,s),l=a.getViewLineMaxColumn(this.model,r+1,s);tl&&(t=l);var c=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new o.a(r+1,c)).equals(n)?new o.a(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,r=n.remainder,s=this.lines[i].getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new o.a(i+1,s))},e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var n=this.model.validatePosition(new o.a(e,t)),i=n.lineNumber,r=n.column,s=i-1,a=!1;s>0&&!this.lines[s].isVisible();)s--,a=!0;if(0===s&&!this.lines[s].isVisible())return new o.a(1,1);var u=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));return a?this.lines[s].getViewPositionOfModelPosition(u,this.model.getLineMaxColumn(s+1)):this.lines[i-1].getViewPositionOfModelPosition(u,r)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var o=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new _,r=0,s=i.length;rt.id?1:0:n});for(var f=[],p=0,g=null,m=0,v=a.length;m0&&(r=this.wrappedIndent+r),r},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=o-i;return n>0&&(r=this.wrappedIndent.length+r),r},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});n>0&&(r=this.wrappedIndent+r);var s=n>0?this.wrappedIndentLength+1:1,a=r.length+1,u=n+10&&(c=this.wrappedIndentLength);var d=e.getLineTokens(t);return new l.c(r,u,s,a,d.sliceAndInflate(i,o,c))},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a0&&(n0&&(r+=this.wrappedIndentLength),new o.a(e+i,r)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex},e}(),m=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}(),v=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new m(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new a.j(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new a.k(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new a.i(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount()},e.prototype.warmUpLookupCache=function(e,t){},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),o=0;o=t)return void(n>s&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]},e}()},function(e,t,n){"use strict";n.d(t,"c",function(){return p}),n.d(t,"d",function(){return g}),n.d(t,"b",function(){return m}),n.d(t,"a",function(){return _});var i=n(292),o=(n.n(i),n(7)),r=n(11),s=n(0),a=n(51),u=n(6),l=n(17),c=n(64),d=n(44),h=n(1),f=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),p=function(e){function t(t,n,i){var o=e.call(this)||this;return o.options=i,o._context=t||o,o._action=n,n instanceof a.a&&o._register(n.onDidChange(function(e){o.element&&o.handleActionChangeEvent(e)})),o}return f(t,e),t.prototype.handleActionChangeEvent=function(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()},Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){this._actionRunner=e},enumerable:!0,configurable:!0}),t.prototype.getAction=function(){return this._action},t.prototype.isEnabled=function(){return this._action.enabled},t.prototype.setActionContext=function(e){this._context=e},t.prototype.render=function(e){var t=this;this.element=e,c.b.addTarget(e);var n=this.options&&this.options.draggable;n&&(e.draggable=!0),this._register(u.g(this.element,c.a.Tap,function(e){return t.onClick(e)})),this._register(u.g(this.element,u.c.MOUSE_DOWN,function(e){n||u.b.stop(e,!0);var i=e;t._action.enabled&&0===i.button&&u.e(t.element,"active")})),this._register(u.g(this.element,u.c.CLICK,function(e){u.b.stop(e,!0),t.options&&t.options.isMenu?t.onClick(e):o.h(function(){return t.onClick(e)})})),this._register(u.g(this.element,u.c.DBLCLICK,function(e){u.b.stop(e,!0)})),[u.c.MOUSE_UP,u.c.MOUSE_OUT].forEach(function(e){t._register(u.g(t.element,e,function(e){u.b.stop(e),u.D(t.element,"active")}))})},t.prototype.onClick=function(e){u.b.stop(e,!0);var t;l.i(this._context)?t=e:(t=this._context,l.f(t)&&(t.event=e)),this._actionRunner.run(this._action,t)},t.prototype.focus=function(){this.element&&(this.element.focus(),u.e(this.element,"focused"))},t.prototype.blur=function(){this.element&&(this.element.blur(),u.D(this.element,"focused"))},t.prototype.updateEnabled=function(){},t.prototype.updateLabel=function(){},t.prototype.updateTooltip=function(){},t.prototype.updateClass=function(){},t.prototype.updateChecked=function(){},t.prototype.dispose=function(){this.element&&(u.F(this.element),this.element=null),e.prototype.dispose.call(this)},t}(s.a),g=function(e){function t(n){var i=e.call(this,t.ID,n,n?"separator text":"separator")||this;return i.checked=!1,i.radio=!1,i.enabled=!1,i}return f(t,e),t.ID="vs.actions.separator",t}(a.a),m=function(e){function t(t,n,i){void 0===i&&(i={});var o=e.call(this,t,n,i)||this;return o.options=i,o.options.icon=void 0!==i.icon&&i.icon,o.options.label=void 0===i.label||i.label,o.cssClass="",o}return f(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.label=u.k(this.element,u.a("a.action-label")),this._action.id===g.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button"),this.options.label&&this.options.keybinding&&(u.k(this.element,u.a("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()},t.prototype.focus=function(){e.prototype.focus.call(this),this.label.focus()},t.prototype.updateLabel=function(){this.options.label&&(this.label.textContent=this.getAction().label)},t.prototype.updateTooltip=function(){var e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=r.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&(this.label.title=e)},t.prototype.updateClass=function(){this.cssClass&&u.E(this.label,this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,u.e(this.label,"icon"),this.cssClass&&u.f(this.label,this.cssClass),this.updateEnabled()):u.D(this.label,"icon")},t.prototype.updateEnabled=function(){this.getAction().enabled?(this.label.removeAttribute("aria-disabled"),u.D(this.element,"disabled"),u.D(this.label,"disabled"),this.label.tabIndex=0):(this.label.setAttribute("aria-disabled","true"),u.e(this.element,"disabled"),u.e(this.label,"disabled"),u.G(this.label))},t.prototype.updateChecked=function(){this.getAction().checked?u.e(this.label,"checked"):u.D(this.label,"checked")},t}(p),v={orientation:0,context:null,triggerKeys:{keys:[3,10],keyDown:!1}},_=function(e){function t(t,n){void 0===n&&(n=v);var i=e.call(this)||this;i._onDidBlur=i._register(new h.a),i._onDidCancel=i._register(new h.a),i._onDidRun=i._register(new h.a),i._onDidBeforeRun=i._register(new h.a),i.options=n,i._context=n.context,i._actionRunner=i.options.actionRunner,i.options.triggerKeys||(i.options.triggerKeys=v.triggerKeys),i._actionRunner||(i._actionRunner=new a.b,i._register(i._actionRunner)),i._register(i._actionRunner.onDidRun(function(e){return i._onDidRun.fire(e)})),i._register(i._actionRunner.onDidBeforeRun(function(e){return i._onDidBeforeRun.fire(e)})),i.items=[],i.focusedItem=void 0,i.domNode=document.createElement("div"),i.domNode.className="monaco-action-bar",!1!==n.animated&&u.e(i.domNode,"animated");var o,r;switch(i.options.orientation){case 0:o=15,r=17;break;case 1:o=17,r=15,i.domNode.className+=" reverse";break;case 2:o=16,r=18,i.domNode.className+=" vertical";break;case 3:o=18,r=16,i.domNode.className+=" vertical reverse"}return i._register(u.g(i.domNode,u.c.KEY_DOWN,function(e){var t=new d.a(e),n=!0;t.equals(o)?i.focusPrevious():t.equals(r)?i.focusNext():t.equals(9)?i.cancel():i.isTriggerKeyEvent(t)?i.options.triggerKeys&&i.options.triggerKeys.keyDown&&i.doTrigger(t):n=!1,n&&(t.preventDefault(),t.stopPropagation())})),i._register(u.g(i.domNode,u.c.KEY_UP,function(e){var t=new d.a(e);i.isTriggerKeyEvent(t)?(i.options.triggerKeys.keyDown||i.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&i.updateFocusedItem()})),i.focusTracker=i._register(u.N(i.domNode)),i._register(i.focusTracker.onDidBlur(function(){document.activeElement!==i.domNode&&u.z(document.activeElement,i.domNode)||(i._onDidBlur.fire(),i.focusedItem=void 0)})),i._register(i.focusTracker.onDidFocus(function(){return i.updateFocusedItem()})),i.actionsList=document.createElement("ul"),i.actionsList.className="actions-container",i.actionsList.setAttribute("role","toolbar"),i.options.ariaLabel&&i.actionsList.setAttribute("aria-label",i.options.ariaLabel),i.domNode.appendChild(i.actionsList),t.appendChild(i.domNode),i}return f(t,e),Object.defineProperty(t.prototype,"onDidBlur",{get:function(){return this._onDidBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidCancel",{get:function(){return this._onDidCancel.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}),t.prototype.isTriggerKeyEvent=function(e){var t=!1;return this.options.triggerKeys&&this.options.triggerKeys.keys.forEach(function(n){t=t||e.equals(n)}),t},t.prototype.updateFocusedItem=function(){for(var e=0;e=n.actionsList.children.length?(n.actionsList.appendChild(i),n.items.push(r)):(n.actionsList.insertBefore(i,n.actionsList.children[o]),n.items.splice(o,0,r),o++)})},t.prototype.clear=function(){this.items=Object(s.d)(this.items),u.l(this.actionsList)},t.prototype.isEmpty=function(){return 0===this.items.length},t.prototype.focus=function(e){e&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):this.updateFocus()},t.prototype.focusNext=function(){void 0===this.focusedItem&&(this.focusedItem=this.items.length-1);var e,t=this.focusedItem;do{this.focusedItem=(this.focusedItem+1)%this.items.length,e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},t.prototype.focusPrevious=function(){void 0===this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),e=this.items[this.focusedItem]}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0)},t.prototype.updateFocus=function(e){void 0===this.focusedItem&&this.actionsList.focus();for(var t=0;t'"_]/g,"-")}function c(e,t){console.log(e.languageId+": "+t)}function d(e,t){return new Error(e.languageId+": "+t)}function h(e,t,n,i,o){var r=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,s=null;return t.replace(r,function(t,r,l,c,d,h,f,p,g){return a(l)?a(c)?!a(d)&&d0;){var i=e.tokenizer[n];if(i)return i;var o=n.lastIndexOf(".");n=o<0?null:n.substr(0,o)}return null}function p(e,t){for(var n=t;n&&n.length>0;){if(e.stateNames[n])return!0;var i=n.lastIndexOf(".");n=i<0?null:n.substr(0,i)}return!1}t.e=o,t.g=r,t.f=s,t.b=a,t.d=u,t.i=l,t.h=c,t.a=d,t.k=h,t.c=f,t.j=p},function(module,exports,__webpack_require__){"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};__webpack_require__(139);var _editor=__webpack_require__(142),monaco=_interopRequireWildcard(_editor);__webpack_require__(344);var blazorFiddle={getOptionsFromEl:function getOptionsFromEl(el){if(el.dataset.hasOwnProperty("blazorFiddle")){var v=el.dataset.blazorFiddle;return v&&v.startsWith("{")&&v.endsWith("}")&&(v="("+v+")"),blazorFiddle.parseOptions(eval(v))}return{}},parseOptions:function(e){return void 0===e&&(e=!0),"object"!==(void 0===e?"undefined":_typeof(e))&&(e={auto:e}),e.hasOwnProperty("auto")||(e.auto=!0),e},colorize:function(e,t){return monaco.editor.colorize(e,"razor",t)},setContent:function(e,t,n){return monaco.editor.colorize(t,"razor",n).then(function(t){e.innerHTML=t})},addLink:function(e,t){var n=document.createElement("form");n.setAttribute("method","post"),n.setAttribute("action","https://blazorfiddle.com/post"),n.setAttribute("target","_blank"),n.classList.add("blazor-fiddle-post-form");var i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name","f"),i.setAttribute("value",e.innerText);var o=document.createElement("input");o.setAttribute("type","submit"),o.setAttribute("value","Edit in BlazorFiddle"),o.classList.add("blazor-fiddle-post-form-button"),n.appendChild(i),n.appendChild(o),e.parentElement.insertBefore(n,e.nextSibling)},create:function(e,t){var n=blazorFiddle.getOptionsFromEl(e);return t&&Object.assign(n,t),t=n,monaco.editor.colorizeElement(e,{mimeType:"razor"}).then(function(){return!t.text||blazorFiddle.setContent(e,t.text,t)}).then(function(){t.disableLink||blazorFiddle.addLink(e,t)})}};Array.prototype.forEach.call(document.getElementsByClassName("blazor-fiddle"),function(e){blazorFiddle.getOptionsFromEl(e).auto&&blazorFiddle.create(e)}),window.blazorFiddle=blazorFiddle},function(e,t,n){var i=n(140);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,".blazor-fiddle {\r\n border: 1px solid lightgray;\r\n}\r\n\r\n.blazor-fiddle + .blazor-fiddle-link {\r\n float: right;\r\n color: blue;\r\n}\r\n\r\n.blazor-fiddle + .blazor-fiddle-post-form {\r\n float: right;\r\n /*color: blue;*/\r\n}\r\n\r\n\r\n.blazor-fiddle-post-form-button {\r\n background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #6300ee), color-stop(1, #6300ee));\r\n background:-moz-linear-gradient(top, #6300ee 5%, #6300ee 100%);\r\n background:-webkit-linear-gradient(top, #6300ee 5%, #6300ee 100%);\r\n background:-o-linear-gradient(top, #6300ee 5%, #6300ee 100%);\r\n background:-ms-linear-gradient(top, #6300ee 5%, #6300ee 100%);\r\n background:linear-gradient(to bottom, #6300ee 5%, #6300ee 100%);\r\n filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#6300ee', endColorstr='#6300ee',GradientType=0);\r\n background-color:#6300ee;\r\n -moz-border-radius:10px;\r\n -webkit-border-radius:10px;\r\n border-radius:10px;\r\n display:inline-block;\r\n cursor:pointer;\r\n color:#ffffff;\r\n font-family:Arial;\r\n font-size:15px;\r\n font-weight:bold;\r\n padding:4px 20px;\r\n text-decoration:none;\r\n}\r\n.blazor-fiddle-post-form-button:hover {\r\n background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #6300ee), color-stop(1, #6300ee));\r\n background:-moz-linear-gradient(top, #6300ee 5%, #6300ee 100%);\r\n background:-webkit-linear-gradient(top, #6300ee 5%, #6300ee 100%);\r\n background:-o-linear-gradient(top, #6300ee 5%, #6300ee 100%);\r\n background:-ms-linear-gradient(top, #6300ee 5%, #6300ee 100%);\r\n background:linear-gradient(to bottom, #6300ee 5%, #6300ee 100%);\r\n filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#6300ee', endColorstr='#6300ee',GradientType=0);\r\n background-color:#6300ee;\r\n}\r\n.blazor-fiddle-post-form-button:active {\r\n position:relative;\r\n top:1px;\r\n}\r\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o))return e;var r;return r=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:i+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")"})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"CancellationTokenSource",function(){return c}),n.d(t,"Emitter",function(){return d}),n.d(t,"KeyCode",function(){return h}),n.d(t,"KeyMod",function(){return f}),n.d(t,"Position",function(){return p}),n.d(t,"Range",function(){return g}),n.d(t,"Selection",function(){return m}),n.d(t,"SelectionDirection",function(){return v}),n.d(t,"MarkerSeverity",function(){return _}),n.d(t,"MarkerTag",function(){return y}),n.d(t,"Promise",function(){return b}),n.d(t,"Uri",function(){return C}),n.d(t,"Token",function(){return w}),n.d(t,"editor",function(){return S}),n.d(t,"languages",function(){return L});var i=n(98),o=n(26),r=n(103),s=n(144),a=n(341),u=self;void 0===u.Promise&&(u.Promise=i.a),o.a.wrappingIndent=0,o.a.viewInfo.glyphMargin=!1,o.a.autoIndent=!1;var l=Object(r.a)();l.editor=Object(s.a)(),l.languages=Object(a.a)();var c=l.CancellationTokenSource,d=l.Emitter,h=l.KeyCode,f=l.KeyMod,p=l.Position,g=l.Range,m=l.Selection,v=l.SelectionDirection,_=l.MarkerSeverity,y=l.MarkerTag,b=l.Promise,C=l.Uri,w=l.Token,S=l.editor,L=l.languages;u.monaco=l,void 0!==u.require&&"function"==typeof u.require.config&&u.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},function(e,t,n){"use strict";function i(e){var t,n=this,i=!1;return function(){return i?t:(i=!0,t=e.apply(n,arguments))}}t.a=i},function(e,t,n){"use strict";function i(e,t,n){var i=new U.a(e,t),o=null;i.has(F.a)||(o=new z.d,i.set(F.a,o)),i.has($.a)||i.set($.a,new O.a(i.get(D.a),i.get(G.b)));var r=n(i);return o&&o.setEditor(r),r}function o(e,t,n){return i(e,n||{},function(n){return new B.b(e,t,n,n.get(J.a),n.get(D.a),n.get(G.b),n.get(q.c),n.get(Q.a),n.get(Y.b),n.get(K.a),n.get(X.a),n.get(Z.a))})}function r(e){return U.b.codeEditorService.get().onCodeEditorAdd(function(t){e(t)})}function s(e,t,n){return i(e,n,function(n){return new B.a(e,t,n,n.get(J.a),n.get(q.c),n.get(Q.a),n.get(Y.b),n.get(W.a),n.get(D.a),n.get(K.a),n.get(X.a),n.get(Z.a))})}function a(e,t){return new E.a(e,t)}function u(e,t,n){return U.b.modelService.get().createModel(e,t,n)}function l(e,t,n){if(e=e||"",!t){var i=n?n.path:null,o=e.indexOf("\n"),r=e;return-1!==o&&(r=e.substring(0,o)),u(e,U.b.modeService.get().createByFilepathOrFirstLine(i,r),n)}return u(e,U.b.modeService.get().create(t),n)}function c(e,t){U.b.modelService.get().setMode(e,U.b.modeService.get().create(t))}function d(e,t,n){e&&U.b.markerService.get().changeOne(t,e.uri,n)}function h(e){return U.b.markerService.get().read(e)}function f(e){return U.b.modelService.get().getModel(e)}function p(){return U.b.modelService.get().getModels()}function g(e){return U.b.modelService.get().onModelAdded(e)}function m(e){return U.b.modelService.get().onModelRemoved(e)}function v(e){return U.b.modelService.get().onModelModeChanged(function(t){e({model:t.model,oldLanguage:t.oldModeId})})}function _(e){return Object(H.a)(U.b.modelService.get(),e)}function y(e,t){return V.a.colorizeElement(U.b.standaloneThemeService.get(),U.b.modeService.get(),e,t)}function b(e,t,n){return V.a.colorize(U.b.modeService.get(),e,t,n)}function C(e,t,n){return void 0===n&&(n=4),V.a.colorizeModelLine(e,t,n)}function w(e){var t=R.u.get(e);return t||{getInitialState:function(){return P.c},tokenize:function(t,n,i){return Object(P.d)(e,t,n,i)},tokenize2:void 0}}function S(e,t){U.b.modeService.get().triggerMode(t);for(var n=w(t),i=e.split(/\r\n|\r|\n/),o=[],r=n.getInitialState(),s=0,a=i.length;s .scrollbar,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: background !important;\r\n\t\tborder: 1px solid windowtext;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\t\tbackground: windowtext !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\r\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\t\tbackground: highlight !important;\r\n\t}\r\n\r\n\t/* overview ruler */\r\n\t.monaco-editor.vs .decorationsOverviewRuler,\r\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\r\n\t\topacity: 0;\r\n\t}\r\n\r\n\t/* minimap */\r\n\t.monaco-editor.vs .minimap,\r\n\t.monaco-editor.vs-dark .minimap {\r\n\t\tdisplay: none;\r\n\t}\r\n\r\n\t/* squiggles */\r\n\t.monaco-editor.vs .squiggly-d-error,\r\n\t.monaco-editor.vs-dark .squiggly-d-error {\r\n\t\tbackground: transparent !important;\r\n\t\tborder-bottom: 4px double #E47777;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-c-warning,\r\n\t.monaco-editor.vs-dark .squiggly-c-warning {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-b-info,\r\n\t.monaco-editor.vs-dark .squiggly-b-info {\r\n\t\tborder-bottom: 4px double #71B771;\r\n\t}\r\n\t.monaco-editor.vs .squiggly-a-hint,\r\n\t.monaco-editor.vs-dark .squiggly-a-hint {\r\n\t\tborder-bottom: 4px double #6c6c6c;\r\n\t}\r\n\r\n\t/* contextmenu */\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tcolor: highlighttext !important;\r\n\t\tbackground-color: highlight !important;\r\n\t}\r\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\r\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\r\n\t\t-ms-high-contrast-adjust: none;\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t/* diff editor */\r\n\t.monaco-diff-editor.vs .diffOverviewRuler,\r\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\r\n\t\tdisplay: none;\r\n\t}\r\n\t.monaco-editor.vs .line-insert,\r\n\t.monaco-editor.vs-dark .line-insert,\r\n\t.monaco-editor.vs .line-delete,\r\n\t.monaco-editor.vs-dark .line-delete {\r\n\t\tbackground: transparent !important;\r\n\t\tborder: 1px solid highlight !important;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\t.monaco-editor.vs .char-insert,\r\n\t.monaco-editor.vs-dark .char-insert,\r\n\t.monaco-editor.vs .char-delete,\r\n\t.monaco-editor.vs-dark .char-delete {\r\n\t\tbackground: transparent !important;\r\n\t}\r\n}\r\n\r\n/*.monaco-editor.vs [tabindex="0"]:focus {\r\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}\r\n\r\n.monaco-editor.vs-dark [tabindex="0"]:focus {\r\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\r\n\toutline-offset: -1px;\r\n\topacity: 1 !important;\r\n}*/\r\n',""])},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var i=n(6),o=n(148),r=n(45),s=n(105),a=n(29),u=n(24),l=n(5),c=n(47),d=n(149),h=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},f=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},p=function(){function e(e,t,n){void 0===n&&(n=d.a),this._editorService=e,this._commandService=t,this._telemetryService=n}return e.prototype.open=function(e,t){var n;this._telemetryService&&this._telemetryService.publicLog("openerService",{scheme:e.scheme});var a=e.scheme,l=e.path,c=e.query,d=e.fragment,h=void 0;if(a===r.a.http||a===r.a.https||a===r.a.mailto)i.O(e.toString(!0));else if("command"===a&&u.a.getCommand(l)){var f=[];try{f=Object(o.a)(c),Array.isArray(f)||(f=[f])}catch(e){}h=(n=this._commandService).executeCommand.apply(n,[l].concat(f))}else{var p=void 0,g=/^L?(\d+)(?:,(\d+))?/.exec(d);if(g&&(p={startLineNumber:parseInt(g[1]),startColumn:g[2]?parseInt(g[2]):1},e=e.with({fragment:""})),!e.scheme)return Promise.resolve(void 0);e.scheme===r.a.file&&(e=s.b(e)),h=this._editorService.openCodeEditor({resource:e,options:{selection:p}},this._editorService.getFocusedCodeEditor(),t&&t.openToSide)}return Promise.resolve(h)},e=h([f(0,a.a),f(1,u.b),f(2,Object(l.d)(c.a))],e)}()},function(e,t,n){"use strict";function i(e){var t=JSON.parse(e);return t=o(t,0)}function o(e,t){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return r.a.revive(e);case 2:return new RegExp(e.source,e.flags)}for(var n in e)Object.hasOwnProperty.call(e,n)&&(e[n]=o(e[n],t+1))}return e}t.a=i;var r=n(28)},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(33),o=new(function(){function e(){}return e.prototype.publicLog=function(e,t){return i.b.wrap(void 0)},e.prototype.getTelemetryInfo=function(){return i.b.wrap({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(73),o=n(1),r=n(0),s=n(31),a=n(2),u={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},l=function(){function e(e,t){void 0===t&&(t={});var n=this;this._onDidUpdate=new o.a,this._editor=e,this._options=s.e(t,u,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._disposables.push(this._editor.onDidDispose(function(){return n.dispose()})),this._disposables.push(this._editor.onDidUpdateDiff(function(){return n._onDiffUpdated()})),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition(function(e){n.ignoreSelectionChange||(n.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel(function(e){n.revealFirst=!0})),this._init()}return e.prototype._init=function(){this._editor.getLineChanges()},e.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},e.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach(function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){t.ranges.push({rhs:!0,range:new a.a(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):t.ranges.push({rhs:!0,range:new a.a(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort(function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0}),this._onDidUpdate.fire(this)},e.prototype._initIdx=function(e){var t=!1,n=this._editor.getPosition();if(!n)return void(this.nextIdx=0);for(var i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var o=n.range.getStartPosition();this._editor.setPosition(o),this._editor.revealPositionInCenter(o,t)}finally{this.ignoreSelectionChange=!1}}},e.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},e.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)},e.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},e.prototype.dispose=function(){Object(r.d)(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=[],this.disposed=!0},e}()},function(e,t,n){"use strict";function i(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(i):!!e.exclusive)}n.d(t,"a",function(){return u});var o=n(1),r=n(0),s=n(152),a=n(59),u=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new o.a}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this,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),Object(r.e)(function(){if(i){var e=n._entries.indexOf(i);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),i=void 0)}})},e.prototype.has=function(e){return this.all(e).length>0},e.prototype.all=function(e){if(!e)return[];this._updateScores(e);for(var t=[],n=0,i=this._entries;n0&&t.push(o.provider)}return t},e.prototype.ordered=function(e){var t=[];return this._orderedForEach(e,function(e){return t.push(e.provider)}),t},e.prototype.orderedGroups=function(e){var t,n,i=[];return this._orderedForEach(e,function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],i.push(t))}),i},e.prototype._orderedForEach=function(e,t){if(e){this._updateScores(e);for(var n=0;n0&&t(i)}}},e.prototype._updateScores=function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;for(var o=0,r=this._entries;o0){for(var l=0,c=this._entries;lt._score?-1:e._timet._time?-1:0},e}()},function(e,t,n){"use strict";function i(e,t,n,r){if(Array.isArray(e)){for(var s=0,a=0,u=e;as&&(s=c)}return s}if("string"==typeof e)return r?"*"===e?5:e===n?10:0:0;if(e){var d=e.language,h=e.pattern,f=e.scheme,p=e.hasAccessToAllModels;if(!r&&!p)return 0;var s=0;if(f)if(f===t.scheme)s=10;else{if("*"!==f)return 0;s=5}if(d)if(d===n)s=10;else{if("*"!==d)return 0;s=Math.max(s,5)}if(h){if(h!==t.fsPath&&!Object(o.a)(h,t.fsPath))return 0;s=10}return s}return 0}t.a=i;var o=n(106)},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(1),o=n(0),r=function(){function e(){this._onDidChange=new i.a,this.onDidChange=this._onDidChange.event,this._map=Object.create(null),this._promises=Object.create(null),this._colorMap=null}return e.prototype.fire=function(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})},e.prototype.register=function(e,t){var n=this;return this._map[e]=t,this.fire([e]),Object(o.e)(function(){n._map[e]===t&&(delete n._map[e],n.fire([e]))})},e.prototype.getPromise=function(e){var t=this,n=this.get(e);if(n)return Promise.resolve(n);var i=this._promises[e];return i?i.then(function(n){return t.get(e)}):null},e.prototype.get=function(e){return this._map[e]||null},e.prototype.setColorMap=function(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Object.keys(this._map),changedColorMap:!0})},e.prototype.getColorMap=function(){return this._colorMap},e.prototype.getDefaultBackground=function(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null},e}()},function(e,t,n){"use strict";function i(e,t){return new s(e,t)}t.a=i;var o=n(108),r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),s=function(e){function t(t,n){var i=e.call(this,t,n.label)||this;return i._foreignModuleId=n.moduleId,i._foreignModuleCreateData=n.createData||null,i._foreignProxy=null,i}return r(t,e),t.prototype._getForeignProxy=function(){var e=this;return this._foreignProxy||(this._foreignProxy=this._getProxy().then(function(t){return t.loadForeignModule(e._foreignModuleId,e._foreignModuleCreateData).then(function(n){e._foreignModuleCreateData=null;for(var i=function(e,n){return t.fmr(e,n)},o={},r=0;r1&&!!e.close}).map(function(e){return new i.b(e)}),n.docComment&&this._complexAutoClosePairs.push(new i.b({open:n.docComment.open,close:n.docComment.close}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets.length;t=0))return{appendText:s.close}}}}return null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(e){this._indentationRules=e}return e.prototype.shouldIncrease=function(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))},e.prototype.shouldDecrease=function(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))},e.prototype.shouldIndentNextLine=function(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))},e.prototype.shouldIgnore=function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))},e.prototype.getIndentMetadata=function(e){var t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(13),o=n(3),r=n(48),s=function(){function e(t){var n=this;t=t||{},t.brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],t.brackets.forEach(function(t){var i=e._createOpenBracketRegExp(t[0]),o=e._createCloseBracketRegExp(t[1]);i&&o&&n._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:o})}),this._regExpRules=t.regExpRules||[]}return e.prototype.onEnter=function(e,t,n){for(var i=0,o=this._regExpRules.length;i0&&n.length>0)for(var i=0,o=this._brackets.length;i0)for(var i=0,o=this._brackets.length;i=i._lines.length?r.b:(n=i._lines[o],a=i._wordenize(n,e),s=0,o+=1,u())};return{next:u}},t.prototype.getLineWords=function(e,t){for(var n=this._lines[e-1],i=this._wordenize(n,t),o=[],r=0,s=i;rthis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e},t}(d.a),_=function(){function e(e){this._foreignModuleFactory=e,this._foreignModule=null}return e.prototype.computeDiff=function(e,t,n){var i=this._getModel(e),o=this._getModel(t);if(!i||!o)return Promise.resolve(null);var r=i.getLinesContent(),s=o.getLinesContent(),a=new c.a(r,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0}),u=a.computeDiff(),l=!(u.length>0)&&this._modelsAreIdentical(i,o);return Promise.resolve({identical:l,changes:u})},e.prototype._modelsAreIdentical=function(e,t){var n=e.getLineCount();if(n!==t.getLineCount())return!1;for(var i=1;i<=n;i++){if(e.getLineContent(i)!==t.getLineContent(i))return!1}return!0},e.prototype.computeMoreMinimalEdits=function(t,n){var r=this._getModel(t);if(!r)return Promise.resolve(n);var s=[],a=void 0;n=Object(i.f)(n,function(e,t){return e.range&&t.range?l.a.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)});for(var u=0,c=n;ue._diffLimit)s.push({range:h,text:f});else for(var m=Object(o.b)(g,f,!1),v=r.offsetAt(l.a.lift(h).getStartPosition()),_=0,y=m;_1&&v>1;){var _=p.charCodeAt(m-2),y=g.charCodeAt(v-2);if(_!==y)break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(r,s+1,1,m,a+1,1,v);for(var b=l._getLastNonBlankColumn(p,1),C=l._getLastNonBlankColumn(g,1),w=p.length+1,S=g.length+1;bt&&(t=u),s>n&&(n=s),l>n&&(n=l)}t++,n++;for(var c=new a.a(n,t,0),i=0,o=e.length;i=this._maxCharCode?0:this._states.get(e,t)},e}(),l=null,c=null,d=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r);if(2!==e.get(s))break;r--}while(r>i);if(i>0){var a=t.charCodeAt(i-1),u=t.charCodeAt(r);(40===a&&41===u||91===a&&93===u||123===a&&125===u)&&r--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t){for(var n=i(),r=o(),s=[],a=1,u=t.getLineCount();a<=u;a++){for(var l=t.getLineContent(a),c=l.length,d=0,h=0,f=0,p=1,g=!1,m=!1,v=!1;d=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null},e.INSTANCE=new e,e}()},function(e,t,n){"use strict";function i(e,t,n){return r(e,t,n)}function o(e,t){var n=[],i=new Uint32Array(2);i[0]=0,i[1]=16793600;for(var o=0,r=e.length;o")}return n.join("")}function r(e,t,n){for(var i=[],o=n.getInitialState(),r=0,s=e.length;r"),o=l.endState}return i.join("")}n.d(t,"a",function(){return h});var s=n(14),a=n(3),u=n(62),l=n(15),c=n(63),d=n(39),h=function(){function e(){}return e.colorizeElement=function(e,t,n,i){i=i||{};var o=i.theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();e.setTheme(o);var s=n.firstChild?n.firstChild.nodeValue:"";n.className+=" "+o;var a=function(e){n.innerHTML=e};return this.colorize(t,s||"",r,i).then(a,function(e){return console.error(e)})},e.colorize=function(e,t,n,r){var u=4;r&&"number"==typeof r.tabSize&&(u=r.tabSize),a.C(t)&&(t=t.substr(1));var c=t.split(/\r\n|\r|\n/),d=e.getModeId(n);if(!d)return Promise.resolve(o(c,u));e.triggerMode(d);var h=l.u.get(d);return h?Promise.resolve(i(c,u,h)):new Promise(function(e,t){var n=null,r=null,a=function(){n&&(n.dispose(),n=null),r&&(r.dispose(),r=null);var t=l.u.get(d);return e(t?i(c,u,t):o(c,u))};r=new s.d,r.cancelAndSet(a,500),n=l.u.onDidChange(function(e){e.changedLanguages.indexOf(d)>=0&&a()})})},e.colorizeLine=function(e,t,n,i,o){void 0===o&&(o=4);var r=d.d.isBasicASCII(e,t),s=d.d.containsRTL(e,r,n);return Object(c.d)(new c.b(!1,!0,e,!1,r,s,0,i,[],o,0,-1,"none",!1,!1)).html},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t);e.forceTokenization(t);var o=e.getLineTokens(t),r=o.inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),r,n)},e}()},function(e,t,n){"use strict";function i(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===o.a.ICodeEditor}t.a=i;var o=n(35)},function(e,t,n){"use strict";function i(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}n.d(t,"a",function(){return s});var o=n(21),r=n(1),s={JSONContribution:"base.contributions.json"},a=function(){function e(){this._onDidChangeSchema=new r.a,this.schemasById={}}return e.prototype.registerSchema=function(e,t){this.schemasById[i(e)]=t,this._onDidChangeSchema.fire(e)},e}(),u=new a;o.a.add(s.JSONContribution,u)},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(2),o=function(){function e(){}return e.insert=function(e,t){return{range:new i.a(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{range:e,text:null}},e.replace=function(e,t){return{range:e,text:t}},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var i=n(1),o=n(0),r=n(18),s=n(50),a=n(24),u=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},l=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},c=function(){function e(t,n,o,r){var a=this;this._commandService=o,this._contextKeyService=r,this._menuGroups=[],this._disposables=[],this._onDidChange=new i.a,n.then(function(n){var i,o=s.d.getMenuItems(t),r=new Set;o.sort(e._compareMenuItems);for(var u=0,l=o;u0&&t.push([r,u])}return t},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();ns)return 1;var a="string"==typeof e.command.title?e.command.title:e.command.title.value,u="string"==typeof t.command.title?t.command.title:t.command.title.value;return a.localeCompare(u)},e=u([l(2,a.b),l(3,r.c)],e)}()},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"c",function(){return d}),n.d(t,"a",function(){return h});var i=n(58),o=n(27),r=n(17),s=n(31),a=n(49),u=n(32),l=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),c=function(){function e(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n=[]),this._contents=e,this._keys=t,this._overrides=n,this.isFrozen=!1}return Object.defineProperty(e.prototype,"contents",{get:function(){return this.checkAndFreeze(this._contents)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overrides",{get:function(){return this.checkAndFreeze(this._overrides)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return this.checkAndFreeze(this._keys)},enumerable:!0,configurable:!0}),e.prototype.getValue=function(e){return e?Object(u.d)(this.contents,e):this.contents},e.prototype.override=function(t){var n=this.getContentsForOverrideIdentifer(t);if(!n||"object"!=typeof n||!Object.keys(n).length)return this;for(var i={},r=0,a=o.b(Object.keys(this.contents).concat(Object.keys(n)));r5e3&&n._leaveChordMode()},500)},t.prototype._leaveChordMode=function(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null},t.prototype._dispatch=function(e,t){var n=this,o=!1,r=this.resolveKeyboardEvent(e);if(r.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;var s=r.getDispatchParts()[0];if(null===s)return o;var a=this._contextKeyService.getContext(t),u=this._currentChord?this._currentChord.keypress:null,l=r.getLabel(),c=this._getResolver().resolve(a,u,s);return c&&c.enterChord?(o=!0,this._enterChordMode(s,l),o):(this._statusService&&this._currentChord&&(c&&c.commandId||(this._statusService.setStatusMessage(i.a("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),1e4),o=!0)),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(o=!0),void 0===c.commandArgs?this._commandService.executeCommand(c.commandId).then(void 0,function(e){return n._notificationService.warn(e)}):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,function(e){return n._notificationService.warn(e)}),this._telemetryService.publicLog("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),o)},t}(s.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(e,t,n,i,o){if(this.resolvedKeybinding=e,e){var r=e.getDispatchParts(),s=r[0],a=r[1];this.keypressFirstPart=s,this.keypressChordPart=a}else this.keypressFirstPart=null,this.keypressChordPart=null;this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o}return e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(34),o=n(175),r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),s=function(e){function t(t,n){var i=e.call(this)||this;if(i._os=n,!t)throw new Error("Invalid USLayoutResolvedKeybinding");return 2===t.type?(i._firstPart=t.firstPart,i._chordPart=t.chordPart):(i._firstPart=t,i._chordPart=null),i}return r(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return i.b.toString(e)},t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode):null},t.prototype.getLabel=function(){var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return o.b.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":i.b.toString(e.keyCode):null},t.prototype.getAriaLabel=function(){var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return o.a.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._chordPart?this._toResolvedKeybindingPart(this._chordPart):null]},t.prototype._toResolvedKeybindingPart=function(e){return new i.d(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e))},t.prototype.getDispatchParts=function(){return[this._firstPart?t.getDispatchStr(this._firstPart):null,this._chordPart?t.getDispatchStr(this._chordPart):null]},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=i.b.toString(e.keyCode)},t}(i.c)},function(e,t,n){"use strict";function i(e,t,n){if(null===t)return"";var i=[];return e.ctrlKey&&i.push(n.ctrlKey),e.shiftKey&&i.push(n.shiftKey),e.altKey&&i.push(n.altKey),e.metaKey&&i.push(n.metaKey),i.push(t),i.join(n.separator)}function o(e,t,n,o,r){var s=i(e,t,r);return null!==n&&null!==o&&(s+=" ",s+=i(n,o,r)),s}n.d(t,"b",function(){return a}),n.d(t,"a",function(){return u});var r=n(11),s=function(){function e(e,t,n){void 0===n&&(n=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}return e.prototype.toLabel=function(e,t,n,i,r){return null===e||null===t?null:o(e,t,n,i,this.modifierLabels[r])},e}(),a=new s({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:r.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:r.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:r.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:r.a({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:r.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:r.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:r.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:r.a({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),u=new s({ctrlKey:r.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:r.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:r.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:r.a({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:r.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:r.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:r.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:r.a({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:r.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:r.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:r.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:r.a({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"})},function(e,t,n){"use strict";function i(){D||(D=!0,s.a(document.body))}n.d(t,"b",function(){return E}),n.d(t,"a",function(){return M});var o=n(11),r=n(20),s=n(177),a=n(0),u=n(29),l=n(114),c=n(282),d=n(131),h=n(60),f=n(84),p=n(94),g=n(50),m=n(24),v=n(32),_=n(18),y=n(69),b=n(5),C=n(70),w=n(40),S=n(10),L=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),x=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},I=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},N=0,D=!1,O=function(e){function t(t,n,s,a,u,l,c,d,h){var p=this;return n=n||{},n.ariaLabel=n.ariaLabel||o.a("editorViewAccessibleLabel","Editor content"),n.ariaLabel=n.ariaLabel+";"+(r.k?o.a("accessibilityHelpMessageIE","Press Ctrl+F1 for Accessibility Options."):o.a("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")),p=e.call(this,t,n,{},s,a,u,l,d,h)||this,c instanceof f.m&&(p._standaloneKeybindingService=c),i(),p}return L(t,e),t.prototype.addCommand=function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var i="DYNAMIC_"+ ++N,o=_.b.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i},t.prototype.createContextKey=function(e,t){return this._contextKeyService.createKey(e,t)},t.prototype.addAction=function(e){var t=this;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"),a.a.None;var n=e.id,i=e.label,o=_.b.and(_.b.equals("editorId",this.getId()),_.b.deserialize(e.precondition)),r=e.keybindings,s=_.b.and(o,_.b.deserialize(e.keybindingContext)),u=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=function(){return Promise.resolve(e.run(t))},h=[],f=this.getId()+":"+n;if(h.push(m.a.registerCommand(f,c)),u){var p={command:{id:f,title:i},when:o,group:u,order:l};h.push(g.d.appendMenuItem(g.b.EditorContext,p))}Array.isArray(r)&&(h=h.concat(r.map(function(e){return t._standaloneKeybindingService.addDynamicKeybinding(f,e,c,s)})));var v=new d.a(f,i,i,o,c,this._contextKeyService);return this._actions[n]=v,h.push(Object(a.e)(function(){delete t._actions[n]})),Object(a.c)(h)},t=x([I(2,b.a),I(3,u.a),I(4,m.b),I(5,_.c),I(6,C.a),I(7,S.c),I(8,w.a)],t)}(l.a),E=function(e){function t(t,n,i,o,r,s,a,u,l,c,d,h){var p=this;Object(f.o)(h,n,!1),n=n||{},"string"==typeof n.theme&&c.setTheme(n.theme);var g=n.model;delete n.model,p=e.call(this,t,n,o,r,s,a,u,c,d)||this,p._contextViewService=l,p._configurationService=h,p._register(i);var m;if(void 0===g?(m=self.monaco.editor.createModel(n.value||"",n.language||"text/plain"),p._ownsModel=!0):(m=g,p._ownsModel=!1),p._attachModel(m),m){var v={oldModelUrl:null,newModelUrl:m.uri};p._onDidChangeModel.fire(v)}return p}return L(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){Object(f.o)(this._configurationService,t,!1),e.prototype.updateOptions.call(this,t)},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)},t.prototype._postDetachModelCleanup=function(t){e.prototype._postDetachModelCleanup.call(this,t),t&&this._ownsModel&&(t.dispose(),this._ownsModel=!1)},t=x([I(3,b.a),I(4,u.a),I(5,m.b),I(6,_.c),I(7,C.a),I(8,y.b),I(9,p.a),I(10,w.a),I(11,v.a)],t)}(O),M=function(e){function t(t,n,i,o,r,s,a,u,l,c,d,h){var p=this;return Object(f.o)(h,n,!0),n=n||{},"string"==typeof n.theme&&(n.theme=c.setTheme(n.theme)),p=e.call(this,t,n,u,r,o,l,c,d)||this,p._contextViewService=a,p._configurationService=h,p._register(i),p._contextViewService.setContainer(p._containerDomElement),p}return L(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){Object(f.o)(this._configurationService,t,!0),e.prototype.updateOptions.call(this,t)},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(O,t,n)},t.prototype.getOriginalEditor=function(){return e.prototype.getOriginalEditor.call(this)},t.prototype.getModifiedEditor=function(){return e.prototype.getModifiedEditor.call(this)},t.prototype.addCommand=function(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)},t.prototype.createContextKey=function(e,t){return this.getModifiedEditor().createContextKey(e,t)},t.prototype.addAction=function(e){return this.getModifiedEditor().addAction(e)},t=x([I(3,b.a),I(4,_.c),I(5,C.a),I(6,y.b),I(7,h.a),I(8,u.a),I(9,p.a),I(10,w.a),I(11,v.a)],t)}(c.a)},function(e,t,n){"use strict";function i(e){o=document.createElement("div"),o.className="monaco-aria-container",r=document.createElement("div"),r.className="monaco-alert",r.setAttribute("role","alert"),r.setAttribute("aria-atomic","true"),o.appendChild(r),s=document.createElement("div"),s.className="monaco-status",s.setAttribute("role","status"),s.setAttribute("aria-atomic","true"),o.appendChild(s),e.appendChild(o)}t.a=i;var o,r,s,a=n(178);n.n(a),n(11),n(7),n(6)},function(e,t,n){var i=n(179);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-aria-container {\r\n\tposition: absolute; /* try to hide from window but not from screen readers */\r\n\tleft:-999em;\r\n}",""])},function(e,t,n){var i=n(181);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,'/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* -------------------- IE10 remove auto clear button -------------------- */\r\n\r\n::-ms-clear {\r\n\tdisplay: none;\r\n}\r\n\r\n/* All widgets */\r\n/* I am not a big fan of this rule */\r\n.monaco-editor .editor-widget input {\r\n\tcolor: inherit;\r\n}\r\n\r\n/* -------------------- Editor -------------------- */\r\n\r\n.monaco-editor {\r\n\tposition: relative;\r\n\toverflow: visible;\r\n\t-webkit-text-size-adjust: 100%;\r\n\t-webkit-font-feature-settings: "liga" off, "calt" off;\r\n\tfont-feature-settings: "liga" off, "calt" off;\r\n}\r\n.monaco-editor.enable-ligatures {\r\n\t-webkit-font-feature-settings: "liga" on, "calt" on;\r\n\tfont-feature-settings: "liga" on, "calt" on;\r\n}\r\n\r\n/* -------------------- Misc -------------------- */\r\n\r\n.monaco-editor .overflow-guard {\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n\r\n.monaco-editor .view-overlays {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}',""])},function(e,t,n){var i=n(183);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .vs-whitespace {\r\n\tdisplay:inline-block;\r\n}\r\n\r\n",""])},function(e,t,n){"use strict";function i(e,t){new r(e,t).read()}n.d(t,"a",function(){return o}),t.b=i;var o=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}(),r=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);var o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",o.style.fontStyle="italic",t.appendChild(o);for(var r=[],s=0,a=this._requests.length;s0?1:-1;h.a.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}};return l._register(r.g(l.viewHelper.viewDomNode,"mousewheel",p,!0)),l._register(r.g(l.viewHelper.viewDomNode,"DOMMouseScroll",p,!0)),l._context.addEventHandler(l),l}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new d.a(e,t),i=n.toPageCoordinates(),o=Object(d.f)(this.viewHelper.viewDomNode);if(i.yo.y+o.height||i.xo.x+o.width)return null;var r=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(r,o,i,null)},t.prototype._createMouseTarget=function(e,t){var n=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(n,e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){if(!this._mouseDownOperation.isActive()){e.timestampt.y+t.height){var r=i.getCurrentScrollTop()+(e.posy-t.y),s=c.a.getZoneAtCoord(this._context,r);if(s){var a=this._helpPositionJumpOverViewZone(s);if(a)return new c.b(null,13,o,a)}var l=i.getLineNumberAtVerticalOffset(r);return new c.b(null,13,o,new f.a(l,n.getLineMaxColumn(l)))}var d=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new c.b(null,13,o,new f.a(d,n.getLineMaxColumn(d))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null;if(8===i.type||5===i.type){var o=this._helpPositionJumpOverViewZone(i.detail);if(o)return new c.b(i.element,i.type,i.mouseColumn,o,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new f.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},t.prototype._dispatchMouse=function(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,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})},t}(u.a),y=function(){function e(){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}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(53),o=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),r=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,n,i,o){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(n,i),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,o)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new i.a(e[0].left,e[0].width)];e.sort(o.compare);for(var t=[],n=0,r=e[0].left,s=e[0].width,a=1,u=e.length;a=c?s=Math.max(s,c+d-r):(t[n++]=new i.a(r,s),r=c,s=d)}return t[n++]=new i.a(r,s),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],i=0,r=e.length;ia)return null;t=Math.min(a,Math.max(0,t)),i=Math.min(a,Math.max(0,i)),t!==i&&i>0&&0===o&&(i--,o=Number.MAX_VALUE);var u=e.children[t].firstChild,l=e.children[i].firstChild;if(u&&l||(!u&&0===n&&t>0&&(u=e.children[t-1].firstChild,n=1073741824),!l&&0===o&&i>0&&(l=e.children[i-1].firstChild,o=1073741824)),!u||!l)return null;n=Math.min(u.textContent.length,Math.max(0,n)),o=Math.min(l.textContent.length,Math.max(0,o));var c=this._readClientRects(u,n,l,o,s);return this._createHorizontalRangesFromClientRects(c,r)},e}()},function(e,t,n){"use strict";function i(e,t){var n=document.createElement("canvas"),i=n.getContext("2d");i.font=o(t);var r=i.measureText(e);return a.j?r.width+2:r.width}function o(e){return r("normal",e.fontWeight,e.fontSize,e.lineHeight,e.fontFamily)}function r(e,t,n,i,o){return e+" normal "+t+" "+n+"px / "+i+"px "+o}n.d(t,"a",function(){return I});var s=n(192),a=(n.n(s),n(20)),u=n(12),l=n(7),c=n(3),d=n(41),h=n(194),f=n(117),p=n(16),g=n(118),m=n(119),v=n(66),_=n(4),y=n(2),b=n(19),C=n(46),w=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),S=function(){function e(e,t,n){this.top=e,this.left=t,this.width=n}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),L=a.h||a.j,x=function(){function e(){this._lastState=null}return e.prototype.set=function(e){this._lastState=e},e.prototype.get=function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState:(this._lastState=null,null)},e.INSTANCE=new e,e}(),I=function(e){function t(t,n,o){var r=e.call(this,t)||this;r._primaryCursorVisibleRange=null,r._viewController=n,r._viewHelper=o;var s=r._context.configuration.editor;r._accessibilitySupport=s.accessibilitySupport,r._contentLeft=s.layoutInfo.contentLeft,r._contentWidth=s.layoutInfo.contentWidth,r._contentHeight=s.layoutInfo.contentHeight,r._scrollLeft=0,r._scrollTop=0,r._fontInfo=s.fontInfo,r._lineHeight=s.lineHeight,r._emptySelectionClipboard=s.emptySelectionClipboard,r._copyWithSyntaxHighlighting=s.copyWithSyntaxHighlighting,r._visibleTextArea=null,r._selections=[new b.a(1,1,1,1)],r.textArea=Object(u.b)(document.createElement("textarea")),p.a.write(r.textArea,6),r.textArea.setClassName("inputarea"),r.textArea.setAttribute("wrap","off"),r.textArea.setAttribute("autocorrect","off"),r.textArea.setAttribute("autocapitalize","off"),r.textArea.setAttribute("autocomplete","off"),r.textArea.setAttribute("spellcheck","false"),r.textArea.setAttribute("aria-label",s.viewInfo.ariaLabel),r.textArea.setAttribute("role","textbox"),r.textArea.setAttribute("aria-multiline","true"),r.textArea.setAttribute("aria-haspopup","false"),r.textArea.setAttribute("aria-autocomplete","both"),r.textAreaCover=Object(u.b)(document.createElement("div")),r.textAreaCover.setPosition("absolute");var c={getLineCount:function(){return r._context.model.getLineCount()},getLineMaxColumn:function(e){return r._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return r._context.model.getValueInRange(e,t)}},d={getPlainTextToCopy:function(){var e=r._context.model.getPlainTextToCopy(r._selections,r._emptySelectionClipboard,l.g),t=r._context.model.getEOL(),n=r._emptySelectionClipboard&&1===r._selections.length&&r._selections[0].isEmpty(),i=Array.isArray(e)?e:null,o=Array.isArray(e)?e.join(t):e,s=null;if(n||i){s={lastCopiedValue:a.j?o.replace(/\r\n/g,"\n"):o,isFromEmptySelection:r._emptySelectionClipboard&&1===r._selections.length&&r._selections[0].isEmpty(),multicursorText:i}}return x.INSTANCE.set(s),o},getHTMLToCopy:function(){return r._copyWithSyntaxHighlighting||h.a.forceCopyWithSyntaxHighlighting?r._context.model.getHTMLToCopy(r._selections,r._emptySelectionClipboard):null},getScreenReaderContent:function(e){if(a.l)return f.b.EMPTY;if(1===r._accessibilitySupport){if(l.d){var t=r._selections[0];if(t.isEmpty()){var n=t.getStartPosition(),i=r._getWordBeforePosition(n);if(0===i.length&&(i=r._getCharacterBeforePosition(n)),i.length>0)return new f.b(i,i.length,i.length,n,n)}}return f.b.EMPTY}return f.a.fromEditorSelection(e,c,r._selections[0],0===r._accessibilitySupport)},deduceModelPosition:function(e,t,n){return r._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return r._textAreaInput=r._register(new h.b(d,r.textArea)),r._register(r._textAreaInput.onKeyDown(function(e){r._viewController.emitKeyDown(e)})),r._register(r._textAreaInput.onKeyUp(function(e){r._viewController.emitKeyUp(e)})),r._register(r._textAreaInput.onPaste(function(e){var t=x.INSTANCE.get(e.text),n=!1,i=null;t&&(n=r._emptySelectionClipboard&&t.isFromEmptySelection,i=t.multicursorText),r._viewController.paste("keyboard",e.text,n,i)})),r._register(r._textAreaInput.onCut(function(){r._viewController.cut("keyboard")})),r._register(r._textAreaInput.onType(function(e){e.replaceCharCnt?r._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):r._viewController.type("keyboard",e.text)})),r._register(r._textAreaInput.onSelectionChangeRequest(function(e){r._viewController.setSelection("keyboard",e)})),r._register(r._textAreaInput.onCompositionStart(function(){var e=r._selections[0].startLineNumber,t=r._selections[0].startColumn;r._context.privateViewEventBus.emit(new C.l(new y.a(e,t,e,t),0,!0,1));var n=r._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(r._visibleTextArea=new S(r._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,L?0:1),r._render()),r.textArea.setClassName("inputarea ime-input"),r._viewController.compositionStart("keyboard")})),r._register(r._textAreaInput.onCompositionUpdate(function(e){a.h?r._visibleTextArea=r._visibleTextArea.setWidth(0):r._visibleTextArea=r._visibleTextArea.setWidth(i(e.data,r._fontInfo)),r._render()})),r._register(r._textAreaInput.onCompositionEnd(function(){r._visibleTextArea=null,r._render(),r.textArea.setClassName("inputarea"),r._viewController.compositionEnd("keyboard")})),r._register(r._textAreaInput.onFocus(function(){r._context.privateViewEventBus.emit(new C.f(!0))})),r._register(r._textAreaInput.onBlur(function(){r._context.privateViewEventBus.emit(new C.f(!1))})),r}return w(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=Object(v.a)(this._context.configuration.editor.wordSeparators),i=e.column,o=0;i>1;){var r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber),n=t.charAt(e.column-2);if(!c.s(n.charCodeAt(0)))return n}return""},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.editor;return e.fontInfo&&(this._fontInfo=t.fontInfo),e.viewInfo&&this.textArea.setAttribute("aria-label",t.viewInfo.ariaLabel),e.layoutInfo&&(this._contentLeft=t.layoutInfo.contentLeft,this._contentWidth=t.layoutInfo.contentWidth,this._contentHeight=t.layoutInfo.contentHeight),e.lineHeight&&(this._lineHeight=t.lineHeight),e.accessibilitySupport&&(this._accessibilitySupport=t.accessibilitySupport,this._textAreaInput.writeScreenReaderContent("strategy changed")),e.emptySelectionClipboard&&(this._emptySelectionClipboard=t.emptySelectionClipboard),e.copyWithSyntaxHighlighting&&(this._copyWithSyntaxHighlighting=t.copyWithSyntaxHighlighting),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.prepareRender=function(e){if(2===this._accessibilitySupport)this._primaryCursorVisibleRange=null;else{var t=new _.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=e.visibleRangeForPosition(t)}},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)return void this._renderInsideEditor(this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight,!0);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)return void this._renderAtTopLeft();this._renderInsideEditor(t,e,L?0:1,L?0:1,!1)},t.prototype._renderInsideEditor=function(e,t,n,i,o){var r=this.textArea,s=this.textAreaCover;o?d.a.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(n),r.setHeight(i),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(d.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),L)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1),this._context.configuration.editor.viewInfo.glyphMargin?t.setClassName("monaco-editor-background textAreaCover "+m.a.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+g.a.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(p.b)},function(e,t,n){var i=n(193);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .inputarea {\r\n\tmin-width: 0;\r\n\tmin-height: 0;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\tposition: absolute;\r\n\toutline: none !important;\r\n\tresize: none;\r\n\tborder: none;\r\n\toverflow: hidden;\r\n\tcolor: transparent;\r\n\tbackground-color: transparent;\r\n}\r\n/*.monaco-editor .inputarea {\r\n\tposition: fixed !important;\r\n\twidth: 800px !important;\r\n\theight: 500px !important;\r\n\ttop: initial !important;\r\n\tleft: initial !important;\r\n\tbottom: 0 !important;\r\n\tright: 0 !important;\r\n\tcolor: black !important;\r\n\tbackground: white !important;\r\n\tline-height: 15px !important;\r\n\tfont-size: 14px !important;\r\n}*/\r\n.monaco-editor .inputarea.ime-input {\r\n\tz-index: 10;\r\n}\r\n",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return f}),n.d(t,"b",function(){return p});var i=n(20),o=n(6),r=n(14),s=n(1),a=n(0),u=n(7),l=n(3),c=n(117),d=n(19),h=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),f={forceCopyWithSyntaxHighlighting:!1},p=function(e){function t(t,n){var a=e.call(this)||this;a._onFocus=a._register(new s.a),a.onFocus=a._onFocus.event,a._onBlur=a._register(new s.a),a.onBlur=a._onBlur.event,a._onKeyDown=a._register(new s.a),a.onKeyDown=a._onKeyDown.event,a._onKeyUp=a._register(new s.a),a.onKeyUp=a._onKeyUp.event,a._onCut=a._register(new s.a),a.onCut=a._onCut.event,a._onPaste=a._register(new s.a),a.onPaste=a._onPaste.event,a._onType=a._register(new s.a),a.onType=a._onType.event,a._onCompositionStart=a._register(new s.a),a.onCompositionStart=a._onCompositionStart.event,a._onCompositionUpdate=a._register(new s.a),a.onCompositionUpdate=a._onCompositionUpdate.event,a._onCompositionEnd=a._register(new s.a),a.onCompositionEnd=a._onCompositionEnd.event,a._onSelectionChangeRequest=a._register(new s.a),a.onSelectionChangeRequest=a._onSelectionChangeRequest.event,a._host=t,a._textArea=a._register(new m(n)),a._lastTextAreaEvent=0,a._asyncTriggerCut=a._register(new r.c(function(){return a._onCut.fire()},0)),a._textAreaState=c.b.EMPTY,a.writeScreenReaderContent("ctor"),a._hasFocus=!1,a._isDoingComposition=!1,a._nextCommand=0,a._register(o.j(n.domNode,"keydown",function(e){!a._isDoingComposition||109!==e.keyCode&&1!==e.keyCode||e.stopPropagation(),e.equals(9)&&e.preventDefault(),a._onKeyDown.fire(e)})),a._register(o.j(n.domNode,"keyup",function(e){a._onKeyUp.fire(e)})),a._register(o.g(n.domNode,"compositionstart",function(e){a._lastTextAreaEvent=1,a._isDoingComposition||(a._isDoingComposition=!0,i.h||a._setAndWriteTextAreaState("compositionstart",c.b.EMPTY),a._onCompositionStart.fire())}));var h=function(e,t){var n=a._textAreaState,i=c.b.readFromTextArea(a._textArea);return[i,c.b.deduceInput(n,i,e,t)]},f=function(e){var t=a._textAreaState,n=c.b.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},p=function(e){return!(!i.h||"ja"!==e)||!(!i.k||0!==e.indexOf("zh-Han"))};a._register(o.g(n.domNode,"compositionupdate",function(e){if(a._lastTextAreaEvent=2,p(e.locale)){var t=h(!1,!1),n=t[0],i=t[1];return a._textAreaState=n,a._onType.fire(i),void a._onCompositionUpdate.fire(e)}var o=f(e.data),r=o[0],s=o[1];a._textAreaState=r,a._onType.fire(s),a._onCompositionUpdate.fire(e)})),a._register(o.g(n.domNode,"compositionend",function(e){if(a._lastTextAreaEvent=3,p(e.locale)){var t=h(!1,!1),n=t[0],o=t[1];a._textAreaState=n,a._onType.fire(o)}else{var r=f(e.data),n=r[0],o=r[1];a._textAreaState=n,a._onType.fire(o)}(i.h||i.f)&&(a._textAreaState=c.b.readFromTextArea(a._textArea)),a._isDoingComposition&&(a._isDoingComposition=!1,a._onCompositionEnd.fire())})),a._register(o.g(n.domNode,"input",function(){var e=8===a._lastTextAreaEvent;if(a._lastTextAreaEvent=4,a._textArea.setIgnoreSelectionChangeTime("received input event"),!a._isDoingComposition){var t=h(u.d,e&&u.d),n=t[0],i=t[1];0===i.replaceCharCnt&&1===i.text.length&&l.s(i.text.charCodeAt(0))||(a._textAreaState=n,0===a._nextCommand?""!==i.text&&a._onType.fire(i):(""!==i.text&&a._onPaste.fire({text:i.text}),a._nextCommand=0))}})),a._register(o.g(n.domNode,"cut",function(e){a._lastTextAreaEvent=5,a._textArea.setIgnoreSelectionChangeTime("received cut event"),a._ensureClipboardGetsEditorSelection(e),a._asyncTriggerCut.schedule()})),a._register(o.g(n.domNode,"copy",function(e){a._lastTextAreaEvent=6,a._ensureClipboardGetsEditorSelection(e)})),a._register(o.g(n.domNode,"paste",function(e){if(a._lastTextAreaEvent=7,a._textArea.setIgnoreSelectionChangeTime("received paste event"),g.canUseTextData(e)){var t=g.getTextData(e);""!==t&&a._onPaste.fire({text:t})}else a._textArea.getSelectionStart()!==a._textArea.getSelectionEnd()&&a._setAndWriteTextAreaState("paste",c.b.EMPTY),a._nextCommand=1})),a._register(o.g(n.domNode,"focus",function(){a._lastTextAreaEvent=8,a._setHasFocus(!0)})),a._register(o.g(n.domNode,"blur",function(){a._lastTextAreaEvent=9,a._setHasFocus(!1)}));var v=0;return a._register(o.g(document,"selectionchange",function(e){if(a._hasFocus&&!a._isDoingComposition&&i.f&&u.g){var t=Date.now(),n=t-v;if(v=t,!(n<5)){var o=t-a._textArea.getIgnoreSelectionChangeTime();if(a._textArea.resetSelectionChangeTime(),!(o<100)&&a._textAreaState.selectionStartPosition&&a._textAreaState.selectionEndPosition){var r=a._textArea.getValue();if(a._textAreaState.value===r){var s=a._textArea.getSelectionStart(),l=a._textArea.getSelectionEnd();if(a._textAreaState.selectionStart!==s||a._textAreaState.selectionEnd!==l){var c=a._textAreaState.deduceEditorPosition(s),h=a._host.deduceModelPosition(c[0],c[1],c[2]),f=a._textAreaState.deduceEditorPosition(l),p=a._host.deduceModelPosition(f[0],f[1],f[2]),g=new d.a(h.lineNumber,h.column,p.lineNumber,p.column);a._onSelectionChangeRequest.fire(g)}}}}}})),a}return h(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.focusTextArea=function(){this._setHasFocus(!0)},t.prototype.isFocused=function(){return this._hasFocus},t.prototype._setHasFocus=function(e){this._hasFocus!==e&&(this._hasFocus=e,this._hasFocus&&(i.g?this._setAndWriteTextAreaState("focusgain",c.b.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())},t.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t},t.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._host.getPlainTextToCopy();if(!g.canUseTextData(e))return void this._setAndWriteTextAreaState("copy or cut",c.b.selectedText(t));var n=null;i.e()&&(t.length<65536||f.forceCopyWithSyntaxHighlighting)&&(n=this._host.getHTMLToCopy()),g.setTextData(e,t,n)},t}(a.a),g=function(){function e(){}return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData},e.getTextData=function(e){if(e.clipboardData)return e.preventDefault(),e.clipboardData.getData("text/plain");if(window.clipboardData)return e.preventDefault(),window.clipboardData.getData("Text");throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")},e.setTextData=function(e,t,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),null!==n&&e.clipboardData.setData("text/html",n),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")},e}(),m=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n._ignoreSelectionChangeTime=0,n}return h(t,e),t.prototype.setIgnoreSelectionChangeTime=function(e){this._ignoreSelectionChangeTime=Date.now()},t.prototype.getIgnoreSelectionChangeTime=function(){return this._ignoreSelectionChangeTime},t.prototype.resetSelectionChangeTime=function(){this._ignoreSelectionChangeTime=0},t.prototype.getValue=function(){return this._actual.domNode.value},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart},t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd},t.prototype.setSelectionRange=function(e,t,n){var r=this._actual.domNode,s=document.activeElement===r,a=r.selectionStart,u=r.selectionEnd;if(s&&a===t&&u===n)return void(i.j&&window.parent!==window&&r.focus());if(s)return this.setIgnoreSelectionChangeTime("setSelectionRange"),r.setSelectionRange(t,n),void(i.j&&window.parent!==window&&r.focus());try{var l=o.J(r);this.setIgnoreSelectionChangeTime("setSelectionRange"),r.focus(),r.setSelectionRange(t,n),o.H(r,l)}catch(e){}},t}(a.a)},function(e,t,n){var i=n(196);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,'/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers {\r\n\tposition: absolute;\r\n\ttext-align: right;\r\n\tdisplay: inline-block;\r\n\tvertical-align: middle;\r\n\tbox-sizing: border-box;\r\n\tcursor: default;\r\n\theight: 100%;\r\n}\r\n\r\n.monaco-editor .relative-current-line-number {\r\n\ttext-align: left;\r\n\tdisplay: inline-block;\r\n\twidth: 100%;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers {\r\n\tcursor: -webkit-image-set(\r\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIyMSIgeD0iMHB4IiB5PSIwcHgiIHZpZXdCb3g9IjAgMCAxNSAyMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTUgMjE7Ij48cG9seWdvbiBzdHlsZT0iZmlsbDojRkZGRkZGO3N0cm9rZTojMDAwMDAwIiBwb2ludHM9IjE0LjUsMS4yIDEuOSwxMy44IDcuMSwxMy44IDQuNSwxOS4xIDcuNywyMC4xIDEwLjMsMTQuOSAxNC41LDE4Ii8+PC9zdmc+") 1x,\r\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMzAiIGhlaWdodD0iNDIiIHZpZXdCb3g9IjAgMCAzMCA0MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzAgNDI7Ij48cG9seWdvbiBzdHlsZT0iZmlsbDojRkZGRkZGO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyOyIgcG9pbnRzPSIyOSwyLjQgMy44LDI3LjYgMTQuMywyNy42IDksMzguMSAxNS40LDQwLjIgMjAuNiwyOS43IDI5LDM2Ii8+PC9zdmc+DQo=") 2x\r\n\t) 30 0, default;\r\n}\r\n\r\n.monaco-editor.mac .margin-view-overlays .line-numbers {\r\n\tcursor: -webkit-image-set(\r\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDEyIDE4Ij48c3R5bGU+LnN0MHtmaWxsOiNmZmZ9PC9zdHlsZT48dGl0bGU+ZmxpcHBlZC1jdXJzb3ItbWFjPC90aXRsZT48cGF0aCBkPSJNNC4zIDE2LjVsMS42LTQuNkgxLjFMMTEuNSAxLjJ2MTQuNEw4LjcgMTNsLTEuNiA0LjV6Ii8+PHBhdGggY2xhc3M9InN0MCIgZD0iTTExIDE0LjVsLTIuNS0yLjNMNyAxNi43IDUgMTZsMS42LTQuNWgtNGw4LjUtOU0wIDEyLjVoNS4ybC0xLjUgNC4xTDcuNSAxOCA5IDE0LjJsMi45IDIuM1YwTDAgMTIuNXoiLz48L3N2Zz4=") 1x,\r\n\t\turl("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIzNiIgdmlld0JveD0iMCAwIDI0IDM2LjEiPjxkZWZzPjxzdHlsZT4uYXtmaWxsOiNmZmY7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5mbGlwcGVkLWN1cnNvci1tYWMtMng8L3RpdGxlPjxwb2x5Z29uIHBvaW50cz0iOC42IDMzLjEgMTEuOCAyMy45IDIuMiAyMy45IDIzIDIuNSAyMyAzMS4zIDE3LjQgMjYuMSAxNC4yIDM1LjEgOC42IDMzLjEiLz48cGF0aCBjbGFzcz0iYSIgZD0iTTIyLDI5LjFsLTUtNC42LTMuMDYyLDguOTM4LTQuMDYyLTEuNUwxMywyM0g1TDIyLDVNMCwyNUgxMC40bC0zLDguM0wxNSwzNi4xbDMuMTI1LTcuNjYyTDI0LDMzVjBaIi8+PC9zdmc+") 2x\r\n\t) 24 3, default;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\r\n\tmargin-top: 1px;\r\n}\r\n',""])},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(198),o=n(4),r=function(){function e(e,t,n,i){this.configuration=e,this.viewModel=t,this.outgoingEvents=n,this.commandDelegate=i}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this.commandDelegate.executeEditorCommand(e,t)},e.prototype.paste=function(e,t,n,i){this.commandDelegate.paste(e,t,n,i)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this.commandDelegate.executeEditorCommand(i.a.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this.selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelectDrag(e.position):this.lastCursorLineSelect(e.position):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this.lastCursorWordSelect(e.position):e.inSelectionMode?this.wordSelectDrag(e.position):this.wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this.columnSelect(e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect(e.position):this.createCursor(e.position,!1)):e.inSelectionMode?this.moveToSelect(e.position):this.moveTo(e.position)},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this.convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(i.a.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(i.a.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(i.a.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(i.a.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(i.a.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){this._execMouseCommand(i.a.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(i.a.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(i.a.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(i.a.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(i.a.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(i.a.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(i.a.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(i.a.SelectAll,{})},e.prototype.convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e}()},function(e,t,n){"use strict";function i(e){e.register()}function o(e){i(new D("default:"+e,e)),i(new D(e,e))}n.d(t,"a",function(){return x});var r,s=n(11),a=n(17),u=n(86),l=n(29),c=n(199),d=n(22),h=n(122),f=n(209),p=n(125),g=n(4),m=n(2),v=n(35),_=n(126),y=n(50),b=n(18),C=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),w=0,S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditorCommand(i,n||{})},t}(u.c);!function(e){function t(t){var n;switch(t.to){case e.RawDirection.Up:n=1;break;case e.RawDirection.Down:n=2;break;default:return null}var i;switch(t.by){case e.RawUnit.Line:i=1;break;case e.RawUnit.WrappedLine:i=2;break;case e.RawUnit.Page:i=3;break;case e.RawUnit.HalfPage:i=4;break;default:i=2}return{direction:n,unit:i,value:Math.floor(t.value||1),revealCursor:!!t.revealCursor,select:!!t.select}}var n=function(e){if(!a.f(e))return!1;var t=e;return!!a.g(t.to)&&(!(!a.h(t.by)&&!a.g(t.by))&&(!(!a.h(t.value)&&!a.e(t.value))&&!(!a.h(t.revealCursor)&&!a.b(t.revealCursor))))};e.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:n}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=t}(r||(r={}));var L;!function(e){var t=function(e){if(!a.f(e))return!1;var t=e;return!!a.e(t.lineNumber)&&!(!a.h(t.at)&&!a.g(t.at))};e.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:t}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(L||(L={}));var x;!function(e){var t=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n}return C(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[f.b.moveTo(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(!0,0,0)},t}(S);e.MoveTo=Object(u.f)(new t({id:"_moveTo",inSelectionMode:!1,precondition:null})),e.MoveToSelect=Object(u.f)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:null}));var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement();var n=this._getColumnSelectResult(e.context,e.getPrimaryCursor(),e.getColumnSelectData(),t);e.setStates(t.source,3,n.viewStates.map(function(e){return d.d.fromViewState(e)})),e.setColumnSelectData({toViewLineNumber:n.toLineNumber,toViewVisualColumn:n.toVisualColumn}),e.reveal(!0,n.reversed?1:2,0)},t}(S);e.ColumnSelect=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"columnSelect",precondition:null})||this}return C(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){var o,r=e.model.validatePosition(i.position);return o=i.viewPosition?e.validateViewPosition(new g.a(i.viewPosition.lineNumber,i.viewPosition.column),r):e.convertModelPositionToViewPosition(r),c.a.columnSelect(e.config,e.viewModel,t.viewState.selection,o.lineNumber,i.mouseColumn-1)},t}(n))),e.CursorColumnSelectLeft=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectLeft",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:3599,linux:{primary:0}}})||this}return C(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return c.a.columnSelectLeft(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(n))),e.CursorColumnSelectRight=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectRight",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:3601,linux:{primary:0}}})||this}return C(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return c.a.columnSelectRight(e.config,e.viewModel,t.viewState,n.toViewLineNumber,n.toViewVisualColumn)},t}(n)));var i=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return C(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return c.a.columnSelectUp(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(n);e.CursorColumnSelectUp=Object(u.f)(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Object(u.f)(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:3595,linux:{primary:0}}}));var o=function(e){function t(t){var n=e.call(this,t)||this;return n._isPaged=t.isPaged,n}return C(t,e),t.prototype._getColumnSelectResult=function(e,t,n,i){return c.a.columnSelectDown(e.config,e.viewModel,t.viewState,this._isPaged,n.toViewLineNumber,n.toViewVisualColumn)},t}(n);e.CursorColumnSelectDown=Object(u.f)(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Object(u.f)(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:3596,linux:{primary:0}}}));var s=function(e){function t(){return e.call(this,{id:"cursorMove",precondition:null,description:f.a.description})||this}return C(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n=f.a.parse(t);n&&this._runCursorMove(e,t.source,n)},t.prototype._runCursorMove=function(e,t,n){e.context.model.pushStackElement(),e.setStates(t,3,f.b.move(e.context,e.getAll(),n)),e.reveal(!0,0,0)},t}(S);e.CursorMoveImpl=s,e.CursorMove=Object(u.f)(new s);var a=function(t){function n(e){var n=t.call(this,e)||this;return n._staticArgs=e.args,n}return C(n,t),n.prototype.runCoreEditorCommand=function(t,n){var i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.context.config.pageSize}),e.CursorMove._runCursorMove(t,n.source,i)},n}(S);e.CursorLeft=Object(u.f)(new a({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Object(u.f)(new a({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:1039}})),e.CursorRight=Object(u.f)(new a({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Object(u.f)(new a({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:1041}})),e.CursorUp=Object(u.f)(new a({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Object(u.f)(new a({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Object(u.f)(new a({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:11}})),e.CursorPageUpSelect=Object(u.f)(new a({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:1035}})),e.CursorDown=Object(u.f)(new a({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Object(u.f)(new a({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Object(u.f)(new a({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:12}})),e.CursorPageDownSelect=Object(u.f)(new a({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:null,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:1036}})),e.CreateCursor=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"createCursor",precondition:null})||this}return C(t,e),t.prototype.runCoreEditorCommand=function(e,t){var n,i=e.context;n=t.wholeLine?f.b.line(i,e.getPrimaryCursor(),!1,t.position,t.viewPosition):f.b.moveTo(i,e.getPrimaryCursor(),!1,t.position,t.viewPosition);var o=e.getAll();if(o.length>1)for(var r=n.modelState?n.modelState.position:null,s=n.viewState?n.viewState.position:null,a=0,u=o.length;ao&&(i=o);var r=new m.a(i,1,i,e.context.model.getLineMaxColumn(i)),s=0;if(n.at)switch(n.at){case L.RawAtArgument.Top:s=3;break;case L.RawAtArgument.Center:s=1;break;case L.RawAtArgument.Bottom:s=4}var a=e.context.convertModelRangeToViewRange(r);e.revealRange(!1,a,s,0)},t}(S))),e.SelectAll=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this}return C(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[f.b.selectAll(e.context,e.getPrimaryCursor())])},t}(S))),e.SetSelection=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:null})||this}return C(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[d.d.fromModelSelection(t.selection)])},t}(S)))}(x||(x={}));var I;!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditingCommand(t,i,n||{})},t}(u.c);e.CoreEditingCommand=t,e.LineBreakInsert=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:_.a.writable,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:0,mac:{primary:301}}})||this}return C(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,p.a.lineBreakInsert(t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection})))},t}(t))),e.Outdent=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:_.a.writable,kbOpts:{weight:w,kbExpr:b.b.and(_.a.editorTextFocus,_.a.tabDoesNotMoveFocus),primary:1026}})||this}return C(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,p.a.outdent(t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection}))),e.pushUndoStop()},t}(t))),e.Tab=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"tab",precondition:_.a.writable,kbOpts:{weight:w,kbExpr:b.b.and(_.a.editorTextFocus,_.a.tabDoesNotMoveFocus),primary:2}})||this}return C(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,p.a.tab(t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection}))),e.pushUndoStop()},t}(t))),e.DeleteLeft=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:_.a.writable,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return C(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=h.a.deleteLeft(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection})),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(2)},t}(t))),e.DeleteRight=Object(u.f)(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:_.a.writable,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return C(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=h.a.deleteRight(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection})),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(3)},t}(t)))}(I||(I={}));var N=function(e){function t(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return C(t,e),t.prototype.runCommand=function(e,t){var n=e.get(l.a).getFocusedCodeEditor();if(n&&n.hasTextFocus())return this._runEditorHandler(e,n,t);var i=document.activeElement;if(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)return void document.execCommand(this._inputHandler);var o=e.get(l.a).getActiveCodeEditor();return o?(o.focus(),this._runEditorHandler(e,o,t)):void 0},t.prototype._runEditorHandler=function(e,t,n){var i=this._editorHandler;"string"==typeof i?t.trigger("keyboard",i,n):(n=n||{},n.source="keyboard",i.runEditorCommand(e,t,n))},t}(u.a),D=function(e){function t(t,n){var i=e.call(this,{id:t,precondition:null})||this;return i._handlerId=n,i}return C(t,e),t.prototype.runCommand=function(e,t){var n=e.get(l.a).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t)},t}(u.a);i(new N({editorHandler:x.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:_.a.textInputFocus,kbOpts:{weight:w,kbExpr:null,primary:2079},menubarOpts:{menuId:y.b.MenubarSelectionMenu,group:"1_basic",title:s.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),i(new N({editorHandler:v.b.Undo,inputHandler:"undo",id:v.b.Undo,precondition:_.a.writable,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:2104},menubarOpts:{menuId:y.b.MenubarEditMenu,group:"1_do",title:s.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),i(new D("default:"+v.b.Undo,v.b.Undo)),i(new N({editorHandler:v.b.Redo,inputHandler:"redo",id:v.b.Redo,precondition:_.a.writable,kbOpts:{weight:w,kbExpr:_.a.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menubarOpts:{menuId:y.b.MenubarEditMenu,group:"1_do",title:s.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),i(new D("default:"+v.b.Redo,v.b.Redo)),o(v.b.Type),o(v.b.ReplacePreviousChar),o(v.b.CompositionStart),o(v.b.CompositionEnd),o(v.b.Paste),o(v.b.Cut)},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(22),o=n(4),r=n(2),s=function(){function e(){}return e._columnSelect=function(e,t,n,s,a,u){for(var l=Math.abs(a-n)+1,c=n>a,d=s>u,h=su)continue;if(ys)continue;if(_1&&o--,this.columnSelect(e,t,n.selection,i,o)},e.columnSelectRight=function(e,t,n,r,s){for(var a=0,u=Math.min(n.position.lineNumber,r),l=Math.max(n.position.lineNumber,r),c=u;c<=l;c++){var d=t.getLineMaxColumn(c),h=i.a.visibleColumnFromColumn2(e,t,new o.a(c,d));a=Math.max(a,h)}return st.getLineCount()&&(o=t.getLineCount()),this.columnSelect(e,t,n.selection,o,r)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var i=n(7),o=i.b.performance&&"function"==typeof i.b.performance.now,r=function(){function e(e){this._highResolution=o&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.elapsed=function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?i.b.performance.now():(new Date).getTime()},e}()},function(e,t,n){"use strict";function i(e){return"\n"===e.getEOL()?0:1}n.d(t,"a",function(){return a});var o=n(13),r=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[]}return e.prototype.undo=function(e){for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return Object(o.d)(e),this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return Object(o.d)(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}()},function(e,t,n){"use strict";function i(e,t,n,i,o){o.spacesDiff=0,o.looksLikeAlignment=!1;var r;for(r=0;r0&&l>0||d>0&&h>0)){var f=Math.abs(l-h),p=Math.abs(u-d);return 0===f?(o.spacesDiff=p,void(p>0&&0<=d-1&&d-10?s++:y>1&&a++,i(u,l,g,_,h),!h.looksLikeAlignment)){var L=h.spacesDiff;L<=8&&d[L]++,u=g,l=_}}var x=n;s!==a&&(x=sN&&(N=t,I=e)}),{insertSpaces:x,tabSize:I}}t.a=o;var r=function(){function e(){}return e}()},function(e,t,n){"use strict";function i(e){return(1&e.metadata)>>>0}function o(e,t){e.metadata=254&e.metadata|t<<0}function r(e){return(2&e.metadata)>>>1==1}function s(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function a(e){return(4&e.metadata)>>>2==1}function u(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function l(e){return(8&e.metadata)>>>3==1}function c(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function d(e){return(48&e.metadata)>>>4}function h(e,t){e.metadata=207&e.metadata|t<<4}function f(e){return(64&e.metadata)>>>6==1}function p(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}function g(e){for(var t=e.root,n=0;t!==P;)t.left===P||r(t.left)?t.right===P||r(t.right)?(t.start=n+t.start,t.end=n+t.end,t.delta=0,k(t),s(t,!0),s(t.left,!1),s(t.right,!1),t===t.parent.right&&(n-=t.parent.delta),t=t.parent):(n+=t.delta,t=t.right):t=t.left;s(e.root,!1)}function m(e,t,n,i){return en)&&(1!==i&&(2===i||t))}function v(e,t,n,i,o){var r=d(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),h=e.start,p=!1,g=e.end,v=!1;t<=h&&g<=n&&f(e)&&(e.start=t,p=!0,e.end=t,v=!0);var _=o?1:u>0?2:0;if(!p&&m(h,s,t,_)&&(p=!0),!v&&m(g,a,t,_)&&(v=!0),c>0&&!o){var _=u>l?2:0;!p&&m(h,s,t+c,_)&&(p=!0),!v&&m(g,a,t+c,_)&&(v=!0)}var _=o?1:0;!p&&m(h,s,n,_)&&(e.start=t+l,p=!0),!v&&m(g,a,n,_)&&(e.end=t+l,v=!0);var y=l-u;p||(e.start=Math.max(0,h+y),p=!0),v||(e.end=Math.max(0,g+y),v=!0),e.start>e.end&&(e.end=e.start)}function _(e,t,n){for(var i=e.root,o=0,a=0,u=0,l=[],c=0;i!==P;)if(r(i))s(i.left,!1),s(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!r(i.left)){if(o+i.maxEndn?s(i,!0):(u=o+i.end,u>=t&&(i.setCachedOffsets(a,u,0),l[c++]=i),s(i,!0),i.right===P||r(i.right)||(o+=i.delta,i=i.right))}return s(e.root,!1),l}function y(e,t,n,i){for(var o=e.root,a=0,u=0,l=i-(n-t);o!==P;)if(r(o))s(o.left,!1),s(o.right,!1),o===o.parent.right&&(a-=o.parent.delta),k(o),o=o.parent;else{if(!r(o.left)){if(a+o.maxEndn?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),s(o,!0)):(s(o,!0),o.right===P||r(o.right)||(a+=o.delta,o=o.right))}s(e.root,!1)}function b(e,t){for(var n=e.root,i=[],o=0;n!==P;)r(n)?(s(n.left,!1),s(n.right,!1),n=n.parent):n.left===P||r(n.left)?(n.ownerId===t&&(i[o++]=n),s(n,!0),n.right===P||r(n.right)||(n=n.right)):n=n.left;return s(e.root,!1),i}function C(e){for(var t=e.root,n=[],i=0;t!==P;)r(t)?(s(t.left,!1),s(t.right,!1),t=t.parent):t.left===P||r(t.left)?t.right===P||r(t.right)?(n[i++]=t,s(t,!0)):t=t.right:t=t.left;return s(e.root,!1),n}function w(e,t,n,i){for(var o=e.root,u=0,l=0,c=0,d=[],h=0;o!==P;)if(r(o))s(o.left,!1),s(o.right,!1),o===o.parent.right&&(u-=o.parent.delta),o=o.parent;else if(o.left===P||r(o.left)){l=u+o.start,c=u+o.end,o.setCachedOffsets(l,c,i);var f=!0;t&&o.ownerId&&o.ownerId!==t&&(f=!1),n&&a(o)&&(f=!1),f&&(d[h++]=o),s(o,!0),o.right===P||r(o.right)||(u+=o.delta,o=o.right)}else o=o.left;return s(e.root,!1),d}function S(e,t,n,i,o,u){for(var l=e.root,c=0,d=0,h=0,f=[],p=0;l!==P;)if(r(l))s(l.left,!1),s(l.right,!1),l===l.parent.right&&(c-=l.parent.delta),l=l.parent;else{if(!r(l.left)){if(c+l.maxEndn)s(l,!0);else{if((h=c+l.end)>=t){l.setCachedOffsets(d,h,u);var g=!0;i&&l.ownerId&&l.ownerId!==i&&(g=!1),o&&a(l)&&(g=!1),g&&(f[p++]=l)}s(l,!0),l.right===P||r(l.right)||(c+=l.delta,l=l.right)}}return s(e.root,!1),f}function L(e,t){if(e.root===P)return t.parent=P,t.left=P,t.right=P,o(t,0),e.root=t,e.root;x(e,t),T(t.parent);for(var n=t;n!==e.root&&1===i(n.parent);)if(n.parent===n.parent.parent.left){var r=n.parent.parent.right;1===i(r)?(o(n.parent,0),o(r,0),o(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&(n=n.parent,O(e,n)),o(n.parent,0),o(n.parent.parent,1),E(e,n.parent.parent))}else{var r=n.parent.parent.left;1===i(r)?(o(n.parent,0),o(r,0),o(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&(n=n.parent,E(e,n)),o(n.parent,0),o(n.parent.parent,1),O(e,n.parent.parent))}return o(e.root,0),t}function x(e,t){for(var n=0,i=e.root,r=t.start,s=t.end;;){if(A(r,s,i.start+n,i.end+n)<0){if(i.left===P){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break}i=i.left}else{if(i.right===P){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break}n+=i.delta,i=i.right}}t.parent=i,t.left=P,t.right=P,o(t,1)}function I(e,t){var n,r;if(t.left===P?(n=t.right,r=t,n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===P?(n=t.left,r=t):(r=N(t.right),n=r.right,n.start+=r.delta,n.end+=r.delta,n.delta+=r.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),r.start+=t.delta,r.end+=t.delta,r.delta=t.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0)),r===e.root)return e.root=n,o(n,0),t.detach(),D(),k(n),void(e.root.parent=P);var s=1===i(r);if(r===r.parent.left?r.parent.left=n:r.parent.right=n,r===t?n.parent=r.parent:(r.parent===t?n.parent=r:n.parent=r.parent,r.left=t.left,r.right=t.right,r.parent=t.parent,o(r,i(t)),t===e.root?e.root=r:t===t.parent.left?t.parent.left=r:t.parent.right=r,r.left!==P&&(r.left.parent=r),r.right!==P&&(r.right.parent=r)),t.detach(),s)return T(n.parent),r!==t&&(T(r),T(r.parent)),void D();T(n),T(n.parent),r!==t&&(T(r),T(r.parent));for(var a;n!==e.root&&0===i(n);)n===n.parent.left?(a=n.parent.right,1===i(a)&&(o(a,0),o(n.parent,1),O(e,n.parent),a=n.parent.right),0===i(a.left)&&0===i(a.right)?(o(a,1),n=n.parent):(0===i(a.right)&&(o(a.left,0),o(a,1),E(e,a),a=n.parent.right),o(a,i(n.parent)),o(n.parent,0),o(a.right,0),O(e,n.parent),n=e.root)):(a=n.parent.left,1===i(a)&&(o(a,0),o(n.parent,1),E(e,n.parent),a=n.parent.left),0===i(a.left)&&0===i(a.right)?(o(a,1),n=n.parent):(0===i(a.left)&&(o(a.right,0),o(a,1),O(e,a),a=n.parent.left),o(a,i(n.parent)),o(n.parent,0),o(a.left,0),E(e,n.parent),n=e.root));o(n,0),D()}function N(e){for(;e.left!==P;)e=e.left;return e}function D(){P.parent=P,P.delta=0,P.start=0,P.end=0}function O(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==P&&(n.left.parent=t),n.parent=t.parent,t.parent===P?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,k(t),k(n)}function E(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==P&&(n.right.parent=t),n.parent=t.parent,t.parent===P?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,k(t),k(n)}function M(e){var t=e.end;if(e.left!==P){var n=e.left.maxEnd;n>t&&(t=n)}if(e.right!==P){var i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function k(e){e.maxEnd=M(e)}function T(e){for(;e!==P;){var t=M(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function A(e,t,n,i){return e===n?t-i:e-n}t.c=l,n.d(t,"a",function(){return R}),n.d(t,"b",function(){return W}),t.d=k;var R=function(){function e(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,o(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,u(this,!1),h(this,1),c(this,!1),p(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,s(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;u(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),h(this,this.options.stickiness),c(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),p(this,this.options.collapseOnReplaceEdit)},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),P=new R(null,0,0);P.parent=P,P.left=P,P.right=P,o(P,0);var W=function(){function e(){this.root=P,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===P?[]:S(this,e,t,n,i,o)},e.prototype.search=function(e,t,n){return this.root===P?[]:w(this,e,t,n)},e.prototype.collectNodesFromOwner=function(e){return b(this,e)},e.prototype.collectNodesPostOrder=function(){return C(this)},e.prototype.insert=function(e){L(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){I(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,t,n,i){for(var o=_(this,e,e+t),r=0,s=o.length;rt/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,s=n.length;i=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)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=Object(o.c)(this._tmpLineStarts,e);this.chunks.push(new o.b(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=i.f(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new s(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=Object(o.d)(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}()},function(e,t,n){"use strict";function i(e){for(;e.left!==g;)e=e.left;return e}function o(e){for(;e.right!==g;)e=e.right;return e}function r(e){return e===g?0:e.size_left+e.piece.length+r(e.right)}function s(e){return e===g?0:e.lf_left+e.piece.lineFeedCnt+s(e.right)}function a(){g.parent=g}function u(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==g&&(n.left.parent=t),n.parent=t.parent,t.parent===g?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n}function l(e,t){var n=t.left;t.left=n.right,n.right!==g&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===g?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n}function c(e,t){var n,o;if(t.left===g?(o=t,n=o.right):t.right===g?(o=t,n=o.left):(o=i(t.right),n=o.right),o===e.root)return e.root=n,n.color=0,t.detach(),a(),void(e.root.parent=g);var c=1===o.color;if(o===o.parent.left?o.parent.left=n:o.parent.right=n,o===t?(n.parent=o.parent,f(e,n)):(o.parent===t?n.parent=o:n.parent=o.parent,f(e,n),o.left=t.left,o.right=t.right,o.parent=t.parent,o.color=t.color,t===e.root?e.root=o:t===t.parent.left?t.parent.left=o:t.parent.right=o,o.left!==g&&(o.left.parent=o),o.right!==g&&(o.right.parent=o),o.size_left=t.size_left,o.lf_left=t.lf_left,f(e,o)),t.detach(),n.parent.left===n){var d=r(n),p=s(n);if(d!==n.parent.size_left||p!==n.parent.lf_left){var m=d-n.parent.size_left,v=p-n.parent.lf_left;n.parent.size_left=d,n.parent.lf_left=p,h(e,n.parent,m,v)}}if(f(e,n.parent),c)return void a();for(var _;n!==e.root&&0===n.color;)n===n.parent.left?(_=n.parent.right,1===_.color&&(_.color=0,n.parent.color=1,u(e,n.parent),_=n.parent.right),0===_.left.color&&0===_.right.color?(_.color=1,n=n.parent):(0===_.right.color&&(_.left.color=0,_.color=1,l(e,_),_=n.parent.right),_.color=n.parent.color,n.parent.color=0,_.right.color=0,u(e,n.parent),n=e.root)):(_=n.parent.left,1===_.color&&(_.color=0,n.parent.color=1,l(e,n.parent),_=n.parent.left),0===_.left.color&&0===_.right.color?(_.color=1,n=n.parent):(0===_.left.color&&(_.right.color=0,_.color=1,u(e,_),_=n.parent.left),_.color=n.parent.color,n.parent.color=0,_.left.color=0,l(e,n.parent),n=e.root));n.color=0,a()}function d(e,t){for(f(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){var n=t.parent.parent.right;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,u(e,t)),t.parent.color=0,t.parent.parent.color=1,l(e,t.parent.parent))}else{var n=t.parent.parent.left;1===n.color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,l(e,t)),t.parent.color=0,t.parent.parent.color=1,u(e,t.parent.parent))}e.root.color=0}function h(e,t,n,i){for(;t!==e.root&&t!==g;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}function f(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;t=t.parent,n=r(t.left)-t.size_left,i=s(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent}}n.d(t,"b",function(){return p}),n.d(t,"a",function(){return g}),t.d=i,t.f=o,t.e=c,t.c=d,t.g=h;var p=function(){function e(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}return e.prototype.next=function(){if(this.right!==g)return i(this.right);for(var e=this;e.parent!==g&&e.parent.left!==e;)e=e.parent;return e.parent===g?g:e.parent},e.prototype.prev=function(){if(this.left!==g)return o(this.left);for(var e=this;e.parent!==g&&e.parent.right!==e;)e=e.parent;return e.parent===g?g:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),g=new p(null,0);g.parent=g,g.left=g,g.right=g,g.color=0},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(3),o=n(2),r=n(36),s=n(120),a=function(){function e(e,t,n,i,o,r){this._BOM=t,this._mightContainNonBasicASCII=!o,this._mightContainRTL=i,this._pieceTree=new s.a(e,n,r)}return e.prototype.mightContainRTL=function(){return this._mightContainRTL},e.prototype.mightContainNonBasicASCII=function(){return this._mightContainNonBasicASCII},e.prototype.getBOM=function(){return this._BOM},e.prototype.getEOL=function(){return this._pieceTree.getEOL()},e.prototype.getOffsetAt=function(e,t){return this._pieceTree.getOffsetAt(e,t)},e.prototype.getPositionAt=function(e){return this._pieceTree.getPositionAt(e)},e.prototype.getRangeAt=function(e,t){var n=e+t,i=this.getPositionAt(e),r=this.getPositionAt(n);return new o.a(i.lineNumber,i.column,r.lineNumber,r.column)},e.prototype.getValueInRange=function(e,t){if(void 0===t&&(t=0),e.isEmpty())return"";var n=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,n)},e.prototype.getValueLengthInRange=function(e,t){if(void 0===t&&(t=0),e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;var n=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-n},e.prototype.getLength=function(){return this._pieceTree.getLength()},e.prototype.getLineCount=function(){return this._pieceTree.getLineCount()},e.prototype.getLinesContent=function(){return this._pieceTree.getLinesContent()},e.prototype.getLineContent=function(e){return this._pieceTree.getLineContent(e)},e.prototype.getLineCharCode=function(e,t){return this._pieceTree.getLineCharCode(e,t)},e.prototype.getLineLength=function(e){return this._pieceTree.getLineLength(e)},e.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=i.m(this.getLineContent(e));return-1===t?0:t+1},e.prototype.getLineLastNonWhitespaceColumn=function(e){var t=i.w(this.getLineContent(e));return-1===t?0:t+2},e.prototype._getEndOfLine=function(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL()}throw new Error("Unknown EOL preference")},e.prototype.setEOL=function(e){this._pieceTree.setEOL(e)},e.prototype.applyEdits=function(t,n){for(var o=this._mightContainRTL,s=this._mightContainNonBasicASCII,a=!0,u=[],l=0;l0){v.sort(function(e,t){return t.lineNumber-e.lineNumber}),S=[];for(var l=0,L=v.length;l0&&v[l-1].lineNumber===y)){var x=v[l].oldContent,I=this.getLineContent(y);0!==I.length&&I!==x&&-1===i.m(I)&&S.push(y)}}}return new r.a(C,w,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,r=new o.a(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),s=n.startLineNumber,a=n.startColumn,u=[],l=0,c=e.length;l0){var h=u.lines.length,f=u.lines[0],p=u.lines[h-1];d=1===h?new o.a(l,c,l,c+f.length):new o.a(l,c,l+h-1,p.length+1)}else d=new o.a(l,c,l,c);n=d.endLineNumber,i=d.endColumn,t.push(d),r=u}return t},e._sortOpsAscending=function(e,t){var n=o.a.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n},e._sortOpsDescending=function(e,t){var n=o.a.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n},e}()},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"e",function(){return o}),n.d(t,"f",function(){return r}),n.d(t,"g",function(){return s}),n.d(t,"c",function(){return a}),n.d(t,"b",function(){return u}),n.d(t,"a",function(){return l});var i=function(){function e(){this.changeType=1}return e}(),o=function(){function e(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}return e}(),r=function(){function e(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}return e}(),s=function(){function e(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n}return e}(),a=function(){function e(){this.changeType=5}return e}(),u=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t>>0}n.d(t,"a",function(){return d}),n.d(t,"b",function(){return h});var o=n(27),r=n(13),s=n(62),a=n(4),u=n(37),l=new Uint32Array(0).buffer,c=function(){function e(e){this._state=e,this._lineTokens=null,this._invalid=!0}return e.prototype.deleteBeginning=function(e){null!==this._lineTokens&&this._lineTokens!==l&&this.delete(0,e)},e.prototype.deleteEnding=function(e){if(null!==this._lineTokens&&this._lineTokens!==l){var t=new Uint32Array(this._lineTokens),n=t[t.length-2];this.delete(e,n)}},e.prototype.delete=function(e,t){if(null!==this._lineTokens&&this._lineTokens!==l&&e!==t){var n=new Uint32Array(this._lineTokens),i=n.length>>>1;if(0===e&&n[n.length-2]===t)return void(this._lineTokens=l);var o=s.a.findIndexInTokensArray(n,e),r=o>0?n[o-1<<1]:0;if(td&&(n[c++]=p,n[c++]=n[1+(f<<1)],d=p)}if(c!==n.length){var g=new Uint32Array(c);g.set(n.subarray(0,c),0),this._lineTokens=g.buffer}}}},e.prototype.append=function(e){if(e!==l){if(this._lineTokens===l)return void(this._lineTokens=e);if(null!==this._lineTokens){if(null===e)return void(this._lineTokens=null);var t=new Uint32Array(this._lineTokens),n=new Uint32Array(e),i=n.length>>>1,o=new Uint32Array(t.length+n.length);o.set(t,0);for(var r=t.length,s=t[t.length-2],a=0;a>>1,o=s.a.findIndexInTokensArray(n,e);if(o>0){(o>0?n[o-1<<1]:0)===e&&o--}for(var r=o;r=e},e.prototype.hasLinesToTokenize=function(e){return this._invalidLineStartIndex=0;s--)this.invalidateLine(e.startLineNumber+s-1);this._acceptDeleteRange(e),this._acceptInsertText(new a.a(e.startLineNumber,e.startColumn),t,n)},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1;if(!(t>=this._tokens.length)){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void this._tokens[t].delete(e.startColumn-1,e.endColumn-1)}var n=this._tokens[t];n.deleteEnding(e.startColumn-1);var i=e.endLineNumber-1,o=null;if(i=this._tokens.length)){if(0===t)return void this._tokens[i].insert(e.column-1,n);var r=this._tokens[i];r.deleteEnding(e.column-1),r.insert(e.column-1,n);for(var s=new Array(t),a=t-1;a>=0;a--)s[a]=new c(null);this._tokens=o.a(this._tokens,e.lineNumber,s)}}},e.prototype._tokenizeOneLine=function(e,t){if(!this.hasLinesToTokenize(e))return e.getLineCount()+1;var n=this._invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t,n),n},e.prototype._tokenizeText=function(e,t,n){var i=null;if(this.tokenizationSupport)try{i=this.tokenizationSupport.tokenize2(t,n,0)}catch(e){Object(r.d)(e)}return i||(i=Object(u.e)(this.languageIdentifier.id,t,n,0)),i},e.prototype._updateTokensUntilLine=function(e,t,n){if(!this.tokenizationSupport)return void(this._invalidLineStartIndex=e.getLineCount());for(var i=e.getLineCount(),o=n-1,s=this._invalidLineStartIndex;s<=o;s++){var a=s+1,l=e.getLineContent(s+1),c=this._getState(s),d=null;try{var h=c.clone();d=this.tokenizationSupport.tokenize2(l,h,0)}catch(e){Object(r.d)(e)}if(d||(d=Object(u.e)(this.languageIdentifier.id,l,c,0)),this._setTokens(this.languageIdentifier.id,s,l.length,d.tokens),t.registerChangedTokens(s+1),this._setIsInvalid(s,!1),a0?t[n-1]:null;i&&i.toLineNumber===e-1?i.toLineNumber++:t[n]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}()},function(e,t,n){"use strict";n.d(t,"b",function(){return c}),n.d(t,"a",function(){return i});var i,o=n(17),r=n(22),s=n(124),a=n(210),u=n(4),l=n(2),c=function(){function e(){}return e.addCursorDown=function(e,t,n){for(var i=[],o=0,a=0,u=t.length;ac&&(d=c,h=e.model.getLineMaxColumn(d)),r.d.fromModelState(new r.f(new l.a(s.lineNumber,1,d,h),0,new u.a(d,h),0))}var f=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberf){var c=e.viewModel.getLineCount(),p=a.lineNumber+1,g=1;return p>c&&(p=c,g=e.viewModel.getLineMaxColumn(p)),r.d.fromViewState(t.viewState.move(t.modelState.hasSelection(),p,g,0))}var m=t.modelState.selectionStart.getEndPosition();return r.d.fromModelState(t.modelState.move(t.modelState.hasSelection(),m.lineNumber,m.column,0))},e.word=function(e,t,n,i){var o=e.model.validatePosition(i);return r.d.fromModelState(a.a.word(e.config,e.model,t.modelState,n,o))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new r.d(t.modelState,t.viewState);var n=t.viewState.position.lineNumber,i=t.viewState.position.column;return r.d.fromViewState(new r.f(new l.a(n,i,n,i),0,new u.a(n,i),0))},e.moveTo=function(e,t,n,i,o){var s=e.model.validatePosition(i),a=o?e.validateViewPosition(new u.a(o.lineNumber,o.column),s):e.convertModelPositionToViewPosition(s);return r.d.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))},e.move=function(e,t,n){var i=n.select,o=n.value;switch(n.direction){case 0:return 4===n.unit?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===n.unit?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===n.unit?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===n.unit?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,i);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 11:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 10:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 12:for(var l=e.getCompletelyVisibleViewRange(),c=[],d=0,h=t.length;dn.endLineNumber-1&&(o=n.endLineNumber-1),o=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===s&&0!==i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(1===s)return o+1;if(1===n&&2===s)return o+1;if(2===n&&0===s)return o+1}return 0},e.moveWordLeft=function(t,n,i,o){var r=i.lineNumber,s=i.column,u=!1;1===s&&r>1&&(u=!0,r-=1,s=n.getLineMaxColumn(r));var l=e._findPreviousWordOnLine(t,n,new a.a(r,s));if(0===o){if(l&&!u){if(n.getLineLastNonWhitespaceColumn(r)1?new a.a(n-1,e.getLineMaxColumn(n-1)):t;for(var r=e.getLineContent(n),s=t.column-1;s>1;s--){var u=r.charCodeAt(s-2),l=r.charCodeAt(s-1);if(95!==u&&95===l)return new a.a(n,s);if(o.u(u)&&o.v(l))return new a.a(n,s);if(o.v(u)&&o.v(l)&&s+1=u.start+1&&(u=e._findNextWordOnLine(t,n,new a.a(r,u.end+1))),s=u?u.start+1:n.getLineMaxColumn(r)),new a.a(r,s)},e._moveWordPartRight=function(e,t){var n=t.lineNumber,i=e.getLineMaxColumn(n);if(t.column===i)return n1?c=1:(l--,c=n.getLineMaxColumn(l)):(h&&c<=h.end+1&&(h=e._findPreviousWordOnLine(t,n,new a.a(l,h.start+1))),h?c=h.end+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l))),new u.a(l,c,s.lineNumber,s.column)},e._deleteWordPartLeft=function(t,n){if(!n.isEmpty())return n;var i=n.getPosition(),o=e._moveWordPartLeft(t,i);return new u.a(i.lineNumber,i.column,o.lineNumber,o.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i=p.start+1&&(p=e._findNextWordOnLine(t,n,new a.a(l,p.end+1))),p?c=p.start+1:c1){var _=o.a.visibleColumnFromColumn(m,v+1,l);if(_%l!=0&&t.isCheapToTokenize(g-1)){var y=a.a.getRawEnterActionAtPosition(t,g-1,t.getLineMaxColumn(g-1));if(y){if(p=f,y.appendText)for(var b=0,C=y.appendText.length;b'),i.appendASCIIString(o),i.appendASCIIString("
"),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),c=function(e){function t(t){var n=e.call(this,t)||this;return n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n.domNode.setHeight(0),n}return a(t,e),t.prototype.onConfigurationChanged=function(t){return t.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),e.prototype.onConfigurationChanged.call(this,t)},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(u),d=function(e){function t(t){var n=e.call(this,t)||this;return n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),o.a.applyFontInfo(n.domNode,n._context.configuration.editor.fontInfo),n}return a(t,e),t.prototype.onConfigurationChanged=function(t){var n=!1;return t.fontInfo&&(o.a.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),n=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,n=!0),e.prototype.onConfigurationChanged.call(this,t)||n},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(u)},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(6),o=n(12),r=n(16),s=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=function(){function e(e,t){this.top=e,this.left=t}return e}(),u=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=Object(o.b)(document.createElement("div")),r.a.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=Object(o.b)(document.createElement("div")),r.a.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i}return s(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={}},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),n=0,i=t.length;n=i,d=a,h=u>=i,f=e.left,p=t.left;return f+n>o.scrollLeft+o.viewportWidth&&(f=o.scrollLeft+o.viewportWidth-n),p+n>o.scrollLeft+o.viewportWidth&&(p=o.scrollLeft+o.viewportWidth-n),fthis._contentWidth)return null;var u=e.top-o,l=t.top+this._lineHeight,c=s+this._contentLeft,d=a+this._contentLeft,h=i.s(this._viewDomNode.domNode),f=h.top+u-i.d.scrollY,p=h.top+l-i.d.scrollY,g=h.left+c-i.d.scrollX,m=h.left+d-i.d.scrollX,v=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,_=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,y=f>=22,b=p+o<=_-22;if(g+n+20>v){var C=g-(v-n-20);g-=C,c-=C}if(m+n+20>v){var C=m-(v-n-20);m-=C,d-=C}if(g<0){var C=g;g-=C,c-=C}if(m<0){var C=m;m-=C,d-=C}return this._fixedOverflowWidgets&&(u=f,l=p,c=g,d=m),{fitsAbove:y,aboveTop:u,aboveLeft:c,fitsBelow:b,belowTop:l,belowLeft:d}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new a(e.top,e.left+this._contentLeft)},e.prototype._getTopAndBottomLeft=function(e){if(!this._viewPosition)return[null,null];var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return[null,null];var n=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop,i=new a(n,t.left),o=this._viewPosition.lineNumber,r=t.left;if(this._viewRange){var s=e.linesVisibleRangesForRange(this._viewRange,!1);if(s&&s.length>0)for(var u=s.length-1;u>=0;u--){var l=s[u];if(l.lineNumber>=o){l.lineNumber>o&&(o=l.lineNumber,r=1073741824);for(var c=0,d=l.ranges.length;ce.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){this._renderData=this._prepareRenderWidget(e)},e.prototype.render=function(e){if(!this._renderData)return void(this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(216),o=(n.n(i),n(42)),r=n(25),s=n(10),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._scrollWidth=0,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._context.addEventHandler(n),n}return a(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){this._scrollWidth=e.scrollWidth},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){if(this._shouldShowCurrentLine()){return'
'}return""}return""},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._willRenderMarginCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}(o.a);Object(s.e)(function(e,t){var n=e.getColor(r.l);if(n&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),!n||n.isTransparent()||e.defines(r.m)){var i=e.getColor(r.m);i&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}})},function(e,t,n){var i=n(217);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(219),o=(n.n(i),n(42)),r=n(25),s=n(10),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._context.addEventHandler(n),n}return a(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){var n="current-line";if(this._shouldShowCurrentLine()){n="current-line current-line-margin"+(this._willRenderContentCurrentLine()?" current-line-margin-both":"")}return'
'}return""},t.prototype._shouldShowCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._willRenderContentCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}(o.a);Object(s.e)(function(e,t){var n=e.getColor(r.l);if(n)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }");else{var i=e.getColor(r.m);i&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}})},function(e,t,n){var i=n(220);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .margin-view-overlays .current-line {\r\n\tdisplay: block;\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\r\n\tborder-right: 0;\r\n}",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(222),o=(n.n(i),n(42)),r=n(2),s=n(53),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return a(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,s=t.length;ot.options.zIndex)return 1;var n=e.options.className,i=t.options.className;return ni?1:r.a.compareRangesUsingStarts(e.range,t.range)});for(var u=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,c=[],d=u;d<=l;d++){c[d-u]=""}this._renderWholeLineDecorations(e,n,c),this._renderNormalDecorations(e,n,c),this._renderResult=c},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(u.range.startLineNumber,o),d=Math.min(u.range.endLineNumber,r),h=c;h<=d;h++){var f=h-o;n[f]+=l}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=null,a=!1,u=null,l=0,c=t.length;l';a[h]+=v}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(o.a)},function(e,t,n){var i=n(223);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcdr = core decorations rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cdr {\r\n\tposition: absolute;\r\n}",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(6),o=n(12),r=n(89),s=n(16),a=n(10),u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(e){function t(t,n,u,l){var c=e.call(this,t)||this,d=c._context.configuration.editor,h=d.viewInfo.scrollbar,f={listenOnDomNode:u.domNode,className:"editor-scrollable "+Object(a.d)(t.theme.type),useShadows:!1,lazyRender:!0,vertical:h.vertical,horizontal:h.horizontal,verticalHasArrows:h.verticalHasArrows,horizontalHasArrows:h.horizontalHasArrows,verticalScrollbarSize:h.verticalScrollbarSize,verticalSliderSize:h.verticalSliderSize,horizontalScrollbarSize:h.horizontalScrollbarSize,horizontalSliderSize:h.horizontalSliderSize,handleMouseWheel:h.handleMouseWheel,arrowSize:h.arrowSize,mouseWheelScrollSensitivity:h.mouseWheelScrollSensitivity};c.scrollbar=c._register(new r.c(n.domNode,f,c._context.viewLayout.scrollable)),s.a.write(c.scrollbar.getDomNode(),5),c.scrollbarDomNode=Object(o.b)(c.scrollbar.getDomNode()),c.scrollbarDomNode.setPosition("absolute"),c._setLayout();var p=function(e,t,n){var i={};if(t){var o=e.scrollTop;o&&(i.scrollTop=c._context.viewLayout.getCurrentScrollTop()+o,e.scrollTop=0)}if(n){var r=e.scrollLeft;r&&(i.scrollLeft=c._context.viewLayout.getCurrentScrollLeft()+r,e.scrollLeft=0)}c._context.viewLayout.setScrollPositionNow(i)};return c._register(i.g(u.domNode,"scroll",function(e){return p(u.domNode,!0,!0)})),c._register(i.g(n.domNode,"scroll",function(e){return p(n.domNode,!0,!1)})),c._register(i.g(l.domNode,"scroll",function(e){return p(l.domNode,!0,!1)})),c._register(i.g(c.scrollbarDomNode.domNode,"scroll",function(e){return p(c.scrollbarDomNode.domNode,!0,!1)})),c}return u(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.scrollbarDomNode.setLeft(e.contentLeft),"right"===this._context.configuration.editor.viewInfo.minimap.side?this.scrollbarDomNode.setWidth(e.contentWidth+e.minimapWidth):this.scrollbarDomNode.setWidth(e.contentWidth),this.scrollbarDomNode.setHeight(e.contentHeight)},t.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo()},t.prototype.getDomNode=function(){return this.scrollbarDomNode},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)},t.prototype.onConfigurationChanged=function(e){if(e.viewInfo){var t=this._context.configuration.editor,n={handleMouseWheel:t.viewInfo.scrollbar.handleMouseWheel,mouseWheelScrollSensitivity:t.viewInfo.scrollbar.mouseWheelScrollSensitivity};this.scrollbar.updateOptions(n)}return e.layoutInfo&&this._setLayout(),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onThemeChanged=function(e){return this.scrollbar.updateClassName("editor-scrollable "+Object(a.d)(this._context.theme.type)),!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this.scrollbar.renderNow()},t}(s.b)},function(e,t,n){var i=n(226);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,'/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Arrows */\r\n.monaco-scrollable-element > .scrollbar > .up-arrow {\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiIGZpbGw9IiM0MjQyNDIiLz48L3N2Zz4=");\r\n\tcursor: pointer;\r\n}\r\n.monaco-scrollable-element > .scrollbar > .down-arrow {\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA1LjQ5MDQ1OTkxODk3NTgzLDUuODExNTAwMDcyNDc5MjQ4KSIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiLz48L3N2Zz4=");\r\n\tcursor: pointer;\r\n}\r\n.monaco-scrollable-element > .scrollbar > .left-arrow {\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDUuNDkwNDU5OTE4OTc1ODMxLDUuNDMxMzgyMTc5MjYwMjU0KSIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNDgwNDYsOC41ODEzOGwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\r\n\tcursor: pointer;\r\n}\r\n.monaco-scrollable-element > .scrollbar > .right-arrow {\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoOTAgNS42MTcxNjUwODg2NTM1NjQ1LDUuNTU4MDg5NzMzMTIzNzgpICIgZmlsbD0iIzQyNDI0MiIgZD0ibTkuNjA3MTcsOC43MDgwOWwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\r\n\tcursor: pointer;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element > .scrollbar > .up-arrow,\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .up-arrow {\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiIGZpbGw9IiNFOEU4RTgiLz48L3N2Zz4=");\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .down-arrow,\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .down-arrow {\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA1LjQ5MDQ1OTkxODk3NTgzLDUuODExNTAwMDcyNDc5MjQ4KSIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNDgwNDYsOC45NjE1bDEuMjYsLTEuMjZsLTUuMDQsLTUuMDRsLTUuNDYsNS4wNGwxLjI2LDEuMjZsNC4yLC0zLjc4bDMuNzgsMy43OHoiLz48L3N2Zz4=");\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .left-arrow,\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .left-arrow {\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMSAxMSI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDUuNDkwNDU5OTE4OTc1ODMxLDUuNDMxMzgyMTc5MjYwMjU0KSIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNDgwNDYsOC41ODEzOGwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .right-arrow,\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .right-arrow {\r\n\tbackground: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggdHJhbnNmb3JtPSJyb3RhdGUoOTAgNS42MTcxNjUwODg2NTM1NjQ1LDUuNTU4MDg5NzMzMTIzNzgpICIgZmlsbD0iI0U4RThFOCIgZD0ibTkuNjA3MTcsOC43MDgwOWwxLjI2LC0xLjI2bC01LjA0LC01LjA0bC01LjQ2LDUuMDRsMS4yNiwxLjI2bDQuMiwtMy43OGwzLjc4LDMuNzh6Ii8+PC9zdmc+");\r\n}\r\n\r\n.monaco-scrollable-element > .visible {\r\n\topacity: 1;\r\n\r\n\t/* Background rule added for IE9 - to allow clicks on dom node */\r\n\tbackground:rgba(0,0,0,0);\r\n\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-scrollable-element > .invisible {\r\n\topacity: 0;\r\n\tpointer-events: none;\r\n}\r\n.monaco-scrollable-element > .invisible.fade {\r\n\ttransition: opacity 800ms linear;\r\n}\r\n\r\n/* Scrollable Content Inset Shadow */\r\n.monaco-scrollable-element > .shadow {\r\n\tposition: absolute;\r\n\tdisplay: none;\r\n}\r\n.monaco-scrollable-element > .shadow.top {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 3px;\r\n\theight: 3px;\r\n\twidth: 100%;\r\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.left {\r\n\tdisplay: block;\r\n\ttop: 3px;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 3px;\r\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\r\n}\r\n.monaco-scrollable-element > .shadow.top-left-corner {\r\n\tdisplay: block;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 3px;\r\n\twidth: 3px;\r\n}\r\n.monaco-scrollable-element > .shadow.top.left {\r\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\r\n}\r\n\r\n/* ---------- Default Style ---------- */\r\n\r\n.vs .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(100, 100, 100, .4);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(121, 121, 121, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider {\r\n\tbackground: rgba(111, 195, 223, .6);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(100, 100, 100, .7);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider:hover {\r\n\tbackground: rgba(111, 195, 223, .8);\r\n}\r\n\r\n.monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(0, 0, 0, .6);\r\n}\r\n.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(191, 191, 191, .4);\r\n}\r\n.hc-black .monaco-scrollable-element > .scrollbar > .slider.active {\r\n\tbackground: rgba(111, 195, 223, 1);\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: #000 6px 0 6px -6px inset;\r\n}\r\n\r\n.vs-dark .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: #000 6px 6px 6px -6px inset;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.left {\r\n\tbox-shadow: none;\r\n}\r\n\r\n.hc-black .monaco-scrollable-element .shadow.top.left {\r\n\tbox-shadow: none;\r\n}',""])},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(23),o=n(127),r=n(90),s=n(128),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(e){function t(t,n,o){var a=e.call(this,{lazyRender:n.lazyRender,host:o,scrollbarState:new s.a(n.horizontalHasArrows?n.arrowSize:0,2===n.horizontal?0:n.horizontalScrollbarSize,2===n.vertical?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var u=(n.arrowSize-r.a)/2,l=(n.horizontalScrollbarSize-r.a)/2;a._createArrow({className:"left-arrow",top:l,left:u,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return a._host.onMouseWheel(new i.c(null,1,0))}}),a._createArrow({className:"right-arrow",top:l,left:void 0,bottom:void 0,right:u,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return a._host.onMouseWheel(new i.c(null,-1,0))}})}return a._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,void 0,n.horizontalSliderSize),a}return a(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(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},t.prototype._mouseDownRelativePosition=function(e,t){return e},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(14),o=n(0),r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),s=function(e){function t(t,n,o){var r=e.call(this)||this;return r._visibility=t,r._visibleClassName=n,r._invisibleClassName=o,r._domNode=null,r._isVisible=!1,r._isNeeded=!1,r._shouldBeVisible=!1,r._revealTimer=r._register(new i.d),r}return r(t,e),t.prototype.applyVisibilitySetting=function(e){return 2!==this._visibility&&(3===this._visibility||e)},t.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())},t.prototype.setIsNeeded=function(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())},t.prototype.setDomNode=function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)},t.prototype.ensureVisibility=function(){if(!this._isNeeded)return void this._hide(!1);this._shouldBeVisible?this._reveal():this._hide(!0)},t.prototype._reveal=function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(function(){e._domNode&&e._domNode.setClassName(e._visibleClassName)},0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(23),o=n(127),r=n(90),s=n(128),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(e){function t(t,n,o){var a=e.call(this,{lazyRender:n.lazyRender,host:o,scrollbarState:new s.a(n.verticalHasArrows?n.arrowSize:0,2===n.vertical?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var u=(n.arrowSize-r.a)/2,l=(n.verticalScrollbarSize-r.a)/2;a._createArrow({className:"up-arrow",top:u,left:l,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return a._host.onMouseWheel(new i.c(null,0,1))}}),a._createArrow({className:"down-arrow",top:void 0,left:l,bottom:u,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return a._host.onMouseWheel(new i.c(null,0,-1))}})}return a._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,void 0),a}return a(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t)},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(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},t.prototype._mouseDownRelativePosition=function(e,t){return t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(o.a)},function(e,t,n){var i=n(231);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .glyph-margin {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n}\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcgmr = core glyph margin rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cgmr {\r\n\tposition: absolute;\r\n}\r\n",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(233),o=(n.n(i),n(42)),r=n(4),s=n(25),a=n(10),u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._primaryLineNumber=0,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._activeIndentEnabled=n._context.configuration.editor.viewInfo.highlightActiveIndentGuide,n._renderResult=null,n._context.addEventHandler(n),n}return u(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides,this._activeIndentEnabled=this._context.configuration.editor.viewInfo.highlightActiveIndentGuide),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(!this._enabled)return void(this._renderResult=null);var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize(),o=i*this._spaceWidth,s=e.scrollWidth,a=this._lineHeight,u=o,l=this._context.model.getLinesIndentGuides(t,n),c=0,d=0,h=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var f=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);c=f.startLineNumber,d=f.endLineNumber,h=f.indent}for(var p=[],g=t;g<=n;g++){for(var m=c<=g&&g<=d,v=g-t,_=l[v],y="",b=e.visibleRangeForPosition(new r.a(g,1)),C=b?b.left:0,w=1;w<=_;w++){if(y+='
',(C+=o)>s)break}p[v]=y}this._renderResult=p},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(o.a);Object(a.e)(function(e,t){var n=e.getColor(s.i);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(s.a)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }")})},function(e,t,n){var i=n(234);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcigr = core ident guides rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cigr {\r\n\tposition: absolute;\r\n}\r\n.monaco-editor .lines-content .cigra {\r\n\tposition: absolute;\r\n}\r\n",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var i=n(236),o=(n.n(i),n(14)),r=n(41),s=n(88),a=n(16),u=n(116),l=n(4),c=n(2),d=n(53),h=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),f=function(){function e(){this._currentVisibleRange=new c.a(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),p=function(){function e(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r}return e}(),g=function(e){function t(t,n){var i=e.call(this,t)||this;i._linesContent=n,i._textRangeRestingSpot=document.createElement("div"),i._visibleLines=new s.b(i),i.domNode=i._visibleLines.domNode;var l=i._context.configuration;return i._lineHeight=l.editor.lineHeight,i._typicalHalfwidthCharacterWidth=l.editor.fontInfo.typicalHalfwidthCharacterWidth,i._isViewportWrapping=l.editor.wrappingInfo.isViewportWrapping,i._revealHorizontalRightPadding=l.editor.viewInfo.revealHorizontalRightPadding,i._canUseLayerHinting=l.editor.canUseLayerHinting,i._viewLineOptions=new u.c(l,i._context.theme.type),a.a.write(i.domNode,7),i.domNode.setClassName("view-lines"),r.a.applyFontInfo(i.domNode,l.editor.fontInfo),i._maxLineWidth=0,i._asyncUpdateLineWidths=new o.c(function(){i._updateLineWidthsSlow()},200),i._lastRenderedData=new f,i._horizontalRevealRequest=null,i}return h(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new u.b(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.wrappingInfo&&(this._maxLineWidth=0);var t=this._context.configuration;return e.lineHeight&&(this._lineHeight=t.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=t.editor.fontInfo.typicalHalfwidthCharacterWidth),e.wrappingInfo&&(this._isViewportWrapping=t.editor.wrappingInfo.isViewportWrapping),e.viewInfo&&(this._revealHorizontalRightPadding=t.editor.viewInfo.revealHorizontalRightPadding),e.canUseLayerHinting&&(this._canUseLayerHinting=t.editor.canUseLayerHinting),e.fontInfo&&r.a.applyFontInfo(this.domNode,t.editor.fontInfo),this._onOptionsMaybeChanged(),e.layoutInfo&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new u.c(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++){this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new p(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop);return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new l.a(i,1);var o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(ir)return null;var s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),a=this._context.model.getLineMinColumn(i);return sn?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber,i=c.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;var o=[],r=0,s=new u.a(this.domNode.domNode,this._textRangeRestingSpot),a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new l.a(i.startLineNumber,1)).lineNumber);for(var h=this._visibleLines.getStartLineNumber(),f=this._visibleLines.getEndLineNumber(),p=i.startLineNumber;p<=i.endLineNumber;p++)if(!(pf)){var g=p===i.startLineNumber?i.startColumn:1,m=p===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(p),v=this._visibleLines.getVisibleLine(p).getVisibleRangesForRange(g,m,s);if(v&&0!==v.length){if(t&&pr)){var a=s===t.startLineNumber?t.startColumn:1,l=s===t.endLineNumber?t.endColumn:this._context.model.getLineMaxColumn(s),d=this._visibleLines.getVisibleLine(s).getVisibleRangesForRange(a,l,i);d&&0!==d.length&&(n=n.concat(d))}return 0===n.length?null:n},t.prototype.visibleRangeForPosition=function(e){var t=this.visibleRangesForRange2(new c.a(e.lineNumber,e.column,e.lineNumber,e.column));return t?t[0]:null},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,o=!0,r=t;r<=n;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(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){var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,o=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,n,i);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===o?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting);var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthd&&(d=f.left+f.width)}return o=d,l=Math.max(0,l-t.HORIZONTAL_EXTRA_PX),d+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(s,a,l,d),maxHorizontalOffset:o}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){e|=0,t|=0,n|=0,i|=0,o=!!o,r=!!r;var s=t-e;return i-nt?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(a.b)},function(e,t,n){var i=n(237);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* Uncomment to see lines flashing when they're painted */\r\n/*.monaco-editor .view-lines > .view-line {\r\n\tbackground-color: none;\r\n\tanimation-name: flash-background;\r\n\tanimation-duration: 800ms;\r\n}\r\n@keyframes flash-background {\r\n\t0% { background-color: lightgreen; }\r\n\t100% { background-color: none }\r\n}*/\r\n\r\n.monaco-editor.safari .lines-content,\r\n.monaco-editor.safari .view-line,\r\n.monaco-editor.safari .view-lines {\r\n\t-webkit-user-select: text;\r\n\tuser-select: text;\r\n}\r\n\r\n.monaco-editor .lines-content,\r\n.monaco-editor .view-line,\r\n.monaco-editor .view-lines {\r\n\t-webkit-user-select: none;\r\n\t-ms-user-select: none;\r\n\t-khtml-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-o-user-select: none;\r\n\tuser-select: none;\r\n}\r\n\r\n.monaco-editor .view-lines {\r\n\tcursor: text;\r\n\twhite-space: nowrap;\r\n}\r\n\r\n.monaco-editor.vs-dark.mac .view-lines,\r\n.monaco-editor.hc-black.mac .view-lines {\r\n\tcursor: -webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8, text;\r\n}\r\n\r\n.monaco-editor .view-line {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n}\r\n\r\n/* TODO@tokenization bootstrap fix */\r\n/*.monaco-editor .view-line > span > span {\r\n\tfloat: none;\r\n\tmin-height: inherit;\r\n\tmargin-left: inherit;\r\n}*/",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(239),o=(n.n(i),n(92)),r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),s=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._decorationsLeft=n._context.configuration.editor.layoutInfo.decorationsLeft,n._decorationsWidth=n._context.configuration.editor.layoutInfo.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return r(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,r=0,s=t.length;r',a=[],u=t;u<=n;u++){for(var l=u-t,c=i[l],d="",h=0,f=c.length;h';o[s]=u}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(o.b)},function(e,t,n){var i=n(243);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcmdr = core margin decorations rendering (div)\r\n*/\r\n.monaco-editor .margin-view-overlays .cmdr {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}",""])},function(e,t,n){"use strict";function i(e){return 2===e?4:4===e?6:1===e?2:3}function o(e){return 2===e?2:4===e?2:1}n.d(t,"a",function(){return I});var r=n(245),s=(n.n(r),n(6)),a=n(12),u=n(65),l=n(7),c=n(3),d=n(88),h=n(16),f=n(2),p=n(93),g=n(248),m=n(46),v=n(30),_=n(10),y=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),b=140,C=function(){function e(e){var t=e.editor.pixelRatio,n=e.editor.layoutInfo,i=e.editor.viewInfo,o=e.editor.fontInfo;this.renderMinimap=0|n.renderMinimap,this.scrollBeyondLastLine=i.scrollBeyondLastLine,this.showSlider=i.minimap.showSlider,this.pixelRatio=t,this.typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this.lineHeight=e.editor.lineHeight,this.minimapLeft=n.minimapLeft,this.minimapWidth=n.minimapWidth,this.minimapHeight=n.height,this.canvasInnerWidth=Math.max(1,Math.floor(t*this.minimapWidth)),this.canvasInnerHeight=Math.max(1,Math.floor(t*this.minimapHeight)),this.canvasOuterWidth=this.canvasInnerWidth/t,this.canvasOuterHeight=this.canvasInnerHeight/t}return e.prototype.equals=function(e){return this.renderMinimap===e.renderMinimap&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&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},e}(),w=function(){function e(e,t,n,i,o,r,s){this.scrollTop=e,this.scrollHeight=t,this._computedSliderRatio=n,this.sliderTop=i,this.sliderHeight=o,this.startLineNumber=r,this.endLineNumber=s}return e.prototype.getDesiredScrollTopFromDelta=function(e){var t=this.sliderTop+e;return Math.round(t/this._computedSliderRatio)},e.create=function(t,n,o,r,s,a,u,l,c){var d,h=t.pixelRatio,f=i(t.renderMinimap),p=Math.floor(t.canvasInnerHeight/f),g=t.lineHeight;if(s&&o!==a){var m=o-n+1;d=Math.floor(m*f/h)}else{var v=r/g;d=Math.floor(v*f/h)}var _;_=t.scrollBeyondLastLine?(a-1)*f/h:Math.max(0,a*f/h-d),_=Math.min(t.minimapHeight-d,_);var y=_/(l-r),b=u*y;if(p>=a){var C=1,w=a;return new e(u,l,y,b,d,C,w)}var C=Math.max(1,Math.floor(n-b*h/f));c&&c.scrollHeight===l&&(c.scrollTop>u&&(C=Math.min(C,c.startLineNumber)),c.scrollTopb)return void n._context.viewLayout.setScrollPositionNow({scrollTop:o.scrollTop});var s=e.posy-t;n._context.viewLayout.setScrollPositionNow({scrollTop:o.getDesiredScrollTopFromDelta(s)})},function(){n._slider.toggleClassName("active",!1)})}}),n}return y(t,e),t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||(this._buffers=new x(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers.getBuffer()},t.prototype._onOptionsMaybeChanged=function(){var e=new C(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._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");var t=w.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*o(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,o=e.startLineNumber,r=e.endLineNumber,s=i(n);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var a=this._lastRenderData._get();return new L(e,a.imageData,a.lines)}for(var u=this._getBuffer(),l=t._renderUntouchedLines(u,o,r,s,this._lastRenderData),c=l[0],d=l[1],h=l[2],f=this._context.model.getMinimapLinesRenderingData(o,r,h),p=f.tabSize,m=this._tokensColorTracker.getColor(2),v=this._tokensColorTracker.backgroundIsLight(),_=0,y=[],b=0,C=r-o+1;b=0&&xp)return;var S=d.charCodeAt(m);if(9===S){var L=u-(m+v)%u;v+=L-1,g+=L*f}else if(32===S)g+=f;else for(var x=c.r(S)?2:1,I=0;Ip)return}},t}(h.b);Object(_.e)(function(e,t){var n=e.getColor(v._2);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}var o=e.getColor(v._3);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(v._1);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var u=e.getColor(v._0);u&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+u+" -6px 0 6px -6px inset; }")})},function(e,t,n){var i=n(246);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* START cover the case that slider is visible on mouseover */\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\r\n\topacity: 0;\r\n\ttransition: opacity 100ms linear;\r\n}\r\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\r\n\topacity: 1;\r\n}\r\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\r\n\topacity: 1;\r\n}\r\n/* END cover the case that slider is visible on mouseover */\r\n\r\n.monaco-editor .minimap-shadow-hidden {\r\n\tposition: absolute;\r\n\twidth: 0;\r\n}\r\n.monaco-editor .minimap-shadow-visible {\r\n\tposition: absolute;\r\n\tleft: -6px;\r\n\twidth: 6px;\r\n}\r\n",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(t,n,i,o){this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(i),this.a=e._clamp(o)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e.Empty=new e(0,0,0,0),e}()},function(e,t,n){"use strict";function i(e){for(var t=new Uint8ClampedArray(e.length),n=0,i=e.length;n=3){var o=Math.floor(i/3),r=Math.floor(i/3),s=i-o-r,a=e,u=a+o,l=a+o+s;return[[0,a,u,a,l,a,u,a],[0,o,s,o+s,r,o+s+r,s+r,o+s+r]]}if(2===n){var o=Math.floor(i/2),r=i-o,a=e,l=a+o;return[[0,a,a,a,l,a,a,a],[0,o,o,o,r,o+r,o+r,o+r]]}var c=e,d=i;return[[0,c,c,c,c,c,c,c],[0,d,d,d,d,d,d,d]]},e.prototype.equals=function(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.cursorColor===e.cursorColor&&this.themeType===e.themeType&&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},e}(),d=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=Object(i.b)(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setAttribute("aria-hidden","true"),n._updateSettings(!1),n._tokensColorTrackerListener=a.u.onDidChange(function(e){e.changedColorMap&&n._updateSettings(!0)}),n._cursorPositions=[],n}return l(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new c(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)},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(N=t-u),x=N-u,I=N+u}x>y+1||w!==v?(0!==b&&l.fillRect(c[v],_,d[v],y-_),v=w,_=x,y=I):I>y&&(y=I)}l.fillRect(c[v],_,d[v],y-_)}if(!this._settings.hideCursor&&this._settings.cursorColor){var D=2*this._settings.pixelRatio|0,O=D/2|0,E=this._settings.x[7],M=this._settings.w[7];l.fillStyle=this._settings.cursorColor;for(var _=-100,y=-100,b=0,C=this._cursorPositions.length;bt&&(N=t-O);var x=N-O,I=x+D;x>y+1?(0!==b&&l.fillRect(E,_,M,y-_),_=x,y=I):I>y&&(y=I)}l.fillRect(E,_,M,y-_)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())},t}(r.b)},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(12),o=n(130),r=n(52),s=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=function(e){function t(t,n){var r=e.call(this)||this;return r._context=t,r._domNode=Object(i.b)(document.createElement("canvas")),r._domNode.setClassName(n),r._domNode.setPosition("absolute"),r._domNode.setLayerHinting(!0),r._zoneManager=new o.b(function(e){return r._context.viewLayout.getVerticalOffsetForLineNumber(e)}),r._zoneManager.setDOMWidth(0),r._zoneManager.setDOMHeight(0),r._zoneManager.setOuterHeight(r._context.viewLayout.getScrollHeight()),r._zoneManager.setLineHeight(r._context.configuration.editor.lineHeight),r._zoneManager.setPixelRatio(r._context.configuration.editor.pixelRatio),r._context.addEventHandler(r),r}return s(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight),this._render()),e.pixelRatio&&(this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio),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},t.prototype.onFlushed=function(e){return this._render(),!0},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0},t.prototype.onZonesChanged=function(e){return this._render(),!0},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.setLayout=function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||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())},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render()},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,u=t.length;a=d?s=Math.max(s,h):(e.fillRect(0,r,i,s-r),r=d,s=h)}e.fillRect(0,r,i,s-r)},t}(r.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var i=n(255),o=(n.n(i),n(12)),r=n(16),s=n(25),a=n(10),u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),l=function(e){function t(t){var n=e.call(this,t)||this;return n.domNode=Object(o.b)(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.domNode.setClassName("view-rulers"),n._renderedRulers=[],n._rulers=n._context.configuration.editor.viewInfo.rulers,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n}return u(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0)},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;){var r=Object(o.b)(document.createElement("div"));r.setClassName("view-ruler"),r.setWidth(n),this.domNode.appendChild(r),this._renderedRulers.push(r),i--}else for(var s=e-t;s>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),s--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype._updateWidth=function(){var e=this._context.configuration.editor.layoutInfo,t=0;return t=0===e.renderMinimap||e.minimapWidth>0&&0===e.minimapLeft?e.width:e.width-e.minimapWidth-e.verticalScrollbarWidth,this._width!==t&&(this._width=t,!0)},t.prototype.onConfigurationChanged=function(e){var t=!1;return e.viewInfo&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),e.layoutInfo&&(t=this._updateWidth()),this._updateShouldShow()||t},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(r.b);Object(a.e)(function(e,t){var n=e.getColor(s._0);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")})},function(e,t,n){var i=n(259);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.monaco-editor .scroll-decoration {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 6px;\r\n}",""])},function(e,t,n){"use strict";function i(e){return new h(e)}function o(e){return new f(e.lineNumber,e.ranges.map(i))}function r(e){return e<0?-e:e}n.d(t,"a",function(){return g});var s=n(261),a=(n.n(s),n(20)),u=n(42),l=n(30),c=n(10),d=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),h=function(){function e(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}return e}(),f=function(){function e(e,t){this.lineNumber=e,this.ranges=t}return e}(),p=a.h,g=function(e){function t(t){var n=e.call(this)||this;return n._previousFrameVisibleRangesWithStyle=[],n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._roundedSelection=n._context.configuration.editor.viewInfo.roundedSelection,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return d(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,o=null,s=null;if(n&&n.length>0&&t.length>0){var a=t[0].lineNumber;if(a===e.startLineNumber)for(var u=0;!o&&u=0;u--)n[u].lineNumber===l&&(s=n[u].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(var u=0,c=t.length;u0){var m=t[u-1].ranges[0].left,v=t[u-1].ranges[0].left+t[u-1].ranges[0].width;r(h-m)m&&(p.top=1),r(f-v)'},t.prototype._actualRenderOneSelection=function(e,n,i,o){for(var r=o.length>0&&o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o.length>0?o[0].lineNumber:0,l=o.length>0?o[o.length-1].lineNumber:0,c=0,d=o.length;c1,l)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(u.a);Object(c.e)(function(e,t){var n=e.getColor(l.p);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var i=e.getColor(l.o);i&&t.addRule(".monaco-editor .selected-text { background-color: "+i+"; }");var o=e.getColor(l.q);o&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+o+"; }")})},function(e,t,n){var i=n(262);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/*\r\n\tKeeping name short for faster parsing.\r\n\tcslr = core selections layer rendering (div)\r\n*/\r\n.monaco-editor .lines-content .cslr {\r\n\tposition: absolute;\r\n}\r\n\r\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\r\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\r\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\r\n\r\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\r\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\r\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\r\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\r\n",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var i=n(264),o=(n.n(i),n(12)),r=n(14),s=n(16),a=n(266),u=n(26),l=n(25),c=n(10),d=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),h=function(e){function t(t){var n=e.call(this,t)||this;return n._readOnly=n._context.configuration.editor.readOnly,n._cursorBlinking=n._context.configuration.editor.viewInfo.cursorBlinking,n._cursorStyle=n._context.configuration.editor.viewInfo.cursorStyle,n._selectionIsEmpty=!0,n._primaryCursor=new a.a(n._context),n._secondaryCursors=[],n._renderData=[],n._domNode=Object(o.b)(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._updateDomClassName(),n._domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new r.d,n._cursorFlatBlinkInterval=new r.b,n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n}return d(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo&&(this._cursorBlinking=this._context.configuration.editor.viewInfo.cursorBlinking,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),this._primaryCursor.onConfigurationChanged(e),this._updateBlinking(),e.viewInfo&&this._updateDomClassName();for(var t=0,n=this._secondaryCursors.length;tt.length)for(var r=this._secondaryCursors.length-t.length,i=0;i .cursor {\r\n\tposition: absolute;\r\n\tcursor: text;\r\n\toverflow: hidden;\r\n}\r\n\r\n/* -- block-outline-style -- */\r\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\r\n\tbox-sizing: border-box;\r\n\tbackground: transparent !important;\r\n\tborder-style: solid;\r\n\tborder-width: 1px;\r\n}\r\n\r\n/* -- underline-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\r\n\tborder-bottom-width: 2px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n/* -- underline-thin-style -- */\r\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\r\n\tborder-bottom-width: 1px;\r\n\tborder-bottom-style: solid;\r\n\tbackground: transparent !important;\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n@keyframes monaco-cursor-smooth {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t60%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-phase {\r\n\t0%,\r\n\t20% {\r\n\t\topacity: 1;\r\n\t}\r\n\t90%,\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n@keyframes monaco-cursor-expand {\r\n\t0%,\r\n\t20% {\r\n\t\ttransform: scaleY(1);\r\n\t}\r\n\t80%,\r\n\t100% {\r\n\t\ttransform: scaleY(0);\r\n\t}\r\n}\r\n\r\n.cursor-smooth {\r\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-phase {\r\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\r\n}\r\n\r\n.cursor-expand > .cursor {\r\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\r\n}",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(6),o=n(12),r=n(3),s=n(41),a=n(26),u=n(4),l=n(2),c=function(){function e(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r}return e}(),d=function(){function e(e){this._context=e,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(o.b)(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),s.a.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new u.a(1,1)),this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(s.a.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),e.viewInfo&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth)),!0},e.prototype.onCursorPositionChanged=function(e){return this.updatePosition(e),!0},e.prototype._prepareRender=function(e){var t="",n="";if(this._cursorStyle===a.g.Line||this._cursorStyle===a.g.LineThin){var o=e.visibleRangeForPosition(this._position);if(!o)return null;var s;if(this._cursorStyle===a.g.Line){if((s=i.m(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){var u=this._context.model.getLineContent(this._position.lineNumber);t=u.charAt(this._position.column-1)}}else s=i.m(1);var d=o.left;s>=2&&d>=1&&(d-=1);var h=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new c(h,d,s,this._lineHeight,t,n)}var f=e.linesVisibleRangesForRange(new l.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!f||0===f.length||0===f[0].ranges.length)return null;var p=f[0].ranges[0],g=p.width<1?this._typicalHalfwidthCharacterWidth:p.width;if(this._cursorStyle===a.g.Block){var m=this._context.model.getViewLineData(this._position.lineNumber);t=m.content.charAt(this._position.column-1),r.s(m.content.charCodeAt(this._position.column-1))&&(t+=m.content.charAt(this._position.column));var v=m.tokens.findTokenIndexAtOffset(this._position.column-1);n=m.tokens.getClassName(v)}var _=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,y=this._lineHeight;return this._cursorStyle!==a.g.Underline&&this._cursorStyle!==a.g.UnderlineThin||(_+=this._lineHeight-2,y=2),new c(_,p.left,g,y,t,n)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(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._renderData.textContentClassName),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),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)},e.prototype.updatePosition=function(e){this._position=e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(12),o=n(13),r=n(16),s=n(4),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(e){function t(t){var n=e.call(this,t)||this;return n._lineHeight=n._context.configuration.editor.lineHeight,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode=Object(i.b)(document.createElement("div")),n.domNode.setClassName("view-zones"),n.domNode.setPosition("absolute"),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.marginDomNode=Object(i.b)(document.createElement("div")),n.marginDomNode.setClassName("margin-view-zones"),n.marginDomNode.setPosition("absolute"),n.marginDomNode.setAttribute("role","presentation"),n.marginDomNode.setAttribute("aria-hidden","true"),n._zones={},n}return a(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._zones={}},t.prototype._recomputeWhitespacesProps=function(){for(var e=!1,t=Object.keys(this._zones),n=0,i=t.length;nt.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var o=new _(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,n,o)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,n){this._revealRange(t,0,e,n)},t.prototype.revealRange=function(e,t,n,i){this.emitCursorRevealRange(t,n,e,i)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n1)return;var a=new h.a(r.lineNumber,r.column,r.lineNumber,r.column);this.emitCursorRevealRange(a,t,n,i)},t.prototype.emitCursorRevealRange=function(e,t,n,i){try{this._beginEmit().emit(new g.l(e,t,n,i))}finally{this._endEmit()}},t.prototype.trigger=function(e,t,n){var i=p.b;if(t===i.CompositionStart)return void(this._isDoingComposition=!0);if(t===i.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)return void this._onDidAttemptReadOnlyEdit.fire(void 0);var o=new _(this._model,this),s=0;t!==i.Undo&&t!==i.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case i.Type:this._type(e,n.text);break;case i.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case i.Paste:s=4,this._paste(n.text,n.pasteOnNewLine,n.multicursorText);break;case i.Cut:this._cut();break;case i.Undo:s=5,this._interpretCommandResult(this._model.undo());break;case i.Redo:s=6,this._interpretCommandResult(this._model.redo());break;case i.ExecuteCommand:this._externalExecuteCommand(n);break;case i.ExecuteCommands:this._externalExecuteCommands(n);break;case i.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){Object(r.d)(e)}this._isHandling=!1,t!==i.Undo&&t!==i.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,s,o)&&this._revealRange(0,0,!0,0)},t.prototype._interpretCompositionEnd=function(e){this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(d.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()))},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(d.a.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var n=0,i=t.length;n0&&(r[0]._isTracked=!0);var u=e.model.pushEditOperations(e.selectionsBefore,r,function(n){for(var i=[],o=0;o0?(i[n].sort(s),a[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new f.a(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new f.a(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):a[n]=e.selectionsBefore[n]}(o);return a});u||(u=e.selectionsBefore);var l=[];for(var c in o)o.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort(function(e,t){return t-e});for(var s=0;so.identifier.major?i.identifier.major:o.identifier.major,t[r.toString()]=!0;for(var s=0;s0&&n--}}return t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var i=n(22),o=n(274),r=n(19),s=function(){function e(e){this.context=e,this.primaryCursor=new o.a(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()},e.prototype.startTrackingSelections=function(){this.primaryCursor.startTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;en)for(var r=t-n,o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;tf&&t[S].index--;e.splice(f,1),t.splice(h,1),this._removeSecondaryCursor(f-1),s--}}}}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(22),o=n(4),r=n(2),s=n(19),a=function(){function e(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new i.f(new r.a(1,1,1,1),0,new o.a(1,1),0),new i.f(new r.a(1,1,1,1),0,new o.a(1,1),0))}return e.prototype.dispose=function(e){this._removeTrackedRange(e)},e.prototype.startTrackingSelection=function(e){this._trackSelection=!0,this._updateTrackedRange(e)},e.prototype.stopTrackingSelection=function(e){this._trackSelection=!1,this._removeTrackedRange(e)},e.prototype._updateTrackedRange=function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))},e.prototype._removeTrackedRange=function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)},e.prototype.asCursorState=function(){return new i.d(this.modelState,this.viewState)},e.prototype.readSelectionFromMarkers=function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new s.a(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new s.a(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)},e.prototype.ensureValidState=function(e){this._setState(e,this.modelState,this.viewState)},e.prototype.setState=function(e,t,n){this._setState(e,t,n)},e.prototype._setState=function(e,t,n){if(t){var s=e.model.validateRange(t.selectionStart),a=t.selectionStart.equalsRange(s)?t.selectionStartLeftoverVisibleColumns:0,u=e.model.validatePosition(t.position),l=t.position.equals(u)?t.leftoverVisibleColumns:0;t=new i.f(s,a,u,l)}else{if(!n)return;var s=e.model.validateRange(e.convertViewRangeToModelRange(n.selectionStart)),u=e.model.validatePosition(e.convertViewPositionToModelPosition(n.position.lineNumber,n.position.column));t=new i.f(s,n.selectionStartLeftoverVisibleColumns,u,n.leftoverVisibleColumns)}if(n){var c=e.validateViewRange(n.selectionStart,t.selectionStart),d=e.validateViewPosition(n.position,t.position);n=new i.f(c,t.selectionStartLeftoverVisibleColumns,d,t.leftoverVisibleColumns)}else{var h=e.convertModelPositionToViewPosition(new o.a(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),f=e.convertModelPositionToViewPosition(new o.a(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),c=new r.a(h.lineNumber,h.column,f.lineNumber,f.column),d=e.convertModelPositionToViewPosition(t.position);n=new i.f(c,t.selectionStartLeftoverVisibleColumns,d,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=n,this._updateTrackedRange(e)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return _});var i=n(43),o=n(3),r=n(4),s=n(2),a=n(15),u=n(276),l=n(93),c=n(46),d=n(277),h=n(280),f=n(132),p=n(39),g=n(281),m=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),v=!0,_=function(e){function t(t,n,i,o){var r=e.call(this)||this;if(r.editorId=t,r.configuration=n,r.model=i,r.hasFocus=!1,r.viewportStartLine=-1,r.viewportStartLineTrackedRange=null,r.viewportStartLineDelta=0,v&&r.model.isTooLargeForTokenization())r.lines=new f.a(r.model);else{var s=r.configuration.editor,a=new h.a(s.wrappingInfo.wordWrapBreakBeforeCharacters,s.wrappingInfo.wordWrapBreakAfterCharacters,s.wrappingInfo.wordWrapBreakObtrusiveCharacters);r.lines=new f.c(r.model,a,r.model.getOptions().tabSize,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth,s.wrappingInfo.wrappingIndent)}return r.coordinatesConverter=r.lines.createCoordinatesConverter(),r.viewLayout=r._register(new d.a(r.configuration,r.getLineCount(),o)),r._register(r.viewLayout.onDidScroll(function(e){try{r._beginEmit().emit(new c.m(e))}finally{r._endEmit()}})),r.decorations=new g.a(r.editorId,r.model,r.configuration,r.lines,r.coordinatesConverter),r._registerModelEvents(),r._register(r.configuration.onDidChange(function(e){try{var t=r._beginEmit();r._onConfigurationChanged(t,e)}finally{r._endEmit()}})),r._register(l.b.getInstance().onDidChange(function(){try{r._beginEmit().emit(new c.p)}finally{r._endEmit()}})),r}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.decorations.dispose(),this.lines.dispose(),this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,null,1)},t.prototype.setHasFocus=function(e){this.hasFocus=e},t.prototype._onConfigurationChanged=function(e,t){var n=null;if(-1!==this.viewportStartLine){var i=new r.a(this.viewportStartLine,this.getLineMinColumn(this.viewportStartLine));n=this.coordinatesConverter.convertViewPositionToModelPosition(i)}var o=!1,s=this.configuration.editor;if(this.lines.setWrappingSettings(s.wrappingInfo.wrappingIndent,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth)&&(e.emit(new c.e),e.emit(new c.h),e.emit(new c.c),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(o=!0)),t.readOnly&&(this.decorations.reset(),e.emit(new c.c)),e.emit(new c.a(t)),this.viewLayout.onConfigurationChanged(t),o&&n){var a=this.coordinatesConverter.convertModelPositionToViewPosition(n),u=this.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber);this.viewLayout.setScrollPositionNow({scrollTop:u+this.viewportStartLineDelta})}},t.prototype._registerModelEvents=function(){var e=this;this._register(this.model.onDidChangeRawContentFast(function(t){try{for(var n=e._beginEmit(),i=!1,o=!1,r=t.changes,s=t.versionId,a=0,u=r.length;a=2&&e.viewportStartLineTrackedRange){var m=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(m){var v=e.coordinatesConverter.convertModelPositionToViewPosition(m.getStartPosition()),_=e.viewLayout.getVerticalOffsetForLineNumber(v.lineNumber);e.viewLayout.setScrollPositionNow({scrollTop:_+e.viewportStartLineDelta})}}})),this._register(this.model.onDidChangeTokens(function(t){for(var n=[],i=0,o=t.ranges.length;iu||(r0&&u[c-1]===u[c]||(l+=this.model.getLineContent(u[c])+o);return l}for(var d=[],c=0;c'+this._getHTMLToCopy(n,r)+""},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",l=n;l<=o;l++){var c=this.model.getLineTokens(l),d=c.getLineContent(),h=l===n?i-1:0,f=l===o?r-1:d.length;a+=""===d?"
":Object(u.a)(d,c.inflate(),t,h,f,s)}return a},t.prototype._getColorMap=function(){var e=a.u.getColorMap(),t=["#000000"];if(e)for(var n=1,o=e.length;n0;)h+=" ",p--;break;case 60:h+="<";break;case 62:h+=">";break;case 38:h+="&";break;case 0:h+="�";break;case 65279:case 8232:h+="�";break;case 13:h+="​";break;default:h+=String.fromCharCode(f)}}if(s+=''+h+"",d>o||a>=o)break}}return s+=""}t.a=i;n(3),n(62),n(37)},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var i=n(0),o=n(129),r=n(278),s=n(39),a=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=function(e){function t(t,n,i){var s=e.call(this)||this;return s._configuration=t,s._linesLayout=new r.a(n,s._configuration.editor.lineHeight),s.scrollable=s._register(new o.a(0,i)),s._configureSmoothScrollDuration(),s.scrollable.setScrollDimensions({width:t.editor.layoutInfo.contentWidth,height:t.editor.layoutInfo.contentHeight}),s.onDidScroll=s.scrollable.onScroll,s._updateHeight(),s}return a(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onHeightMaybeChanged=function(){this._updateHeight()},t.prototype._configureSmoothScrollDuration=function(){this.scrollable.setSmoothScrollDuration(this._configuration.editor.viewInfo.smoothScrolling?125:0)},t.prototype.onConfigurationChanged=function(e){e.lineHeight&&this._linesLayout.setLineHeight(this._configuration.editor.lineHeight),e.layoutInfo&&this.scrollable.setScrollDimensions({width:this._configuration.editor.layoutInfo.contentWidth,height:this._configuration.editor.layoutInfo.contentHeight}),e.viewInfo&&this._configureSmoothScrollDuration(),this._updateHeight()},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e)},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t)},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t)},t.prototype._getHorizontalScrollbarHeight=function(e){return 2===this._configuration.editor.viewInfo.scrollbar.horizontal?0:e.width>=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize},t.prototype._getTotalHeight=function(){var e=this.scrollable.getScrollDimensions(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t)},t.prototype._updateHeight=function(){this.scrollable.setScrollDimensions({scrollHeight:this._getTotalHeight()})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition();return new s.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new s.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){var n=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,t,i)}return Math.max(e,t)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,n,i){return this._linesLayout.insertWhitespace(e,t,n,i)},t.prototype.changeWhitespace=function(e,t,n){return this._linesLayout.changeWhitespace(e,t,n)},t.prototype.removeWhitespace=function(e){return this._linesLayout.removeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var 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)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop},t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t}(i.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var i=n(279),o=function(){function e(e,t){this._lineCount=e,this._lineHeight=t,this._whitespaces=new i.a}return e.prototype.setLineHeight=function(e){this._lineHeight=e},e.prototype.onFlushed=function(e){this._lineCount=e},e.prototype.insertWhitespace=function(e,t,n,i){return this._whitespaces.insertWhitespace(e,t,n,i)},e.prototype.changeWhitespace=function(e,t,n){return this._whitespaces.changeWhitespace(e,t,n)},e.prototype.removeWhitespace=function(e){return this._whitespaces.removeWhitespace(e)},e.prototype.onLinesDeleted=function(e,t){this._lineCount-=t-e+1,this._whitespaces.onLinesDeleted(e,t)},e.prototype.onLinesInserted=function(e,t){this._lineCount+=t-e+1,this._whitespaces.onLinesInserted(e,t)},e.prototype.getLinesTotalHeight=function(){return this._lineHeight*this._lineCount+this._whitespaces.getTotalHeight()},e.prototype.getVerticalOffsetForLineNumber=function(e){e|=0;return(e>1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){return this._whitespaces.getMinWidth()},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,u=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this._whitespaces.getCount();-1===u?(u=l,i=a+1,n=0):(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));var c=s,d=c,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),h=Math.floor(h/o)*o,d-=h);for(var f=[],p=e+(t-e)/2,g=-1,m=r;m<=a;m++){if(-1===g){var v=c,_=c+o;(v<=p&&p<_||v>p)&&(g=m)}for(c+=o,f[m-r]=d,d+=o;i===m;)d+=n,c+=n,u++,u>=l?i=a+1:(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));if(c>=t){a=m;break}}-1===g&&(g=a);var y=0|this.getVerticalOffsetForLineNumber(a),b=r,C=a;return bt&&C--,{bigNumbersDelta:h,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:f,centeredLineNumber:g,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:C}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t,n=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);t=n>=1?this._lineHeight*n:0;var i;return i=e>0?this._whitespaces.getAccumulatedHeight(e-1):0,t+i},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,n,i,o=0,r=this._whitespaces.getCount()-1;if(r<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(r)+this._whitespaces.getHeightForWhitespaceIndex(r))return-1;for(;o=n+i)o=t+1;else{if(e>=n)return t;r=t}return o},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this._whitespaces.getCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(){this._heights=[],this._minWidths=[],this._ids=[],this._afterLineNumbers=[],this._ordinals=[],this._prefixSum=[],this._prefixSumValidIndex=-1,this._whitespaceId2Index={},this._lastWhitespaceId=0,this._minWidth=-1}return e.findInsertionIndex=function(e,t,n,i){for(var o=0,r=e.length;o>>1;t===e[s]?i=t&&(this._whitespaceId2Index[l]=c+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,n){e|=0,t|=0,n|=0;var i=!1;return i=this.changeWhitespaceHeight(e,n)||i,i=this.changeWhitespaceAfterLineNumber(e,t)||i},e.prototype.changeWhitespaceHeight=function(e,t){e|=0,t|=0;var n=e.toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._heights[i]!==t)return this._heights[i]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,n){t|=0,n|=0;var i=t.toString();if(this._whitespaceId2Index.hasOwnProperty(i)){var o=this._whitespaceId2Index[i];if(this._afterLineNumbers[o]!==n){var r=this._ordinals[o],s=this._heights[o],a=this._minWidths[o];this.removeWhitespace(t);var u=e.findInsertionIndex(this._afterLineNumbers,n,this._ordinals,r);return this._insertWhitespaceAtIndex(t,u,n,r,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){e|=0;var t=e.toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var n=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(n),this._minWidth=-1,!0}return!1},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._minWidths.splice(e,1),this._ids.splice(e,1),this._afterLineNumbers.splice(e,1),this._ordinals.splice(e,1),this._prefixSum.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1);for(var t=Object.keys(this._whitespaceId2Index),n=0,i=t.length;n=e&&(this._whitespaceId2Index[o]=r-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;nt&&(this._afterLineNumbers[n]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;n=t.length||t[s+1]>=e)return s;n=s+1|0}else i=s-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e),n=t+1;return n=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t)},t}(o.a),c=function(){function e(e,t,n){this.classifier=new l(e,t,n)}return e.nextVisibleColumn=function(e,t,n,i){return e=+e,t=+t,i=+i,n?e+(t-e%t):e+i},e.prototype.createLineMapping=function(t,n,o,a,u){if(-1===o)return null;n=+n,o=+o,a=+a,u=+u;var l=0,c="",h=-1;if(0!==u&&-1!==(h=i.m(t))){c=t.substring(0,h);for(var f=0;fo&&(c="",l=0)}for(var g=this.classifier,m=0,v=[],_=0,y=0,b=-1,C=0,w=-1,S=0,L=t.length,f=0;f0){var D=t.charCodeAt(f-1);1!==g.get(D)&&(b=f,C=l)}var O=1;if(i.r(x)&&(O=a),(y=e.nextVisibleColumn(y,n,I,O))>o&&0!==f){var E=void 0,M=void 0;-1!==b&&C<=o?(E=b,M=C):-1!==w&&S<=o?(E=w,M=S):(E=f,M=l),v[_++]=E-m,m=E,y=e.nextVisibleColumn(M,n,I,O),b=-1,C=0,w=-1,S=0}if(-1!==b&&(C=e.nextVisibleColumn(C,n,I,O)),-1!==w&&(S=e.nextVisibleColumn(S,n,I,O)),2===N&&(0===u||f>=h)&&(b=f+1,C=l),4===N&&f0}function r(e){return e.originalEndLineNumber>0}function s(){var e=document.createElement("div");return e.className="diagonal-fill",e}n.d(t,"a",function(){return z});var a=n(283),u=(n.n(a),n(11)),l=n(6),c=n(12),d=n(285),h=n(14),f=n(1),p=n(0),g=n(31),m=n(41),v=n(288),_=n(29),y=n(114),b=n(289),C=n(26),w=n(2),S=n(82),L=n(35),x=n(67),I=n(60),N=n(130),D=n(83),O=n(63),E=n(39),M=n(18),k=n(5),T=n(68),A=n(40),R=n(30),P=n(10),W=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),F=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},H=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},j=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter(function(e){return!t._zonesMap[String(e.id)]})},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones(function(e){for(var n=0,i=t._zones.length;n0?o/n:0;return{height:Math.max(0,Math.floor(e.contentHeight*r)),top:Math.floor(t*r)}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height-e._reviewHeight},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getTheme()),this._diffComputationResult&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){var n=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===n.length||e=a?i=r+1:(i=r,o=r)}return n[i]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.originalStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.modifiedStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=F([H(2,I.a),H(3,M.c),H(4,k.a),H(5,_.a),H(6,P.c),H(7,A.a)],t)}(p.a),B=function(e){function t(t){var n=e.call(this)||this;return n._dataSource=t,n}return W(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(R.i)||R.f).transparent(2),n=(e.getColor(R.k)||R.g).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i},t.prototype.getEditorsDiffDecorations=function(e,t,n,i,o,r,s){o=o.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber}),i=i.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber});var a=this._getViewZones(e,i,o,r,s,n),u=this._getOriginalEditorDecorations(e,t,n,r,s),l=this._getModifiedEditorDecorations(e,t,n,r,s);return{original:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.modified}}},t}(p.a),U=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this._index0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},h=new U(this.modifiedForeignVZ),f=new U(this.originalForeignVZ),p=0,g=this.lineChanges.length;p<=g;p++){var m=p0?-1:0),a=m.modifiedStartLineNumber+(m.modifiedEndLineNumber>0?-1:0),n=m.originalEndLineNumber>0?m.originalEndLineNumber-m.originalStartLineNumber+1:0,t=m.modifiedEndLineNumber>0?m.modifiedEndLineNumber-m.modifiedStartLineNumber+1:0,u=Math.max(m.originalStartLineNumber,m.originalEndLineNumber),l=Math.max(m.modifiedStartLineNumber,m.modifiedEndLineNumber)):(i+=1e7+n,a+=1e7+t,u=i,l=a);for(var v=[],_=[];h.current&&h.current.afterLineNumber<=l;){var y=void 0;y=h.current.afterLineNumber<=a?i-a+h.current.afterLineNumber:u;var b=null;m&&m.modifiedStartLineNumber<=h.current.afterLineNumber&&h.current.afterLineNumber<=m.modifiedEndLineNumber&&(b=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),v.push({afterLineNumber:y,heightInLines:h.current.heightInLines,domNode:null,marginDomNode:b}),h.advance()}for(;f.current&&f.current.afterLineNumber<=u;){var y=void 0;y=f.current.afterLineNumber<=i?a-i+f.current.afterLineNumber:l,_.push({afterLineNumber:y,heightInLines:f.current.heightInLines,domNode:null}),f.advance()}if(null!==m&&o(m)){var C=this._produceOriginalFromDiff(m,n,t);C&&v.push(C)}if(null!==m&&r(m)){var C=this._produceModifiedFromDiff(m,n,t);C&&_.push(C)}var w=0,S=0;for(v=v.sort(c),_=_.sort(c);w=x.heightInLines?(L.heightInLines-=x.heightInLines,S++):(x.heightInLines-=L.heightInLines,w++)}for(;w2*t.MINIMUM_EDITOR_WIDTH?(oi-t.MINIMUM_EDITOR_WIDTH&&(o=i-t.MINIMUM_EDITOR_WIDTH)):o=r,this._sashPosition!==o&&(this._sashPosition=o,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth(),n=t-z.ENTIRE_DIFF_OVERVIEW_WIDTH,i=this.layout((this._startSashPosition+(e.currentX-e.startX))/n);this._sashRatio=i/n,this._dataSource.relayoutEditors()},t.prototype.onSashDragEnd=function(){this._sash.layout()},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()},t.prototype.getVerticalSashTop=function(e){return 0},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,n,i,o){return new q(e,t,n).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,s,a){for(var u=this._removeColor.toString(),l={decorations:[],overviewZones:[]},c=s.getModel(),d=0,h=e.length;dt?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null},t}(K),Y=function(e){function t(t,n){var i=e.call(this,t)||this;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(t.getOriginalEditor().onDidLayoutChange(function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors())})),i}return W(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,o,r){return new J(e,t,n,i,o,r).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var s=this._removeColor.toString(),a={decorations:[],overviewZones:[]},u=0,l=e.length;u'])}f+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var v=document.createElement("div");v.className="view-lines line-delete",v.innerHTML=u.build(),m.a.applyFontInfoSlow(v,this.modifiedEditorConfiguration.fontInfo);var _=document.createElement("div");return _.className="inline-deleted-margin-view-zone",_.innerHTML=l.join(""),m.a.applyFontInfoSlow(_,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:f*h,domNode:v,marginDomNode:_}},t.prototype._renderOriginalLine=function(e,t,n,i,o,r,s){var a=t.getLineTokens(o),u=a.getLineContent(),l=D.a.filter(r,o,1,u.length+1);s.appendASCIIString('
');var c=E.d.isBasicASCII(u,t.mightContainNonBasicASCII()),d=E.d.containsRTL(u,c,t.mightContainRTL()),h=Object(O.c)(new O.b(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,n.fontInfo.canUseHalfwidthRightwardsArrow,u,!1,c,d,0,a,l,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters,n.viewInfo.fontLigatures),s);s.appendASCIIString("
");var f=h.characterMapping.getAbsoluteOffsets();return f.length>0?f[f.length-1]:0},t}(K);Object(P.e)(function(e,t){var n=e.getColor(R.i);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(R.k);i&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+i+"; }"));var o=e.getColor(R.j);o&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+o+"; }");var r=e.getColor(R.l);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(R._0);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(R.h);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }")})},function(e,t,n){var i=n(284);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,'/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* ---------- DiffEditor ---------- */\r\n\r\n.monaco-diff-editor .diffOverview {\r\n\tz-index: 9;\r\n}\r\n\r\n/* colors not externalized: using transparancy on background */\r\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\r\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\r\n\r\n.monaco-diff-editor .diffViewport {\r\n\tbox-shadow: inset 0px 0px 1px 0px #B9B9B9;\r\n\tbackground: rgba(0, 0, 0, 0.10);\r\n}\r\n\r\n.monaco-diff-editor.vs-dark .diffViewport,\r\n.monaco-diff-editor.hc-black .diffViewport {\r\n\tbackground: rgba(255, 255, 255, 0.10);\r\n}\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\r\n\r\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\r\n\tz-index: 10;\r\n}\r\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\r\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\r\n\r\n/* ---------- Diff ---------- */\r\n\r\n.monaco-editor .insert-sign,\r\n.monaco-diff-editor .insert-sign,\r\n.monaco-editor .delete-sign,\r\n.monaco-diff-editor .delete-sign {\r\n\tbackground-size: 60%;\r\n\topacity: 0.7;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: 50% 50%;\r\n\tbackground-position: center;\r\n\tbackground-size: 11px 11px;\r\n}\r\n.monaco-editor.hc-black .insert-sign,\r\n.monaco-diff-editor.hc-black .insert-sign,\r\n.monaco-editor.hc-black .delete-sign,\r\n.monaco-diff-editor.hc-black .delete-sign {\r\n\topacity: 1;\r\n}\r\n.monaco-editor .insert-sign,\r\n.monaco-diff-editor .insert-sign {\r\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMTEiIHdpZHRoPSIzIiB5PSIzIiB4PSI3IiBmaWxsPSIjNDI0MjQyIi8+PHJlY3QgaGVpZ2h0PSIzIiB3aWR0aD0iMTEiIHk9IjciIHg9IjMiIGZpbGw9IiM0MjQyNDIiLz48L3N2Zz4=");\r\n}\r\n.monaco-editor .delete-sign,\r\n.monaco-diff-editor .delete-sign {\r\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMyIgd2lkdGg9IjExIiB5PSI3IiB4PSIzIiBmaWxsPSIjNDI0MjQyIi8+PC9zdmc+");\r\n}\r\n\r\n.monaco-editor.vs-dark .insert-sign,\r\n.monaco-diff-editor.vs-dark .insert-sign,\r\n.monaco-editor.hc-black .insert-sign,\r\n.monaco-diff-editor.hc-black .insert-sign {\r\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMTEiIHdpZHRoPSIzIiB5PSIzIiB4PSI3IiBmaWxsPSIjQzVDNUM1Ii8+PHJlY3QgaGVpZ2h0PSIzIiB3aWR0aD0iMTEiIHk9IjciIHg9IjMiIGZpbGw9IiNDNUM1QzUiLz48L3N2Zz4=");\r\n}\r\n.monaco-editor.vs-dark .delete-sign,\r\n.monaco-diff-editor.vs-dark .delete-sign,\r\n.monaco-editor.hc-black .delete-sign,\r\n.monaco-diff-editor.hc-black .delete-sign {\r\n\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPkxheWVyIDE8L3RpdGxlPjxyZWN0IGhlaWdodD0iMyIgd2lkdGg9IjExIiB5PSI3IiB4PSIzIiBmaWxsPSIjQzVDNUM1Ii8+PC9zdmc+");\r\n}\r\n\r\n.monaco-editor .inline-deleted-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n.monaco-editor .inline-added-margin-view-zone {\r\n\ttext-align: right;\r\n}\r\n\r\n.monaco-editor .diagonal-fill {\r\n\tbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAChJREFUKFNjOH/+fAMDDgCSu3Dhwn9c8gwwBTgNGR4KQP4HhQOhsAIAZCBTkhtqePcAAAAASUVORK5CYII=");\r\n}\r\n.monaco-editor.vs-dark .diagonal-fill {\r\n\topacity: 0.2;\r\n}\r\n.monaco-editor.hc-black .diagonal-fill {\r\n\tbackground: none;\r\n}\r\n\r\n/* ---------- Inline Diff ---------- */\r\n\r\n.monaco-editor .view-zones .view-lines .view-line span {\r\n\tdisplay: inline-block;\r\n}\r\n',""])},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var i=n(286),o=(n.n(i),n(0)),r=n(20),s=n(7),a=n(17),u=n(64),l=n(23),c=n(1),d=n(6),h=n(72),f=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),p=!1,g=function(e){function t(t,n,i){void 0===i&&(i={});var o=e.call(this)||this;return o._state=3,o._onDidEnablementChange=o._register(new c.a),o.onDidEnablementChange=o._onDidEnablementChange.event,o._onDidStart=o._register(new c.a),o.onDidStart=o._onDidStart.event,o._onDidChange=o._register(new c.a),o.onDidChange=o._onDidChange.event,o._onDidReset=o._register(new c.a),o.onDidReset=o._onDidReset.event,o._onDidEnd=o._register(new c.a),o.onDidEnd=o._onDidEnd.event,o.linkedSash=void 0,o.orthogonalStartSashDisposables=[],o.orthogonalEndSashDisposables=[],o.el=Object(d.k)(t,Object(d.a)(".monaco-sash")),s.d&&Object(d.e)(o.el,"mac"),o._register(Object(h.a)(o.el,"mousedown")(o.onMouseDown,o)),o._register(Object(h.a)(o.el,"dblclick")(o.onMouseDoubleClick,o)),u.b.addTarget(o.el),o._register(Object(h.a)(o.el,u.a.Start)(o.onTouchStart,o)),r.l&&Object(d.e)(o.el,"touch"),o.setOrientation(i.orientation||0),o.hidden=!1,o.layoutProvider=n,o.orthogonalStartSash=i.orthogonalStartSash,o.orthogonalEndSash=i.orthogonalEndSash,Object(d.M)(o.el,"debug",p),o}return f(t,e),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){this._state!==e&&(Object(d.M)(this.el,"disabled",0===e),Object(d.M)(this.el,"minimum",1===e),Object(d.M)(this.el,"maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash},set:function(e){this.orthogonalStartSashDisposables=Object(o.d)(this.orthogonalStartSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this,this.orthogonalStartSashDisposables),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(0),this._orthogonalStartSash=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orthogonalEndSash",{get:function(){return this._orthogonalEndSash},set:function(e){this.orthogonalEndSashDisposables=Object(o.d)(this.orthogonalEndSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this,this.orthogonalEndSashDisposables),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(0),this._orthogonalEndSash=e},enumerable:!0,configurable:!0}),t.prototype.setOrientation=function(e){this.orientation=e,1===this.orientation?(Object(d.e)(this.el,"horizontal"),Object(d.D)(this.el,"vertical")):(Object(d.D)(this.el,"horizontal"),Object(d.e)(this.el,"vertical")),this.layoutProvider&&this.layout()},t.prototype.onMouseDown=function(e){var t=this;d.b.stop(e,!1);var n=!1;if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!e.__orthogonalSashEvent){var i=void 0;0===this.orientation?e.offsetY<=4?i=this.orthogonalStartSash:e.offsetY>=this.el.clientHeight-4&&(i=this.orthogonalEndSash):e.offsetX<=4?i=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(i=this.orthogonalEndSash),i&&(n=!0,e.__orthogonalSashEvent=!0,i.onMouseDown(e))}if(this.state){for(var r=Object(d.t)("iframe"),a=0,u=r;a0){n=o[0].getStartPosition();var r=t.getTopForPosition(n.lineNumber,n.column);i=t.getScrollTop()-r}}return new e(n,i)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}())},function(e,t,n){"use strict";function i(e){for(var t=e.get(p.a),n=t.listDiffEditors(),i=0,o=n.length;i0){var _=e[r-1];m=0===_.originalEndLineNumber?_.originalStartLineNumber+1:_.originalEndLineNumber+1,v=0===_.modifiedEndLineNumber?_.modifiedStartLineNumber+1:_.modifiedEndLineNumber+1}var y=p-3+1,b=g-3+1;if(yI){var C=I-O;O+=C,E+=C}if(E>N){var C=N-E;O+=C,E+=C}h[f++]=new L(w,O,S,E),i[o++]=new x(h)}for(var M=i[0].entries,k=[],T=0,r=1,s=i.length;rg)&&(g=w),0!==S&&(0===m||Sv)&&(v=L)}var x=document.createElement("div");x.className="diff-review-row";var I=document.createElement("div");I.className="diff-review-cell diff-review-summary";var N=g-p+1,D=v-m+1;I.appendChild(document.createTextNode(c+1+"/"+this._diffs.length+": @@ -"+p+","+N+" +"+m+","+D+" @@")),x.setAttribute("data-line",String(m));var O=function(e){return 0===e?r.a("no_lines","no lines"):1===e?r.a("one_line","1 line"):r.a("more_lines","{0} lines",e)},E=O(N),M=O(D);x.setAttribute("aria-label",r.a({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines", "1 line" or "X lines", localized separately.']},"Difference {0} of {1}: original {2}, {3}, modified {4}, {5}",c+1,this._diffs.length,p,E,m,M)),x.appendChild(I),x.setAttribute("role","listitem"),f.appendChild(x);for(var k=m,_=0,y=d.length;_0?n[0]:null},e.prototype.getModeId=function(e){var t=this._registry.extractModeIds(e);return t.length>0?t[0]:null},e.prototype.getLanguageIdentifier=function(e){return this._registry.getLanguageIdentifier(e)},e.prototype.create=function(e){var t=this;return new l(this.onLanguagesMaybeChanged,function(){var n=t.getModeId(e);return t._createModeAndGetLanguageIdentifier(n)})},e.prototype.createByFilepathOrFirstLine=function(e,t){var n=this;return new l(this.onLanguagesMaybeChanged,function(){var i=n.getModeIdByFilepathOrFirstLine(e,t);return n._createModeAndGetLanguageIdentifier(i)})},e.prototype._createModeAndGetLanguageIdentifier=function(e){var t=this.getLanguageIdentifier(e||"plaintext")||s.a;return this._getOrCreateMode(t.language),t},e.prototype.triggerMode=function(e){var t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")},e.prototype._getOrCreateMode=function(e){if(!this._instantiatedModes.hasOwnProperty(e)){var t=this.getLanguageIdentifier(e)||s.a;this._instantiatedModes[e]=new r.a(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var i=function(){function e(e){this._languageIdentifier=e}return e.prototype.getId=function(){return this._languageIdentifier.language},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var i=n(13),o=n(1),r=n(0),s=n(299),a=n(3),u=n(15),l=n(95),c=n(37),d=n(49),h=n(21),f=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),p=Object.prototype.hasOwnProperty,g=function(e){function t(t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);var i=e.call(this)||this;return i._onDidChange=i._register(new o.a),i.onDidChange=i._onDidChange.event,i._nextLanguageId=1,i._languages={},i._mimeTypesMap={},i._nameMap={},i._lowercaseNameMap={},i._languageIds=[],i._warnOnOverwrite=n,t&&(i._registerLanguages(l.a.getLanguages()),i._register(l.a.onDidAddLanguages(function(e){return i._registerLanguages(e)}))),i}return f(t,e),t.prototype._registerLanguages=function(e){var t=this;if(0!==e.length){for(var n=0;n0&&((n=e.mimetypes).push.apply(n,t.mimetypes),r=t.mimetypes[0]),r||(r="text/x-"+o,e.mimetypes.push(r)),Array.isArray(t.extensions))for(var u=0,l=t.extensions;u0){var v=t.firstLine;"^"!==v.charAt(0)&&(v="^"+v);try{var _=new RegExp(v);a.y(_)||s.b({id:o,mime:r,firstline:_},this._warnOnOverwrite)}catch(e){Object(i.d)(e)}}e.aliases.push(o);var y=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(y=0===t.aliases.length?[null]:t.aliases),null!==y)for(var b=0;b0;if(w&&null===y[0]);else{var S=(w?y[0]:null)||o;!w&&e.name||(e.name=S)}t.configuration&&e.configurationFiles.push(t.configuration)},t.prototype.isRegisteredMode=function(e){return!!p.call(this._mimeTypesMap,e)||p.call(this._languages,e)},t.prototype.getModeIdForLanguageNameLowercase=function(e){return p.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null},t.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map(function(e){return e.trim()}).map(function(e){return p.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language:e}).filter(function(e){return p.call(t._languages,e)}):[]},t.prototype.getLanguageIdentifier=function(e){if(e===c.b||0===e)return c.a;var t;if("string"==typeof e)t=e;else if(!(t=this._languageIds[e]))return null;return p.call(this._languages,t)?this._languages[t].identifier:null},t.prototype.getModeIdsFromFilepathOrFirstLine=function(e,t){if(!e&&!t)return[];var n=s.a(e,t);return this.extractModeIds(n.join(","))},t}(r.a)},function(e,t,n){"use strict";function i(e,t){void 0===t&&(t=!1);var n=o(e);f.push(n),n.userConfigured?g.push(n):p.push(n),t&&!n.userConfigured&&f.forEach(function(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+">>"))})}function o(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(u.h)>=0}}function r(e,t){if(!e)return[h];e=e.toLowerCase();var n=u.a(e),i=s(e,n,g);if(i)return[i,d];var o=s(e,n,p);if(o)return[o,d];if(t){var r=a(t);if(r)return[r,d]}return[h]}function s(e,t,n){for(var i=null,o=null,r=null,s=n.length-1;s>=0;s--){var a=n[s];if(t===a.filenameLowercase){i=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){var u=a.filepatternOnPath?e:t;Object(c.a)(a.filepatternLowercase,u)&&(o=a)}a.extension&&(!r||a.extension.length>r.extension.length)&&l.i(t,a.extensionLowercase)&&(r=a)}return i?i.mime:o?o.mime:r?r.mime:null}function a(e){if(l.C(e)&&(e=e.substr(1)),e.length>0)for(var t=0;t0)return n.mime}}return null}t.b=i,t.a=r;var u=n(57),l=n(3),c=n(106),d="text/plain",h="application/unknown",f=[],p=[],g=[]},function(e,t,n){"use strict";function i(e){return e.toString()}n.d(t,"a",function(){return D});var o=n(11),r=n(27),s=n(1),a=n(301),u=n(0),l=n(45),c=n(57),d=n(7),h=n(26),f=n(2),p=n(36),g=n(67),m=n(95),v=n(81),_=n(25),y=n(32),b=n(96),C=n(10),w=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),S=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},L=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},x=function(){function e(e,t,n){this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._markerDecorations=[],this._modelEventListeners=[],this._modelEventListeners.push(e.onWillDispose(function(){return t(e)})),this._modelEventListeners.push(e.onDidChangeLanguage(function(t){return n(e,t)}))}return e.prototype._disposeLanguageSelection=function(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)},e.prototype.dispose=function(){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,[]),this._modelEventListeners=Object(u.d)(this._modelEventListeners),this._disposeLanguageSelection()},e.prototype.acceptMarkerDecorations=function(e){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,e)},e.prototype.setLanguage=function(e){var t=this;this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(function(){return t.model.setMode(e.languageIdentifier)}),this.model.setMode(e.languageIdentifier)},e}(),I=function(){function e(){}return e.setMarkers=function(t,n){var i=n.read({resource:t.model.uri,take:500}),o=i.map(function(n){return{range:e._createDecorationRange(t.model,n),options:e._createDecorationOption(n)}});t.acceptMarkerDecorations(o)},e._createDecorationRange=function(e,t){var n=f.a.lift(t);if(t.severity===b.b.Hint&&(t.tags&&-1!==t.tags.indexOf(1)||(n=n.setEndPosition(n.startLineNumber,n.startColumn+2))),n=e.validateRange(n),n.isEmpty()){var i=e.getWordAtPosition(n.getStartPosition());if(i)n=new f.a(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn);else{var o=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===o||(n=n.endColumn>=o?new f.a(n.startLineNumber,o-1,n.endLineNumber,o):new f.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){var r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r=0?"squiggly-unnecessary":"squiggly-hint",n=0;break;case b.b.Warning:t="squiggly-warning",i=Object(C.f)(_.w),n=20;break;case b.b.Info:t="squiggly-info",i=Object(C.f)(_.v),n=10;break;case b.b.Error:default:t="squiggly-error",i=Object(C.f)(_.u),n=30}e.tags&&-1!==e.tags.indexOf(1)&&(s="squiggly-inline-unnecessary");var u=null,l=e.message,d=e.source,h=e.relatedInformation,f=e.code;if("string"==typeof l&&(l=l.trim(),d&&(l=/\n/g.test(l)?f?o.a("diagAndSourceAndCodeMultiline","[{0}]\n{1} [{2}]",d,l,f):o.a("diagAndSourceMultiline","[{0}]\n{1}",d,l):f?o.a("diagAndSourceAndCode","[{0}] {1} [{2}]",d,l,f):o.a("diagAndSource","[{0}] {1}",d,l)),u=(new a.a).appendCodeblock("_",l),!Object(r.e)(h))){u.appendMarkdown("\n");for(var g=0,m=h;g=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},f=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},p=function(e){function t(t,n){void 0===n&&(n=i.n());var o=e.call(this)||this;return o._styleSheet=n,o._decorationOptionProviders=Object.create(null),o._themeService=t,o}return d(t,e),t.prototype.registerDecorationType=function(e,t,n){var i=this._decorationOptionProviders[e];if(!i){var o={styleSheet:this._styleSheet,key:e,parentTypeKey:n,options:t||Object.create(null)};i=n?new g(this._themeService,o):new m(this._themeService,o),this._decorationOptionProviders[e]=i}i.refCount++},t.prototype.removeDecorationType=function(e){var t=this._decorationOptionProviders[e];t&&--t.refCount<=0&&(delete this._decorationOptionProviders[e],t.dispose(),this.listCodeEditors().forEach(function(t){return t.removeDecorations(e)}))},t.prototype.resolveDecorationOptions=function(e,t){var n=this._decorationOptionProviders[e];if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t)},t=h([f(0,c.c)],t)}(a.a),g=function(){function e(e,t){this._parentTypeKey=t.parentTypeKey,this.refCount=0,this._beforeContentRules=new _(3,t,e),this._afterContentRules=new _(4,t,e)}return e.prototype.getOptions=function(e,t){var n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n},e.prototype.dispose=function(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null)},e}(),m=function(){function e(e,t){var n=this;this.refCount=0,this._disposables=[];var i=function(i){var o=new _(i,t,e);if(o.hasContent)return n._disposables.push(o),o.className};this.className=i(0);var o=function(i){var o=new _(i,t,e);return o.hasContent?(n._disposables.push(o),{className:o.className,hasLetterSpacing:o.hasLetterSpacing}):null}(1);o&&(this.inlineClassName=o.className,this.inlineClassNameAffectsLetterSpacing=o.hasLetterSpacing),this.beforeContentClassName=i(3),this.afterContentClassName=i(4),this.glyphMarginClassName=i(2);var r=t.options;this.isWholeLine=Boolean(r.isWholeLine),this.stickiness=r.rangeBehavior;var s=r.light&&r.light.overviewRulerColor||r.overviewRulerColor,a=r.dark&&r.dark.overviewRulerColor||r.overviewRulerColor;void 0===s&&void 0===a||(this.overviewRuler={color:s||a,darkColor:a||s,position:r.overviewRulerLane||l.c.Center})}return e.prototype.getOptions=function(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this},e.prototype.dispose=function(){this._disposables=Object(o.d)(this._disposables)},e}(),v={color:"color:{0} !important;",opacity:"opacity:{0}; will-change: opacity;",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:url('{0}') center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:url('{0}');",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"},_=function(){function e(e,t,n){var i=this;this._theme=n.getTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;var o=y.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(o=o+" "+y.getClassName(this._providerArgs.parentTypeKey,e)),this._className=o,this._unThemedSelector=y.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=n.onThemeChange(function(e){i._theme=n.getTheme(),i._removeCSS(),i._buildCSS()}):this._themeListener=null}return e.prototype.dispose=function(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)},Object.defineProperty(e.prototype,"hasContent",{get:function(){return this._hasContent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasLetterSpacing",{get:function(){return this._hasLetterSpacing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),e.prototype._buildCSS=function(){var e,t,n,i=this._providerArgs.options;switch(this._ruleType){case 0:e=this.getCSSTextForModelDecorationClassName(i),t=this.getCSSTextForModelDecorationClassName(i.light),n=this.getCSSTextForModelDecorationClassName(i.dark);break;case 1:e=this.getCSSTextForModelDecorationInlineClassName(i),t=this.getCSSTextForModelDecorationInlineClassName(i.light),n=this.getCSSTextForModelDecorationInlineClassName(i.dark);break;case 2:e=this.getCSSTextForModelDecorationGlyphMarginClassName(i),t=this.getCSSTextForModelDecorationGlyphMarginClassName(i.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(i.dark);break;case 3:e=this.getCSSTextForModelDecorationContentClassName(i.before),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.before),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.before);break;case 4:e=this.getCSSTextForModelDecorationContentClassName(i.after),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.after),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}var o=this._providerArgs.styleSheet.sheet,r=!1;e.length>0&&(o.insertRule(this._unThemedSelector+" {"+e+"}",0),r=!0),t.length>0&&(o.insertRule(".vs"+this._unThemedSelector+" {"+t+"}",0),r=!0),n.length>0&&(o.insertRule(".vs-dark"+this._unThemedSelector+", .hc-black"+this._unThemedSelector+" {"+n+"}",0),r=!0),this._hasContent=r},e.prototype._removeCSS=function(){i.C(this._unThemedSelector,this._providerArgs.styleSheet)},e.prototype.getCSSTextForModelDecorationClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")},e.prototype.getCSSTextForModelDecorationInlineClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")},e.prototype.getCSSTextForModelDecorationContentClassName=function(e){if(!e)return"";var t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&("string"==typeof e.contentIconPath?t.push(r.n(v.contentIconPath,s.a.file(e.contentIconPath).toString().replace(/'/g,"%27"))):t.push(r.n(v.contentIconPath,s.a.revive(e.contentIconPath).toString(!0).replace(/'/g,"%27")))),"string"==typeof e.contentText){var n=e.contentText.match(/^.*$/m)[0],i=n.replace(/['\\]/g,"\\$&");t.push(r.n(v.contentText,i))}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")},e.prototype.getCSSTextForModelDecorationGlyphMarginClassName=function(e){if(!e)return"";var t=[];return void 0!==e.gutterIconPath&&("string"==typeof e.gutterIconPath?t.push(r.n(v.gutterIconPath,s.a.file(e.gutterIconPath).toString())):t.push(r.n(v.gutterIconPath,s.a.revive(e.gutterIconPath).toString(!0).replace(/'/g,"%27"))),void 0!==e.gutterIconSize&&t.push(r.n(v.gutterIconSize,e.gutterIconSize))),t.join("")},e.prototype.collectBorderSettingsCSSText=function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(r.n("box-sizing: border-box;")),!0)},e.prototype.collectCSSText=function(e,t,n){for(var i=n.length,o=0,s=t;o0?(this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}return Object.defineProperty(e.prototype,"base",{get:function(){return this.themeData.base},enumerable:!0,configurable:!0}),e.prototype.notifyBaseUpdated=function(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)},e.prototype.getColors=function(){if(!this.colors){var e=Object.create(null);for(var t in this.themeData.colors)e[t]=a.a.fromHex(this.themeData.colors[t]);if(this.themeData.inherit){var n=o(this.themeData.base);for(var t in n.colors)e[t]||(e[t]=a.a.fromHex(n.colors[t]))}this.colors=e}return this.colors},e.prototype.getColor=function(e,t){var n=this.getColors()[e];return n||(!1!==t?this.getDefault(e):null)},e.prototype.getDefault=function(e){var t=this.defaultColors[e];return t||(t=_.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)},e.prototype.defines=function(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)},Object.defineProperty(e.prototype,"type",{get:function(){switch(this.base){case g:return"light";case v:return"hc";default:return"dark"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenTheme",{get:function(){if(!this._tokenTheme){var e=[],t=[];if(this.themeData.inherit){var n=o(this.themeData.base);e=n.rules,n.encodedTokensColors&&(t=n.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=c.a.createFromRawTokenTheme(e,t)}return this._tokenTheme},enumerable:!0,configurable:!0}),e}(),C=function(){function e(){this.environment=Object.create(null),this._onThemeChange=new u.a,this._onIconThemeChange=new u.a,this._knownThemes=new Map,this._knownThemes.set(g,r(g)),this._knownThemes.set(m,r(m)),this._knownThemes.set(v,r(v)),this._styleElement=s.n(),this._styleElement.className="monaco-colors",this.setTheme(g)}return Object.defineProperty(e.prototype,"onThemeChange",{get:function(){return this._onThemeChange.event},enumerable:!0,configurable:!0}),e.prototype.defineTheme=function(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!i(t.base)&&!i(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new b(e,t)),i(e)&&this._knownThemes.forEach(function(t){t.base===e&&t.notifyBaseUpdated()}),this._theme&&this._theme.themeName===e&&this.setTheme(e)},e.prototype.getTheme=function(){return this._theme},e.prototype.setTheme=function(e){var t,n=this;if(t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(g),this._theme===t)return t.id;this._theme=t;var i=[],o={},r={addRule:function(e){o[e]||(i.push(e),o[e]=!0)}};y.getThemingParticipants().forEach(function(e){return e(t,r,n.environment)});var s=t.tokenTheme,a=s.getColorMap();return r.addRule(Object(c.b)(a)),this._styleElement.innerHTML=i.join("\n"),l.u.setColorMap(a),this._onThemeChange.fire(t),t.id},e.prototype.getIconTheme=function(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}},e}()},function(e,t,n){"use strict";function i(e){if(!e||!Array.isArray(e))return[];for(var t=[],n=0,i=0,o=e.length;i=1&&""===e[0].token;){var r=e.shift();-1!==r.fontStyle&&(n=r.fontStyle),null!==r.foreground&&(i=r.foreground),null!==r.background&&(o=r.background)}for(var a=new d,u=0,l=t;ut?1:0}function a(e){for(var t=[],n=1,i=e.length;n>>0,this._cache.set(t,n)}return(n|e<<0)>>>0},e}(),f=/\b(comment|string|regex)\b/,p=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.prototype.acceptOverwrite=function(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0},e}(),g=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.match=function(e){if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return void 0!==o?o.match(n):this._mainRule},e.prototype.insert=function(t,n,i,o){if(""===t)return void this._mainRule.acceptOverwrite(n,i,o);var r,s,a=t.indexOf(".");-1===a?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var u=this._children.get(r);void 0===u&&(u=new e(this._mainRule.clone()),this._children.set(r,u)),u.insert(s,n,i,o)},e}()},function(e,t,n){"use strict";n.d(t,"b",function(){return u}),n.d(t,"c",function(){return l}),n.d(t,"a",function(){return c});var i,o,r,s=n(25),a=n(30),u={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:"09885A"},{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:"09885A"},{token:"attribute.value.unit",foreground:"09885A"},{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:"FF00FF"}],colors:(i={},i[a.m]="#FFFFFE",i[a.n]="#000000",i[a.o]="#E5EBF1",i[s.i]="#D3D3D3",i[s.a]="#939393",i[a.r]="#ADD6FF4D",i)},l={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:(o={},o[a.m]="#1E1E1E",o[a.n]="#D4D4D4",o[a.o]="#3A3D41",o[s.i]="#404040",o[s.a]="#707070",o[a.r]="#ADD6FF26",o)},c={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:(r={},r[a.m]="#000000",r[a.n]="#FFFFFF",r[s.i]="#FFFFFF",r[s.a]="#FFFFFF",r)}},function(e,t,n){"use strict";function i(e){for(;e;){if(e.hasAttribute(p)){var t=e.getAttribute(p);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}n.d(t,"a",function(){return C});var o=n(1),r=n(0),s=n(58),a=n(24),u=n(32),l=n(18),c=n(111),d=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),h=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},f=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},p="data-keybinding-context",g=function(){function e(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}return e.prototype.setValue=function(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)},e.prototype.removeValue=function(e){return e in this._value&&(delete this._value[e],!0)},e.prototype.getValue=function(e){var t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t},e}(),m=function(e){function t(){return e.call(this,-1,null)||this}return d(t,e),t.prototype.setValue=function(e,t){return!1},t.prototype.removeValue=function(e){return!1},t.prototype.getValue=function(e){},t.INSTANCE=new t,t}(g),v=function(e){function t(t,n,i){var o=e.call(this,t,null)||this;return o._configurationService=n,o._values=new Map,o._listener=o._configurationService.onDidChangeConfiguration(function(e){if(4===e.source){var t=Object(s.d)(o._values);o._values.clear(),i.fire(t)}else{for(var n=[],r=0,a=e.affectedKeys;r=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},f=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}},p=function(e){function t(t,n,o,r,a,u){var l=e.call(this)||this;return l._onDidContextMenu=l._register(new s.a),l.contextMenuHandler=l._register(new i.a(t,r,n,o,a,u)),l}return d(t,e),t.prototype.dispose=function(){this.contextMenuHandler.dispose()},t.prototype.showContextMenu=function(e){this.contextMenuHandler.showContextMenu(e),this._onDidContextMenu.fire()},t=h([f(1,r.a),f(2,a.a),f(3,o.b),f(4,l.a),f(5,u.c)],t)}(c.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var i=n(311),o=(n.n(i),n(0)),r=n(23),s=n(51),a=n(313),u=n(6),l=n(135),c=n(72),d=function(){function e(e,t,n,i,o,r){this.contextViewService=t,this.telemetryService=n,this.notificationService=i,this.keybindingService=o,this.themeService=r,this.setContainer(e)}return e.prototype.setContainer=function(e){var t=this;this.element&&(this.elementDisposable=Object(o.d)(this.elementDisposable),this.element=null),e&&(this.element=e,this.elementDisposable=Object(u.g)(this.element,u.c.MOUSE_DOWN,function(e){return t.onMouseDown(e)}))},e.prototype.showContextMenu=function(e){var t=this;e.getActions().then(function(n){if(n.length){t.focusToReturn=document.activeElement;var i;t.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,render:function(r){t.menuContainerElement=r;var d=e.getMenuClassName?e.getMenuClassName():"";d&&(r.className+=" "+d);var h=[],f=e.actionRunner||new s.b;return f.onDidBeforeRun(t.onActionRun,t,h),f.onDidRun(t.onDidActionRun,t,h),i=new a.a(r,n,{actionItemProvider:e.getActionItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:f,getKeyBinding:e.getKeyBinding?e.getKeyBinding:function(e){return t.keybindingService.lookupKeybinding(e.id)}}),h.push(Object(l.b)(i,t.themeService)),i.onDidCancel(function(){return t.contextViewService.hideContextView(!0)},null,h),i.onDidBlur(function(){return t.contextViewService.hideContextView(!0)},null,h),Object(c.a)(window,u.c.BLUR)(function(){t.contextViewService.hideContextView(!0)},null,h),Object(o.c)(h.concat([i]))},focus:function(){i.focus(!!e.autoSelectFirstItem)},onHide:function(n){e.onHide&&e.onHide(n),t.menuContainerElement=null}})}})},e.prototype.onActionRun=function(e){this.telemetryService&&this.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()},e.prototype.onDidActionRun=function(e){e.error&&this.notificationService&&this.notificationService.error(e.error)},e.prototype.onMouseDown=function(e){if(this.menuContainerElement){for(var t=new r.b(e),n=t.target;n;){if(n===this.menuContainerElement)return;n=n.parentElement}this.contextViewService.hideContextView()}},e.prototype.dispose=function(){this.setContainer(null)},e}()},function(e,t,n){var i=n(312);"string"==typeof i&&(i=[[e.i,i,""]]);var o={};o.transform=void 0;n(9)(i,o);i.locals&&(e.exports=i.locals)},function(e,t,n){t=e.exports=n(8)(!1),t.push([e.i,"/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n.context-view .monaco-menu {\r\n\tmin-width: 130px;\r\n}\r\n",""])},function(e,t,n){"use strict";function i(e){var t=g,n=t.exec(e);if(!n)return e;var i="&"===n[0].charAt(0);return e.replace(t,i?"$2":"").trim()}n.d(t,"a",function(){return _});var o=n(314),r=(n.n(o),n(11)),s=n(3),a=n(51),u=n(133),l=n(34),c=n(6),d=n(44),h=n(14),f=n(0),p=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),g=/\(&{1,2}(.)\)|&{1,2}(.)/,m=/(?:&){1,2}(.)/,v=function(e){function t(t,n,i){var o=e.call(this,i||"submenu",t,"",!0)||this;return o.entries=n,o}return p(t,e),t}(a.a),_=function(e){function t(t,n,i){void 0===i&&(i={});var o=this;Object(c.e)(t,"monaco-menu-container"),t.setAttribute("role","presentation");var r=document.createElement("div");Object(c.e)(r,"monaco-menu"),r.setAttribute("role","presentation"),t.appendChild(r),o=e.call(this,r,{orientation:2,actionItemProvider:function(e){return o.doGetActionItem(e,i,s)},context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,triggerKeys:{keys:[3],keyDown:!0}})||this,o.actionsList.setAttribute("role","menu"),o.actionsList.tabIndex=0,o.menuDisposables=[],i.enableMnemonics&&o.menuDisposables.push(Object(c.g)(r,c.c.KEY_DOWN,function(e){var t=l.b.fromString(e.key);if(o.mnemonics.has(t)){c.b.stop(e,!0);var n=o.mnemonics.get(t);if(1===n.length&&(n[0]instanceof b&&o.focusItemByElement(n[0].container),n[0].onClick(event)),n.length>1){var i=n.shift();o.focusItemByElement(i.container),n.push(i),o.mnemonics.set(t,n)}}})),o._register(Object(c.g)(o.domNode,c.c.MOUSE_OUT,function(e){var t=e.relatedTarget;Object(c.z)(t,o.domNode)||(o.focusedItem=void 0,o.updateFocus(),e.stopPropagation())})),o._register(Object(c.g)(o.actionsList,c.c.MOUSE_OVER,function(e){var t=e.target;if(t&&Object(c.z)(t,o.actionsList)&&t!==o.actionsList){for(;t.parentElement!==o.actionsList;)t=t.parentElement;if(Object(c.x)(t,"action-item")){var n=o.focusedItem;o.setFocusedItem(t),n!==o.focusedItem&&o.updateFocus()}}}));var s={parent:o};return o.mnemonics=new Map,o.push(n,{icon:!0,label:!0,isMenu:!0}),o}return p(t,e),t.prototype.style=function(e){var t=this.getContainer(),n=e.foregroundColor?""+e.foregroundColor:null,i=e.backgroundColor?""+e.backgroundColor:null,o=e.borderColor?"2px solid "+e.borderColor:null,r=e.shadowColor?"0 2px 4px "+e.shadowColor:null;t.style.border=o,this.domNode.style.color=n,this.domNode.style.backgroundColor=i,t.style.boxShadow=r,this.items&&this.items.forEach(function(t){(t instanceof y||t instanceof C)&&t.style(e)})},t.prototype.focusItemByElement=function(e){var t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()},t.prototype.setFocusedItem=function(e){for(var t=0;t