diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index db4461e991..87d067bb56 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -7,9 +7,9 @@ trigger:
batch: true
branches:
include:
- - blazor-wasm
- master
- release/*
+ - internal/release/3.*
# Run PR validation on all branches
pr:
@@ -80,18 +80,11 @@ variables:
value: test
- name: _PublishArgs
value: ''
-<<<<<<< HEAD
-=======
- # used for post-build phases, internal builds only
- - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - group: DotNet-AspNet-SDLValidation-Params
->>>>>>> bbafecc0535e1de3264845e51ea8b3d18eb3ca61
stages:
- stage: build
displayName: Build
jobs:
-<<<<<<< HEAD
# Code check
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- template: jobs/default-build.yml
@@ -116,8 +109,6 @@ stages:
publishOnError: true
includeForks: true
-=======
->>>>>>> bbafecc0535e1de3264845e51ea8b3d18eb3ca61
# Build Windows (x64/x86)
- template: jobs/default-build.yml
parameters:
@@ -151,13 +142,12 @@ stages:
-arch x64
-pack
-all
- -NoBuildNative
+ -buildNative
/bl:artifacts/log/build.x64.binlog
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
displayName: Build x64
-<<<<<<< HEAD
# Build the x86 shared framework
# TODO: make it possible to build for one Windows architecture at a time
# This is going to actually build x86 native assets. See https://github.com/aspnet/AspNetCore/issues/7196
@@ -183,8 +173,6 @@ stages:
$(_InternalRuntimeDownloadArgs)
displayName: Build SiteExtension
-=======
->>>>>>> bbafecc0535e1de3264845e51ea8b3d18eb3ca61
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
# consider running code-signing inline with the other previous steps.
# Sign check is disabled because it is run in a separate step below, after installers are built.
@@ -212,6 +200,16 @@ stages:
/p:PublishInstallerBaseVersion=true
displayName: Build Installers
+ # A few files must also go to the VS package feed.
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - task: NuGetCommand@2
+ displayName: Push Visual Studio packages
+ inputs:
+ command: push
+ packagesToPush: 'artifacts/packages/**/VS.Redist.Common.AspNetCore.*.nupkg'
+ nuGetFeedType: external
+ publishFeedCredentials: 'DevDiv - VS package feed'
+
artifacts:
- name: Windows_Logs
path: artifacts/log/
@@ -220,7 +218,6 @@ stages:
- name: Windows_Packages
path: artifacts/packages/
-<<<<<<< HEAD
# Build Windows ARM
- template: jobs/default-build.yml
parameters:
@@ -515,8 +512,6 @@ stages:
parameters:
inputName: Linux_musl_arm64
-=======
->>>>>>> bbafecc0535e1de3264845e51ea8b3d18eb3ca61
# Test jobs
- template: jobs/default-build.yml
parameters:
@@ -661,7 +656,6 @@ stages:
publishOnError: true
includeForks: true
-<<<<<<< HEAD
# Source build
- job: Source_Build
displayName: 'Test: Linux Source Build'
@@ -720,17 +714,23 @@ stages:
artifactType: Container
parallel: true
-=======
->>>>>>> bbafecc0535e1de3264845e51ea8b3d18eb3ca61
# Publish to the BAR
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
dependsOn:
- Windows_build
+ - Windows_arm_build
+ - CodeSign_Xplat_MacOS_x64
+ - CodeSign_Xplat_Linux_x64
+ - CodeSign_Xplat_Linux_arm
+ - CodeSign_Xplat_Linux_arm64
+ - CodeSign_Xplat_Linux_musl_x64
+ - CodeSign_Xplat_Linux_musl_arm64
# In addition to the dependencies above, ensure the build was successful overall.
- Linux_Test
- MacOS_Test
+ - Source_Build
- Windows_Templates_Test
- Windows_Test
pool:
diff --git a/NuGet.config b/NuGet.config
index b632b50bdf..699d9e10b1 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -3,32 +3,20 @@
-<<<<<<< HEAD
+
+
-=======
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
->>>>>>> bbafecc0535e1de3264845e51ea8b3d18eb3ca61
diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props
index 78f2952da7..00294a106f 100644
--- a/eng/Baseline.Designer.props
+++ b/eng/Baseline.Designer.props
@@ -18,6 +18,13 @@
3.1.4
+
+
+ 3.2.0
+
+
+
+
3.1.4
@@ -240,6 +247,48 @@
+
+
+ 3.2.0
+
+
+
+
+
+
+
+
+
+ 3.2.0
+
+
+
+
+
+
+ 3.2.0
+
+
+
+
+ 3.2.0
+
+
+
+
+
+
+
+ 3.2.0
+
+
+
+
+ 3.2.0
+
+
+
+
3.1.4
diff --git a/eng/Baseline.xml b/eng/Baseline.xml
index a768d1d764..ee094c82d5 100644
--- a/eng/Baseline.xml
+++ b/eng/Baseline.xml
@@ -8,6 +8,7 @@ Update this list when preparing for a new patch.
+
@@ -36,6 +37,12 @@ Update this list when preparing for a new patch.
+
+
+
+
+
+
diff --git a/eng/Build.props b/eng/Build.props
index 6ba4d0eda6..95b9636667 100644
--- a/eng/Build.props
+++ b/eng/Build.props
@@ -34,8 +34,8 @@
$(RepoRoot)src\Installers\**\*.*proj;
$(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj;
$(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj;
- $(RepoRoot)src\Components\Blazor\Build\testassets\**\*.*proj;
- $(RepoRoot)src\ProjectTemplates\BlazorWasm.ProjectTemplates\content\**\*.csproj;
+ $(RepoRoot)src\Components\WebAssembly\Build\testassets\**\*.csproj;
+ $(RepoRoot)src\ProjectTemplates\ComponentsWebAssembly.ProjectTemplates\content\**\*.csproj;
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.csproj;
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.fsproj;
$(RepoRoot)src\ProjectTemplates\Web.Spa.ProjectTemplates\content\**\*.csproj;
@@ -50,11 +50,6 @@
" />
-
-
- $(RepoRoot)src\Components\**\*.csproj;$(RepoRoot)src\ProjectTemplates\**\*.csproj
-
-
diff --git a/eng/Dependencies.props b/eng/Dependencies.props
index 73ffdde39f..22235e50c4 100644
--- a/eng/Dependencies.props
+++ b/eng/Dependencies.props
@@ -92,6 +92,7 @@ and are generated based on the last package release.
+
@@ -122,7 +123,7 @@ and are generated based on the last package release.
-
+
diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props
index dedf038e0b..c0ecfb2b07 100644
--- a/eng/ProjectReferences.props
+++ b/eng/ProjectReferences.props
@@ -55,12 +55,14 @@
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 037cb728dc..580e6b3b36 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -9,9 +9,13 @@
-->
-
- https://github.com/aspnet/Blazor
- 7868699de745fd30a654c798a99dc541b77b95c0
+
+ https://github.com/dotnet/blazor
+ cc449601d638ffaab58ae9487f0fd010bb178a12
+
+
+ https://github.com/dotnet/corefx
+ 66409e392d64ed96e5d3a5fda712d9baf51196ed
https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore-tooling
diff --git a/eng/Versions.props b/eng/Versions.props
index c43b1c1855..07f4eaf7ba 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -10,6 +10,11 @@
1
5
0
+
+ 3
+ 2
+ 1
+
@@ -19,9 +24,6 @@
false
servicing
Servicing
-
- 4
- preview$(BlazorClientPreReleasePreviewNumber)
$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)
3.1.0
@@ -30,6 +32,7 @@
true
$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)
+ $(ComponentsWebAssemblyMajorVersion).$(ComponentsWebAssemblyMinorVersion).$(ComponentsWebAssemblyPatchVersion)
$(VersionPrefix)
@@ -92,12 +95,13 @@
4.7.0
4.7.1
4.7.2
+ 3.2.0
4.7.1
4.7.0
3.1.1
- 3.1.0-preview4.19605.1
+ 3.2.0
3.1.4-servicing.20221.11
3.1.4-servicing.20221.11
diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1
index 29d76cd3be..92a053bd16 100644
--- a/eng/common/tools.ps1
+++ b/eng/common/tools.ps1
@@ -257,7 +257,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
if ($msbuildCmd -ne $null) {
# Workaround for https://github.com/dotnet/roslyn/issues/35793
# Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
- $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0])
+ $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0])
if ($msbuildVersion -ge $vsMinVersion) {
return $global:_MSBuildExe = $msbuildCmd.Path
diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1
index a7baf079c8..072f55fe21 100644
--- a/eng/scripts/CodeCheck.ps1
+++ b/eng/scripts/CodeCheck.ps1
@@ -170,11 +170,10 @@ try {
& $PSScriptRoot\GenerateReferenceAssemblies.ps1 -ci:$ci
}
- # Temporarily disable package baseline generation while we stage for publishing
- # Write-Host "Re-generating package baselines"
- # Invoke-Block {
- # & dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/"
- # }
+ Write-Host "Re-generating package baselines"
+ Invoke-Block {
+ & dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/"
+ }
Write-Host "Run git diff to check for pending changes"
diff --git a/global.json b/global.json
index e0882dd64d..974708a611 100644
--- a/global.json
+++ b/global.json
@@ -1,16 +1,9 @@
{
"sdk": {
-<<<<<<< HEAD
"version": "3.1.103"
},
"tools": {
"dotnet": "3.1.103",
-=======
- "version": "3.1.100"
- },
- "tools": {
- "dotnet": "3.1.100",
->>>>>>> bbafecc0535e1de3264845e51ea8b3d18eb3ca61
"runtimes": {
"dotnet/x64": [
"$(MicrosoftNETCoreAppInternalPackageVersion)"
@@ -32,12 +25,7 @@
},
"msbuild-sdks": {
"Yarn.MSBuild": "1.15.2",
-<<<<<<< HEAD
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20213.4",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.20213.4"
-=======
- "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19577.5",
- "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19577.5"
->>>>>>> bbafecc0535e1de3264845e51ea8b3d18eb3ca61
}
}
diff --git a/src/Components/Blazor/Blazor.Version.props b/src/Components/Blazor/Blazor.Version.props
deleted file mode 100644
index 123a94c1d7..0000000000
--- a/src/Components/Blazor/Blazor.Version.props
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- 3.2.0
- preview1
-
-
-
\ No newline at end of file
diff --git a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs
deleted file mode 100644
index eb33362975..0000000000
--- a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Blazor
-{
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public static partial class JSInteropMethods
- {
- [Microsoft.JSInterop.JSInvokableAttribute("NotifyLocationChanged")]
- public static void NotifyLocationChanged(string uri, bool isInterceptedLink) { }
- }
-}
-namespace Microsoft.AspNetCore.Blazor.Hosting
-{
- [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
- public readonly partial struct RootComponentMapping
- {
- private readonly object _dummy;
- public RootComponentMapping(System.Type componentType, string selector) { throw null; }
- public System.Type ComponentType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public string Selector { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- }
- public partial class RootComponentMappingCollection : System.Collections.ObjectModel.Collection
- {
- public RootComponentMappingCollection() { }
- public void Add(System.Type componentType, string selector) { }
- public void AddRange(System.Collections.Generic.IEnumerable items) { }
- public void Add(string selector) where TComponent : Microsoft.AspNetCore.Components.IComponent { }
- }
- public sealed partial class WebAssemblyHost : System.IAsyncDisposable
- {
- internal WebAssemblyHost() { }
- public Microsoft.Extensions.Configuration.IConfiguration Configuration { get { throw null; } }
- public System.IServiceProvider Services { get { throw null; } }
- [System.Diagnostics.DebuggerStepThroughAttribute]
- public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
- public System.Threading.Tasks.Task RunAsync() { throw null; }
- }
- public sealed partial class WebAssemblyHostBuilder
- {
- internal WebAssemblyHostBuilder() { }
- public Microsoft.Extensions.Configuration.IConfigurationBuilder Configuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.AspNetCore.Blazor.Hosting.RootComponentMappingCollection RootComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.Extensions.DependencyInjection.IServiceCollection Services { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- public Microsoft.AspNetCore.Blazor.Hosting.WebAssemblyHost Build() { throw null; }
- public static Microsoft.AspNetCore.Blazor.Hosting.WebAssemblyHostBuilder CreateDefault(string[] args = null) { throw null; }
- }
-}
-namespace Microsoft.AspNetCore.Blazor.Http
-{
- public enum FetchCredentialsOption
- {
- Omit = 0,
- SameOrigin = 1,
- Include = 2,
- }
- public static partial class WebAssemblyHttpMessageHandlerOptions
- {
- public static Microsoft.AspNetCore.Blazor.Http.FetchCredentialsOption DefaultCredentials { get { throw null; } set { } }
- }
-}
-namespace Microsoft.AspNetCore.Blazor.Rendering
-{
- public static partial class WebAssemblyEventDispatcher
- {
- [Microsoft.JSInterop.JSInvokableAttribute("DispatchEvent")]
- public static System.Threading.Tasks.Task DispatchEvent(Microsoft.AspNetCore.Components.RenderTree.WebEventDescriptor eventDescriptor, string eventArgsJson) { throw null; }
- }
-}
diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs
deleted file mode 100644
index 1d1f05dce7..0000000000
--- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Http;
-using Microsoft.AspNetCore.Blazor.Services;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Routing;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.DependencyInjection.Extensions;
-using Microsoft.Extensions.Logging;
-using Microsoft.JSInterop;
-
-namespace Microsoft.AspNetCore.Blazor.Hosting
-{
- ///
- /// A builder for configuring and creating a .
- ///
- public sealed class WebAssemblyHostBuilder
- {
- ///
- /// Creates an instance of using the most common
- /// conventions and settings.
- ///
- /// The argument passed to the application's main method.
- /// A .
- public static WebAssemblyHostBuilder CreateDefault(string[] args = default)
- {
- // We don't use the args for anything right now, but we want to accept them
- // here so that it shows up this way in the project templates.
- args ??= Array.Empty();
- var builder = new WebAssemblyHostBuilder();
-
- // Right now we don't have conventions or behaviors that are specific to this method
- // however, making this the default for the template allows us to add things like that
- // in the future, while giving `new WebAssemblyHostBuilder` as an opt-out of opinionated
- // settings.
- return builder;
- }
-
- ///
- /// Creates an instance of with the minimal configuration.
- ///
- private WebAssemblyHostBuilder()
- {
- // Private right now because we don't have much reason to expose it. This can be exposed
- // in the future if we want to give people a choice between CreateDefault and something
- // less opinionated.
- Configuration = new ConfigurationBuilder();
- RootComponents = new RootComponentMappingCollection();
- Services = new ServiceCollection();
-
- InitializeDefaultServices();
- }
-
- ///
- /// Gets an that can be used to customize the application's
- /// configuration sources.
- ///
- public IConfigurationBuilder Configuration { get; }
-
- ///
- /// Gets the collection of root component mappings configured for the application.
- ///
- public RootComponentMappingCollection RootComponents { get; }
-
- ///
- /// Gets the service collection.
- ///
- public IServiceCollection Services { get; }
-
- ///
- /// Builds a instance based on the configuration of this builder.
- ///
- /// A object.
- public WebAssemblyHost Build()
- {
- // Intentionally overwrite configuration with the one we're creating.
- var configuration = Configuration.Build();
- Services.AddSingleton(configuration);
-
- // A Blazor application always runs in a scope. Since we want to make it possible for the user
- // to configure services inside *that scope* inside their startup code, we create *both* the
- // service provider and the scope here.
- var services = Services.BuildServiceProvider();
- var scope = services.GetRequiredService().CreateScope();
-
- return new WebAssemblyHost(services, scope, configuration, RootComponents.ToArray());
- }
-
- private void InitializeDefaultServices()
- {
- Services.AddSingleton(WebAssemblyJSRuntime.Instance);
- Services.AddSingleton(WebAssemblyNavigationManager.Instance);
- Services.AddSingleton(WebAssemblyNavigationInterception.Instance);
- Services.AddSingleton();
- Services.TryAdd(ServiceDescriptor.Singleton(typeof(ILogger<>), typeof(WebAssemblyConsoleLogger<>)));
- Services.AddSingleton(s =>
- {
- // Creating the URI helper needs to wait until the JS Runtime is initialized, so defer it.
- var navigationManager = s.GetRequiredService();
- return new HttpClient
- {
- BaseAddress = new Uri(navigationManager.BaseUri)
- };
- });
- }
- }
-}
diff --git a/src/Components/Blazor/Blazor/src/Http/WebAssemblyHttpMessageHandlerOptions.cs b/src/Components/Blazor/Blazor/src/Http/WebAssemblyHttpMessageHandlerOptions.cs
deleted file mode 100644
index bc46e4e527..0000000000
--- a/src/Components/Blazor/Blazor/src/Http/WebAssemblyHttpMessageHandlerOptions.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Reflection;
-
-namespace Microsoft.AspNetCore.Blazor.Http
-{
- ///
- /// Configures options for the WebAssembly HTTP message handler.
- ///
- public static class WebAssemblyHttpMessageHandlerOptions
- {
- ///
- /// Gets or sets the default value of the 'credentials' option on outbound HTTP requests.
- /// Defaults to .
- ///
- public static FetchCredentialsOption DefaultCredentials
- {
- get
- {
- var valueString = MonoDefaultCredentialsGetter.Value();
- var result = default(FetchCredentialsOption);
- if (valueString != null)
- {
- Enum.TryParse(valueString, out result);
- }
- return result;
- }
-
- set
- {
- MonoDefaultCredentialsSetter.Value(value.ToString());
- }
- }
-
- static Func MonoWasmHttpMessageHandlerType = ()
- => Assembly.Load("WebAssembly.Net.Http")
- .GetType("WebAssembly.Net.Http.HttpClient.WasmHttpMessageHandler");
-
- static Func MonoFetchCredentialsOptionType = ()
- => Assembly.Load("WebAssembly.Net.Http")
- .GetType("WebAssembly.Net.Http.HttpClient.FetchCredentialsOption");
-
- static Lazy MonoDefaultCredentialsProperty = new Lazy(
- () => MonoWasmHttpMessageHandlerType()?.GetProperty("DefaultCredentials", BindingFlags.Public | BindingFlags.Static));
-
- static Lazy> MonoDefaultCredentialsGetter = new Lazy>(() =>
- {
- return () => MonoDefaultCredentialsProperty.Value?.GetValue(null).ToString();
- });
-
- static Lazy> MonoDefaultCredentialsSetter = new Lazy>(() =>
- {
- var fetchCredentialsOptionsType = MonoFetchCredentialsOptionType();
- return value => MonoDefaultCredentialsProperty.Value?.SetValue(null, Enum.Parse(fetchCredentialsOptionsType, value));
- });
- }
-}
diff --git a/src/Components/Blazor/Blazor/src/JSInteropMethods.cs b/src/Components/Blazor/Blazor/src/JSInteropMethods.cs
deleted file mode 100644
index 239dbb4952..0000000000
--- a/src/Components/Blazor/Blazor/src/JSInteropMethods.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.ComponentModel;
-using Microsoft.AspNetCore.Blazor.Services;
-using Microsoft.JSInterop;
-
-namespace Microsoft.AspNetCore.Blazor
-{
- ///
- /// Contains methods called by interop. Intended for framework use only, not supported for use in application
- /// code.
- ///
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static class JSInteropMethods
- {
- ///
- /// For framework use only.
- ///
- [JSInvokable(nameof(NotifyLocationChanged))]
- public static void NotifyLocationChanged(string uri, bool isInterceptedLink)
- {
- WebAssemblyNavigationManager.Instance.SetLocation(uri, isInterceptedLink);
- }
- }
-}
diff --git a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj
deleted file mode 100644
index 3a4e98a8b7..0000000000
--- a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- netstandard2.1
- Build client-side single-page applications (SPAs) with Blazor running under WebAssembly.
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Blazor/src/Services/WebAssemblyConsoleLogger.cs b/src/Components/Blazor/Blazor/src/Services/WebAssemblyConsoleLogger.cs
deleted file mode 100644
index c86c1cf30b..0000000000
--- a/src/Components/Blazor/Blazor/src/Services/WebAssemblyConsoleLogger.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using Microsoft.Extensions.Logging;
-
-namespace Microsoft.AspNetCore.Blazor.Services
-{
- internal class WebAssemblyConsoleLogger : ILogger, ILogger
- {
- public IDisposable BeginScope(TState state)
- {
- return NoOpDisposable.Instance;
- }
-
- public bool IsEnabled(LogLevel logLevel)
- {
- return logLevel >= LogLevel.Warning;
- }
-
- public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter)
- {
- var formattedMessage = formatter(state, exception);
- Console.WriteLine($"[{logLevel}] {formattedMessage}");
- }
-
- private class NoOpDisposable : IDisposable
- {
- public static NoOpDisposable Instance = new NoOpDisposable();
-
- public void Dispose() { }
- }
- }
-}
diff --git a/src/Components/Blazor/Blazor/src/Services/WebAssemblyJSRuntime.cs b/src/Components/Blazor/Blazor/src/Services/WebAssemblyJSRuntime.cs
deleted file mode 100644
index c5404c256f..0000000000
--- a/src/Components/Blazor/Blazor/src/Services/WebAssemblyJSRuntime.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components;
-using Mono.WebAssembly.Interop;
-
-namespace Microsoft.AspNetCore.Blazor.Services
-{
- internal sealed class WebAssemblyJSRuntime : MonoWebAssemblyJSRuntime
- {
- private static readonly WebAssemblyJSRuntime _instance = new WebAssemblyJSRuntime();
- private static bool _initialized;
-
- public WebAssemblyJSRuntime()
- {
- JsonSerializerOptions.Converters.Add(new ElementReferenceJsonConverter());
- }
-
- public static WebAssemblyJSRuntime Instance
- {
- get
- {
- if (!_initialized)
- {
- // This is executing in MonoWASM. Consequently we do not to have concern ourselves with thread safety.
- _initialized = true;
- Initialize(_instance);
- }
-
- return _instance;
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Blazor/src/Services/WebAssemblyLoggerFactory.cs b/src/Components/Blazor/Blazor/src/Services/WebAssemblyLoggerFactory.cs
deleted file mode 100644
index 73458387e7..0000000000
--- a/src/Components/Blazor/Blazor/src/Services/WebAssemblyLoggerFactory.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.Extensions.Logging;
-
-namespace Microsoft.AspNetCore.Blazor.Services
-{
- internal class WebAssemblyLoggerFactory : ILoggerFactory
- {
- public void AddProvider(ILoggerProvider provider)
- {
- // No-op
- }
-
- public ILogger CreateLogger(string categoryName)
- => new WebAssemblyConsoleLogger();
-
- public void Dispose()
- {
- // No-op
- }
- }
-}
diff --git a/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs b/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs
deleted file mode 100644
index 77b6583d26..0000000000
--- a/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Net.Http;
-using System.Text;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Routing;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Logging;
-using Microsoft.JSInterop;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Blazor.Hosting
-{
- public class WebAssemblyHostBuilderTest
- {
- [Fact]
- public void Build_AllowsConfiguringConfiguration()
- {
- // Arrange
- var builder = WebAssemblyHostBuilder.CreateDefault();
-
- builder.Configuration.AddInMemoryCollection(new[]
- {
- new KeyValuePair("key", "value"),
- });
-
- // Act
- var host = builder.Build();
-
- // Assert
- Assert.Equal("value", host.Configuration["key"]);
- }
-
- [Fact]
- public void Build_AllowsConfiguringServices()
- {
- // Arrange
- var builder = WebAssemblyHostBuilder.CreateDefault();
-
- // This test also verifies that we create a scope.
- builder.Services.AddScoped();
-
- // Act
- var host = builder.Build();
-
- // Assert
- Assert.NotNull(host.Services.GetRequiredService());
- }
-
- [Fact]
- public void Build_AddsConfigurationToServices()
- {
- // Arrange
- var builder = WebAssemblyHostBuilder.CreateDefault();
-
- builder.Configuration.AddInMemoryCollection(new[]
- {
- new KeyValuePair("key", "value"),
- });
-
- // Act
- var host = builder.Build();
-
- // Assert
- var configuration = host.Services.GetRequiredService();
- Assert.Equal("value", configuration["key"]);
- }
-
- private static IReadOnlyList DefaultServiceTypes
- {
- get
- {
- return new Type[]
- {
- typeof(IJSRuntime),
- typeof(NavigationManager),
- typeof(INavigationInterception),
- typeof(ILoggerFactory),
- typeof(HttpClient),
- typeof(ILogger<>),
- };
- }
- }
-
- [Fact]
- public void Constructor_AddsDefaultServices()
- {
- // Arrange & Act
- var builder = WebAssemblyHostBuilder.CreateDefault();
-
- // Assert
- Assert.Equal(DefaultServiceTypes.Count, builder.Services.Count);
- foreach (var type in DefaultServiceTypes)
- {
- Assert.Single(builder.Services, d => d.ServiceType == type);
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj
deleted file mode 100644
index 40c5a5b702..0000000000
--- a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- $(DefaultNetCoreTargetFramework)
-
- false
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Build/src/Properties/AssemblyInfo.cs b/src/Components/Blazor/Build/src/Properties/AssemblyInfo.cs
deleted file mode 100644
index aac42c25cc..0000000000
--- a/src/Components/Blazor/Build/src/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-using System.Runtime.CompilerServices;
-
-[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Build.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
diff --git a/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs b/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs
deleted file mode 100644
index 1984de0a57..0000000000
--- a/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Runtime.Serialization.Json;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- public class GenerateBlazorBootJson : Task
- {
- [Required]
- public string AssemblyPath { get; set; }
-
- [Required]
- public ITaskItem[] References { get; set; }
-
- [Required]
- public bool LinkerEnabled { get; set; }
-
- [Required]
- public string OutputPath { get; set; }
-
- public override bool Execute()
- {
- var entryAssemblyName = AssemblyName.GetAssemblyName(AssemblyPath).Name;
- var assemblies = References.Select(GetUriPath).OrderBy(c => c, StringComparer.Ordinal).ToArray();
-
- using var fileStream = File.Create(OutputPath);
- WriteBootJson(fileStream, entryAssemblyName, assemblies, LinkerEnabled);
-
- return true;
-
- static string GetUriPath(ITaskItem item)
- {
- var outputPath = item.GetMetadata("RelativeOutputPath");
- if (string.IsNullOrEmpty(outputPath))
- {
- outputPath = Path.GetFileName(item.ItemSpec);
- }
-
- return outputPath.Replace('\\', '/');
- }
- }
-
- internal static void WriteBootJson(Stream stream, string entryAssemblyName, string[] assemblies, bool linkerEnabled)
- {
- var data = new BootJsonData
- {
- entryAssembly = entryAssemblyName,
- assemblies = assemblies,
- linkerEnabled = linkerEnabled,
- };
-
- var serializer = new DataContractJsonSerializer(typeof(BootJsonData));
- serializer.WriteObject(stream, data);
- }
-
- ///
- /// Defines the structure of a Blazor boot JSON file
- ///
-#pragma warning disable IDE1006 // Naming Styles
- public class BootJsonData
- {
- ///
- /// Gets the name of the assembly with the application entry point
- ///
- public string entryAssembly { get; set; }
-
- ///
- /// Gets the closure of assemblies to be loaded by Blazor WASM. This includes the application entry assembly.
- ///
- public string[] assemblies { get; set; }
-
- ///
- /// Gets a value that determines if the linker is enabled.
- ///
- public bool linkerEnabled { get; set; }
- }
-#pragma warning restore IDE1006 // Naming Styles
- }
-}
diff --git a/src/Components/Blazor/Build/src/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props b/src/Components/Blazor/Build/src/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props
deleted file mode 100644
index f20d90334c..0000000000
--- a/src/Components/Blazor/Build/src/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/src/Components/Blazor/Build/src/targets/All.targets b/src/Components/Blazor/Build/src/targets/All.targets
deleted file mode 100644
index 6c69e85a40..0000000000
--- a/src/Components/Blazor/Build/src/targets/All.targets
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
-
-
-
- $(MSBuildThisFileDirectory)..\tools\
- <_BlazorTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netcoreapp
- <_BlazorTasksTFM Condition=" '$(_BlazorTasksTFM)' == ''">netfx
- $(BlazorToolsDir)$(_BlazorTasksTFM)\Microsoft.AspNetCore.Blazor.Build.Tasks.dll
-
-
- true
-
-
- true
-
-
-
-
-
-
-
-
- $(AssemblyName).blazor.config
- $(TargetDir)$(BlazorMetadataFileName)
-
-
-
- <_BlazorConfigContent Include="$(MSBuildProjectFullPath)" />
- <_BlazorConfigContent Include="$(TargetPath)" />
- <_BlazorConfigContent Include="debug:true" Condition="'$(BlazorEnableDebugging)'=='true'" />
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props
deleted file mode 100644
index f49c1f8f2f..0000000000
--- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- $(MSBuildThisFileDirectory)..\tools\blazor\blazor.webassembly.js
-
-
-
- none
- --disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com -v false -c link -u link -b true
- dist\
- $(BaseBlazorDistPath)_content\
- $(BaseBlazorDistPath)_framework\
- $(BaseBlazorRuntimeOutputPath)_bin\
- $(BaseBlazorRuntimeOutputPath)wasm\
- wwwroot\
- blazor.boot.json
- <_BlazorBuiltInBclLinkerDescriptor>$(MSBuildThisFileDirectory)BuiltInBclLinkerDescriptor.xml
-
-
-
diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets
deleted file mode 100644
index 3c7d126561..0000000000
--- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets
+++ /dev/null
@@ -1,336 +0,0 @@
-
-
- true
-
-
-
-
- $(MonoBaseClassLibraryPath)
- $(MonoBaseClassLibraryFacadesPath)
- $(MonoWasmRuntimePath)
- $(MonoWasmFrameworkPath)
-
-
-
-
- $(DotNetWebAssemblyArtifactsRoot)\wasm-bcl\wasm\
- $(DotNetWebAssemblyBCLPath)\Facades\
- $(DotNetWebAssemblyArtifactsRoot)\builds\debug\
- $(DotNetWebAssemblyArtifactsRoot)\framework\
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_BlazorStatisticsOutput Include="@(BlazorOutputWithTargetPath->'%(TargetOutputPath)')" />
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(BlazorRuntimeWasmOutputPath)%(FileName)%(Extension)
-
-
- $(BaseBlazorRuntimeOutputPath)%(FileName)%(Extension)
-
-
-
-
- <_BlazorPackageContentOutput Include="@(BlazorPackageContentFile)" Condition="%(SourcePackage) != ''">
- $(BaseBlazorPackageContentOutputPath)%(SourcePackage)\%(RecursiveDir)\%(Filename)%(Extension)
-
-
-
-
-
-
-
-
- $(IntermediateOutputPath)blazor\
-
-
- $(BlazorIntermediateOutputPath)linker.descriptor.xml
-
- <_TypeGranularityLinkerDescriptor>$(BlazorIntermediateOutputPath)linker.typegranularityconfig.xml
-
-
- $(BlazorIntermediateOutputPath)linker/
-
-
- $(BlazorIntermediateOutputPath)$(BlazorBootJsonName)
-
- <_BlazorLinkerOutputCache>$(BlazorIntermediateOutputPath)linker.output
-
- <_BlazorApplicationAssembliesCacheFile>$(BlazorIntermediateOutputPath)unlinked.output
-
-
-
- <_WebAssemblyBCLFolder Include="
- $(DotNetWebAssemblyBCLPath);
- $(DotNetWebAssemblyBCLFacadesPath);
- $(DotNetWebAssemblyFrameworkPath)" />
-
- <_WebAssemblyBCLAssembly Include="%(_WebAssemblyBCLFolder.Identity)*.dll" />
-
-
-
-
-
- <_BlazorManagedRuntimeAssemby Include="@(RuntimeCopyLocalItems)" />
-
-
- <_BlazorUserRuntimeAssembly Include="@(ReferencePath->WithMetadataValue('CopyLocal', 'true'))" />
- <_BlazorUserRuntimeAssembly Include="@(ReferenceDependencyPaths->WithMetadataValue('CopyLocal', 'true'))" />
-
- <_BlazorManagedRuntimeAssemby Include="@(_BlazorUserRuntimeAssembly)" />
- <_BlazorManagedRuntimeAssemby Include="@(IntermediateAssembly)" />
-
-
-
-
-
-
-
-
-
-
- <_BlazorCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" />
- <_BlazorCopyLocalPaths Remove="@(_BlazorManagedRuntimeAssemby)" />
-
-
- true
- $(BlazorRuntimeBinOutputPath)%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)
- %(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)
-
-
-
- true
- $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)
- %(FileName)%(Extension)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_BlazorRuntimeCopyLocalItems Include="@(RuntimeCopyLocalItems)" />
-
-
- <_BlazorRuntimeCopyLocalItems IsLinkable="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('System.'))" />
- <_BlazorRuntimeCopyLocalItems IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.AspNetCore.'))" />
- <_BlazorRuntimeCopyLocalItems IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.Extensions.'))" />
-
- <_BlazorAssemblyToLink Include="@(_WebAssemblyBCLAssembly)" />
- <_BlazorAssemblyToLink Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' == 'true'" />
-
- <_BlazorLinkerRoot Include="@(IntermediateAssembly)" />
- <_BlazorLinkerRoot Include="@(_BlazorUserRuntimeAssembly)" />
- <_BlazorLinkerRoot Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' != 'true'" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_BlazorLinkerAdditionalOptions>-l $(MonoLinkerI18NAssemblies) $(AdditionalMonoLinkerOptions)
-
-
-
- <_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.dll" />
- <_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" />
-
-
-
-
-
-
- <_DotNetHostDirectory>$(NetCoreRoot)
- <_DotNetHostFileName>dotnet
- <_DotNetHostFileName Condition=" '$(OS)' == 'Windows_NT' ">dotnet.exe
-
-
-
-
-
- <_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.dll" />
- <_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" Condition="'$(BlazorEnableDebugging)' == 'true'" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_BlazorRuntimeFile Include="@(BlazorOutputWithTargetPath->WithMetadataValue('BlazorRuntimeFile', 'true'))" />
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Build/src/targets/Publish.targets b/src/Components/Blazor/Build/src/targets/Publish.targets
deleted file mode 100644
index 7cb7e0ad23..0000000000
--- a/src/Components/Blazor/Build/src/targets/Publish.targets
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
- true
- $(AssemblyName)\dist\
-
-
- false
- false
- false
- false
- false
- true
-
-
-
-
-
-
-
-
-
- $(BlazorPublishDistDir)$([System.String]::new(%(TargetPath)).Substring(8))
-
-
-
- <_BlazorGCTPDI Include="%(BlazorOutputWithTargetPath.Identity)">
- $(AssemblyName)\%(TargetOutputPath)
-
-
-
- %(TargetPath)
- PreserveNewest
-
-
-
-
-
- <_BlazorConfigPath>$(OutDir)$(AssemblyName).blazor.config
-
-
-
- <_BlazorPublishConfigContent Include="." />
- <_BlazorPublishConfigContent Include="$(AssemblyName)/" />
-
-
-
-
-
-
-
-
-
- <_StandaloneWebConfigContent Include="$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)Standalone.Web.config'))"/>
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets b/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets
deleted file mode 100644
index d547f500b1..0000000000
--- a/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
- $(ResolveStaticWebAssetsInputsDependsOn);
- _RemoveBlazorCurrentProjectAssetsFromStaticWebAssets;
-
-
-
- $(GetCurrentProjectStaticWebAssetsDependsOn);
- _RemoveBlazorCurrentProjectAssetsFromStaticWebAssets;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_StandaloneExternalPublishStaticWebAsset Include="@(_ExternalPublishStaticWebAsset)" Condition="'%(RelativePath)' != ''">
- $([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$([MSBuild]::NormalizePath('$([System.Text.RegularExpressions.Regex]::Replace('%(RelativePath)','^wwwroot\\?\/?(.*)','$(BlazorPublishDistDir)$1'))'))'))
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs
deleted file mode 100644
index 1fafb9e81d..0000000000
--- a/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs
+++ /dev/null
@@ -1,534 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Test.Helpers;
-using Xunit;
-using Xunit.Abstractions;
-
-namespace Microsoft.AspNetCore.Blazor.Build.Test
-{
- public class BindRazorIntegrationTest : RazorIntegrationTestBase
- {
- public BindRazorIntegrationTest(ITestOutputHelper output)
- : base(output)
- {
- }
-
- internal override bool UseTwoPhaseCompilation => true;
-
- [Fact]
- public void Render_BindToComponent_SpecifiesValue_WithMatchingProperties()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public int Value { get; set; }
-
- [Parameter]
- public Action ValueChanged { get; set; }
- }
-}"));
-
- var component = CompileToComponent(@"
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 3, 0),
- frame => AssertFrame.Attribute(frame, "Value", 42, 1),
- frame => AssertFrame.Attribute(frame, "ValueChanged", typeof(Action), 2));
- }
-
- [Fact]
- public void Render_BindToComponent_SpecifiesValue_WithoutMatchingProperties()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase, IComponent
- {
- Task IComponent.SetParametersAsync(ParameterView parameters)
- {
- return Task.CompletedTask;
- }
- }
-}"));
-
- var component = CompileToComponent(@"
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 3, 0),
- frame => AssertFrame.Attribute(frame, "Value", 42, 1),
- frame => AssertFrame.Attribute(frame, "ValueChanged", typeof(EventCallback), 2));
- }
-
- [Fact]
- public void Render_BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public int Value { get; set; }
-
- [Parameter]
- public Action OnChanged { get; set; }
- }
-}"));
-
- var component = CompileToComponent(@"
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 3, 0),
- frame => AssertFrame.Attribute(frame, "Value", 42, 1),
- frame => AssertFrame.Attribute(frame, "OnChanged", typeof(Action), 2));
- }
-
- [Fact]
- public void Render_BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase, IComponent
- {
- Task IComponent.SetParametersAsync(ParameterView parameters)
- {
- return Task.CompletedTask;
- }
- }
-}"));
-
- var component = CompileToComponent(@"
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 3, 0),
- frame => AssertFrame.Attribute(frame, "Value", 42, 1),
- frame => AssertFrame.Attribute(frame, "OnChanged", typeof(EventCallback), 2));
- }
-
- [Fact]
- public void Render_BindToElement_WritesAttributes()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- [BindElement(""div"", null, ""myvalue"", ""myevent"")]
- public static class BindAttributes
- {
- }
-}"));
-
- var component = CompileToComponent(@"
-
-@code {
- public string ParentValue { get; set; } = ""hi"";
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "div", 3, 0),
- frame => AssertFrame.Attribute(frame, "myvalue", "hi", 1),
- frame => AssertFrame.Attribute(frame, "myevent", typeof(EventCallback), 2));
- }
-
- [Fact]
- public void Render_BindToElementWithSuffix_WritesAttributes()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- [BindElement(""div"", ""value"", ""myvalue"", ""myevent"")]
- public static class BindAttributes
- {
- }
-}"));
-
- var component = CompileToComponent(@"
-
-@code {
- public string ParentValue { get; set; } = ""hi"";
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "div", 3, 0),
- frame => AssertFrame.Attribute(frame, "myvalue", "hi", 1),
- frame => AssertFrame.Attribute(frame, "myevent", typeof(EventCallback), 2));
- }
-
- [Fact]
- public void Render_BindDuplicates_ReportsDiagnostic()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- [BindElement(""div"", ""value"", ""myvalue2"", ""myevent2"")]
- [BindElement(""div"", ""value"", ""myvalue"", ""myevent"")]
- public static class BindAttributes
- {
- }
-}"));
-
- // Act
- var result = CompileToCSharp(@"
-
-@code {
- public string ParentValue { get; set; } = ""hi"";
-}");
-
- // Assert
- var diagnostic = Assert.Single(result.Diagnostics);
- Assert.Equal("RZ9989", diagnostic.Id);
- Assert.Equal(
- "The attribute '@bind-value' was matched by multiple bind attributes. Duplicates:" + Environment.NewLine +
- "Test.BindAttributes" + Environment.NewLine +
- "Test.BindAttributes",
- diagnostic.GetMessage());
- }
-
- [Fact]
- public void Render_BuiltIn_BindToInputWithoutType_WritesAttributes()
- {
- // Arrange
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 3, 0),
- frame => AssertFrame.Attribute(frame, "value", "42", 1),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 2));
- }
-
- [Fact]
- public void Render_BuiltIn_BindToInputText_WithFormat_WritesAttributes()
- {
- // Arrange
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 4, 0),
- frame => AssertFrame.Attribute(frame, "type", "text", 1),
- frame => AssertFrame.Attribute(frame, "value", new DateTime(2018, 1, 1).ToString("MM/dd/yyyy"), 2),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 3));
- }
-
- [Fact]
- public void Render_BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes()
- {
- // Arrange
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
-
- public string Format { get; set; } = ""MM/dd/yyyy"";
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 4, 0),
- frame => AssertFrame.Attribute(frame, "type", "text", 1),
- frame => AssertFrame.Attribute(frame, "value", new DateTime(2018, 1, 1).ToString("MM/dd/yyyy"), 2),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 3));
- }
-
- [Fact]
- public void Render_BuiltIn_BindToInputText_WritesAttributes()
- {
- // Arrange
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 4, 0),
- frame => AssertFrame.Attribute(frame, "type", "text", 1),
- frame => AssertFrame.Attribute(frame, "value", "42", 2),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 3));
- }
-
- [Fact]
- public void Render_BuiltIn_BindToInputCheckbox_WritesAttributes()
- {
- // Arrange
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public bool Enabled { get; set; }
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 3, 0),
- frame => AssertFrame.Attribute(frame, "type", "checkbox", 1),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 3));
- }
-
- [Fact]
- public void Render_BindToElementFallback_WritesAttributes()
- {
- // Arrange
- var component = CompileToComponent(@"
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 4, 0),
- frame => AssertFrame.Attribute(frame, "type", "text", 1),
- frame => AssertFrame.Attribute(frame, "value", "42", 2),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 3));
- }
-
- [Fact]
- public void Render_BindToElementFallback_WithFormat_WritesAttributes()
- {
- // Arrange
- var component = CompileToComponent(@"
-
-@code {
- public DateTime CurrentDate { get; set; } = new DateTime(2018, 1, 1);
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 4, 0),
- frame => AssertFrame.Attribute(frame, "type", "text", 1),
- frame => AssertFrame.Attribute(frame, "value", new DateTime(2018, 1, 1).ToString("MM/dd"), 2),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 3));
- }
-
- [Fact] // Additional coverage of OrphanTagHelperLoweringPass
- public void Render_BindToElementFallback_SpecifiesValueAndChangeEvent_WithCSharpAttribute()
- {
- // Arrange
- var component = CompileToComponent(@"
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 5, 0),
- frame => AssertFrame.Attribute(frame, "type", "text", 1),
- frame => AssertFrame.Attribute(frame, "visible", 2),
- frame => AssertFrame.Attribute(frame, "value", "42", 3),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 4));
- }
-
- [Fact] // See https://github.com/aspnet/Blazor/issues/703
- public void Workaround_703()
- {
- // Arrange
- var component = CompileToComponent(@"
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- //
- // The workaround for 703 is that the value attribute MUST be after the type
- // attribute.
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "input", 5, 0),
- frame => AssertFrame.Attribute(frame, "type", "text", 1),
- frame => AssertFrame.Attribute(frame, "visible", 2),
- frame => AssertFrame.Attribute(frame, "value", "42", 3),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 4));
- }
-
- [Fact] // Additional coverage of OrphanTagHelperLoweringPass
- public void Render_BindToElementFallback_SpecifiesValueAndChangeEvent_BodyContent()
- {
- // Arrange
- var component = CompileToComponent(@"
-
- @(42.ToString())
-
-@code {
- public int ParentValue { get; set; } = 42;
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "div", 7, 0),
- frame => AssertFrame.Attribute(frame, "value", "42", 1),
- frame => AssertFrame.Attribute(frame, "onchange", typeof(EventCallback), 2),
- frame => AssertFrame.MarkupWhitespace(frame, 3),
- frame => AssertFrame.Element(frame, "span", 2, 4),
- frame => AssertFrame.Text(frame, "42", 5),
- frame => AssertFrame.MarkupWhitespace(frame, 6));
- }
-
- [Fact]
- public void Render_BindFallback_InvalidSyntax_TooManyParts()
- {
- // Arrange & Act
- var generated = CompileToCSharp(@"
-
-@code {
- public string Text { get; set; } = ""text"";
-}");
-
- // Assert
- var diagnostic = Assert.Single(generated.Diagnostics);
- Assert.Equal("RZ9991", diagnostic.Id);
- }
-
- [Fact]
- public void Render_BindFallback_InvalidSyntax_TrailingDash()
- {
- // Arrange & Act
- var generated = CompileToCSharp(@"
-
-@code {
- public string Text { get; set; } = ""text"";
-}");
-
- // Assert
- var diagnostic = Assert.Single(generated.Diagnostics);
- Assert.Equal("RZ9991", diagnostic.Id);
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/BootJsonWriterTest.cs b/src/Components/Blazor/Build/test/BootJsonWriterTest.cs
deleted file mode 100644
index 1e2d89b573..0000000000
--- a/src/Components/Blazor/Build/test/BootJsonWriterTest.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.IO;
-using System.Text.Json;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- public class BootJsonWriterTest
- {
- [Fact]
- public async Task ProducesJsonReferencingAssemblyAndDependencies()
- {
- // Arrange/Act
- var assemblyReferences = new string[] { "MyApp.EntryPoint.dll", "System.Abc.dll", "MyApp.ClassLib.dll", };
- using var stream = new MemoryStream();
-
- // Act
- GenerateBlazorBootJson.WriteBootJson(
- stream,
- "MyApp.Entrypoint.dll",
- assemblyReferences,
- linkerEnabled: true);
-
- // Assert
- stream.Position = 0;
- using var parsedContent = await JsonDocument.ParseAsync(stream);
- var rootElement = parsedContent.RootElement;
- Assert.Equal("MyApp.Entrypoint.dll", rootElement.GetProperty("entryAssembly").GetString());
- var assembliesElement = rootElement.GetProperty("assemblies");
- Assert.Equal(assemblyReferences.Length, assembliesElement.GetArrayLength());
- for (var i = 0; i < assemblyReferences.Length; i++)
- {
- Assert.Equal(assemblyReferences[i], assembliesElement[i].GetString());
- }
- Assert.True(rootElement.GetProperty("linkerEnabled").GetBoolean());
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs
deleted file mode 100644
index 73d8645029..0000000000
--- a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Threading.Tasks;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- public class BuildIncrementalismTest
- {
- [Fact]
- public async Task Build_WithLinker_IsIncremental()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone");
- var result = await MSBuildProcessManager.DotnetMSBuild(project);
-
- Assert.BuildPassed(result);
-
- var buildOutputDirectory = project.BuildOutputDirectory;
-
- // Act
- var thumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory);
-
- // Assert
- for (var i = 0; i < 3; i++)
- {
- result = await MSBuildProcessManager.DotnetMSBuild(project);
- Assert.BuildPassed(result);
-
- var newThumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory);
- Assert.Equal(thumbPrint.Count, newThumbPrint.Count);
- for (var j = 0; j < thumbPrint.Count; j++)
- {
- Assert.Equal(thumbPrint[j], newThumbPrint[j]);
- }
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs
deleted file mode 100644
index f3148b1a0b..0000000000
--- a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.IO;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- public class BuildIntegrationTest
- {
- [Fact]
- public async Task Build_WithDefaultSettings_Works()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone");
- var result = await MSBuildProcessManager.DotnetMSBuild(project);
-
- Assert.BuildPassed(result);
-
- var buildOutputDirectory = project.BuildOutputDirectory;
-
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.js");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
- }
-
- [Fact]
- public async Task Build_Hosted_Works()
- {
- // Arrange
- using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
- project.TargetFramework = "netcoreapp3.1";
- var result = await MSBuildProcessManager.DotnetMSBuild(project);
-
- Assert.BuildPassed(result);
-
- var buildOutputDirectory = project.BuildOutputDirectory;
- var blazorConfig = Path.Combine(buildOutputDirectory, "standalone.blazor.config");
- Assert.FileExists(result, blazorConfig);
-
- var path = Path.GetFullPath(Path.Combine(project.SolutionPath, "standalone", "bin", project.Configuration, "netstandard2.1", "standalone.dll"));
- Assert.FileContains(result, blazorConfig, path);
- Assert.FileDoesNotExist(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
- }
-
- [Fact]
- public async Task Build_WithLinkOnBuildDisabled_Works()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone");
- project.AddProjectFileContent(
-@"
- false
- ");
-
- var result = await MSBuildProcessManager.DotnetMSBuild(project);
-
- Assert.BuildPassed(result);
-
- var buildOutputDirectory = project.BuildOutputDirectory;
-
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.js");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
- }
-
- [Fact]
- public async Task Build_SatelliteAssembliesAreCopiedToBuildOutput()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" });
- project.AddProjectFileContent(
-@"
-
- $(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies
-
-
-
- ");
-
- var result = await MSBuildProcessManager.DotnetMSBuild(project, args: "/restore");
-
- Assert.BuildPassed(result);
-
- var buildOutputDirectory = project.BuildOutputDirectory;
-
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "classlibrarywithsatelliteassemblies.dll");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output.
-
- var bootJsonPath = Path.Combine(buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\"");
- Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\"");
- }
-
- [Fact]
- public async Task Build_WithBlazorLinkOnBuildFalse_SatelliteAssembliesAreCopiedToBuildOutput()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" });
- project.AddProjectFileContent(
-@"
-
- false
- $(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies
-
-
-
- ");
-
- var result = await MSBuildProcessManager.DotnetMSBuild(project, args: "/restore");
-
- Assert.BuildPassed(result);
-
- var buildOutputDirectory = project.BuildOutputDirectory;
-
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "classlibrarywithsatelliteassemblies.dll");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll");
- Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output.
-
- var bootJsonPath = Path.Combine(buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\"");
- Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\"");
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs
deleted file mode 100644
index 3556f119f4..0000000000
--- a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.IO;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Blazor.Build
-{
- public class PublishIntegrationTest
- {
- [Fact]
- public async Task Publish_WithDefaultSettings_Works()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone", additionalProjects: new [] { "razorclasslibrary" });
- var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
-
- Assert.BuildPassed(result);
-
- var publishDirectory = project.PublishOutputDirectory;
- var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
-
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
-
- // Verify referenced static web assets
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
-
- // Verify static assets are in the publish directory
- Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
-
- // Verify web.config
- Assert.FileExists(result, publishDirectory, "web.config");
- }
-
- [Fact]
- public async Task Publish_WithNoBuild_Works()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary" });
- var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build");
-
- Assert.BuildPassed(result);
-
- result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", "/p:NoBuild=true");
-
- Assert.BuildPassed(result);
-
- var publishDirectory = project.PublishOutputDirectory;
- var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
-
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
-
- // Verify static assets are in the publish directory
- Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
-
- // Verify static web assets from referenced projects are copied.
- // Uncomment once https://github.com/aspnet/AspNetCore/issues/17426 is resolved.
- // Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
- // Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
-
- // Verify static assets are in the publish directory
- Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
-
- // Verify web.config
- Assert.FileExists(result, publishDirectory, "web.config");
- }
-
- [Fact]
- public async Task Publish_WithLinkOnBuildDisabled_Works()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone", additionalProjects: new [] { "razorclasslibrary" });
- project.AddProjectFileContent(
-@"
- false
- ");
-
- var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
-
- Assert.BuildPassed(result);
-
- var publishDirectory = project.PublishOutputDirectory;
- var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
-
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
-
- // Verify static assets are in the publish directory
- Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
-
- // Verify referenced static web assets
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
-
- // Verify web.config
- Assert.FileExists(result, publishDirectory, "web.config");
- }
-
- [Fact]
- public async Task Publish_SatelliteAssemblies_AreCopiedToBuildOutput()
- {
- // Arrange
- using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" });
- project.AddProjectFileContent(
-@"
-
- $(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies
-
-
-
- ");
-
- var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", args: "/restore");
-
- Assert.BuildPassed(result);
-
- var publishDirectory = project.PublishOutputDirectory;
- var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
-
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output.
-
- var bootJsonPath = Path.Combine(blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\"");
- Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\"");
- }
-
- [Fact]
- public async Task Publish_HostedApp_Works()
- {
- // Arrange
- using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
- project.TargetFramework = "netcoreapp3.1";
- var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
-
- Assert.BuildPassed(result);
-
- var publishDirectory = project.PublishOutputDirectory;
- // Make sure the main project exists
- Assert.FileExists(result, publishDirectory, "blazorhosted.dll");
-
- var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
-
- // Verify static assets are in the publish directory
- Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
-
- // Verify static web assets from referenced projects are copied.
- Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
- Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "styles.css");
-
- // Verify static assets are in the publish directory
- Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
-
- // Verify web.config
- Assert.FileExists(result, publishDirectory, "web.config");
-
- var blazorConfig = Path.Combine(result.Project.DirectoryPath, publishDirectory, "standalone.blazor.config");
- var blazorConfigLines = File.ReadAllLines(blazorConfig);
- Assert.Equal(".", blazorConfigLines[0]);
- Assert.Equal("standalone/", blazorConfigLines[1]);
- }
-
- [Fact]
- public async Task Publish_HostedApp_WithNoBuild_Works()
- {
- // Arrange
- using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
- project.TargetFramework = "netcoreapp3.1";
- var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build");
-
- Assert.BuildPassed(result);
-
- result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", "/p:NoBuild=true");
-
- var publishDirectory = project.PublishOutputDirectory;
- // Make sure the main project exists
- Assert.FileExists(result, publishDirectory, "blazorhosted.dll");
-
- var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
- Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
-
- // Verify static assets are in the publish directory
- Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
-
- // Verify static web assets from referenced projects are copied.
- // Uncomment once https://github.com/aspnet/AspNetCore/issues/17426 is resolved.
- // Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
- // Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "styles.css");
-
- // Verify static assets are in the publish directory
- Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
-
- // Verify web.config
- Assert.FileExists(result, publishDirectory, "web.config");
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/ChildContentRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/ChildContentRazorIntegrationTest.cs
deleted file mode 100644
index 720c00fe9b..0000000000
--- a/src/Components/Blazor/Build/test/ChildContentRazorIntegrationTest.cs
+++ /dev/null
@@ -1,407 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Test.Helpers;
-using Microsoft.CodeAnalysis.CSharp;
-using Xunit;
-using Xunit.Abstractions;
-
-namespace Microsoft.AspNetCore.Blazor.Build.Test
-{
- public class ChildContentRazorIntegrationTest : RazorIntegrationTestBase
- {
- private readonly CSharpSyntaxTree RenderChildContentComponent = Parse(@"
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Rendering;
-namespace Test
-{
- public class RenderChildContent : ComponentBase
- {
- protected override void BuildRenderTree(RenderTreeBuilder builder)
- {
- builder.AddContent(0, ChildContent);
- }
-
- [Parameter]
- public RenderFragment ChildContent { get; set; }
- }
-}
-");
-
- private readonly CSharpSyntaxTree RenderChildContentStringComponent = Parse(@"
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Rendering;
-namespace Test
-{
- public class RenderChildContentString : ComponentBase
- {
- protected override void BuildRenderTree(RenderTreeBuilder builder)
- {
- builder.AddContent(0, ChildContent, Value);
- }
-
- [Parameter]
- public RenderFragment ChildContent { get; set; }
-
- [Parameter]
- public string Value { get; set; }
- }
-}
-");
-
- private readonly CSharpSyntaxTree RenderMultipleChildContent = Parse(@"
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Rendering;
-namespace Test
-{
- public class RenderMultipleChildContent : ComponentBase
- {
- protected override void BuildRenderTree(RenderTreeBuilder builder)
- {
- builder.AddContent(0, Header, Name);
- builder.AddContent(1, ChildContent, Value);
- builder.AddContent(2, Footer);
- }
-
- [Parameter]
- public string Name { get; set; }
-
- [Parameter]
- public RenderFragment Header { get; set; }
-
- [Parameter]
- public RenderFragment ChildContent { get; set; }
-
- [Parameter]
- public RenderFragment Footer { get; set; }
-
- [Parameter]
- public string Value { get; set; }
- }
-}
-");
-
- public ChildContentRazorIntegrationTest(ITestOutputHelper output)
- : base(output)
- {
- }
-
- internal override bool UseTwoPhaseCompilation => true;
-
- [Fact]
- public void Render_BodyChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentComponent);
-
- var component = CompileToComponent(@"
-
-
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 0),
- frame => AssertFrame.Attribute(frame, "ChildContent", 1),
- frame => AssertFrame.Markup(frame, "\n
\n", 2));
- }
-
- [Fact]
- public void Render_BodyChildContent_Generic()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentStringComponent);
-
- var component = CompileToComponent(@"
-
- @context.ToLowerInvariant()
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContentString", 3, 0),
- frame => AssertFrame.Attribute(frame, "Value", "HI", 1),
- frame => AssertFrame.Attribute(frame, "ChildContent", 2),
- frame => AssertFrame.MarkupWhitespace(frame, 3),
- frame => AssertFrame.Element(frame, "div", 2, 4),
- frame => AssertFrame.Text(frame, "hi", 5),
- frame => AssertFrame.MarkupWhitespace(frame, 6));
- }
-
- [Fact]
- public void Render_ExplicitChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentComponent);
-
- var component = CompileToComponent(@"
-
-
-
-
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 0),
- frame => AssertFrame.Attribute(frame, "ChildContent", 1),
- frame => AssertFrame.Markup(frame, "\n
\n ", 2));
- }
-
- [Fact]
- public void Render_BodyChildContent_Recursive()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentComponent);
-
- var component = CompileToComponent(@"
-
-
-
-
-
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 0),
- frame => AssertFrame.Attribute(frame, "ChildContent", 1),
- frame => AssertFrame.MarkupWhitespace(frame, 2),
- frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 3),
- frame => AssertFrame.Attribute(frame, "ChildContent", 4),
- frame => AssertFrame.MarkupWhitespace(frame, 6),
- frame => AssertFrame.Markup(frame, "\n
\n ", 5));
- }
-
- [Fact]
- public void Render_AttributeChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentComponent);
-
- var component = CompileToComponent(@"
-@{ RenderFragment template = (context) => @@context.ToLowerInvariant()
; }
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 2),
- frame => AssertFrame.Attribute(frame, "ChildContent", 3),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hi", 1));
- }
-
- [Fact]
- public void Render_AttributeChildContent_RenderFragmentOfString()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentStringComponent);
-
- var component = CompileToComponent(@"
-@{ RenderFragment template = (context) => @@context.ToLowerInvariant()
; }
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContentString", 3, 2),
- frame => AssertFrame.Attribute(frame, "ChildContent", 3),
- frame => AssertFrame.Attribute(frame, "Value", "HI", 4),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hi", 1));
- }
-
- [Fact]
- public void Render_AttributeChildContent_NoArgTemplate()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentComponent);
-
- var component = CompileToComponent(@"
-@{ RenderFragment template = @@(""HI"".ToLowerInvariant())
; }
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 2),
- frame => AssertFrame.Attribute(frame, "ChildContent", 3),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hi", 1));
- }
-
- [Fact]
- public void Render_AttributeChildContent_IgnoresEmptyBody()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentComponent);
-
- var component = CompileToComponent(@"
-@{ RenderFragment template = (context) => @@context.ToLowerInvariant()
; }
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 2),
- frame => AssertFrame.Attribute(frame, "ChildContent", 3),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hi", 1));
- }
-
- [Fact]
- public void Render_AttributeChildContent_IgnoresWhitespaceBody()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderChildContentComponent);
-
- var component = CompileToComponent(@"
-@{ RenderFragment template = (context) => @@context.ToLowerInvariant()
; }
-
-
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 2),
- frame => AssertFrame.Attribute(frame, "ChildContent", 3),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hi", 1));
- }
-
- [Fact]
- public void Render_MultipleChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderMultipleChildContent);
-
- var component = CompileToComponent(@"
-@{ RenderFragment header = context => @@context.ToLowerInvariant()
; }
-
- Some @context.ToLowerInvariant() Content
-
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderMultipleChildContent", 6, 2),
- frame => AssertFrame.Attribute(frame, "Name", "billg", 3),
- frame => AssertFrame.Attribute(frame, "Header", typeof(RenderFragment), 4),
- frame => AssertFrame.Attribute(frame, "Value", "HI", 5),
- frame => AssertFrame.Attribute(frame, "ChildContent", typeof(RenderFragment), 6),
- frame => AssertFrame.Attribute(frame, "Footer", typeof(RenderFragment), 10),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "billg", 1),
- frame => AssertFrame.Text(frame, "Some ", 7),
- frame => AssertFrame.Text(frame, "hi", 8),
- frame => AssertFrame.Text(frame, " Content", 9),
- frame => AssertFrame.Text(frame, "Bye!", 11));
- }
-
- [Fact]
- public void Render_MultipleChildContent_ContextParameterOnComponent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderMultipleChildContent);
-
- var component = CompileToComponent(@"
-
-
- Some @Context.ToLowerInvariant() Content
-
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderMultipleChildContent", 6, 0),
- frame => AssertFrame.Attribute(frame, "Name", "billg", 1),
- frame => AssertFrame.Attribute(frame, "Value", "HI", 2),
- frame => AssertFrame.Attribute(frame, "Header", typeof(RenderFragment), 3),
- frame => AssertFrame.Attribute(frame, "ChildContent", typeof(RenderFragment), 6),
- frame => AssertFrame.Attribute(frame, "Footer", typeof(RenderFragment), 10),
- frame => AssertFrame.Element(frame, "div", 2, 4),
- frame => AssertFrame.Text(frame, "billg", 5),
- frame => AssertFrame.Text(frame, "Some ", 7),
- frame => AssertFrame.Text(frame, "hi", 8),
- frame => AssertFrame.Text(frame, " Content", 9),
- frame => AssertFrame.Text(frame, "Bye!", 11));
- }
-
- // Verifies that our check for reuse of parameter names isn't too aggressive.
- [Fact]
- public void Render_MultipleChildContent_ContextParameterOnComponent_SetsSameName()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(RenderMultipleChildContent);
-
- var component = CompileToComponent(@"
-
-
-
- Some @item.ToLowerInvariant() Content
-
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.RenderMultipleChildContent", 6, 0),
- frame => AssertFrame.Attribute(frame, "Name", "billg", 1),
- frame => AssertFrame.Attribute(frame, "Value", "HI", 2),
- frame => AssertFrame.Attribute(frame, "Header", typeof(RenderFragment), 3),
- frame => AssertFrame.Attribute(frame, "ChildContent", typeof(RenderFragment), 6),
- frame => AssertFrame.Attribute(frame, "Footer", typeof(RenderFragment), 10),
- frame => AssertFrame.Element(frame, "div", 2, 4),
- frame => AssertFrame.Text(frame, "billg", 5),
- frame => AssertFrame.Text(frame, "Some ", 7),
- frame => AssertFrame.Text(frame, "hi", 8),
- frame => AssertFrame.Text(frame, " Content", 9),
- frame => AssertFrame.Text(frame, "Bye!", 11));
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs
deleted file mode 100644
index d15cf4f584..0000000000
--- a/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs
+++ /dev/null
@@ -1,616 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Linq;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.RenderTree;
-using Microsoft.AspNetCore.Components.Test.Helpers;
-using Microsoft.AspNetCore.Components.Web;
-using Xunit;
-using Xunit.Abstractions;
-
-namespace Microsoft.AspNetCore.Blazor.Build.Test
-{
- public class ComponentRenderingRazorIntegrationTest : RazorIntegrationTestBase
- {
- public ComponentRenderingRazorIntegrationTest(ITestOutputHelper output)
- : base(output)
- {
- }
-
- internal override bool UseTwoPhaseCompilation => true;
-
- [Fact]
- public void Render_ChildComponent_Simple()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- }
-}
-"));
-
- var component = CompileToComponent(@"
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 1, 0));
- }
-
- [Fact]
- public void Render_ChildComponent_WithParameters()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class SomeType
- {
- }
-
- public class MyComponent : ComponentBase
- {
- [Parameter] public int IntProperty { get; set; }
- [Parameter] public bool BoolProperty { get; set; }
- [Parameter] public string StringProperty { get; set; }
- [Parameter] public SomeType ObjectProperty { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent(@"
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 5, 0),
- frame => AssertFrame.Attribute(frame, "IntProperty", 123, 1),
- frame => AssertFrame.Attribute(frame, "BoolProperty", true, 2),
- frame => AssertFrame.Attribute(frame, "StringProperty", "My string", 3),
- frame =>
- {
- AssertFrame.Attribute(frame, "ObjectProperty", 4);
- Assert.Equal("Test.SomeType", frame.AttributeValue.GetType().FullName);
- });
- }
-
- [Fact]
- public void Render_ChildComponent_TriesToSetNonParamter()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- public int IntProperty { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent(@"
- ");
-
- // Act
- var ex = Assert.Throws(() => GetRenderTree(component));
-
- // Assert
- Assert.Equal(
- "Object of type 'Test.MyComponent' has a property matching the name 'IntProperty', " +
- "but it does not have [ParameterAttribute] or [CascadingParameterAttribute] applied.",
- ex.Message);
- }
-
- [Fact]
- public void Render_ChildComponent_WithExplicitStringParameter()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public string StringProperty { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent(@"
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 2, 0),
- frame => AssertFrame.Attribute(frame, "StringProperty", "42", 1));
- }
-
- [Fact]
- public void Render_ChildComponent_WithNonPropertyAttributes()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase, IComponent
- {
- Task IComponent.SetParametersAsync(ParameterView parameters)
- {
- return Task.CompletedTask;
- }
- }
-}
-"));
-
- var component = CompileToComponent(@"
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 3, 0),
- frame => AssertFrame.Attribute(frame, "some-attribute", "foo", 1),
- frame => AssertFrame.Attribute(frame, "another-attribute", "42", 2));
- }
-
-
- [Theory]
- [InlineData("e => Increment(e)")]
- [InlineData("(e) => Increment(e)")]
- [InlineData("@(e => Increment(e))")]
- [InlineData("@(e => { Increment(e); })")]
- [InlineData("Increment")]
- [InlineData("@Increment")]
- [InlineData("@(Increment)")]
- public void Render_ChildComponent_WithEventHandler(string expression)
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Web;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public Action OnClick { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent($@"
-@using Microsoft.AspNetCore.Components.Web
-
-
-@code {{
- private int counter;
- private void Increment(MouseEventArgs e) {{
- counter++;
- }}
-}}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 2, 0),
- frame =>
- {
- AssertFrame.Attribute(frame, "OnClick", 1);
-
- // The handler will have been assigned to a lambda
- var handler = Assert.IsType>(frame.AttributeValue);
- Assert.Equal("Test.TestComponent", handler.Target.GetType().FullName);
- });
- }
-
- [Fact]
- public void Render_ChildComponent_WithExplicitEventHandler()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using System;
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public Action OnClick { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent(@"
-
-
-@code {
- private int counter;
- private void Increment(EventArgs e) {
- counter++;
- }
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 2, 0),
- frame =>
- {
- AssertFrame.Attribute(frame, "OnClick", 1);
-
- // The handler will have been assigned to a lambda
- var handler = Assert.IsType>(frame.AttributeValue);
- Assert.Equal("Test.TestComponent", handler.Target.GetType().FullName);
- Assert.Equal("Increment", handler.Method.Name);
- });
- }
-
- [Fact]
- public void Render_ChildComponent_WithMinimizedBoolAttribute()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public bool BoolProperty { get; set; }
- }
-}"));
-
- var component = CompileToComponent(@"
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 2, 0),
- frame => AssertFrame.Attribute(frame, "BoolProperty", true, 1));
- }
-
- [Fact]
- public void Render_ChildComponent_WithChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public string MyAttr { get; set; }
-
- [Parameter]
- public RenderFragment ChildContent { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent(@"
-Some textNested text @(""Hello"") ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert: component frames are correct
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 3, 0),
- frame => AssertFrame.Attribute(frame, "MyAttr", "abc", 1),
- frame => AssertFrame.Attribute(frame, "ChildContent", 2));
-
- // Assert: Captured ChildContent frames are correct
- var childFrames = GetFrames((RenderFragment)frames[2].AttributeValue);
- Assert.Collection(
- childFrames.AsEnumerable(),
- frame => AssertFrame.Text(frame, "Some text", 3),
- frame => AssertFrame.Element(frame, "some-child", 4, 4),
- frame => AssertFrame.Attribute(frame, "a", "1", 5),
- frame => AssertFrame.Text(frame, "Nested text ", 6),
- frame => AssertFrame.Text(frame, "Hello", 7));
- }
-
- [Fact]
- public void Render_ChildComponent_Nested()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public RenderFragment ChildContent { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent(@"
-Some text ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert: outer component frames are correct
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 2, 0),
- frame => AssertFrame.Attribute(frame, "ChildContent", 1));
-
- // Assert: first level of ChildContent is correct
- // Note that we don't really need the sequence numbers to continue on from the
- // sequence numbers at the parent level. All that really matters is that they are
- // correct relative to each other (i.e., incrementing) within the nesting level.
- // As an implementation detail, it happens that they do follow on from the parent
- // level, but we could change that part of the implementation if we wanted.
- var innerFrames = GetFrames((RenderFragment)frames[1].AttributeValue).AsEnumerable().ToArray();
- Assert.Collection(
- innerFrames,
- frame => AssertFrame.Component(frame, "Test.MyComponent", 2, 2),
- frame => AssertFrame.Attribute(frame, "ChildContent", 3));
-
- // Assert: second level of ChildContent is correct
- Assert.Collection(
- GetFrames((RenderFragment)innerFrames[1].AttributeValue).AsEnumerable(),
- frame => AssertFrame.Text(frame, "Some text", 4));
- }
-
- [Fact] // https://github.com/aspnet/Blazor/issues/773
- public void Regression_773()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-
-namespace Test
-{
- public class SurveyPrompt : ComponentBase
- {
- [Parameter] public string Title { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent(@"
-@page ""/""
-
-Test!"" />
-");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.SurveyPrompt", 2, 0),
- frame => AssertFrame.Attribute(frame, "Title", "Test!
", 1));
- }
-
-
- [Fact]
- public void Regression_784()
- {
- // Arrange
-
- // Act
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public string ParentBgColor { get; set; } = ""#FFFFFF"";
-
- public void OnComponentHover(MouseEventArgs e)
- {
- }
-}
-");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "p", 3, 0),
- frame => AssertFrame.Attribute(frame, "onmouseover", 1),
- frame => AssertFrame.Attribute(frame, "style", "background: #FFFFFF;", 2));
- }
-
- [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/6185")]
- public void Render_Component_HtmlEncoded()
- {
- // Arrange
- var component = CompileToComponent(@"<span>Hi</span>");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Text(frame, "Hi "));
- }
-
- [Fact]
- public void Render_Component_HtmlBlockEncoded()
- {
- // Arrange
- var component = CompileToComponent(@"<span>Hi</span>
");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Markup(frame, "<span>Hi</span>
"));
- }
-
- // Integration test for HTML block rewriting
- [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/6183")]
- public void Render_HtmlBlock_Integration()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-namespace Test
-{
- public class MyComponent : ComponentBase
- {
- [Parameter]
- public RenderFragment ChildContent { get; set; }
- }
-}
-"));
-
- var component = CompileToComponent(@"
-
-
-
-
-
- @(""hi"")
-
-
- @(""hi"")
-
-
-
-");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert: component frames are correct
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "html", 9, 0),
- frame => AssertFrame.MarkupWhitespace(frame, 1),
- frame => AssertFrame.Markup(frame, " \n ", 2),
- frame => AssertFrame.Element(frame, "body", 5, 3),
- frame => AssertFrame.MarkupWhitespace(frame, 4),
- frame => AssertFrame.Component(frame, "Test.MyComponent", 2, 5),
- frame => AssertFrame.Attribute(frame, "ChildContent", 6),
- frame => AssertFrame.MarkupWhitespace(frame, 16),
- frame => AssertFrame.MarkupWhitespace(frame, 17));
-
- // Assert: Captured ChildContent frames are correct
- var childFrames = GetFrames((RenderFragment)frames[6].AttributeValue);
- Assert.Collection(
- childFrames.AsEnumerable(),
- frame => AssertFrame.MarkupWhitespace(frame, 7),
- frame => AssertFrame.Markup(frame, "
\n ", 8),
- frame => AssertFrame.Element(frame, "div", 2, 9),
- frame => AssertFrame.Text(frame, "hi", 10),
- frame => AssertFrame.MarkupWhitespace(frame, 11),
- frame => AssertFrame.Markup(frame, "
\n
\n ", 12),
- frame => AssertFrame.Element(frame, "div", 2, 13),
- frame => AssertFrame.Text(frame, "hi", 14),
- frame => AssertFrame.Markup(frame, "\n
\n ", 15));
- }
-
- [Fact]
- public void RazorTemplate_CanBeUsedFromComponent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(Parse(@"
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Rendering;
-
-namespace Test
-{
- public class Repeater : ComponentBase
- {
- [Parameter] public int Count { get; set; }
- [Parameter] public RenderFragment Template { get; set; }
- [Parameter] public string Value { get; set; }
-
- protected override void BuildRenderTree(RenderTreeBuilder builder)
- {
- for (var i = 0; i < Count; i++)
- {
- builder.AddContent(i, Template, Value);
- }
- }
- }
-}
-"));
-
- var component = CompileToComponent(@"
-@{ RenderFragment template = (context) => @@context.ToLower()
; }
-
-");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, "Test.Repeater", 4, 2),
- frame => AssertFrame.Attribute(frame, "Count", typeof(int), 3),
- frame => AssertFrame.Attribute(frame, "Value", typeof(string), 4),
- frame => AssertFrame.Attribute(frame, "Template", typeof(RenderFragment), 5),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1));
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/DirectiveRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/DirectiveRazorIntegrationTest.cs
deleted file mode 100644
index ef46dd1d19..0000000000
--- a/src/Components/Blazor/Build/test/DirectiveRazorIntegrationTest.cs
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Linq;
-using System.Reflection;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Test.Helpers;
-using Xunit;
-using Xunit.Abstractions;
-
-namespace Microsoft.AspNetCore.Blazor.Build.Test
-{
- // Integration tests for Blazor's directives
- public class DirectiveRazorIntegrationTest : RazorIntegrationTestBase
- {
- public DirectiveRazorIntegrationTest(ITestOutputHelper output)
- : base(output)
- {
- }
-
- [Fact]
- public void ComponentsDoNotHaveLayoutAttributeByDefault()
- {
- // Arrange/Act
- var component = CompileToComponent($"Hello");
-
- // Assert
- Assert.Null(component.GetType().GetCustomAttribute());
- }
-
- [Fact]
- public void SupportsLayoutDeclarations()
- {
- // Arrange/Act
- var testComponentTypeName = FullTypeName();
- var component = CompileToComponent(
- $"@layout {testComponentTypeName}\n" +
- $"Hello");
- var frames = GetRenderTree(component);
-
- // Assert
- var layoutAttribute = component.GetType().GetCustomAttribute();
- Assert.NotNull(layoutAttribute);
- Assert.Equal(typeof(TestLayout), layoutAttribute.LayoutType);
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, "Hello"));
- }
-
- [Fact]
- public void SupportsImplementsDeclarations()
- {
- // Arrange/Act
- var testInterfaceTypeName = FullTypeName();
- var component = CompileToComponent(
- $"@implements {testInterfaceTypeName}\n" +
- $"Hello");
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.IsAssignableFrom(component);
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, "Hello"));
- }
-
- [Fact]
- public void SupportsMultipleImplementsDeclarations()
- {
- // Arrange/Act
- var testInterfaceTypeName = FullTypeName();
- var testInterfaceTypeName2 = FullTypeName();
- var component = CompileToComponent(
- $"@implements {testInterfaceTypeName}\n" +
- $"@implements {testInterfaceTypeName2}\n" +
- $"Hello");
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.IsAssignableFrom(component);
- Assert.IsAssignableFrom(component);
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, "Hello"));
- }
-
- [Fact]
- public void SupportsInheritsDirective()
- {
- // Arrange/Act
- var testBaseClassTypeName = FullTypeName();
- var component = CompileToComponent(
- $"@inherits {testBaseClassTypeName}" + Environment.NewLine +
- $"Hello");
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.IsAssignableFrom(component);
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, "Hello"));
- }
-
- [Fact]
- public void SupportsInjectDirective()
- {
- // Arrange/Act 1: Compilation
- var componentType = CompileToComponent(
- $"@inject {FullTypeName()} MyService1\n" +
- $"@inject {FullTypeName()} MyService2\n" +
- $"Hello from @MyService1 and @MyService2").GetType();
-
- // Assert 1: Compiled type has correct properties
- var propertyFlags = BindingFlags.Instance | BindingFlags.NonPublic;
- var injectableProperties = componentType.GetProperties(propertyFlags)
- .Where(p => p.GetCustomAttribute() != null);
- Assert.Collection(injectableProperties.OrderBy(p => p.Name),
- property =>
- {
- Assert.Equal("MyService1", property.Name);
- Assert.Equal(typeof(IMyService1), property.PropertyType);
- Assert.False(property.GetMethod.IsPublic);
- Assert.False(property.SetMethod.IsPublic);
- },
- property =>
- {
- Assert.Equal("MyService2", property.Name);
- Assert.Equal(typeof(IMyService2), property.PropertyType);
- Assert.False(property.GetMethod.IsPublic);
- Assert.False(property.SetMethod.IsPublic);
- });
-
- // Arrange/Act 2: DI-supplied component has correct behavior
- var serviceProvider = new TestServiceProvider();
- serviceProvider.AddService(new MyService1Impl());
- serviceProvider.AddService(new MyService2Impl());
- var componentFactory = new ComponentFactory();
- var component = componentFactory.InstantiateComponent(serviceProvider, componentType);
- var frames = GetRenderTree(component);
-
- // Assert 2: Rendered component behaves correctly
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, "Hello from "),
- frame => AssertFrame.Text(frame, typeof(MyService1Impl).FullName),
- frame => AssertFrame.Text(frame, " and "),
- frame => AssertFrame.Text(frame, typeof(MyService2Impl).FullName));
- }
-
- public class TestLayout : IComponent
- {
- [Parameter]
- public RenderFragment Body { get; set; }
-
- public void Attach(RenderHandle renderHandle)
- {
- }
-
- public Task SetParametersAsync(ParameterView parameters)
- {
- return Task.CompletedTask;
- }
- }
-
- public interface ITestInterface { }
-
- public interface ITestInterface2 { }
-
- public class TestBaseClass : ComponentBase { }
-
- public interface IMyService1 { }
- public interface IMyService2 { }
- public class MyService1Impl : IMyService1 { }
- public class MyService2Impl : IMyService2 { }
- }
-}
diff --git a/src/Components/Blazor/Build/test/GenericComponentRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/GenericComponentRazorIntegrationTest.cs
deleted file mode 100644
index 7527e83535..0000000000
--- a/src/Components/Blazor/Build/test/GenericComponentRazorIntegrationTest.cs
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Test.Helpers;
-using Microsoft.CodeAnalysis.CSharp;
-using Xunit;
-using Xunit.Abstractions;
-
-namespace Microsoft.AspNetCore.Blazor.Build.Test
-{
- public class GenericComponentRazorIntegrationTest : RazorIntegrationTestBase
- {
- private readonly CSharpSyntaxTree GenericContextComponent = Parse(@"
-using System;
-using System.Collections.Generic;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Rendering;
-namespace Test
-{
- public class GenericContext : ComponentBase
- {
- protected override void BuildRenderTree(RenderTreeBuilder builder)
- {
- var items = (IReadOnlyList)Items ?? Array.Empty();
- for (var i = 0; i < items.Count; i++)
- {
- if (ChildContent == null)
- {
- builder.AddContent(i, Items[i]);
- }
- else
- {
- builder.AddContent(i, ChildContent, new Context() { Index = i, Item = items[i], });
- }
- }
- }
-
- [Parameter]
- public List Items { get; set; }
-
- [Parameter]
- public RenderFragment ChildContent { get; set; }
-
- public class Context
- {
- public int Index { get; set; }
- public TItem Item { get; set; }
- }
- }
-}
-");
-
- private readonly CSharpSyntaxTree MultipleGenericParameterComponent = Parse(@"
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Rendering;
-namespace Test
-{
- public class MultipleGenericParameter : ComponentBase
- {
- protected override void BuildRenderTree(RenderTreeBuilder builder)
- {
- builder.AddContent(0, Item1);
- builder.AddContent(1, Item2);
- builder.AddContent(2, Item3);
- }
-
- [Parameter]
- public TItem1 Item1 { get; set; }
-
- [Parameter]
- public TItem2 Item2 { get; set; }
-
- [Parameter]
- public TItem3 Item3 { get; set; }
- }
-}
-");
-
- public GenericComponentRazorIntegrationTest(ITestOutputHelper output)
- : base(output)
- {
- }
-
- internal override bool UseTwoPhaseCompilation => true;
-
- [Fact]
- public void Render_GenericComponent_WithoutChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(GenericContextComponent);
-
- var component = CompileToComponent(@"
-() { 1, 2, })"" />");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- var genericComponentType = component.GetType().Assembly.DefinedTypes
- .Where(t => t.Name == "GenericContext`1")
- .Single()
- .MakeGenericType(typeof(int));
-
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, genericComponentType.FullName, 2, 0),
- frame => AssertFrame.Attribute(frame, "Items", typeof(List), 1),
- frame => AssertFrame.Text(frame, "1", 0),
- frame => AssertFrame.Text(frame, "2", 1));
- }
-
- [Fact]
- public void Render_GenericComponent_WithRef()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(GenericContextComponent);
-
- var component = CompileToComponent(@"
-() { 1, 2, })"" @ref=""_my"" />
-
-@code {
- GenericContext _my;
- void Foo() { GC.KeepAlive(_my); }
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- var genericComponentType = component.GetType().Assembly.DefinedTypes
- .Where(t => t.Name == "GenericContext`1")
- .Single()
- .MakeGenericType(typeof(int));
-
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, genericComponentType.FullName, 3, 0),
- frame => AssertFrame.Attribute(frame, "Items", typeof(List), 1),
- frame => AssertFrame.ComponentReferenceCapture(frame, 2),
- frame => AssertFrame.Text(frame, "1", 0),
- frame => AssertFrame.Text(frame, "2", 1));
- }
-
- [Fact]
- public void Render_GenericComponent_WithChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(GenericContextComponent);
-
- var component = CompileToComponent(@"
-() { 1, 2, })"">
- @(context.Item * context.Index)
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- var genericComponentType = component.GetType().Assembly.DefinedTypes
- .Where(t => t.Name == "GenericContext`1")
- .Single()
- .MakeGenericType(typeof(int));
-
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, genericComponentType.FullName, 3, 0),
- frame => AssertFrame.Attribute(frame, "Items", typeof(List), 1),
- frame => AssertFrame.Attribute(frame, "ChildContent", 2),
- frame => AssertFrame.MarkupWhitespace(frame, 3),
- frame => AssertFrame.Element(frame, "div", 2, 4),
- frame => AssertFrame.Text(frame, "0", 5),
- frame => AssertFrame.MarkupWhitespace(frame, 6),
- frame => AssertFrame.MarkupWhitespace(frame, 3),
- frame => AssertFrame.Element(frame, "div", 2, 4),
- frame => AssertFrame.Text(frame, "2", 5),
- frame => AssertFrame.MarkupWhitespace(frame, 6));
- }
-
- [Fact]
- public void Render_GenericComponent_TypeInference_WithRef()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(GenericContextComponent);
-
- var component = CompileToComponent(@"
-() { 1, 2, })"" @ref=""_my"" />
-
-@code {
- GenericContext _my;
- void Foo() { GC.KeepAlive(_my); }
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- var genericComponentType = component.GetType().Assembly.DefinedTypes
- .Where(t => t.Name == "GenericContext`1")
- .Single()
- .MakeGenericType(typeof(int));
-
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, genericComponentType.FullName, 3, 0),
- frame => AssertFrame.Attribute(frame, "Items", typeof(List), 1),
- frame => AssertFrame.ComponentReferenceCapture(frame, 2),
- frame => AssertFrame.Text(frame, "1", 0),
- frame => AssertFrame.Text(frame, "2", 1));
- }
-
- [Fact]
- public void Render_GenericComponent_TypeInference_WithRef_Recursive()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(GenericContextComponent);
-
- var assembly = CompileToAssembly("Test.cshtml", @"
-@typeparam TItem
-
-
-@code {
- [Parameter] public List MyItems { get; set; }
- GenericContext _my;
- void Foo() { GC.KeepAlive(_my); }
-}");
-
- var componentType = assembly.Assembly.DefinedTypes
- .Where(t => t.Name == "Test`1")
- .Single()
- .MakeGenericType(typeof(int));
- var component = (IComponent)Activator.CreateInstance(componentType);
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- var genericComponentType = assembly.Assembly.DefinedTypes
- .Where(t => t.Name == "GenericContext`1")
- .Single()
- .MakeGenericType(typeof(int));
-
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, genericComponentType.FullName, 3, 0),
- frame => AssertFrame.Attribute(frame, "Items", 1),
- frame => AssertFrame.ComponentReferenceCapture(frame, 2));
- }
-
- [Fact]
- public void Render_GenericComponent_TypeInference_WithoutChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(GenericContextComponent);
-
- var component = CompileToComponent(@"
-() { 1, 2, })"" />");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- var genericComponentType = component.GetType().Assembly.DefinedTypes
- .Where(t => t.Name == "GenericContext`1")
- .Single()
- .MakeGenericType(typeof(int));
-
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, genericComponentType.FullName, 2, 0),
- frame => AssertFrame.Attribute(frame, "Items", typeof(List), 1),
- frame => AssertFrame.Text(frame, "1", 0),
- frame => AssertFrame.Text(frame, "2", 1));
- }
-
- [Fact]
- public void Render_GenericComponent_MultipleParameters_WithChildContent()
- {
- // Arrange
- AdditionalSyntaxTrees.Add(MultipleGenericParameterComponent);
-
- var component = CompileToComponent(@"
-");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- var genericComponentType = component.GetType().Assembly.DefinedTypes
- .Where(t => t.Name == "MultipleGenericParameter`3")
- .Single()
- .MakeGenericType(typeof(int), typeof(string), typeof(long));
-
- Assert.Collection(
- frames,
- frame => AssertFrame.Component(frame, genericComponentType.FullName, 4, 0),
- frame => AssertFrame.Attribute(frame, "Item1", 3, 1),
- frame => AssertFrame.Attribute(frame, "Item2", "FOO", 2),
- frame => AssertFrame.Attribute(frame, "Item3", 39L, 3),
- frame => AssertFrame.Text(frame, "3", 0),
- frame => AssertFrame.Text(frame, "FOO", 1),
- frame => AssertFrame.Text(frame, "39", 2));
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj
deleted file mode 100644
index eee74d8755..0000000000
--- a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
- $(DefaultNetCoreTargetFramework)
-
-
- $(DefaultItemExcludes);TestFiles\**\*
-
- false
-
-
-
-
-
-
-
-
- GENERATE_BASELINES;$(DefineConstants)
-
-
-
- TRACE
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_BclDirectory Include="$(MonoBaseClassLibraryPath)" />
- <_BclDirectory Include="$(MonoBaseClassLibraryFacadesPath)" />
- <_BclDirectory Include="$(MonoWasmFrameworkPath)" />
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Build/test/Razor/NotFoundProjectItem.cs b/src/Components/Blazor/Build/test/Razor/NotFoundProjectItem.cs
deleted file mode 100644
index ec5359db65..0000000000
--- a/src/Components/Blazor/Build/test/Razor/NotFoundProjectItem.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-
-namespace Microsoft.AspNetCore.Razor.Language
-{
- ///
- /// A that does not exist.
- ///
- internal class NotFoundProjectItem : RazorProjectItem
- {
- ///
- /// Initializes a new instance of .
- ///
- /// The base path.
- /// The path.
- public NotFoundProjectItem(string basePath, string path)
- {
- BasePath = basePath;
- FilePath = path;
- }
-
- ///
- public override string BasePath { get; }
-
- ///
- public override string FilePath { get; }
-
- ///
- public override bool Exists => false;
-
- ///
- public override string PhysicalPath => throw new NotSupportedException();
-
- ///
- public override Stream Read() => throw new NotSupportedException();
- }
-}
\ No newline at end of file
diff --git a/src/Components/Blazor/Build/test/Razor/TestFile.cs b/src/Components/Blazor/Build/test/Razor/TestFile.cs
deleted file mode 100644
index 70d5cacd70..0000000000
--- a/src/Components/Blazor/Build/test/Razor/TestFile.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-using System.Reflection;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Razor.Language
-{
- public class TestFile
- {
- private TestFile(string resourceName, Assembly assembly)
- {
- Assembly = assembly;
- ResourceName = Assembly.GetName().Name + "." + resourceName.Replace('/', '.').Replace('\\', '.');
- }
-
- public Assembly Assembly { get; }
-
- public string ResourceName { get; }
-
- public static TestFile Create(string resourceName, Type type)
- {
- return new TestFile(resourceName, type.GetTypeInfo().Assembly);
- }
-
- public static TestFile Create(string resourceName, Assembly assembly)
- {
- return new TestFile(resourceName, assembly);
- }
-
- public Stream OpenRead()
- {
- var stream = Assembly.GetManifestResourceStream(ResourceName);
- if (stream == null)
- {
- Assert.True(false, string.Format("Manifest resource: {0} not found", ResourceName));
- }
-
- return stream;
- }
-
- public bool Exists()
- {
- var resourceNames = Assembly.GetManifestResourceNames();
- foreach (var resourceName in resourceNames)
- {
- // Resource names are case-sensitive.
- if (string.Equals(ResourceName, resourceName, StringComparison.Ordinal))
- {
- return true;
- }
- }
-
- return false;
- }
-
- public string ReadAllText()
- {
- using (var reader = new StreamReader(OpenRead()))
- {
- // The .Replace() calls normalize line endings, in case you get \n instead of \r\n
- // since all the unit tests rely on the assumption that the files will have \r\n endings.
- return reader.ReadToEnd().Replace("\r", "").Replace("\n", "\r\n");
- }
- }
-
- ///
- /// Saves the file to the specified path.
- ///
- public void Save(string filePath)
- {
- var directory = Path.GetDirectoryName(filePath);
- if (!Directory.Exists(directory))
- {
- Directory.CreateDirectory(directory);
- }
-
- using (var outStream = File.Create(filePath))
- {
- using (var inStream = OpenRead())
- {
- inStream.CopyTo(outStream);
- }
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/Razor/TestProject.cs b/src/Components/Blazor/Build/test/Razor/TestProject.cs
deleted file mode 100644
index 5f14ef4bed..0000000000
--- a/src/Components/Blazor/Build/test/Razor/TestProject.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-
-namespace Microsoft.AspNetCore.Razor.Language
-{
- public static class TestProject
- {
- public static string GetProjectDirectory(Type type)
- {
- var solutionDir = GetSolutionRootDirectory("Components");
-
- var assemblyName = type.Assembly.GetName().Name;
-
- var projectDirectory = Path.Combine(solutionDir, "test", assemblyName);
- if (!Directory.Exists(projectDirectory))
- {
- throw new InvalidOperationException(
-$@"Could not locate project directory for type {type.FullName}.
-Directory probe path: {projectDirectory}.");
- }
-
- return projectDirectory;
- }
-
- public static string GetSolutionRootDirectory(string solution)
- {
- var applicationBasePath = AppContext.BaseDirectory;
- var directoryInfo = new DirectoryInfo(applicationBasePath);
-
- do
- {
- var projectFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, $"{solution}.sln"));
- if (projectFileInfo.Exists)
- {
- return projectFileInfo.DirectoryName;
- }
-
- directoryInfo = directoryInfo.Parent;
- }
- while (directoryInfo.Parent != null);
-
- throw new Exception($"Solution file {solution}.sln could not be found in {applicationBasePath} or its parent directories.");
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/Razor/VirtualProjectFileSystem.cs b/src/Components/Blazor/Build/test/Razor/VirtualProjectFileSystem.cs
deleted file mode 100644
index 3d694a82d0..0000000000
--- a/src/Components/Blazor/Build/test/Razor/VirtualProjectFileSystem.cs
+++ /dev/null
@@ -1,224 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-
-namespace Microsoft.AspNetCore.Razor.Language
-{
- internal class VirtualRazorProjectFileSystem : RazorProjectFileSystem
- {
- private readonly DirectoryNode _root = new DirectoryNode("/");
-
- public override IEnumerable EnumerateItems(string basePath)
- {
- basePath = NormalizeAndEnsureValidPath(basePath);
- var directory = _root.GetDirectory(basePath);
- return directory?.EnumerateItems() ?? Enumerable.Empty();
- }
-
- [Obsolete("Use GetItem(string path, string fileKind)] instead")]
- public override RazorProjectItem GetItem(string path)
- {
- return GetItem(path, fileKind: null);
- }
-
- public override RazorProjectItem GetItem(string path, string fileKind)
- {
- // We ignore fileKind here because the _root is pre-filled with project items that already have fileKinds defined. This is
- // a unique circumstance where the RazorProjectFileSystem is actually pre-filled with all of its project items on construction.
-
- path = NormalizeAndEnsureValidPath(path);
- return _root.GetItem(path) ?? new NotFoundProjectItem(string.Empty, path);
- }
-
- public void Add(RazorProjectItem projectItem)
- {
- if (projectItem == null)
- {
- throw new ArgumentNullException(nameof(projectItem));
- }
-
- var filePath = NormalizeAndEnsureValidPath(projectItem.FilePath);
- _root.AddFile(new FileNode(filePath, projectItem));
- }
-
- // Internal for testing
- [DebuggerDisplay("{Path}")]
- internal class DirectoryNode
- {
- public DirectoryNode(string path)
- {
- Path = path;
- }
-
- public string Path { get; }
-
- public List Directories { get; } = new List();
-
- public List Files { get; } = new List();
-
- public void AddFile(FileNode fileNode)
- {
- var filePath = fileNode.Path;
- if (!filePath.StartsWith(Path, StringComparison.OrdinalIgnoreCase))
- {
- var message = "Error";
- throw new InvalidOperationException(message);
- }
-
- // Look for the first / that appears in the path after the current directory path.
- var directoryPath = GetDirectoryPath(filePath);
- var directory = GetOrAddDirectory(this, directoryPath, createIfNotExists: true);
- Debug.Assert(directory != null);
- directory.Files.Add(fileNode);
- }
-
- public DirectoryNode GetDirectory(string path)
- {
- if (!path.StartsWith(Path, StringComparison.OrdinalIgnoreCase))
- {
- var message = "Error";
- throw new InvalidOperationException(message);
- }
-
- return GetOrAddDirectory(this, path);
- }
-
- public IEnumerable EnumerateItems()
- {
- foreach (var file in Files)
- {
- yield return file.ProjectItem;
- }
-
- foreach (var directory in Directories)
- {
- foreach (var file in directory.EnumerateItems())
- {
- yield return file;
- }
- }
- }
-
- public RazorProjectItem GetItem(string path)
- {
- if (!path.StartsWith(Path, StringComparison.OrdinalIgnoreCase))
- {
- throw new InvalidOperationException("Error");
- }
-
- var directoryPath = GetDirectoryPath(path);
- var directory = GetOrAddDirectory(this, directoryPath);
- if (directory == null)
- {
- return null;
- }
-
- foreach (var file in directory.Files)
- {
- var filePath = file.Path;
- var directoryLength = directory.Path.Length;
-
- // path, filePath -> /Views/Home/Index.cshtml
- // directory.Path -> /Views/Home/
- // We only need to match the file name portion since we've already matched the directory segment.
- if (string.Compare(path, directoryLength, filePath, directoryLength, path.Length - directoryLength, StringComparison.OrdinalIgnoreCase) == 0)
- {
- return file.ProjectItem;
- }
- }
-
- return null;
- }
-
- private static string GetDirectoryPath(string path)
- {
- // /dir1/dir2/file.cshtml -> /dir1/dir2/
- var fileNameIndex = path.LastIndexOf('/');
- if (fileNameIndex == -1)
- {
- return path;
- }
-
- return path.Substring(0, fileNameIndex + 1);
- }
-
- private static DirectoryNode GetOrAddDirectory(
- DirectoryNode directory,
- string path,
- bool createIfNotExists = false)
- {
- Debug.Assert(!string.IsNullOrEmpty(path));
- if (path[path.Length - 1] != '/')
- {
- path += '/';
- }
-
- int index;
- while ((index = path.IndexOf('/', directory.Path.Length)) != -1 && index != path.Length)
- {
- var subDirectory = FindSubDirectory(directory, path);
-
- if (subDirectory == null)
- {
- if (createIfNotExists)
- {
- var directoryPath = path.Substring(0, index + 1); // + 1 to include trailing slash
- subDirectory = new DirectoryNode(directoryPath);
- directory.Directories.Add(subDirectory);
- }
- else
- {
- return null;
- }
- }
-
- directory = subDirectory;
- }
-
- return directory;
- }
-
- private static DirectoryNode FindSubDirectory(DirectoryNode parentDirectory, string path)
- {
- for (var i = 0; i < parentDirectory.Directories.Count; i++)
- {
- // ParentDirectory.Path -> /Views/Home/
- // CurrentDirectory.Path -> /Views/Home/SubDir/
- // Path -> /Views/Home/SubDir/MorePath/File.cshtml
- // Each invocation of FindSubDirectory returns the immediate subdirectory along the path to the file.
-
- var currentDirectory = parentDirectory.Directories[i];
- var directoryPath = currentDirectory.Path;
- var startIndex = parentDirectory.Path.Length;
- var directoryNameLength = directoryPath.Length - startIndex;
-
- if (string.Compare(path, startIndex, directoryPath, startIndex, directoryPath.Length - startIndex, StringComparison.OrdinalIgnoreCase) == 0)
- {
- return currentDirectory;
- }
- }
-
- return null;
- }
- }
-
- // Internal for testing
- [DebuggerDisplay("{Path}")]
- internal struct FileNode
- {
- public FileNode(string path, RazorProjectItem projectItem)
- {
- Path = path;
- ProjectItem = projectItem;
- }
-
- public string Path { get; }
-
- public RazorProjectItem ProjectItem { get; }
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/Razor/VirtualProjectItem.cs b/src/Components/Blazor/Build/test/Razor/VirtualProjectItem.cs
deleted file mode 100644
index 68c135d715..0000000000
--- a/src/Components/Blazor/Build/test/Razor/VirtualProjectItem.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.IO;
-
-namespace Microsoft.AspNetCore.Razor.Language
-{
- internal class VirtualProjectItem : RazorProjectItem
- {
- private readonly byte[] _content;
-
- public VirtualProjectItem(
- string basePath,
- string filePath,
- string physicalPath,
- string relativePhysicalPath,
- string fileKind,
- byte[] content)
- {
- BasePath = basePath;
- FilePath = filePath;
- PhysicalPath = physicalPath;
- RelativePhysicalPath = relativePhysicalPath;
- _content = content;
-
- // Base class will detect based on file-extension.
- FileKind = fileKind ?? base.FileKind;
- }
-
- public override string BasePath { get; }
-
- public override string RelativePhysicalPath { get; }
-
- public override string FileKind { get; }
-
- public override string FilePath { get; }
-
- public override string PhysicalPath { get; }
-
- public override bool Exists => true;
-
- public override Stream Read()
- {
- return new MemoryStream(_content);
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/RazorIntegrationTestBase.cs b/src/Components/Blazor/Build/test/RazorIntegrationTestBase.cs
deleted file mode 100644
index 943a658a36..0000000000
--- a/src/Components/Blazor/Build/test/RazorIntegrationTestBase.cs
+++ /dev/null
@@ -1,542 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Runtime.ExceptionServices;
-using System.Runtime.InteropServices;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.Rendering;
-using Microsoft.AspNetCore.Components.RenderTree;
-using Microsoft.AspNetCore.Components.Test.Helpers;
-using Microsoft.AspNetCore.Razor.Language;
-using Microsoft.AspNetCore.Razor.Language.CodeGeneration;
-using Microsoft.CodeAnalysis;
-using Microsoft.CodeAnalysis.CSharp;
-using Microsoft.CodeAnalysis.Razor;
-using Microsoft.Extensions.Logging.Abstractions;
-using Xunit;
-using Xunit.Abstractions;
-using Xunit.Sdk;
-
-namespace Microsoft.AspNetCore.Blazor.Build.Test
-{
- public class RazorIntegrationTestBase
- {
- private static readonly AsyncLocal _output = new AsyncLocal();
-
- internal const string ArbitraryWindowsPath = "x:\\dir\\subdir\\Test";
- internal const string ArbitraryMacLinuxPath = "/dir/subdir/Test";
-
- // Creating the initial compilation + reading references is on the order of 250ms without caching
- // so making sure it doesn't happen for each test.
- private static readonly CSharpCompilation BaseCompilation;
-
- private static CSharpParseOptions CSharpParseOptions { get; }
-
- static RazorIntegrationTestBase()
- {
- var referenceAssemblyRoots = new[]
- {
- typeof(System.Runtime.AssemblyTargetedPatchBandAttribute).Assembly, // System.Runtime
- typeof(ComponentBase).Assembly,
- typeof(RazorIntegrationTestBase).Assembly, // Reference this assembly, so that we can refer to test component types
- };
-
- var referenceAssemblies = referenceAssemblyRoots
- .SelectMany(assembly => assembly.GetReferencedAssemblies().Concat(new[] { assembly.GetName() }))
- .Distinct()
- .Select(Assembly.Load)
- .Select(assembly => MetadataReference.CreateFromFile(assembly.Location))
- .ToList();
- BaseCompilation = CSharpCompilation.Create(
- "TestAssembly",
- Array.Empty(),
- referenceAssemblies,
- new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
-
- CSharpParseOptions = new CSharpParseOptions(LanguageVersion.Preview);
- }
-
- public RazorIntegrationTestBase(ITestOutputHelper output)
- {
- _output.Value = output;
-
- AdditionalSyntaxTrees = new List();
- AdditionalRazorItems = new List();
-
- Configuration = RazorConfiguration.Create(RazorLanguageVersion.Latest, "MVC-3.0", Array.Empty());
- FileKind = FileKinds.Component; // Treat input files as components by default.
- FileSystem = new VirtualRazorProjectFileSystem();
- PathSeparator = Path.DirectorySeparatorChar.ToString();
- WorkingDirectory = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ArbitraryWindowsPath : ArbitraryMacLinuxPath;
-
- // Many of the rendering tests include line endings in the output.
- LineEnding = "\n";
- NormalizeSourceLineEndings = true;
-
- DefaultRootNamespace = "Test"; // Matches the default working directory
- DefaultFileName = "TestComponent.cshtml";
- }
-
- internal List AdditionalRazorItems { get; }
-
- internal List AdditionalSyntaxTrees { get; }
-
- internal virtual RazorConfiguration Configuration { get; }
-
- internal virtual string DefaultRootNamespace { get; }
-
- internal virtual string DefaultFileName { get; }
-
- internal virtual bool DesignTime { get; }
-
- internal virtual string FileKind { get; }
-
- internal virtual VirtualRazorProjectFileSystem FileSystem { get; }
-
- // Used to force a specific style of line-endings for testing. This matters
- // for the baseline tests that exercise line mappings. Even though we normalize
- // newlines for testing, the difference between platforms affects the data through
- // the *count* of characters written.
- internal virtual string LineEnding { get; }
-
- internal virtual string PathSeparator { get; }
-
- internal virtual bool NormalizeSourceLineEndings { get; }
-
- internal virtual bool UseTwoPhaseCompilation { get; }
-
- internal virtual string WorkingDirectory { get; }
-
- // Intentionally private, we don't want tests messing with this because it's fragile.
- private RazorProjectEngine CreateProjectEngine(MetadataReference[] references)
- {
- return RazorProjectEngine.Create(Configuration, FileSystem, b =>
- {
- b.SetRootNamespace(DefaultRootNamespace);
-
- // Turn off checksums, we're testing code generation.
- b.Features.Add(new SuppressChecksum());
-
- if (LineEnding != null)
- {
- b.Phases.Insert(0, new ForceLineEndingPhase(LineEnding));
- }
-
- // Including MVC here so that we can find any issues that arise from mixed MVC + Components.
- Microsoft.AspNetCore.Mvc.Razor.Extensions.RazorExtensions.Register(b);
-
- // Features that use Roslyn are mandatory for components
- Microsoft.CodeAnalysis.Razor.CompilerFeatures.Register(b);
-
- b.Features.Add(new CompilationTagHelperFeature());
- b.Features.Add(new DefaultMetadataReferenceFeature()
- {
- References = references,
- });
- });
- }
-
- internal RazorProjectItem CreateProjectItem(string cshtmlRelativePath, string cshtmlContent)
- {
- var fullPath = WorkingDirectory + PathSeparator + cshtmlRelativePath;
-
- // FilePaths in Razor are **always** are of the form '/a/b/c.cshtml'
- var filePath = cshtmlRelativePath.Replace('\\', '/');
- if (!filePath.StartsWith('/'))
- {
- filePath = '/' + filePath;
- }
-
- if (NormalizeSourceLineEndings)
- {
- cshtmlContent = cshtmlContent.Replace("\r", "").Replace("\n", LineEnding);
- }
-
- return new VirtualProjectItem(
- WorkingDirectory,
- filePath,
- fullPath,
- cshtmlRelativePath,
- FileKind,
- Encoding.UTF8.GetBytes(cshtmlContent.TrimStart()));
- }
-
- protected CompileToCSharpResult CompileToCSharp(string cshtmlContent)
- {
- return CompileToCSharp(DefaultFileName, cshtmlContent);
- }
-
- protected CompileToCSharpResult CompileToCSharp(string cshtmlRelativePath, string cshtmlContent)
- {
- if (UseTwoPhaseCompilation)
- {
- // The first phase won't include any metadata references for component discovery. This mirrors
- // what the build does.
- var projectEngine = CreateProjectEngine(Array.Empty());
-
- RazorCodeDocument codeDocument;
- foreach (var item in AdditionalRazorItems)
- {
- // Result of generating declarations
- codeDocument = projectEngine.ProcessDeclarationOnly(item);
- Assert.Empty(codeDocument.GetCSharpDocument().Diagnostics);
-
- var syntaxTree = Parse(codeDocument.GetCSharpDocument().GeneratedCode, path: item.FilePath);
- AdditionalSyntaxTrees.Add(syntaxTree);
- }
-
- // Result of generating declarations
- var projectItem = CreateProjectItem(cshtmlRelativePath, cshtmlContent);
- codeDocument = projectEngine.ProcessDeclarationOnly(projectItem);
- var declaration = new CompileToCSharpResult
- {
- BaseCompilation = BaseCompilation.AddSyntaxTrees(AdditionalSyntaxTrees),
- CodeDocument = codeDocument,
- Code = codeDocument.GetCSharpDocument().GeneratedCode,
- Diagnostics = codeDocument.GetCSharpDocument().Diagnostics,
- };
-
- // Result of doing 'temp' compilation
- var tempAssembly = CompileToAssembly(declaration);
-
- // Add the 'temp' compilation as a metadata reference
- var references = BaseCompilation.References.Concat(new[] { tempAssembly.Compilation.ToMetadataReference() }).ToArray();
- projectEngine = CreateProjectEngine(references);
-
- // Now update the any additional files
- foreach (var item in AdditionalRazorItems)
- {
- // Result of generating declarations
- codeDocument = DesignTime ? projectEngine.ProcessDesignTime(item) : projectEngine.Process(item);
- Assert.Empty(codeDocument.GetCSharpDocument().Diagnostics);
-
- // Replace the 'declaration' syntax tree
- var syntaxTree = Parse(codeDocument.GetCSharpDocument().GeneratedCode, path: item.FilePath);
- AdditionalSyntaxTrees.RemoveAll(st => st.FilePath == item.FilePath);
- AdditionalSyntaxTrees.Add(syntaxTree);
- }
-
- // Result of real code generation for the document under test
- codeDocument = DesignTime ? projectEngine.ProcessDesignTime(projectItem) : projectEngine.Process(projectItem);
-
- _output.Value.WriteLine("Use this output when opening an issue");
- _output.Value.WriteLine(string.Empty);
-
- _output.Value.WriteLine($"## Main source file ({projectItem.FileKind}):");
- _output.Value.WriteLine("```");
- _output.Value.WriteLine(ReadProjectItem(projectItem));
- _output.Value.WriteLine("```");
- _output.Value.WriteLine(string.Empty);
-
- foreach (var item in AdditionalRazorItems)
- {
- _output.Value.WriteLine($"### Additional source file ({item.FileKind}):");
- _output.Value.WriteLine("```");
- _output.Value.WriteLine(ReadProjectItem(item));
- _output.Value.WriteLine("```");
- _output.Value.WriteLine(string.Empty);
- }
-
- _output.Value.WriteLine("## Generated C#:");
- _output.Value.WriteLine("```C#");
- _output.Value.WriteLine(codeDocument.GetCSharpDocument().GeneratedCode);
- _output.Value.WriteLine("```");
-
- return new CompileToCSharpResult
- {
- BaseCompilation = BaseCompilation.AddSyntaxTrees(AdditionalSyntaxTrees),
- CodeDocument = codeDocument,
- Code = codeDocument.GetCSharpDocument().GeneratedCode,
- Diagnostics = codeDocument.GetCSharpDocument().Diagnostics,
- };
- }
- else
- {
- // For single phase compilation tests just use the base compilation's references.
- // This will include the built-in Blazor components.
- var projectEngine = CreateProjectEngine(BaseCompilation.References.ToArray());
-
- var projectItem = CreateProjectItem(cshtmlRelativePath, cshtmlContent);
- var codeDocument = DesignTime ? projectEngine.ProcessDesignTime(projectItem) : projectEngine.Process(projectItem);
-
- // Log the generated code for test results.
- _output.Value.WriteLine("Use this output when opening an issue");
- _output.Value.WriteLine(string.Empty);
-
- _output.Value.WriteLine($"## Main source file ({projectItem.FileKind}):");
- _output.Value.WriteLine("```");
- _output.Value.WriteLine(ReadProjectItem(projectItem));
- _output.Value.WriteLine("```");
- _output.Value.WriteLine(string.Empty);
-
- _output.Value.WriteLine("## Generated C#:");
- _output.Value.WriteLine("```C#");
- _output.Value.WriteLine(codeDocument.GetCSharpDocument().GeneratedCode);
- _output.Value.WriteLine("```");
-
- return new CompileToCSharpResult
- {
- BaseCompilation = BaseCompilation.AddSyntaxTrees(AdditionalSyntaxTrees),
- CodeDocument = codeDocument,
- Code = codeDocument.GetCSharpDocument().GeneratedCode,
- Diagnostics = codeDocument.GetCSharpDocument().Diagnostics,
- };
- }
- }
-
- protected CompileToAssemblyResult CompileToAssembly(string cshtmlRelativePath, string cshtmlContent)
- {
- var cSharpResult = CompileToCSharp(cshtmlRelativePath, cshtmlContent);
- return CompileToAssembly(cSharpResult);
- }
-
- protected CompileToAssemblyResult CompileToAssembly(CompileToCSharpResult cSharpResult, bool throwOnFailure = true)
- {
- if (cSharpResult.Diagnostics.Any())
- {
- var diagnosticsLog = string.Join(Environment.NewLine, cSharpResult.Diagnostics.Select(d => d.ToString()).ToArray());
- throw new InvalidOperationException($"Aborting compilation to assembly because RazorCompiler returned nonempty diagnostics: {diagnosticsLog}");
- }
-
- var syntaxTrees = new[]
- {
- Parse(cSharpResult.Code),
- };
-
- var compilation = cSharpResult.BaseCompilation.AddSyntaxTrees(syntaxTrees);
-
- var diagnostics = compilation
- .GetDiagnostics()
- .Where(d => d.Severity != DiagnosticSeverity.Hidden);
-
- if (diagnostics.Any() && throwOnFailure)
- {
- throw new CompilationFailedException(compilation);
- }
- else if (diagnostics.Any())
- {
- return new CompileToAssemblyResult
- {
- Compilation = compilation,
- Diagnostics = diagnostics,
- };
- }
-
- using (var peStream = new MemoryStream())
- {
- compilation.Emit(peStream);
-
- return new CompileToAssemblyResult
- {
- Compilation = compilation,
- Diagnostics = diagnostics,
- Assembly = diagnostics.Any() ? null : Assembly.Load(peStream.ToArray())
- };
- }
- }
-
- protected IComponent CompileToComponent(string cshtmlSource)
- {
- var assemblyResult = CompileToAssembly(DefaultFileName, cshtmlSource);
-
- var componentFullTypeName = $"{DefaultRootNamespace}.{Path.GetFileNameWithoutExtension(DefaultFileName)}";
- return CompileToComponent(assemblyResult, componentFullTypeName);
- }
-
- protected IComponent CompileToComponent(CompileToCSharpResult cSharpResult, string fullTypeName)
- {
- return CompileToComponent(CompileToAssembly(cSharpResult), fullTypeName);
- }
-
- protected IComponent CompileToComponent(CompileToAssemblyResult assemblyResult, string fullTypeName)
- {
- var componentType = assemblyResult.Assembly.GetType(fullTypeName);
- if (componentType == null)
- {
- throw new XunitException(
- $"Failed to find component type '{fullTypeName}'. Found types:" + Environment.NewLine +
- string.Join(Environment.NewLine, assemblyResult.Assembly.ExportedTypes.Select(t => t.FullName)));
- }
-
- return (IComponent)Activator.CreateInstance(componentType);
- }
-
- protected static CSharpSyntaxTree Parse(string text, string path = null)
- {
- return (CSharpSyntaxTree)CSharpSyntaxTree.ParseText(text, CSharpParseOptions, path: path);
- }
-
- protected static string FullTypeName() => typeof(T).FullName.Replace('+', '.');
-
- protected RenderTreeFrame[] GetRenderTree(IComponent component)
- {
- var renderer = new TestRenderer();
- return GetRenderTree(renderer, component);
- }
-
- protected private RenderTreeFrame[] GetRenderTree(TestRenderer renderer, IComponent component)
- {
- renderer.AttachComponent(component);
- var task = renderer.Dispatcher.InvokeAsync(() => component.SetParametersAsync(ParameterView.Empty));
- // we will have to change this method if we add a test that does actual async work.
- Assert.True(task.Status.HasFlag(TaskStatus.RanToCompletion) || task.Status.HasFlag(TaskStatus.Faulted));
- if (task.IsFaulted)
- {
- ExceptionDispatchInfo.Capture(task.Exception.InnerException).Throw();
- }
- return renderer.LatestBatchReferenceFrames;
- }
-
- protected ArrayRange GetFrames(RenderFragment fragment)
- {
- var builder = new RenderTreeBuilder();
- fragment(builder);
- return builder.GetFrames();
- }
-
- protected static void AssertSourceEquals(string expected, CompileToCSharpResult generated)
- {
- // Normalize the paths inside the expected result to match the OS paths
- if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- var windowsPath = Path.Combine(ArbitraryWindowsPath, generated.CodeDocument.Source.RelativePath).Replace('/', '\\');
- expected = expected.Replace(windowsPath, generated.CodeDocument.Source.FilePath);
- }
-
- expected = expected.Trim();
- Assert.Equal(expected, generated.Code.Trim(), ignoreLineEndingDifferences: true);
- }
-
- private static string ReadProjectItem(RazorProjectItem item)
- {
- using (var reader = new StreamReader(item.Read()))
- {
- return reader.ReadToEnd();
- }
- }
-
- protected class CompileToCSharpResult
- {
- // A compilation that can be used *with* this code to compile an assembly
- public Compilation BaseCompilation { get; set; }
- public RazorCodeDocument CodeDocument { get; set; }
- public string Code { get; set; }
- public IEnumerable Diagnostics { get; set; }
- }
-
- protected class CompileToAssemblyResult
- {
- public Assembly Assembly { get; set; }
- public Compilation Compilation { get; set; }
- public string VerboseLog { get; set; }
- public IEnumerable Diagnostics { get; set; }
- }
-
- protected class TestRenderer : Renderer
- {
- public TestRenderer() : base(new TestServiceProvider(), NullLoggerFactory.Instance)
- {
- }
-
- public override Dispatcher Dispatcher { get; } = Dispatcher.CreateDefault();
-
- public RenderTreeFrame[] LatestBatchReferenceFrames { get; private set; }
-
- public void AttachComponent(IComponent component)
- => AssignRootComponentId(component);
-
- protected override void HandleException(Exception exception)
- {
- ExceptionDispatchInfo.Capture(exception).Throw();
- }
-
- protected override Task UpdateDisplayAsync(in RenderBatch renderBatch)
- {
- LatestBatchReferenceFrames = renderBatch.ReferenceFrames.AsEnumerable().ToArray();
- return Task.CompletedTask;
- }
- }
-
- private class CompilationFailedException : XunitException
- {
- public CompilationFailedException(Compilation compilation)
- {
- Compilation = compilation;
- }
-
- public Compilation Compilation { get; }
-
- public override string Message
- {
- get
- {
- var builder = new StringBuilder();
- builder.AppendLine("Compilation failed: ");
-
- var diagnostics = Compilation.GetDiagnostics();
- var syntaxTreesWithErrors = new HashSet();
- foreach (var diagnostic in diagnostics)
- {
- builder.AppendLine(diagnostic.ToString());
-
- if (diagnostic.Location.IsInSource)
- {
- syntaxTreesWithErrors.Add(diagnostic.Location.SourceTree);
- }
- }
-
- if (syntaxTreesWithErrors.Any())
- {
- builder.AppendLine();
- builder.AppendLine();
-
- foreach (var syntaxTree in syntaxTreesWithErrors)
- {
- builder.AppendLine($"File {syntaxTree.FilePath ?? "unknown"}:");
- builder.AppendLine(syntaxTree.GetText().ToString());
- }
- }
-
- return builder.ToString();
- }
- }
- }
-
- private class SuppressChecksum : IConfigureRazorCodeGenerationOptionsFeature
- {
- public int Order => 0;
-
- public RazorEngine Engine { get; set; }
-
- public void Configure(RazorCodeGenerationOptionsBuilder options)
- {
- options.SuppressChecksum = true;
- }
- }
-
- private class ForceLineEndingPhase : RazorEnginePhaseBase
- {
- public ForceLineEndingPhase(string lineEnding)
- {
- LineEnding = lineEnding;
- }
-
- public string LineEnding { get; }
-
- protected override void ExecuteCore(RazorCodeDocument codeDocument)
- {
- var field = typeof(CodeRenderingContext).GetField("NewLineString", BindingFlags.Static | BindingFlags.NonPublic);
- var key = field.GetValue(null);
- codeDocument.Items[key] = LineEnding;
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Build/test/RenderingRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/RenderingRazorIntegrationTest.cs
deleted file mode 100644
index 3f380cbc79..0000000000
--- a/src/Components/Blazor/Build/test/RenderingRazorIntegrationTest.cs
+++ /dev/null
@@ -1,744 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.Components.RenderTree;
-using Microsoft.AspNetCore.Components.Test.Helpers;
-using Microsoft.AspNetCore.Components.Web;
-using Xunit;
-using Xunit.Abstractions;
-
-namespace Microsoft.AspNetCore.Blazor.Build.Test
-{
- // Integration tests for the end-to-end of successful Razor compilation of component definitions
- // Includes running the component code to verify the output.
- public class RenderingRazorIntegrationTest : RazorIntegrationTestBase
- {
- public RenderingRazorIntegrationTest(ITestOutputHelper output)
- : base(output)
- {
- }
-
- [Fact]
- public void SupportsPlainText()
- {
- // Arrange/Act
- var component = CompileToComponent("Some plain text");
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, "Some plain text", 0));
- }
-
- [Fact]
- public void SupportsCSharpExpressions()
- {
- // Arrange/Act
- var component = CompileToComponent(@"
- @(""Hello"")
- @((object)null)
- @(123)
- @(new object())
- ");
-
- // Assert
- var frames = GetRenderTree(component);
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, "Hello", 0),
- frame => AssertFrame.MarkupWhitespace(frame, 1),
- frame => AssertFrame.TextWhitespace(frame, 2), // @((object)null)
- frame => AssertFrame.MarkupWhitespace(frame, 3),
- frame => AssertFrame.Text(frame, "123", 4),
- frame => AssertFrame.MarkupWhitespace(frame, 5),
- frame => AssertFrame.Text(frame, new object().ToString(), 6));
- }
-
- [Fact]
- public void SupportsCSharpFunctionsBlock()
- {
- // Arrange/Act
- var component = CompileToComponent(@"
- @foreach(var item in items) {
- @item
- }
- @code {
- string[] items = new[] { ""First"", ""Second"", ""Third"" };
- }
- ");
-
- // Assert
- var frames = GetRenderTree(component);
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, "First", 0),
- frame => AssertFrame.Text(frame, "Second", 0),
- frame => AssertFrame.Text(frame, "Third", 0));
- }
-
- [Fact]
- public void SupportsElementsWithDynamicContent()
- {
- // Arrange/Act
- var component = CompileToComponent("Hello @(\"there\") ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Element(frame, "myelem", 3, 0),
- frame => AssertFrame.Text(frame, "Hello ", 1),
- frame => AssertFrame.Text(frame, "there", 2));
- }
-
- [Fact]
- public void SupportsElementsAsStaticBlock()
- {
- // Arrange/Act
- var component = CompileToComponent("Hello ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Markup(frame, "Hello ", 0));
- }
-
- [Fact]
- public void CreatesSeparateMarkupFrameForEachTopLevelStaticElement()
- {
- // The JavaScript-side rendering code does not rely on this behavior. It supports
- // inserting markup frames with arbitrary markup (e.g., multiple top-level elements
- // or none). This test exists only as an observation of the current behavior rather
- // than a promise that we never want to change it.
-
- // Arrange/Act
- var component = CompileToComponent(
- "@(\"Hi\") a b ");
-
- // Assert
- var frames = GetRenderTree(component);
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "root", 5, 0),
- frame => AssertFrame.Text(frame, "Hi", 1),
- frame => AssertFrame.Text(frame, " ", 2),
- frame => AssertFrame.Markup(frame, "a ", 3),
- frame => AssertFrame.Markup(frame, "b ", 4));
- }
-
- [Fact]
- public void RendersMarkupStringAsMarkupFrame()
- {
- // Arrange/Act
- var component = CompileToComponent(
- "@{ var someMarkup = new MarkupString(\"Hello
\"); }"
- + "@someMarkup
");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Element(frame, "p", 2, 0),
- frame => AssertFrame.Markup(frame, "Hello
", 1));
- }
-
- [Fact]
- public void SupportsSelfClosingElementsWithDynamicContent()
- {
- // Arrange/Act
- var component = CompileToComponent("Some text so elem isn't at position 0 ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Text(frame, "Some text so elem isn't at position 0 ", 0),
- frame => AssertFrame.Element(frame, "myelem", 2, 1),
- frame => AssertFrame.Attribute(frame, "myattr", "val", 2));
- }
-
- [Fact]
- public void SupportsSelfClosingElementsAsStaticBlock()
- {
- // Arrange/Act
- var component = CompileToComponent("Some text so elem isn't at position 0 ");
-
- // Assert
- Assert.Collection(
- GetRenderTree(component),
- frame => AssertFrame.Markup(frame, "Some text so elem isn't at position 0 ", 0));
- }
-
- [Fact]
- public void SupportsVoidHtmlElements()
- {
- // Arrange/Act
- var component = CompileToComponent("Some text so elem isn't at position 0 ");
-
- // Assert
- Assert.Collection(
- GetRenderTree(component),
- frame => AssertFrame.Markup(frame, "Some text so elem isn't at position 0 ", 0));
- }
-
- [Fact]
- public void SupportsComments()
- {
- // Arrange/Act
- var component = CompileToComponent("StartEnd");
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Markup(frame, "StartEnd", 0));
- }
-
- [Fact]
- public void SupportsAttributesWithLiteralValues()
- {
- // Arrange/Act
- var component = CompileToComponent("@(\"Hello\") ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Element(frame, "elem", 4, 0),
- frame => AssertFrame.Attribute(frame, "attrib-one", "Value 1", 1),
- frame => AssertFrame.Attribute(frame, "a2", "v2", 2),
- frame => AssertFrame.Text(frame, "Hello", 3));
- }
-
- [Fact]
- public void SupportsAttributesWithStringExpressionValues()
- {
- // Arrange/Act
- var component = CompileToComponent(
- "@{ var myValue = \"My string\"; }"
- + " ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Element(frame, "elem", 2, 0),
- frame => AssertFrame.Attribute(frame, "attr", "My string", 1));
- }
-
- [Fact]
- public void SupportsAttributesWithNonStringExpressionValues()
- {
- // Arrange/Act
- var component = CompileToComponent(
- "@{ var myValue = 123; }"
- + " ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Element(frame, "elem", 2, 0),
- frame => AssertFrame.Attribute(frame, "attr", "123", 1));
- }
-
- [Fact]
- public void SupportsAttributesWithInterpolatedStringExpressionValues()
- {
- // Arrange/Act
- var component = CompileToComponent(
- "@{ var myValue = \"world\"; var myNum=123; }"
- + " ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Element(frame, "elem", 2, 0),
- frame => AssertFrame.Attribute(frame, "attr", "Hello, WORLD with number 246!", 1));
- }
-
- [Fact]
- public void SupportsAttributesWithInterpolatedTernaryExpressionValues()
- {
- // Arrange/Act
- var component = CompileToComponent(
- "@{ var myValue = \"world\"; }"
- + " ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Element(frame, "elem", 2, 0),
- frame => AssertFrame.Attribute(frame, "attr", "Hello, world!", 1));
- }
-
- [Fact]
- public void SupportsHyphenedAttributesWithCSharpExpressionValues()
- {
- // Arrange/Act
- var component = CompileToComponent(
- "@{ var myValue = \"My string\"; }"
- + " ");
-
- // Assert
- Assert.Collection(GetRenderTree(component),
- frame => AssertFrame.Element(frame, "elem", 2, 0),
- frame => AssertFrame.Attribute(frame, "abc-def", "My string", 1));
- }
-
- [Fact]
- public void SupportsDataDashAttributes()
- {
- // Arrange/Act
- var component = CompileToComponent(@"
-@{
- var myValue = ""Expression value"";
-}
- ");
-
- // Assert
- Assert.Collection(
- GetRenderTree(component),
- frame => AssertFrame.Element(frame, "elem", 3, 0),
- frame => AssertFrame.Attribute(frame, "data-abc", "Literal value", 1),
- frame => AssertFrame.Attribute(frame, "data-def", "Expression value", 2));
- }
-
- [Fact]
- public void SupportsUsingStatements()
- {
- // Arrange/Act
- var component = CompileToComponent(
- @"@using System.Collections.Generic
- @(typeof(List).FullName)");
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(frames,
- frame => AssertFrame.Text(frame, typeof(List).FullName, 0));
- }
-
- [Fact]
- public async Task SupportsTwoWayBindingForTextboxes()
- {
- // Arrange/Act
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public string MyValue { get; set; } = ""Initial value"";
-}");
- var myValueProperty = component.GetType().GetProperty("MyValue");
-
- var renderer = new TestRenderer();
-
- // Assert
- EventCallback setter = default;
- var frames = GetRenderTree(renderer, component);
- Assert.Collection(frames,
- frame => AssertFrame.Element(frame, "input", 3, 0),
- frame => AssertFrame.Attribute(frame, "value", "Initial value", 1),
- frame =>
- {
- AssertFrame.Attribute(frame, "onchange", 2);
- setter = Assert.IsType(frame.AttributeValue);
- });
-
- // Trigger the change event to show it updates the property
- //
- // This should always complete synchronously.
- var task = renderer.Dispatcher.InvokeAsync(() => setter.InvokeAsync(new ChangeEventArgs { Value = "Modified value", }));
- Assert.Equal(TaskStatus.RanToCompletion, task.Status);
- await task;
-
- Assert.Equal("Modified value", myValueProperty.GetValue(component));
- }
-
- [Fact]
- public async Task SupportsTwoWayBindingForTextareas()
- {
- // Arrange/Act
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public string MyValue { get; set; } = ""Initial value"";
-}");
- var myValueProperty = component.GetType().GetProperty("MyValue");
-
- var renderer = new TestRenderer();
-
- // Assert
- EventCallback setter = default;
- var frames = GetRenderTree(renderer, component);
- Assert.Collection(frames,
- frame => AssertFrame.Element(frame, "textarea", 3, 0),
- frame => AssertFrame.Attribute(frame, "value", "Initial value", 1),
- frame =>
- {
- AssertFrame.Attribute(frame, "onchange", 2);
- setter = Assert.IsType(frame.AttributeValue);
- });
-
- // Trigger the change event to show it updates the property
- //
- // This should always complete synchronously.
- var task = renderer.Dispatcher.InvokeAsync(() => setter.InvokeAsync(new ChangeEventArgs { Value = "Modified value", }));
- Assert.Equal(TaskStatus.RanToCompletion, task.Status);
- await task;
-
- Assert.Equal("Modified value", myValueProperty.GetValue(component));
- }
-
- [Fact]
- public async Task SupportsTwoWayBindingForDateValues()
- {
- // Arrange/Act
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public DateTime MyDate { get; set; } = new DateTime(2018, 3, 4, 1, 2, 3);
-}");
- var myDateProperty = component.GetType().GetProperty("MyDate");
-
- var renderer = new TestRenderer();
-
- // Assert
- EventCallback setter = default;
- var frames = GetRenderTree(renderer, component);
- Assert.Collection(frames,
- frame => AssertFrame.Element(frame, "input", 3, 0),
- frame => AssertFrame.Attribute(frame, "value", new DateTime(2018, 3, 4, 1, 2, 3).ToString(), 1),
- frame =>
- {
- AssertFrame.Attribute(frame, "onchange", 2);
- setter = Assert.IsType(frame.AttributeValue);
- });
-
- // Trigger the change event to show it updates the property
- // Trigger the change event to show it updates the property
- //
- // This should always complete synchronously.
- var newDateValue = new DateTime(2018, 3, 5, 4, 5, 6);
- var task = renderer.Dispatcher.InvokeAsync(() => setter.InvokeAsync(new ChangeEventArgs { Value = newDateValue.ToString(), }));
- Assert.Equal(TaskStatus.RanToCompletion, task.Status);
- await task;
-
- Assert.Equal(newDateValue, myDateProperty.GetValue(component));
- }
-
- [Fact]
- public async Task SupportsTwoWayBindingForDateValuesWithFormatString()
- {
- // Arrange/Act
- var testDateFormat = "ddd yyyy-MM-dd";
- var component = CompileToComponent($@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {{
- public DateTime MyDate {{ get; set; }} = new DateTime(2018, 3, 4);
-}}");
- var myDateProperty = component.GetType().GetProperty("MyDate");
-
- var renderer = new TestRenderer();
-
- // Assert
- EventCallback setter = default;
- var frames = GetRenderTree(renderer, component);
- Assert.Collection(frames,
- frame => AssertFrame.Element(frame, "input", 3, 0),
- frame => AssertFrame.Attribute(frame, "value", new DateTime(2018, 3, 4).ToString(testDateFormat), 1),
- frame =>
- {
- AssertFrame.Attribute(frame, "onchange", 2);
- setter = Assert.IsType(frame.AttributeValue);
- });
-
- // Trigger the change event to show it updates the property
- //
- // This should always complete synchronously.
- var task = renderer.Dispatcher.InvokeAsync(() => setter.InvokeAsync(new ChangeEventArgs { Value = new DateTime(2018, 3, 5).ToString(testDateFormat), }));
- Assert.Equal(TaskStatus.RanToCompletion, task.Status);
- await task;
-
- Assert.Equal(new DateTime(2018, 3, 5), myDateProperty.GetValue(component));
- }
-
- [Fact] // In this case, onclick is just a normal HTML attribute
- public void SupportsEventHandlerWithString()
- {
- // Arrange
- var component = CompileToComponent(@"
- ");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(frames,
- frame => AssertFrame.Markup(frame, " ", 0));
- }
-
- [Fact]
- public void SupportsEventHandlerWithLambda()
- {
- // Arrange
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
- Clicked = true"" />
-@code {
- public bool Clicked { get; set; }
-}");
-
- var clicked = component.GetType().GetProperty("Clicked");
-
- var renderer = new TestRenderer();
-
- // Act
- var frames = GetRenderTree(renderer, component);
-
- // Assert
- Assert.Collection(frames,
- frame => AssertFrame.Element(frame, "button", 2, 0),
- frame =>
- {
- AssertFrame.Attribute(frame, "onclick", 1);
-
- var func = Assert.IsType>(frame.AttributeValue);
- Assert.False((bool)clicked.GetValue(component));
-
- func(new MouseEventArgs());
- Assert.True((bool)clicked.GetValue(component));
- });
- }
-
- [Fact]
- public void SupportsEventHandlerWithMethodGroup()
- {
- // Arrange
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public void OnClick(MouseEventArgs e) { Clicked = true; }
- public bool Clicked { get; set; }
-}");
-
- var clicked = component.GetType().GetProperty("Clicked");
-
- var renderer = new TestRenderer();
-
- // Act
- var frames = GetRenderTree(renderer, component);
-
- // Assert
- Action func = default; // Since this is a method group, we don't need to create an EventCallback
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "button", 2, 0),
- frame =>
- {
- AssertFrame.Attribute(frame, "onclick", 1);
-
- func = Assert.IsType>(frame.AttributeValue);
- Assert.False((bool)clicked.GetValue(component));
-
-
- });
-
- func.Invoke(new MouseEventArgs());
- Assert.True((bool)clicked.GetValue(component));
- }
-
- [Fact]
- public async Task SupportsTwoWayBindingForBoolValues()
- {
- // Arrange/Act
- var component = CompileToComponent(@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {
- public bool MyValue { get; set; } = true;
-}");
- var myValueProperty = component.GetType().GetProperty("MyValue");
-
- var renderer = new TestRenderer();
-
- // Assert
- EventCallback setter = default;
- var frames = GetRenderTree(renderer, component);
- Assert.Collection(frames,
- frame => AssertFrame.Element(frame, "input", 3, 0),
- frame => AssertFrame.Attribute(frame, "value", true, 1),
- frame =>
- {
- AssertFrame.Attribute(frame, "onchange", 2);
- setter = Assert.IsType(frame.AttributeValue);
- });
-
- // Trigger the change event to show it updates the property
- //
- // This should always complete synchronously.
- var task = renderer.Dispatcher.InvokeAsync(() => setter.InvokeAsync(new ChangeEventArgs() { Value = false, }));
- Assert.Equal(TaskStatus.RanToCompletion, task.Status);
- await task;
-
- Assert.False((bool)myValueProperty.GetValue(component));
- }
-
- [Fact]
- public async Task SupportsTwoWayBindingForEnumValues()
- {
- // Arrange/Act
- var myEnumType = FullTypeName();
- var component = CompileToComponent($@"
-@using Microsoft.AspNetCore.Components.Web
-
-@code {{
- public {myEnumType} MyValue {{ get; set; }} = {myEnumType}.{nameof(MyEnum.FirstValue)};
-}}");
- var myValueProperty = component.GetType().GetProperty("MyValue");
-
- var renderer = new TestRenderer();
-
- // Assert
- EventCallback setter = default;
- var frames = GetRenderTree(renderer, component);
- Assert.Collection(frames,
- frame => AssertFrame.Element(frame, "input", 3, 0),
- frame => AssertFrame.Attribute(frame, "value", MyEnum.FirstValue.ToString(), 1),
- frame =>
- {
- AssertFrame.Attribute(frame, "onchange", 2);
- setter = Assert.IsType(frame.AttributeValue);
- });
-
- // Trigger the change event to show it updates the property
- //
- // This should always complete synchronously.
- var task = renderer.Dispatcher.InvokeAsync(() => setter.InvokeAsync(new ChangeEventArgs { Value = MyEnum.SecondValue.ToString(), }));
- Assert.Equal(TaskStatus.RanToCompletion, task.Status);
- await task;
-
- Assert.Equal(MyEnum.SecondValue, (MyEnum)myValueProperty.GetValue(component));
- }
-
- public enum MyEnum { FirstValue, SecondValue }
-
- [Fact]
- public void RazorTemplate_NonGeneric_CanBeUsedFromRazorCode()
- {
- // Arrange
- var component = CompileToComponent(@"
-@{ RenderFragment template = @@(""Hello, World!"".ToLower())
; }
-@for (var i = 0; i < 3; i++)
-{
- @template;
-}
-");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1));
- }
-
- [Fact]
- public void RazorTemplate_Generic_CanBeUsedFromRazorCode()
- {
- // Arrange
- var component = CompileToComponent(@"
-@{ RenderFragment template = (context) => @@context.ToLower()
; }
-@for (var i = 0; i < 3; i++)
-{
- @template(""Hello, World!"");
-}
-");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1),
- frame => AssertFrame.Element(frame, "div", 2, 0),
- frame => AssertFrame.Text(frame, "hello, world!", 1));
- }
-
- [Fact]
- public void RazorTemplate_NonGeneric_CanBeUsedFromMethod()
- {
- // Arrange
- var component = CompileToComponent(@"
-@(Repeat(@@(""Hello, World!"".ToLower())
, 3))
-
-@code {
- RenderFragment Repeat(RenderFragment template, int count)
- {
- return (b) =>
- {
- for (var i = 0; i < count; i++)
- {
- b.AddContent(i, template);
- }
- };
- }
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- //
- // The sequence numbers start at 1 here because there is an AddContent(0, Repeat(....) call
- // that precedes the definition of the lambda. Sequence numbers for the lambda are allocated
- // from the same logical sequence as the surrounding code.
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "div", 2, 1),
- frame => AssertFrame.Text(frame, "hello, world!", 2),
- frame => AssertFrame.Element(frame, "div", 2, 1),
- frame => AssertFrame.Text(frame, "hello, world!", 2),
- frame => AssertFrame.Element(frame, "div", 2, 1),
- frame => AssertFrame.Text(frame, "hello, world!", 2));
- }
-
- [Fact]
- public void RazorTemplate_Generic_CanBeUsedFromMethod()
- {
- // Arrange
- var component = CompileToComponent(@"
-@(Repeat((context) => @@context.ToLower()
, ""Hello, World!"", 3))
-
-@code {
- RenderFragment Repeat(RenderFragment template, T value, int count)
- {
- return (b) =>
- {
- for (var i = 0; i < count; i++)
- {
- b.AddContent(i, template, value);
- }
- };
- }
-}");
-
- // Act
- var frames = GetRenderTree(component);
-
- // Assert
- //
- // The sequence numbers start at 1 here because there is an AddContent(0, Repeat(....) call
- // that precedes the definition of the lambda. Sequence numbers for the lambda are allocated
- // from the same logical sequence as the surrounding code.
- Assert.Collection(
- frames,
- frame => AssertFrame.Element(frame, "div", 2, 1),
- frame => AssertFrame.Text(frame, "hello, world!", 2),
- frame => AssertFrame.Element(frame, "div", 2, 1),
- frame => AssertFrame.Text(frame, "hello, world!", 2),
- frame => AssertFrame.Element(frame, "div", 2, 1),
- frame => AssertFrame.Text(frame, "hello, world!", 2));
- }
- }
-}
diff --git a/src/Components/Blazor/Build/testassets/standalone/standalone.csproj b/src/Components/Blazor/Build/testassets/standalone/standalone.csproj
deleted file mode 100644
index 1b13eb3d53..0000000000
--- a/src/Components/Blazor/Build/testassets/standalone/standalone.csproj
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- netstandard2.1
- 3.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Directory.Build.props b/src/Components/Blazor/Directory.Build.props
deleted file mode 100644
index a90d83b4cc..0000000000
--- a/src/Components/Blazor/Directory.Build.props
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
- $(BlazorClientPreReleaseVersionLabel)
-
-
-
diff --git a/src/Components/Blazor/Directory.Build.targets b/src/Components/Blazor/Directory.Build.targets
deleted file mode 100644
index e1a17eb9ca..0000000000
--- a/src/Components/Blazor/Directory.Build.targets
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- $(PackageVersion)
-
-
-
diff --git a/src/Components/Blazor/Http/src/HttpClientJsonExtensions.cs b/src/Components/Blazor/Http/src/HttpClientJsonExtensions.cs
deleted file mode 100644
index db691257aa..0000000000
--- a/src/Components/Blazor/Http/src/HttpClientJsonExtensions.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Net.Http;
-using System.Text;
-using System.Text.Json;
-using System.Threading.Tasks;
-
-namespace Microsoft.AspNetCore.Components
-{
- ///
- /// Extension methods for working with JSON APIs.
- ///
- public static class HttpClientJsonExtensions
- {
- ///
- /// Sends a GET request to the specified URI, and parses the JSON response body
- /// to create an object of the generic type.
- ///
- /// A type into which the response body can be JSON-deserialized.
- /// The .
- /// The URI that the request will be sent to.
- /// The response parsed as an object of the generic type.
- public static async Task GetJsonAsync(this HttpClient httpClient, string requestUri)
- {
- var stringContent = await httpClient.GetStringAsync(requestUri);
- return JsonSerializer.Deserialize(stringContent, JsonSerializerOptionsProvider.Options);
- }
-
- ///
- /// Sends a POST request to the specified URI, including the specified
- /// in JSON-encoded format, and parses the JSON response body to create an object of the generic type.
- ///
- /// The .
- /// The URI that the request will be sent to.
- /// Content for the request body. This will be JSON-encoded and sent as a string.
- /// The response parsed as an object of the generic type.
- public static Task PostJsonAsync(this HttpClient httpClient, string requestUri, object content)
- => httpClient.SendJsonAsync(HttpMethod.Post, requestUri, content);
-
- ///
- /// Sends a POST request to the specified URI, including the specified
- /// in JSON-encoded format, and parses the JSON response body to create an object of the generic type.
- ///
- /// A type into which the response body can be JSON-deserialized.
- /// The .
- /// The URI that the request will be sent to.
- /// Content for the request body. This will be JSON-encoded and sent as a string.
- /// The response parsed as an object of the generic type.
- public static Task PostJsonAsync(this HttpClient httpClient, string requestUri, object content)
- => httpClient.SendJsonAsync(HttpMethod.Post, requestUri, content);
-
- ///
- /// Sends a PUT request to the specified URI, including the specified
- /// in JSON-encoded format.
- ///
- /// The .
- /// The URI that the request will be sent to.
- /// Content for the request body. This will be JSON-encoded and sent as a string.
- public static Task PutJsonAsync(this HttpClient httpClient, string requestUri, object content)
- => httpClient.SendJsonAsync(HttpMethod.Put, requestUri, content);
-
- ///
- /// Sends a PUT request to the specified URI, including the specified
- /// in JSON-encoded format, and parses the JSON response body to create an object of the generic type.
- ///
- /// A type into which the response body can be JSON-deserialized.
- /// The .
- /// The URI that the request will be sent to.
- /// Content for the request body. This will be JSON-encoded and sent as a string.
- /// The response parsed as an object of the generic type.
- public static Task PutJsonAsync(this HttpClient httpClient, string requestUri, object content)
- => httpClient.SendJsonAsync(HttpMethod.Put, requestUri, content);
-
- ///
- /// Sends an HTTP request to the specified URI, including the specified
- /// in JSON-encoded format.
- ///
- /// The .
- /// The HTTP method.
- /// The URI that the request will be sent to.
- /// Content for the request body. This will be JSON-encoded and sent as a string.
- public static Task SendJsonAsync(this HttpClient httpClient, HttpMethod method, string requestUri, object content)
- => httpClient.SendJsonAsync(method, requestUri, content);
-
- ///
- /// Sends an HTTP request to the specified URI, including the specified
- /// in JSON-encoded format, and parses the JSON response body to create an object of the generic type.
- ///
- /// A type into which the response body can be JSON-deserialized.
- /// The .
- /// The HTTP method.
- /// The URI that the request will be sent to.
- /// Content for the request body. This will be JSON-encoded and sent as a string.
- /// The response parsed as an object of the generic type.
- public static async Task SendJsonAsync(this HttpClient httpClient, HttpMethod method, string requestUri, object content)
- {
- var requestJson = JsonSerializer.Serialize(content, JsonSerializerOptionsProvider.Options);
- var response = await httpClient.SendAsync(new HttpRequestMessage(method, requestUri)
- {
- Content = new StringContent(requestJson, Encoding.UTF8, "application/json")
- });
-
- // Make sure the call was successful before we
- // attempt to process the response content
- response.EnsureSuccessStatusCode();
-
- if (typeof(T) == typeof(IgnoreResponse))
- {
- return default;
- }
- else
- {
- var stringContent = await response.Content.ReadAsStringAsync();
- return JsonSerializer.Deserialize(stringContent, JsonSerializerOptionsProvider.Options);
- }
- }
-
- class IgnoreResponse { }
- }
-}
diff --git a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj
deleted file mode 100644
index 9d6deb6173..0000000000
--- a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- netstandard2.0
- Provides experimental support for using System.Text.Json with HttpClient. Intended for use with Blazor running under WebAssembly.
- false
- false
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Http/test/HttpClientJsonExtensionsTest.cs b/src/Components/Blazor/Http/test/HttpClientJsonExtensionsTest.cs
deleted file mode 100644
index f8d31fd073..0000000000
--- a/src/Components/Blazor/Http/test/HttpClientJsonExtensionsTest.cs
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Net;
-using System.Net.Http;
-using System.Text.Json;
-using System.Threading;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Components.Test
-{
- public class HttpClientJsonExtensionsTest
- {
- private readonly JsonSerializerOptions _jsonSerializerOptions = new JsonSerializerOptions
- {
- PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
- PropertyNameCaseInsensitive = true,
- };
-
- const string TestUri = "http://example.com/some/uri";
-
- [Fact]
- public async Task GetJson_Success()
- {
- // Arrange
- var httpClient = new HttpClient(new TestHttpMessageHandler(req =>
- {
- Assert.Equal(TestUri, req.RequestUri.AbsoluteUri);
- return Task.FromResult(CreateJsonResponse(HttpStatusCode.OK, new Person
- {
- Name = "Abc",
- Age = 123
- }));
- }));
-
- // Act
- var result = await httpClient.GetJsonAsync(TestUri);
-
- // Assert
- Assert.Equal("Abc", result.Name);
- Assert.Equal(123, result.Age);
- }
-
- [Fact]
- public async Task GetJson_Failure()
- {
- // Arrange
- var httpClient = new HttpClient(new TestHttpMessageHandler(req =>
- {
- Assert.Equal(TestUri, req.RequestUri.AbsoluteUri);
- return Task.FromResult(new HttpResponseMessage(HttpStatusCode.NotFound));
- }));
-
- // Act/Assert
- var ex = await Assert.ThrowsAsync(
- () => httpClient.GetJsonAsync(TestUri));
- Assert.Contains("404 (Not Found)", ex.Message);
- }
-
- [Theory]
- [InlineData("Put")]
- [InlineData("Post")]
- [InlineData("Patch")]
- [InlineData("Delete")]
- [InlineData("MyArtificialMethod")]
- public async Task SendJson_Success(string httpMethodString)
- {
- var httpMethod = new HttpMethod(httpMethodString);
- var requestContent = new { MyProp = true, OtherProp = "Hello" };
-
- // Arrange
- var httpClient = new HttpClient(new TestHttpMessageHandler(async req =>
- {
- Assert.Equal(httpMethod, req.Method);
- Assert.Equal(TestUri, req.RequestUri.AbsoluteUri);
- Assert.Equal(JsonSerializer.Serialize(requestContent, _jsonSerializerOptions), await ((StringContent)req.Content).ReadAsStringAsync());
- return CreateJsonResponse(HttpStatusCode.OK, new Person
- {
- Name = "Abc",
- Age = 123
- });
- }));
-
- // Act
- var result = await Send(httpClient, httpMethodString, requestContent);
-
- // Assert
- Assert.Equal("Abc", result.Name);
- Assert.Equal(123, result.Age);
- }
-
- [Fact]
- public async Task ReadAsJsonAsync_ReadsCamelCasedJson()
- {
- var input = "{\"name\": \"TestPerson\", \"age\": 23 }";
-
- // Arrange
- var httpClient = new HttpClient(new TestHttpMessageHandler(req =>
- {
- return Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)
- {
- Content = new StringContent(input)
- });
- }));
-
- // Act
- var result = await httpClient.GetJsonAsync(TestUri);
-
- // Assert
- Assert.Equal("TestPerson", result.Name);
- Assert.Equal(23, result.Age);
- }
-
- [Fact]
- public async Task ReadAsJsonAsync_ReadsPascalCasedJson()
- {
- var input = "{\"Name\": \"TestPerson\", \"Age\": 23 }";
-
- // Arrange
- var httpClient = new HttpClient(new TestHttpMessageHandler(req =>
- {
- return Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)
- {
- Content = new StringContent(input)
- });
- }));
-
- // Act
- var result = await httpClient.GetJsonAsync(TestUri);
-
- // Assert
- Assert.Equal("TestPerson", result.Name);
- Assert.Equal(23, result.Age);
- }
-
- [Theory]
- [InlineData("Put")]
- [InlineData("Post")]
- [InlineData("Patch")]
- [InlineData("Delete")]
- [InlineData("MyArtificialMethod")]
- public async Task SendJson_Failure(string httpMethodString)
- {
- var httpMethod = new HttpMethod(httpMethodString);
- var requestContent = new { MyProp = true, OtherProp = "Hello" };
-
- // Arrange
- var httpClient = new HttpClient(new TestHttpMessageHandler(async req =>
- {
- Assert.Equal(httpMethod, req.Method);
- Assert.Equal(TestUri, req.RequestUri.AbsoluteUri);
- Assert.Equal(JsonSerializer.Serialize(requestContent, _jsonSerializerOptions), await ((StringContent)req.Content).ReadAsStringAsync());
- return new HttpResponseMessage(HttpStatusCode.BadGateway);
- }));
-
- // Act/Assert
- var ex = await Assert.ThrowsAsync(
- () => Send(httpClient, httpMethodString, requestContent));
- Assert.Contains("502 (Bad Gateway)", ex.Message);
- }
-
- HttpResponseMessage CreateJsonResponse(HttpStatusCode statusCode, object content)
- {
- return new HttpResponseMessage(statusCode)
- {
- Content = new StringContent(JsonSerializer.Serialize(content, _jsonSerializerOptions))
- };
- }
-
- Task Send(HttpClient httpClient, string httpMethodString, object requestContent)
- {
- // For methods with convenience overloads, show those overloads work
- switch (httpMethodString)
- {
- case "post":
- return httpClient.PostJsonAsync(TestUri, requestContent);
- case "put":
- return httpClient.PutJsonAsync(TestUri, requestContent);
- default:
- return httpClient.SendJsonAsync(new HttpMethod(httpMethodString), TestUri, requestContent);
- }
- }
-
- class Person
- {
- public string Name { get; set; }
- public int Age { get; set; }
- }
-
- class TestHttpMessageHandler : HttpMessageHandler
- {
- private readonly Func> _sendDelegate;
-
- public TestHttpMessageHandler(Func> sendDelegate)
- {
- _sendDelegate = sendDelegate;
- }
-
- protected override void Dispose(bool disposing)
- => base.Dispose(disposing);
-
- protected override Task SendAsync(
- HttpRequestMessage request, CancellationToken cancellationToken)
- => _sendDelegate(request);
- }
- }
-}
diff --git a/src/Components/Blazor/Http/test/Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj b/src/Components/Blazor/Http/test/Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj
deleted file mode 100644
index e7a9870ecd..0000000000
--- a/src/Components/Blazor/Http/test/Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- $(DefaultNetCoreTargetFramework)
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Server/src/AutoRebuild/AutoRebuildExtensions.cs b/src/Components/Blazor/Server/src/AutoRebuild/AutoRebuildExtensions.cs
deleted file mode 100644
index 6a43600bb9..0000000000
--- a/src/Components/Blazor/Server/src/AutoRebuild/AutoRebuildExtensions.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Blazor.Server;
-using Microsoft.AspNetCore.Blazor.Server.AutoRebuild;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Logging;
-
-namespace Microsoft.AspNetCore.Builder
-{
- internal static class AutoRebuildExtensions
- {
- // Note that we don't need to watch typical static-file extensions (.css, .js, etc.)
- // because anything in wwwroot is just served directly from disk on each reload.
- // TODO: Make the set of extensions and exclusions configurable in csproj
- private static string[] _includedSuffixes = new[] { ".cs", ".cshtml" };
- private static string[] _excludedDirectories = new[] { "obj", "bin" };
-
- // To ensure the FileSystemWatchers aren't collected, reference them
- // in this static list. They never need to be removed because there's no
- // way to remove middleware once it's registered.
- private static List _uncollectableWatchers = new List();
-
- public static void UseHostedAutoRebuild(this IApplicationBuilder app, BlazorConfig config, string hostAppContentRootPath)
- {
- var isFirstFileWrite = true;
- WatchFileSystem(config, () =>
- {
- if (isFirstFileWrite)
- {
- try
- {
- // Touch any .cs file to force the host project to rebuild
- // (which in turn rebuilds the client, since it's referenced)
- var fileToTouch = Directory.EnumerateFiles(
- hostAppContentRootPath,
- "*.cs",
- SearchOption.AllDirectories).FirstOrDefault();
-
- if (!string.IsNullOrEmpty(fileToTouch))
- {
- File.SetLastWriteTime(fileToTouch, DateTime.Now);
- }
- }
- catch (Exception ex)
- {
- // If we don't have permission to write these files, autorebuild will not be enabled
- var loggerFactory = app.ApplicationServices.GetRequiredService();
- var logger = loggerFactory.CreateLogger(typeof (AutoRebuildExtensions));
- logger?.LogWarning(ex,
- "Cannot autorebuild because there was an error when writing to a file in '{0}'.",
- hostAppContentRootPath);
- }
-
- isFirstFileWrite = false;
- }
- });
- }
-
- public static void UseDevServerAutoRebuild(this IApplicationBuilder app, BlazorConfig config)
- {
- // Currently this only supports VS for Windows. Later on we can add
- // an IRebuildService implementation for VS for Mac, etc.
- if (!VSForWindowsRebuildService.TryCreate(out var rebuildService))
- {
- return; // You're not on Windows, or you didn't launch this process from VS
- }
-
- // Assume we're up to date when the app starts.
- var buildToken = new RebuildToken(new DateTime(1970, 1, 1)) { BuildTask = Task.CompletedTask, };
-
- WatchFileSystem(config, () =>
- {
- // Don't start the recompilation immediately. We only start it when the next
- // HTTP request arrives, because it's annoying if the IDE is constantly rebuilding
- // when you're making changes to multiple files and aren't ready to reload
- // in the browser yet.
- //
- // Replacing the token means that new requests that come in will trigger a rebuild,
- // and will all 'join' that build until a new file change occurs.
- buildToken = new RebuildToken(DateTime.Now);
- });
-
- app.Use(async (context, next) =>
- {
- try
- {
- var token = buildToken;
- if (token.BuildTask == null)
- {
- // The build is out of date, but a new build is not yet started.
- //
- // We can count on VS to only allow one build at a time, this is a safe race
- // because if we request a second concurrent build, it will 'join' the current one.
- var task = rebuildService.PerformRebuildAsync(
- config.SourceMSBuildPath,
- token.LastChange);
- token.BuildTask = task;
- }
-
- // In the general case it's safe to await this task, it will be a completed task
- // if everything is up to date.
- await token.BuildTask;
- }
- catch (Exception)
- {
- // If there's no listener on the other end of the pipe, or if anything
- // else goes wrong, we just let the incoming request continue.
- // There's nowhere useful to log this information so if people report
- // problems we'll just have to get a repro and debug it.
- // If it was an error on the VS side, it logs to the output window.
- }
-
- await next();
- });
- }
-
- private static void WatchFileSystem(BlazorConfig config, Action onWrite)
- {
- var clientAppRootDir = Path.GetDirectoryName(config.SourceMSBuildPath);
- var excludePathPrefixes = _excludedDirectories.Select(subdir
- => Path.Combine(clientAppRootDir, subdir) + Path.DirectorySeparatorChar);
-
- var fsw = new FileSystemWatcher(clientAppRootDir);
- fsw.Created += OnEvent;
- fsw.Changed += OnEvent;
- fsw.Deleted += OnEvent;
- fsw.Renamed += OnEvent;
- fsw.IncludeSubdirectories = true;
- fsw.EnableRaisingEvents = true;
-
- // Ensure the watcher is not GCed for as long as the app lives
- lock (_uncollectableWatchers)
- {
- _uncollectableWatchers.Add(fsw);
- }
-
- void OnEvent(object sender, FileSystemEventArgs eventArgs)
- {
- if (!File.Exists(eventArgs.FullPath))
- {
- // It's probably a directory rather than a file
- return;
- }
-
- if (!_includedSuffixes.Any(ext => eventArgs.Name.EndsWith(ext, StringComparison.OrdinalIgnoreCase)))
- {
- // Not a candidate file type
- return;
- }
-
- if (excludePathPrefixes.Any(prefix => eventArgs.FullPath.StartsWith(prefix, StringComparison.Ordinal)))
- {
- // In an excluded subdirectory
- return;
- }
-
- onWrite();
- }
- }
-
- // Represents a three-state value for the state of the build
- //
- // BuildTask == null means the build is out of date, but no build has started
- // BuildTask.IsCompleted == false means the build has been started, but has not completed
- // BuildTask.IsCompleted == true means the build has completed
- private class RebuildToken
- {
- public RebuildToken(DateTime lastChange)
- {
- LastChange = lastChange;
- }
-
- public DateTime LastChange { get; }
-
- public Task BuildTask;
- }
- }
-}
diff --git a/src/Components/Blazor/Server/src/AutoRebuild/IRebuildService.cs b/src/Components/Blazor/Server/src/AutoRebuild/IRebuildService.cs
deleted file mode 100644
index 6e9616e4bf..0000000000
--- a/src/Components/Blazor/Server/src/AutoRebuild/IRebuildService.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-
-namespace Microsoft.AspNetCore.Blazor.Server.AutoRebuild
-{
- ///
- /// Represents a mechanism for rebuilding a .NET project. For example, it
- /// could be a way of signalling to a VS process to perform a build.
- ///
- internal interface IRebuildService
- {
- Task PerformRebuildAsync(string projectFullPath, DateTime ifNotBuiltSince);
- }
-}
diff --git a/src/Components/Blazor/Server/src/AutoRebuild/ProcessUtils.cs b/src/Components/Blazor/Server/src/AutoRebuild/ProcessUtils.cs
deleted file mode 100644
index af63853ed9..0000000000
--- a/src/Components/Blazor/Server/src/AutoRebuild/ProcessUtils.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-
-namespace Microsoft.AspNetCore.Blazor.Server.AutoRebuild
-{
- internal static class ProcessUtils
- {
- // Based on https://stackoverflow.com/a/3346055
-
- public static Process GetParent(Process process)
- {
- var result = new ProcessBasicInformation();
- var handle = process.Handle;
- var status = NtQueryInformationProcess(handle, 0, ref result, Marshal.SizeOf(result), out var returnLength);
- if (status != 0)
- {
- throw new Win32Exception(status);
- }
-
- try
- {
- var parentProcessId = result.InheritedFromUniqueProcessId.ToInt32();
- return parentProcessId > 0 ? Process.GetProcessById(parentProcessId) : null;
- }
- catch (ArgumentException)
- {
- return null; // Process not found
- }
- }
-
- [DllImport("ntdll.dll")]
- private static extern int NtQueryInformationProcess(IntPtr processHandle, int processInformationClass, ref ProcessBasicInformation processInformation, int processInformationLength, out int returnLength);
-
- [StructLayout(LayoutKind.Sequential)]
- struct ProcessBasicInformation
- {
- // These members must match PROCESS_BASIC_INFORMATION
- public IntPtr Reserved1;
- public IntPtr PebBaseAddress;
- public IntPtr Reserved2_0;
- public IntPtr Reserved2_1;
- public IntPtr UniqueProcessId;
- public IntPtr InheritedFromUniqueProcessId;
- }
- }
-}
diff --git a/src/Components/Blazor/Server/src/AutoRebuild/StreamProtocolExtensions.cs b/src/Components/Blazor/Server/src/AutoRebuild/StreamProtocolExtensions.cs
deleted file mode 100644
index 394b26073d..0000000000
--- a/src/Components/Blazor/Server/src/AutoRebuild/StreamProtocolExtensions.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Microsoft.AspNetCore.Blazor.Server.AutoRebuild
-{
- internal static class StreamProtocolExtensions
- {
- public static async Task WriteStringAsync(this Stream stream, string str)
- {
- var utf8Bytes = Encoding.UTF8.GetBytes(str);
- await stream.WriteAsync(BitConverter.GetBytes(utf8Bytes.Length), 0, 4);
- await stream.WriteAsync(utf8Bytes, 0, utf8Bytes.Length);
- }
-
- public static async Task WriteDateTimeAsync(this Stream stream, DateTime value)
- {
- var ticksBytes = BitConverter.GetBytes(value.Ticks);
- await stream.WriteAsync(ticksBytes, 0, 8);
- }
-
- public static async Task ReadBoolAsync(this Stream stream)
- {
- var responseBuf = new byte[1];
- await stream.ReadAsync(responseBuf, 0, 1);
- return responseBuf[0] == 1;
- }
-
- public static async Task ReadIntAsync(this Stream stream)
- {
- var responseBuf = new byte[4];
- await stream.ReadAsync(responseBuf, 0, 4);
- return BitConverter.ToInt32(responseBuf, 0);
- }
- }
-}
diff --git a/src/Components/Blazor/Server/src/AutoRebuild/VSForWindowsRebuildService.cs b/src/Components/Blazor/Server/src/AutoRebuild/VSForWindowsRebuildService.cs
deleted file mode 100644
index 92d99d57dd..0000000000
--- a/src/Components/Blazor/Server/src/AutoRebuild/VSForWindowsRebuildService.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Diagnostics;
-using System.IO.Pipes;
-using System.Runtime.InteropServices;
-using System.Threading.Tasks;
-
-namespace Microsoft.AspNetCore.Blazor.Server.AutoRebuild
-{
- ///
- /// Finds the VS process that launched this app process (if any), and uses
- /// named pipes to communicate with its AutoRebuild listener (if any).
- ///
- internal class VSForWindowsRebuildService : IRebuildService
- {
- private const int _connectionTimeoutMilliseconds = 3000;
- private readonly Process _vsProcess;
-
- public static bool TryCreate(out VSForWindowsRebuildService result)
- {
- var vsProcess = FindAncestorVSProcess();
- if (vsProcess != null)
- {
- result = new VSForWindowsRebuildService(vsProcess);
- return true;
- }
- else
- {
- result = null;
- return false;
- }
- }
-
- public async Task PerformRebuildAsync(string projectFullPath, DateTime ifNotBuiltSince)
- {
- var pipeName = $"BlazorAutoRebuild\\{_vsProcess.Id}";
- using (var pipeClient = new NamedPipeClientStream(pipeName))
- {
- await pipeClient.ConnectAsync(_connectionTimeoutMilliseconds);
-
- // Protocol:
- // 1. Receive protocol version number from the VS listener
- // If we're incompatible with it, send back special string "abort" and end
- // 2. Send the project path to the VS listener
- // 3. Send the 'if not rebuilt since' timestamp to the VS listener
- // 4. Wait for it to send back a bool representing the result
- // Keep in sync with AutoRebuildService.cs in the BlazorExtension project
- // In the future we may extend this to getting back build error details
- var remoteProtocolVersion = await pipeClient.ReadIntAsync();
- if (remoteProtocolVersion == 1)
- {
- await pipeClient.WriteStringAsync(projectFullPath);
- await pipeClient.WriteDateTimeAsync(ifNotBuiltSince);
- return await pipeClient.ReadBoolAsync();
- }
- else
- {
- await pipeClient.WriteStringAsync("abort");
- return false;
- }
- }
- }
-
- private VSForWindowsRebuildService(Process vsProcess)
- {
- _vsProcess = vsProcess ?? throw new ArgumentNullException(nameof(vsProcess));
- }
-
- private static Process FindAncestorVSProcess()
- {
- if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- return null;
- }
-
- var candidateProcess = Process.GetCurrentProcess();
- try
- {
- while (candidateProcess != null && !candidateProcess.HasExited)
- {
- // It's unlikely that anyone's going to have a non-VS process in the process
- // hierarchy called 'devenv', but if that turns out to be a scenario, we could
- // (for example) write the VS PID to the obj directory during build, and then
- // only consider processes with that ID. We still want to be sure there really
- // is such a process in our ancestor chain, otherwise if you did "dotnet run"
- // in a command prompt, we'd be confused and think it was launched from VS.
- if (candidateProcess.ProcessName.Equals("devenv", StringComparison.OrdinalIgnoreCase))
- {
- return candidateProcess;
- }
-
- candidateProcess = ProcessUtils.GetParent(candidateProcess);
- }
- }
- catch (Exception)
- {
- // There's probably some permissions issue that prevents us from seeing
- // further up the ancestor list, so we have to stop looking here.
- }
-
- return null;
- }
- }
-}
diff --git a/src/Components/Blazor/Server/src/BlazorConfig.cs b/src/Components/Blazor/Server/src/BlazorConfig.cs
deleted file mode 100644
index 5438a7e36a..0000000000
--- a/src/Components/Blazor/Server/src/BlazorConfig.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-using System.Linq;
-
-namespace Microsoft.AspNetCore.Blazor.Server
-{
- internal class BlazorConfig
- {
- public string SourceMSBuildPath { get; }
- public string SourceOutputAssemblyPath { get; }
- public string WebRootPath { get; }
- public string DistPath
- => Path.Combine(Path.GetDirectoryName(SourceOutputAssemblyPath), "dist");
- public bool EnableAutoRebuilding { get; }
- public bool EnableDebugging { get; }
-
- public static BlazorConfig Read(string assemblyPath)
- => new BlazorConfig(assemblyPath);
-
- private BlazorConfig(string assemblyPath)
- {
- // TODO: Instead of assuming the lines are in a specific order, either JSON-encode
- // the whole thing, or at least give the lines key prefixes (e.g., "reload:")
- // so we're not dependent on order and all lines being present.
-
- var configFilePath = Path.ChangeExtension(assemblyPath, ".blazor.config");
- var configLines = File.ReadLines(configFilePath).ToList();
- SourceMSBuildPath = configLines[0];
-
- if (SourceMSBuildPath == ".")
- {
- SourceMSBuildPath = assemblyPath;
- }
-
- var sourceMsBuildDir = Path.GetDirectoryName(SourceMSBuildPath);
- SourceOutputAssemblyPath = Path.Combine(sourceMsBuildDir, configLines[1]);
-
- var webRootPath = Path.Combine(sourceMsBuildDir, "wwwroot");
- if (Directory.Exists(webRootPath))
- {
- WebRootPath = webRootPath;
- }
-
- EnableAutoRebuilding = configLines.Contains("autorebuild:true", StringComparer.Ordinal);
- EnableDebugging = configLines.Contains("debug:true", StringComparer.Ordinal);
- }
-
- public string FindIndexHtmlFile()
- {
- // Before publishing, the client project may have a wwwroot directory.
- // If so, and if it contains index.html, use that.
- if (!string.IsNullOrEmpty(WebRootPath))
- {
- var wwwrootIndexHtmlPath = Path.Combine(WebRootPath, "index.html");
- if (File.Exists(wwwrootIndexHtmlPath))
- {
- return wwwrootIndexHtmlPath;
- }
- }
-
- // After publishing, the client project won't have a wwwroot directory.
- // The contents from that dir will have been copied to "dist" during publish.
- // So if "dist/index.html" now exists, use that.
- var distIndexHtmlPath = Path.Combine(DistPath, "index.html");
- if (File.Exists(distIndexHtmlPath))
- {
- return distIndexHtmlPath;
- }
-
- // Since there's no index.html, we'll use the default DefaultPageStaticFileOptions,
- // hence we'll look for index.html in the host server app's wwwroot.
- return null;
- }
- }
-}
diff --git a/src/Components/Blazor/Server/src/Builder/BlazorHostingApplicationBuilderExtensions.cs b/src/Components/Blazor/Server/src/Builder/BlazorHostingApplicationBuilderExtensions.cs
deleted file mode 100644
index 74cb3c7b21..0000000000
--- a/src/Components/Blazor/Server/src/Builder/BlazorHostingApplicationBuilderExtensions.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Net.Mime;
-using Microsoft.AspNetCore.Blazor.Server;
-using Microsoft.AspNetCore.StaticFiles;
-using Microsoft.Extensions.FileProviders;
-
-namespace Microsoft.AspNetCore.Builder
-{
- ///
- /// Provides extension methods for hosting client-side Blazor applications in ASP.NET Core.
- ///
- public static class BlazorHostingApplicationBuilderExtensions
- {
- ///
- /// Adds a that will serve static files from the client-side Blazor application
- /// specified by .
- ///
- /// A type in the client-side application.
- /// The .
- /// The .
- public static IApplicationBuilder UseClientSideBlazorFiles(this IApplicationBuilder app)
- {
- if (app == null)
- {
- throw new ArgumentNullException(nameof(app));
- }
-
- UseClientSideBlazorFiles(app, typeof(TClientApp).Assembly.Location);
- return app;
- }
-
- ///
- /// Adds a that will serve static files from the client-side Blazor application
- /// specified by .
- ///
- /// The file path of the client-side Blazor application assembly.
- /// The .
- /// The .
- public static IApplicationBuilder UseClientSideBlazorFiles(this IApplicationBuilder app, string clientAssemblyFilePath)
- {
- if (clientAssemblyFilePath == null)
- {
- throw new ArgumentNullException(nameof(clientAssemblyFilePath));
- }
-
- var fileProviders = new List();
-
- // TODO: Make the .blazor.config file contents sane
- // Currently the items in it are bizarre and don't relate to their purpose,
- // hence all the path manipulation here. We shouldn't be hardcoding 'dist' here either.
- var config = BlazorConfig.Read(clientAssemblyFilePath);
-
- // First, match the request against files in the client app dist directory
- fileProviders.Add(new PhysicalFileProvider(config.DistPath));
-
- // * Before publishing, we serve the wwwroot files directly from source
- // (and don't require them to be copied into dist).
- // In this case, WebRootPath will be nonempty if that directory exists.
- // * After publishing, the wwwroot files are already copied to 'dist' and
- // will be served by the above middleware, so we do nothing here.
- // In this case, WebRootPath will be empty (the publish process sets this).
- if (!string.IsNullOrEmpty(config.WebRootPath))
- {
- fileProviders.Add(new PhysicalFileProvider(config.WebRootPath));
- }
-
- // We can't modify an IFileContentTypeProvider, so we have to decorate.
- var contentTypeProvider = new FileExtensionContentTypeProvider();
- AddMapping(contentTypeProvider, ".dll", MediaTypeNames.Application.Octet);
- if (config.EnableDebugging)
- {
- AddMapping(contentTypeProvider, ".pdb", MediaTypeNames.Application.Octet);
- }
-
- var options = new StaticFileOptions()
- {
- ContentTypeProvider = contentTypeProvider,
- FileProvider = new CompositeFileProvider(fileProviders),
- OnPrepareResponse = CacheHeaderSettings.SetCacheHeaders,
- };
-
- app.UseStaticFiles(options);
- return app;
-
- static void AddMapping(FileExtensionContentTypeProvider provider, string name, string mimeType)
- {
- if (!provider.Mappings.ContainsKey(name))
- {
- provider.Mappings.Add(name, mimeType);
- }
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Server/src/Builder/BlazorHostingEndpointRouteBuilderExtensions.cs b/src/Components/Blazor/Server/src/Builder/BlazorHostingEndpointRouteBuilderExtensions.cs
deleted file mode 100644
index f899f2576f..0000000000
--- a/src/Components/Blazor/Server/src/Builder/BlazorHostingEndpointRouteBuilderExtensions.cs
+++ /dev/null
@@ -1,193 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.IO;
-using Microsoft.AspNetCore.Blazor.Server;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Routing;
-using Microsoft.AspNetCore.StaticFiles;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.FileProviders;
-
-namespace Microsoft.AspNetCore.Builder
-{
- ///
- /// Provides extension methods for hosting client-side Blazor applications in ASP.NET Core.
- ///
- public static class BlazorHostingEndpointRouteBuilderExtensions
- {
- ///
- /// Adds a low-priority endpoint that will serve the the file specified by from the client-side
- /// Blazor application specified by .
- ///
- /// A type in the client-side application.
- /// The .
- ///
- /// The relative path to the entry point of the client-side application. The path is relative to the
- /// , commonly wwwroot .
- ///
- /// The .
- ///
- ///
- /// This method is intended to handle cases where URL path of the request does not contain a filename, and no other
- /// endpoint has matched. This is convenient for routing requests for dynamic content to the client-side blazor
- /// application, while also allowing requests for non-existent files to result in an HTTP 404.
- ///
- ///
- public static IEndpointConventionBuilder MapFallbackToClientSideBlazor(this IEndpointRouteBuilder endpoints, string filePath)
- {
- if (endpoints == null)
- {
- throw new ArgumentNullException(nameof(endpoints));
- }
-
- if (filePath == null)
- {
- throw new ArgumentNullException(nameof(filePath));
- }
-
- return MapFallbackToClientSideBlazor(endpoints, typeof(TClientApp).Assembly.Location, FallbackEndpointRouteBuilderExtensions.DefaultPattern, filePath);
- }
-
- ///
- /// Adds a low-priority endpoint that will serve the the file specified by from the client-side
- /// Blazor application specified by .
- ///
- /// The .
- /// The file path of the client-side Blazor application assembly.
- ///
- /// The relative path to the entry point of the client-side application. The path is relative to the
- /// , commonly wwwroot .
- ///
- /// The .
- ///
- ///
- /// This method is intended to handle cases where URL path of the request does not contain a filename, and no other
- /// endpoint has matched. This is convenient for routing requests for dynamic content to the client-side blazor
- /// application, while also allowing requests for non-existent files to result in an HTTP 404.
- ///
- ///
- public static IEndpointConventionBuilder MapFallbackToClientSideBlazor(this IEndpointRouteBuilder endpoints, string clientAssemblyFilePath, string filePath)
- {
- if (endpoints == null)
- {
- throw new ArgumentNullException(nameof(endpoints));
- }
-
- if (clientAssemblyFilePath == null)
- {
- throw new ArgumentNullException(nameof(clientAssemblyFilePath));
- }
-
- if (filePath == null)
- {
- throw new ArgumentNullException(nameof(filePath));
- }
-
- return MapFallbackToClientSideBlazor(endpoints, clientAssemblyFilePath, FallbackEndpointRouteBuilderExtensions.DefaultPattern, filePath);
- }
-
- ///
- /// Adds a low-priority endpoint that will serve the the file specified by from the client-side
- /// Blazor application specified by .
- ///
- /// A type in the client-side application.
- /// The .
- /// The route pattern to match.
- ///
- /// The relative path to the entry point of the client-side application. The path is relative to the
- /// , commonly wwwroot .
- ///
- /// The .
- ///
- ///
- /// This method is intended to handle cases where URL path of the request does not contain a filename, and no other
- /// endpoint has matched. This is convenient for routing requests for dynamic content to the client-side blazor
- /// application, while also allowing requests for non-existent files to result in an HTTP 404.
- ///
- ///
- public static IEndpointConventionBuilder MapFallbackToClientSideBlazor(this IEndpointRouteBuilder endpoints, string pattern, string filePath)
- {
- if (endpoints == null)
- {
- throw new ArgumentNullException(nameof(endpoints));
- }
-
- if (pattern == null)
- {
- throw new ArgumentNullException(nameof(pattern));
- }
-
- if (filePath == null)
- {
- throw new ArgumentNullException(nameof(filePath));
- }
-
- return MapFallbackToClientSideBlazor(endpoints, typeof(TClientApp).Assembly.Location, pattern, filePath);
- }
-
- ///
- /// Adds a low-priority endpoint that will serve the the file specified by from the client-side
- /// Blazor application specified by .
- ///
- /// The file path of the client-side Blazor application assembly.
- /// The .
- /// The route pattern to match.
- ///
- /// The relative path to the entry point of the client-side application. The path is relative to the
- /// , commonly wwwroot .
- ///
- /// The .
- ///
- ///
- /// This method is intended to handle cases where URL path of the request does not contain a filename, and no other
- /// endpoint has matched. This is convenient for routing requests for dynamic content to the client-side blazor
- /// application, while also allowing requests for non-existent files to result in an HTTP 404.
- ///
- ///
- public static IEndpointConventionBuilder MapFallbackToClientSideBlazor(this IEndpointRouteBuilder endpoints, string clientAssemblyFilePath, string pattern, string filePath)
- {
- if (endpoints == null)
- {
- throw new ArgumentNullException(nameof(endpoints));
- }
-
- if (clientAssemblyFilePath == null)
- {
- throw new ArgumentNullException(nameof(clientAssemblyFilePath));
- }
-
- if (pattern == null)
- {
- throw new ArgumentNullException(nameof(pattern));
- }
-
- if (filePath == null)
- {
- throw new ArgumentNullException(nameof(filePath));
- }
-
- var config = BlazorConfig.Read(clientAssemblyFilePath);
-
- // We want to serve "index.html" from whichever directory contains it in this priority order:
- // 1. Client app "dist" directory
- // 2. Client app "wwwroot" directory
- // 3. Server app "wwwroot" directory
- var directory = endpoints.ServiceProvider.GetRequiredService().WebRootPath;
- var indexHtml = config.FindIndexHtmlFile();
- if (indexHtml != null)
- {
- directory = Path.GetDirectoryName(indexHtml);
- }
-
- var options = new StaticFileOptions()
- {
- FileProvider = new PhysicalFileProvider(directory),
- OnPrepareResponse = CacheHeaderSettings.SetCacheHeaders,
- };
-
- return endpoints.MapFallbackToFile(pattern, filePath, options);
- }
- }
-}
diff --git a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj
deleted file mode 100644
index 7596c1a8cb..0000000000
--- a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- $(DefaultNetCoreTargetFramework)
- Runtime server features for ASP.NET Core Blazor applications.
- false
- false
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs
deleted file mode 100644
index cbe0fe363a..0000000000
--- a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs
+++ /dev/null
@@ -1,317 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Runtime.InteropServices;
-using System.Text.Json;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Http;
-using WsProxy;
-
-namespace Microsoft.AspNetCore.Builder
-{
- ///
- /// Provides infrastructure for debugging Blazor applications.
- ///
- public static class BlazorMonoDebugProxyAppBuilderExtensions
- {
- private static JsonSerializerOptions JsonOptions = new JsonSerializerOptions
- {
- PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
- PropertyNameCaseInsensitive = true,
- IgnoreNullValues = true
- };
-
- private static string DefaultDebuggerHost = "http://localhost:9222";
-
- ///
- /// Adds middleware for needed for debugging Blazor applications
- /// inside Chromium dev tools.
- ///
- public static void UseBlazorDebugging(this IApplicationBuilder app)
- {
- app.UseWebSockets();
-
- app.UseVisualStudioDebuggerConnectionRequestHandlers();
-
- app.Use((context, next) =>
- {
- var requestPath = context.Request.Path;
- if (!requestPath.StartsWithSegments("/_framework/debug"))
- {
- return next();
- }
-
- if (requestPath.Equals("/_framework/debug/ws-proxy", StringComparison.OrdinalIgnoreCase))
- {
- return DebugWebSocketProxyRequest(context);
- }
-
- if (requestPath.Equals("/_framework/debug", StringComparison.OrdinalIgnoreCase))
- {
- return DebugHome(context);
- }
-
- context.Response.StatusCode = (int)HttpStatusCode.NotFound;
- return Task.CompletedTask;
- });
- }
-
- private static string GetDebuggerHost()
- {
- var envVar = Environment.GetEnvironmentVariable("ASPNETCORE_WEBASSEMBLYDEBUGHOST");
-
- if (string.IsNullOrEmpty(envVar))
- {
- return DefaultDebuggerHost;
- }
- else
- {
- return envVar;
- }
- }
-
- private static int GetDebuggerPort()
- {
- var host = GetDebuggerHost();
- return new Uri(host).Port;
- }
-
- private static void UseVisualStudioDebuggerConnectionRequestHandlers(this IApplicationBuilder app)
- {
- // Unfortunately VS doesn't send any deliberately distinguishing information so we know it's
- // not a regular browser or API client. The closest we can do is look for the *absence* of a
- // User-Agent header. In the future, we should try to get VS to send a special header to indicate
- // this is a debugger metadata request.
- app.Use(async (context, next) =>
- {
- var request = context.Request;
- var requestPath = request.Path;
- if (requestPath.StartsWithSegments("/json")
- && !request.Headers.ContainsKey("User-Agent"))
- {
- if (requestPath.Equals("/json", StringComparison.OrdinalIgnoreCase) || requestPath.Equals("/json/list", StringComparison.OrdinalIgnoreCase))
- {
- var availableTabs = await GetOpenedBrowserTabs();
-
- // Filter the list to only include tabs displaying the requested app,
- // but only during the "choose application to debug" phase. We can't apply
- // the same filter during the "connecting" phase (/json/list), nor do we need to.
- if (requestPath.Equals("/json"))
- {
- availableTabs = availableTabs.Where(tab => tab.Url.StartsWith($"{request.Scheme}://{request.Host}{request.PathBase}/"));
- }
-
- var proxiedTabInfos = availableTabs.Select(tab =>
- {
- var underlyingV8Endpoint = tab.WebSocketDebuggerUrl;
- var proxiedV8Endpoint = $"ws://{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}";
- return new
- {
- description = "",
- devtoolsFrontendUrl = "",
- id = tab.Id,
- title = tab.Title,
- type = tab.Type,
- url = tab.Url,
- webSocketDebuggerUrl = proxiedV8Endpoint
- };
- });
-
- context.Response.ContentType = "application/json";
- await context.Response.WriteAsync(JsonSerializer.Serialize(proxiedTabInfos));
- }
- else if (requestPath.Equals("/json/version", StringComparison.OrdinalIgnoreCase))
- {
- var browserVersionJson = await GetBrowserVersionInfoAsync();
-
- context.Response.ContentType = "application/json";
- await context.Response.WriteAsync(browserVersionJson);
- }
- }
- else
- {
- await next();
- }
- });
- }
-
- private static async Task DebugWebSocketProxyRequest(HttpContext context)
- {
- if (!context.WebSockets.IsWebSocketRequest)
- {
- context.Response.StatusCode = 400;
- return;
- }
-
- var browserUri = new Uri(context.Request.Query["browser"]);
- var ideSocket = await context.WebSockets.AcceptWebSocketAsync();
- await new MonoProxy().Run(browserUri, ideSocket);
- }
-
- private static async Task DebugHome(HttpContext context)
- {
- context.Response.ContentType = "text/html";
-
- var request = context.Request;
- var appRootUrl = $"{request.Scheme}://{request.Host}{request.PathBase}/";
- var targetTabUrl = request.Query["url"];
- if (string.IsNullOrEmpty(targetTabUrl))
- {
- context.Response.StatusCode = (int)HttpStatusCode.BadRequest;
- await context.Response.WriteAsync("No value specified for 'url'");
- return;
- }
-
- // TODO: Allow overriding port (but not hostname, as we're connecting to the
- // local browser, not to the webserver serving the app)
- var debuggerHost = GetDebuggerHost();
- var debuggerTabsListUrl = $"{debuggerHost}/json";
- IEnumerable availableTabs;
-
- try
- {
- availableTabs = await GetOpenedBrowserTabs();
- }
- catch (Exception ex)
- {
- await context.Response.WriteAsync($@"
-Unable to find debuggable browser tab
-
- Could not get a list of browser tabs from {debuggerTabsListUrl}.
- Ensure your browser is running with debugging enabled.
-
-Resolution
-
-
If you are using Google Chrome for your development, follow these instructions:
- {GetLaunchChromeInstructions(appRootUrl)}
-
-
-
If you are using Microsoft Edge (Chromium) for your development, follow these instructions:
- {GetLaunchEdgeInstructions(appRootUrl)}
-
-This should launch a new browser window with debugging enabled..
-Underlying exception:
-{ex}
- ");
-
- return;
- }
-
- var matchingTabs = availableTabs
- .Where(t => t.Url.Equals(targetTabUrl, StringComparison.Ordinal))
- .ToList();
- if (matchingTabs.Count == 0)
- {
- await context.Response.WriteAsync($@"
- Unable to find debuggable browser tab
-
- The response from {debuggerTabsListUrl} does not include
- any entry for {targetTabUrl}.
-
");
- return;
- }
- else if (matchingTabs.Count > 1)
- {
- // TODO: Automatically disambiguate by adding a GUID to the page title
- // when you press the debugger hotkey, include it in the querystring passed
- // here, then remove it once the debugger connects.
- await context.Response.WriteAsync($@"
- Multiple matching tabs are open
-
- There is more than one browser tab at {targetTabUrl}.
- Close the ones you do not wish to debug, then refresh this page.
-
");
- return;
- }
-
- // Now we know uniquely which tab to debug, construct the URL to the debug
- // page and redirect there
- var tabToDebug = matchingTabs.Single();
- var underlyingV8Endpoint = tabToDebug.WebSocketDebuggerUrl;
- var proxyEndpoint = $"{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}";
- var devToolsUrlAbsolute = new Uri(debuggerHost + tabToDebug.DevtoolsFrontendUrl);
- var wsParamName = request.IsHttps ? "wss" : "ws";
- var devToolsUrlWithProxy = $"{devToolsUrlAbsolute.Scheme}://{devToolsUrlAbsolute.Authority}{devToolsUrlAbsolute.AbsolutePath}?{wsParamName}={proxyEndpoint}";
- context.Response.Redirect(devToolsUrlWithProxy);
- }
-
- private static string GetLaunchChromeInstructions(string appRootUrl)
- {
- var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug");
- var debuggerPort = GetDebuggerPort();
-
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- return $@"Press Win+R and enter the following:
- chrome --remote-debugging-port={debuggerPort} --user-data-dir=""{profilePath}"" {appRootUrl}
";
- }
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
- {
- return $@"In a terminal window execute the following:
- google-chrome --remote-debugging-port={debuggerPort} --user-data-dir={profilePath} {appRootUrl}
";
- }
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- return $@"Execute the following:
- open /Applications/Google\ Chrome.app --args --remote-debugging-port={debuggerPort} --user-data-dir={profilePath} {appRootUrl}
";
- }
- else
- {
- throw new InvalidOperationException("Unknown OS platform");
- }
- }
-
- private static string GetLaunchEdgeInstructions(string appRootUrl)
- {
- var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug");
- var debugggerPort = GetDebuggerPort();
-
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- return $@"Press Win+R and enter the following:
- msedge --remote-debugging-port={debugggerPort} --user-data-dir=""{profilePath}"" --no-first-run {appRootUrl}
";
- }
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
- {
- return $@"In a terminal window execute the following:
- open /Applications/Microsoft\ Edge\ Dev.app --args --remote-debugging-port={debugggerPort} --user-data-dir={profilePath} {appRootUrl}
";
- }
- else
- {
- throw new InvalidOperationException("Unknown OS platform");
- }
- }
-
- private static async Task GetBrowserVersionInfoAsync()
- {
- using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
- var debuggerHost = GetDebuggerHost();
- return await httpClient.GetStringAsync($"{debuggerHost}/json/version");
- }
-
- private static async Task> GetOpenedBrowserTabs()
- {
- using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
- var debuggerHost = GetDebuggerHost();
- var jsonResponse = await httpClient.GetStringAsync($"{debuggerHost}/json");
- return JsonSerializer.Deserialize(jsonResponse, JsonOptions);
- }
-
- class BrowserTab
- {
- public string Id { get; set; }
- public string Type { get; set; }
- public string Url { get; set; }
- public string Title { get; set; }
- public string DevtoolsFrontendUrl { get; set; }
- public string WebSocketDebuggerUrl { get; set; }
- }
- }
-}
diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs
deleted file mode 100644
index e1e9b7392b..0000000000
--- a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs
+++ /dev/null
@@ -1,651 +0,0 @@
-using System;
-using System.IO;
-using System.Collections.Generic;
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-using System.Linq;
-using Newtonsoft.Json.Linq;
-using System.Net.Http;
-using Mono.Cecil.Pdb;
-using Newtonsoft.Json;
-using System.Text.RegularExpressions;
-
-namespace WsProxy {
- internal class BreakPointRequest {
- public string Assembly { get; private set; }
- public string File { get; private set; }
- public int Line { get; private set; }
- public int Column { get; private set; }
-
- public override string ToString () {
- return $"BreakPointRequest Assembly: {Assembly} File: {File} Line: {Line} Column: {Column}";
- }
-
- public static BreakPointRequest Parse (JObject args, DebugStore store)
- {
- if (args == null)
- return null;
-
- var url = args? ["url"]?.Value ();
- if (url == null) {
- var urlRegex = args?["urlRegex"].Value();
- var sourceFile = store.GetFileByUrlRegex (urlRegex);
-
- url = sourceFile?.DotNetUrl;
- }
-
- if (url != null && !url.StartsWith ("dotnet://", StringComparison.InvariantCulture)) {
- var sourceFile = store.GetFileByUrl (url);
- url = sourceFile?.DotNetUrl;
- }
-
- if (url == null)
- return null;
-
- var parts = ParseDocumentUrl (url);
- if (parts.Assembly == null)
- return null;
-
- var line = args? ["lineNumber"]?.Value ();
- var column = args? ["columnNumber"]?.Value ();
- if (line == null || column == null)
- return null;
-
- return new BreakPointRequest () {
- Assembly = parts.Assembly,
- File = parts.DocumentPath,
- Line = line.Value,
- Column = column.Value
- };
- }
-
- static (string Assembly, string DocumentPath) ParseDocumentUrl (string url)
- {
- if (Uri.TryCreate (url, UriKind.Absolute, out var docUri) && docUri.Scheme == "dotnet") {
- return (
- docUri.Host,
- docUri.PathAndQuery.Substring (1)
- );
- } else {
- return (null, null);
- }
- }
- }
-
-
- internal class VarInfo {
- public VarInfo (VariableDebugInformation v)
- {
- this.Name = v.Name;
- this.Index = v.Index;
- }
-
- public VarInfo (ParameterDefinition p)
- {
- this.Name = p.Name;
- this.Index = (p.Index + 1) * -1;
- }
- public string Name { get; private set; }
- public int Index { get; private set; }
-
-
- public override string ToString ()
- {
- return $"(var-info [{Index}] '{Name}')";
- }
- }
-
-
- internal class CliLocation {
-
- private MethodInfo method;
- private int offset;
-
- public CliLocation (MethodInfo method, int offset)
- {
- this.method = method;
- this.offset = offset;
- }
-
- public MethodInfo Method { get => method; }
- public int Offset { get => offset; }
- }
-
-
- internal class SourceLocation {
- SourceId id;
- int line;
- int column;
- CliLocation cliLoc;
-
- public SourceLocation (SourceId id, int line, int column)
- {
- this.id = id;
- this.line = line;
- this.column = column;
- }
-
- public SourceLocation (MethodInfo mi, SequencePoint sp)
- {
- this.id = mi.SourceId;
- this.line = sp.StartLine - 1;
- this.column = sp.StartColumn - 1;
- this.cliLoc = new CliLocation (mi, sp.Offset);
- }
-
- public SourceId Id { get => id; }
- public int Line { get => line; }
- public int Column { get => column; }
- public CliLocation CliLocation => this.cliLoc;
-
- public override string ToString ()
- {
- return $"{id}:{Line}:{Column}";
- }
-
- public static SourceLocation Parse (JObject obj)
- {
- if (obj == null)
- return null;
-
- var id = SourceId.TryParse (obj ["scriptId"]?.Value ());
- var line = obj ["lineNumber"]?.Value ();
- var column = obj ["columnNumber"]?.Value ();
- if (id == null || line == null || column == null)
- return null;
-
- return new SourceLocation (id, line.Value, column.Value);
- }
-
- internal JObject ToJObject ()
- {
- return JObject.FromObject (new {
- scriptId = id.ToString (),
- lineNumber = line,
- columnNumber = column
- });
- }
-
- }
-
- internal class SourceId {
- readonly int assembly, document;
-
- public int Assembly => assembly;
- public int Document => document;
-
- internal SourceId (int assembly, int document)
- {
- this.assembly = assembly;
- this.document = document;
- }
-
-
- public SourceId (string id)
- {
- id = id.Substring ("dotnet://".Length);
- var sp = id.Split ('_');
- this.assembly = int.Parse (sp [0]);
- this.document = int.Parse (sp [1]);
- }
-
- public static SourceId TryParse (string id)
- {
- if (!id.StartsWith ("dotnet://", StringComparison.InvariantCulture))
- return null;
- return new SourceId (id);
-
- }
- public override string ToString ()
- {
- return $"dotnet://{assembly}_{document}";
- }
-
- public override bool Equals (object obj)
- {
- if (obj == null)
- return false;
- SourceId that = obj as SourceId;
- return that.assembly == this.assembly && that.document == this.document;
- }
-
- public override int GetHashCode ()
- {
- return this.assembly.GetHashCode () ^ this.document.GetHashCode ();
- }
-
- public static bool operator == (SourceId a, SourceId b)
- {
- if ((object)a == null)
- return (object)b == null;
- return a.Equals (b);
- }
-
- public static bool operator != (SourceId a, SourceId b)
- {
- return !a.Equals (b);
- }
- }
-
- internal class MethodInfo {
- AssemblyInfo assembly;
- internal MethodDefinition methodDef;
- SourceFile source;
-
- public SourceId SourceId => source.SourceId;
-
- public string Name => methodDef.Name;
-
- public SourceLocation StartLocation { get; private set; }
- public SourceLocation EndLocation { get; private set; }
- public AssemblyInfo Assembly => assembly;
- public int Token => (int)methodDef.MetadataToken.RID;
-
- public MethodInfo (AssemblyInfo assembly, MethodDefinition methodDef, SourceFile source)
- {
- this.assembly = assembly;
- this.methodDef = methodDef;
- this.source = source;
-
- var sps = methodDef.DebugInformation.SequencePoints;
- if (sps != null && sps.Count > 0) {
- StartLocation = new SourceLocation (this, sps [0]);
- EndLocation = new SourceLocation (this, sps [sps.Count - 1]);
- }
-
- }
-
- public SourceLocation GetLocationByIl (int pos)
- {
- SequencePoint prev = null;
- foreach (var sp in methodDef.DebugInformation.SequencePoints) {
- if (sp.Offset > pos)
- break;
- prev = sp;
- }
-
- if (prev != null)
- return new SourceLocation (this, prev);
-
- return null;
- }
-
- public VarInfo [] GetLiveVarsAt (int offset)
- {
- var res = new List ();
-
- res.AddRange (methodDef.Parameters.Select (p => new VarInfo (p)));
-
- res.AddRange (methodDef.DebugInformation.GetScopes ()
- .Where (s => s.Start.Offset <= offset && (s.End.IsEndOfMethod || s.End.Offset > offset))
- .SelectMany (s => s.Variables)
- .Where (v => !v.IsDebuggerHidden)
- .Select (v => new VarInfo (v)));
-
-
- return res.ToArray ();
- }
- }
-
- internal class AssemblyInfo {
- static int next_id;
- ModuleDefinition image;
- readonly int id;
- Dictionary methods = new Dictionary ();
- Dictionary sourceLinkMappings = new Dictionary();
- readonly List sources = new List();
-
- public AssemblyInfo (byte[] assembly, byte[] pdb)
- {
- lock (typeof (AssemblyInfo)) {
- this.id = ++next_id;
- }
-
- try {
- ReaderParameters rp = new ReaderParameters (/*ReadingMode.Immediate*/);
- if (pdb != null) {
- rp.ReadSymbols = true;
- rp.SymbolReaderProvider = new PortablePdbReaderProvider ();
- rp.SymbolStream = new MemoryStream (pdb);
- }
-
- rp.ReadingMode = ReadingMode.Immediate;
- rp.InMemory = true;
-
- this.image = ModuleDefinition.ReadModule (new MemoryStream (assembly), rp);
- } catch (BadImageFormatException ex) {
- Console.WriteLine ($"Failed to read assembly as portable PDB: {ex.Message}");
- }
-
- if (this.image == null) {
- ReaderParameters rp = new ReaderParameters (/*ReadingMode.Immediate*/);
- if (pdb != null) {
- rp.ReadSymbols = true;
- rp.SymbolReaderProvider = new NativePdbReaderProvider ();
- rp.SymbolStream = new MemoryStream (pdb);
- }
-
- rp.ReadingMode = ReadingMode.Immediate;
- rp.InMemory = true;
-
- this.image = ModuleDefinition.ReadModule (new MemoryStream (assembly), rp);
- }
-
- Populate ();
- }
-
- public AssemblyInfo ()
- {
- }
-
- void Populate ()
- {
- ProcessSourceLink();
-
- var d2s = new Dictionary ();
-
- Func get_src = (doc) => {
- if (doc == null)
- return null;
- if (d2s.ContainsKey (doc))
- return d2s [doc];
- var src = new SourceFile (this, sources.Count, doc, GetSourceLinkUrl (doc.Url));
- sources.Add (src);
- d2s [doc] = src;
- return src;
- };
-
- foreach (var m in image.GetTypes().SelectMany(t => t.Methods)) {
- Document first_doc = null;
- foreach (var sp in m.DebugInformation.SequencePoints) {
- if (first_doc == null && !sp.Document.Url.EndsWith (".g.cs")) {
- first_doc = sp.Document;
- }
- // else if (first_doc != sp.Document) {
- // //FIXME this is needed for (c)ctors in corlib
- // throw new Exception ($"Cant handle multi-doc methods in {m}");
- //}
- }
-
- if (first_doc == null) {
- // all generated files
- first_doc = m.DebugInformation.SequencePoints.FirstOrDefault ()?.Document;
- }
-
- if (first_doc != null) {
- var src = get_src (first_doc);
- var mi = new MethodInfo (this, m, src);
- int mt = (int)m.MetadataToken.RID;
- this.methods [mt] = mi;
- if (src != null)
- src.AddMethod (mi);
- }
- }
- }
-
- private void ProcessSourceLink ()
- {
- var sourceLinkDebugInfo = image.CustomDebugInformations.FirstOrDefault (i => i.Kind == CustomDebugInformationKind.SourceLink);
-
- if (sourceLinkDebugInfo != null) {
- var sourceLinkContent = ((SourceLinkDebugInformation)sourceLinkDebugInfo).Content;
-
- if (sourceLinkContent != null) {
- var jObject = JObject.Parse (sourceLinkContent) ["documents"];
- sourceLinkMappings = JsonConvert.DeserializeObject> (jObject.ToString ());
- }
- }
- }
-
- private Uri GetSourceLinkUrl (string document)
- {
- if (sourceLinkMappings.TryGetValue (document, out string url)) {
- return new Uri (url);
- }
-
- foreach (var sourceLinkDocument in sourceLinkMappings) {
- string key = sourceLinkDocument.Key;
-
- if (Path.GetFileName (key) != "*") {
- continue;
- }
-
- var keyTrim = key.TrimEnd ('*');
-
- if (document.StartsWith(keyTrim, StringComparison.OrdinalIgnoreCase)) {
- var docUrlPart = document.Replace (keyTrim, "");
- return new Uri (sourceLinkDocument.Value.TrimEnd ('*') + docUrlPart);
- }
- }
-
- return null;
- }
-
- private string GetRelativePath (string relativeTo, string path)
- {
- var uri = new Uri (relativeTo, UriKind.RelativeOrAbsolute);
- var rel = Uri.UnescapeDataString (uri.MakeRelativeUri (new Uri (path, UriKind.RelativeOrAbsolute)).ToString ()).Replace (Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
- if (rel.Contains (Path.DirectorySeparatorChar.ToString ()) == false) {
- rel = $".{ Path.DirectorySeparatorChar }{ rel }";
- }
- return rel;
- }
-
- public IEnumerable Sources {
- get { return this.sources; }
- }
-
- public int Id => id;
- public string Name => image.Name;
-
- public SourceFile GetDocById (int document)
- {
- return sources.FirstOrDefault (s => s.SourceId.Document == document);
- }
-
- public MethodInfo GetMethodByToken (int token)
- {
- methods.TryGetValue (token, out var value);
- return value;
- }
- }
-
- internal class SourceFile {
- HashSet methods;
- AssemblyInfo assembly;
- int id;
- Document doc;
-
- internal SourceFile (AssemblyInfo assembly, int id, Document doc, Uri sourceLinkUri)
- {
- this.methods = new HashSet ();
- this.SourceLinkUri = sourceLinkUri;
- this.assembly = assembly;
- this.id = id;
- this.doc = doc;
- this.DebuggerFileName = doc.Url.Replace ("\\", "/").Replace (":", "");
-
- this.SourceUri = new Uri ((Path.IsPathRooted (doc.Url) ? "file://" : "") + doc.Url, UriKind.RelativeOrAbsolute);
- if (SourceUri.IsFile && File.Exists (SourceUri.LocalPath)) {
- this.Url = this.SourceUri.ToString ();
- } else {
- this.Url = DotNetUrl;
- }
-
- }
-
- internal void AddMethod (MethodInfo mi)
- {
- this.methods.Add (mi);
- }
- public string DebuggerFileName { get; }
- public string Url { get; }
- public string AssemblyName => assembly.Name;
- public string DotNetUrl => $"dotnet://{assembly.Name}/{DebuggerFileName}";
- public string DocHashCode => "abcdee" + id;
- public SourceId SourceId => new SourceId (assembly.Id, this.id);
- public Uri SourceLinkUri { get; }
- public Uri SourceUri { get; }
-
- public IEnumerable Methods => this.methods;
- }
-
- internal class DebugStore {
- List assemblies = new List ();
-
- public DebugStore (string [] loaded_files)
- {
- bool MatchPdb (string asm, string pdb)
- {
- return Path.ChangeExtension (asm, "pdb") == pdb;
- }
-
- var asm_files = new List ();
- var pdb_files = new List ();
- foreach (var f in loaded_files) {
- var file_name = f;
- if (file_name.EndsWith (".pdb", StringComparison.OrdinalIgnoreCase))
- pdb_files.Add (file_name);
- else
- asm_files.Add (file_name);
- }
-
- //FIXME make this parallel
- foreach (var p in asm_files) {
- try {
- var pdb = pdb_files.FirstOrDefault (n => MatchPdb (p, n));
- HttpClient h = new HttpClient ();
- var assembly_bytes = h.GetByteArrayAsync (p).Result;
- byte [] pdb_bytes = null;
- if (pdb != null)
- pdb_bytes = h.GetByteArrayAsync (pdb).Result;
-
- this.assemblies.Add (new AssemblyInfo (assembly_bytes, pdb_bytes));
- } catch (Exception e) {
- Console.WriteLine ($"Failed to read {p} ({e.Message})");
- }
- }
- }
-
- public IEnumerable AllSources ()
- {
- foreach (var a in assemblies) {
- foreach (var s in a.Sources)
- yield return s;
- }
- }
-
- public SourceFile GetFileById (SourceId id)
- {
- return AllSources ().FirstOrDefault (f => f.SourceId.Equals (id));
- }
-
- public AssemblyInfo GetAssemblyByName (string name)
- {
- return assemblies.FirstOrDefault (a => a.Name.Equals (name, StringComparison.InvariantCultureIgnoreCase));
- }
-
- /*
- V8 uses zero based indexing for both line and column.
- PPDBs uses one based indexing for both line and column.
- */
- static bool Match (SequencePoint sp, SourceLocation start, SourceLocation end)
- {
- var spStart = (Line: sp.StartLine - 1, Column: sp.StartColumn - 1);
- var spEnd = (Line: sp.EndLine - 1, Column: sp.EndColumn - 1);
-
- if (start.Line > spStart.Line)
- return false;
- if (start.Column > spStart.Column && start.Line == sp.StartLine)
- return false;
-
- if (end.Line < spEnd.Line)
- return false;
-
- if (end.Column < spEnd.Column && end.Line == spEnd.Line)
- return false;
-
- return true;
- }
-
- public List FindPossibleBreakpoints (SourceLocation start, SourceLocation end)
- {
- //XXX FIXME no idea what todo with locations on different files
- if (start.Id != end.Id)
- return null;
- var src_id = start.Id;
-
- var doc = GetFileById (src_id);
-
- var res = new List ();
- if (doc == null) {
- //FIXME we need to write up logging here
- Console.WriteLine ($"Could not find document {src_id}");
- return res;
- }
-
- foreach (var m in doc.Methods) {
- foreach (var sp in m.methodDef.DebugInformation.SequencePoints) {
- if (Match (sp, start, end))
- res.Add (new SourceLocation (m, sp));
- }
- }
- return res;
- }
-
- /*
- V8 uses zero based indexing for both line and column.
- PPDBs uses one based indexing for both line and column.
- */
- static bool Match (SequencePoint sp, int line, int column)
- {
- var bp = (line: line + 1, column: column + 1);
-
- if (sp.StartLine > bp.line || sp.EndLine < bp.line)
- return false;
-
- //Chrome sends a zero column even if getPossibleBreakpoints say something else
- if (column == 0)
- return true;
-
- if (sp.StartColumn > bp.column && sp.StartLine == bp.line)
- return false;
-
- if (sp.EndColumn < bp.column && sp.EndLine == bp.line)
- return false;
-
- return true;
- }
-
- public SourceLocation FindBestBreakpoint (BreakPointRequest req)
- {
- var asm = assemblies.FirstOrDefault (a => a.Name.Equals (req.Assembly, StringComparison.OrdinalIgnoreCase));
- var src = asm?.Sources?.FirstOrDefault (s => s.DebuggerFileName.Equals (req.File, StringComparison.OrdinalIgnoreCase));
-
- if (src == null)
- return null;
-
- foreach (var m in src.Methods) {
- foreach (var sp in m.methodDef.DebugInformation.SequencePoints) {
- //FIXME handle multi doc methods
- if (Match (sp, req.Line, req.Column))
- return new SourceLocation (m, sp);
- }
- }
-
- return null;
- }
-
- public string ToUrl (SourceLocation location)
- => location != null ? GetFileById (location.Id).Url : "";
-
- public SourceFile GetFileByUrlRegex (string urlRegex)
- {
- var regex = new Regex (urlRegex);
- return AllSources ().FirstOrDefault (file => regex.IsMatch (file.Url.ToString()));
- }
-
- public SourceFile GetFileByUrl (string url)
- => AllSources ().FirstOrDefault (file => file.Url.ToString() == url);
- }
-}
diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs
deleted file mode 100644
index eb4cf65b50..0000000000
--- a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs
+++ /dev/null
@@ -1,792 +0,0 @@
-using System;
-using System.Linq;
-using System.Threading.Tasks;
-using Newtonsoft.Json.Linq;
-
-using System.Net.WebSockets;
-using System.Threading;
-using System.IO;
-using System.Text;
-using System.Collections.Generic;
-using System.Net;
-
-namespace WsProxy {
-
- internal class MonoCommands {
- public const string GET_CALL_STACK = "MONO.mono_wasm_get_call_stack()";
- public const string IS_RUNTIME_READY_VAR = "MONO.mono_wasm_runtime_is_ready";
- public const string START_SINGLE_STEPPING = "MONO.mono_wasm_start_single_stepping({0})";
- public const string GET_SCOPE_VARIABLES = "MONO.mono_wasm_get_variables({0}, [ {1} ])";
- public const string SET_BREAK_POINT = "MONO.mono_wasm_set_breakpoint(\"{0}\", {1}, {2})";
- public const string REMOVE_BREAK_POINT = "MONO.mono_wasm_remove_breakpoint({0})";
- public const string GET_LOADED_FILES = "MONO.mono_wasm_get_loaded_files()";
- public const string CLEAR_ALL_BREAKPOINTS = "MONO.mono_wasm_clear_all_breakpoints()";
- public const string GET_OBJECT_PROPERTIES = "MONO.mono_wasm_get_object_properties({0})";
- public const string GET_ARRAY_VALUES = "MONO.mono_wasm_get_array_values({0})";
- }
-
- internal enum MonoErrorCodes {
- BpNotFound = 100000,
- }
-
-
- internal class MonoConstants {
- public const string RUNTIME_IS_READY = "mono_wasm_runtime_ready";
- }
- class Frame {
- public Frame (MethodInfo method, SourceLocation location, int id)
- {
- this.Method = method;
- this.Location = location;
- this.Id = id;
- }
-
- public MethodInfo Method { get; private set; }
- public SourceLocation Location { get; private set; }
- public int Id { get; private set; }
- }
-
-
- class Breakpoint {
- public SourceLocation Location { get; private set; }
- public int LocalId { get; private set; }
- public int RemoteId { get; set; }
- public BreakPointState State { get; set; }
-
- public Breakpoint (SourceLocation loc, int localId, BreakPointState state)
- {
- this.Location = loc;
- this.LocalId = localId;
- this.State = state;
- }
- }
-
- enum BreakPointState {
- Active,
- Disabled,
- Pending
- }
-
- enum StepKind {
- Into,
- Out,
- Over
- }
-
- internal class MonoProxy : WsProxy {
- DebugStore store;
- List breakpoints = new List ();
- List current_callstack;
- bool runtime_ready;
- int local_breakpoint_id;
- int ctx_id;
- JObject aux_ctx_data;
-
- public MonoProxy () { }
-
- protected override async Task AcceptEvent (string method, JObject args, CancellationToken token)
- {
- switch (method) {
- case "Runtime.executionContextCreated": {
- var ctx = args? ["context"];
- var aux_data = ctx? ["auxData"] as JObject;
- if (aux_data != null) {
- var is_default = aux_data ["isDefault"]?.Value ();
- if (is_default == true) {
- var ctx_id = ctx ["id"].Value ();
- await OnDefaultContext (ctx_id, aux_data, token);
- }
- }
- break;
- }
- case "Debugger.paused": {
- //TODO figure out how to stich out more frames and, in particular what happens when real wasm is on the stack
- var top_func = args? ["callFrames"]? [0]? ["functionName"]?.Value ();
- if (top_func == "mono_wasm_fire_bp" || top_func == "_mono_wasm_fire_bp") {
- await OnBreakPointHit (args, token);
- return true;
- }
- if (top_func == MonoConstants.RUNTIME_IS_READY) {
- await OnRuntimeReady (token);
- return true;
- }
- break;
- }
- case "Debugger.scriptParsed":{
- if (args?["url"]?.Value ()?.StartsWith ("wasm://") == true) {
- // Console.WriteLine ("ignoring wasm event");
- return true;
- }
- break;
- }
- }
-
- return false;
- }
-
-
- protected override async Task AcceptCommand (int id, string method, JObject args, CancellationToken token)
- {
- switch (method) {
- case "Debugger.getScriptSource": {
- var script_id = args? ["scriptId"]?.Value ();
- if (script_id.StartsWith ("dotnet://", StringComparison.InvariantCultureIgnoreCase)) {
- await OnGetScriptSource (id, script_id, token);
- return true;
- }
-
- break;
- }
- case "Runtime.compileScript": {
- var exp = args? ["expression"]?.Value ();
- if (exp.StartsWith ("//dotnet:", StringComparison.InvariantCultureIgnoreCase)) {
- OnCompileDotnetScript (id, token);
- return true;
- }
- break;
- }
-
- case "Debugger.getPossibleBreakpoints": {
- var start = SourceLocation.Parse (args? ["start"] as JObject);
- //FIXME support variant where restrictToFunction=true and end is omitted
- var end = SourceLocation.Parse (args? ["end"] as JObject);
- if (start != null && end != null)
- return GetPossibleBreakpoints (id, start, end, token);
- break;
- }
-
- case "Debugger.setBreakpointByUrl": {
- Info ($"BP req {args}");
- var bp_req = BreakPointRequest.Parse (args, store);
- if (bp_req != null) {
- await SetBreakPoint (id, bp_req, token);
- return true;
- }
- break;
- }
- case "Debugger.removeBreakpoint": {
- return await RemoveBreakpoint (id, args, token);
- }
-
- case "Debugger.resume": {
- await OnResume (token);
- break;
- }
-
- case "Debugger.stepInto": {
- if (this.current_callstack != null) {
- await Step (id, StepKind.Into, token);
- return true;
- }
- break;
- }
-
- case "Debugger.stepOut": {
- if (this.current_callstack != null) {
- await Step (id, StepKind.Out, token);
- return true;
- }
- break;
- }
-
- case "Debugger.stepOver": {
- if (this.current_callstack != null) {
- await Step (id, StepKind.Over, token);
- return true;
- }
- break;
- }
-
- case "Runtime.getProperties": {
- var objId = args? ["objectId"]?.Value ();
- if (objId.StartsWith ("dotnet:scope:", StringComparison.InvariantCulture)) {
- await GetScopeProperties (id, int.Parse (objId.Substring ("dotnet:scope:".Length)), token);
- return true;
- }
- if (objId.StartsWith("dotnet:", StringComparison.InvariantCulture))
- {
- if (objId.StartsWith("dotnet:object:", StringComparison.InvariantCulture))
- await GetDetails(id, int.Parse(objId.Substring("dotnet:object:".Length)), token, MonoCommands.GET_OBJECT_PROPERTIES);
- if (objId.StartsWith("dotnet:array:", StringComparison.InvariantCulture))
- await GetDetails(id, int.Parse(objId.Substring("dotnet:array:".Length)), token, MonoCommands.GET_ARRAY_VALUES);
- return true;
- }
- break;
- }
- }
-
- return false;
- }
-
- async Task OnRuntimeReady (CancellationToken token)
- {
- Info ("RUNTIME READY, PARTY TIME");
- await RuntimeReady (token);
- await SendCommand ("Debugger.resume", new JObject (), token);
- SendEvent ("Mono.runtimeReady", new JObject (), token);
- }
-
- async Task OnBreakPointHit (JObject args, CancellationToken token)
- {
- //FIXME we should send release objects every now and then? Or intercept those we inject and deal in the runtime
- var o = JObject.FromObject (new {
- expression = MonoCommands.GET_CALL_STACK,
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true
- });
-
- var orig_callframes = args? ["callFrames"]?.Values ();
- var res = await SendCommand ("Runtime.evaluate", o, token);
-
- if (res.IsErr) {
- //Give up and send the original call stack
- SendEvent ("Debugger.paused", args, token);
- return;
- }
-
- //step one, figure out where did we hit
- var res_value = res.Value? ["result"]? ["value"];
- if (res_value == null || res_value is JValue) {
- //Give up and send the original call stack
- SendEvent ("Debugger.paused", args, token);
- return;
- }
-
- Debug ($"call stack (err is {res.Error} value is:\n{res.Value}");
- var bp_id = res_value? ["breakpoint_id"]?.Value ();
- Debug ($"We just hit bp {bp_id}");
- if (!bp_id.HasValue) {
- //Give up and send the original call stack
- SendEvent ("Debugger.paused", args, token);
- return;
- }
- var bp = this.breakpoints.FirstOrDefault (b => b.RemoteId == bp_id.Value);
-
- var src = bp == null ? null : store.GetFileById (bp.Location.Id);
-
- var callFrames = new List ();
- foreach (var frame in orig_callframes) {
- var function_name = frame ["functionName"]?.Value ();
- var url = frame ["url"]?.Value ();
- if ("mono_wasm_fire_bp" == function_name || "_mono_wasm_fire_bp" == function_name) {
- var frames = new List ();
- int frame_id = 0;
- var the_mono_frames = res.Value? ["result"]? ["value"]? ["frames"]?.Values ();
-
- foreach (var mono_frame in the_mono_frames) {
- var il_pos = mono_frame ["il_pos"].Value ();
- var method_token = mono_frame ["method_token"].Value ();
- var assembly_name = mono_frame ["assembly_name"].Value ();
-
- var asm = store.GetAssemblyByName (assembly_name);
- if (asm == null) {
- Info ($"Unable to find assembly: {assembly_name}");
- continue;
- }
-
- var method = asm.GetMethodByToken (method_token);
-
- if (method == null) {
- Info ($"Unable to find il offset: {il_pos} in method token: {method_token} assembly name: {assembly_name}");
- continue;
- }
-
- var location = method?.GetLocationByIl (il_pos);
-
- // When hitting a breakpoint on the "IncrementCount" method in the standard
- // Blazor project template, one of the stack frames is inside mscorlib.dll
- // and we get location==null for it. It will trigger a NullReferenceException
- // if we don't skip over that stack frame.
- if (location == null) {
- continue;
- }
-
- Info ($"frame il offset: {il_pos} method token: {method_token} assembly name: {assembly_name}");
- Info ($"\tmethod {method.Name} location: {location}");
- frames.Add (new Frame (method, location, frame_id));
-
- callFrames.Add (JObject.FromObject (new {
- functionName = method.Name,
- callFrameId = $"dotnet:scope:{frame_id}",
- functionLocation = method.StartLocation.ToJObject (),
-
- location = location.ToJObject (),
-
- url = store.ToUrl (location),
-
- scopeChain = new [] {
- new {
- type = "local",
- @object = new {
- @type = "object",
- className = "Object",
- description = "Object",
- objectId = $"dotnet:scope:{frame_id}",
- },
- name = method.Name,
- startLocation = method.StartLocation.ToJObject (),
- endLocation = method.EndLocation.ToJObject (),
- }}
- }));
-
- ++frame_id;
- this.current_callstack = frames;
-
- }
- } else if (!(function_name.StartsWith ("wasm-function", StringComparison.InvariantCulture)
- || url.StartsWith ("wasm://wasm/", StringComparison.InvariantCulture))) {
- callFrames.Add (frame);
- }
- }
-
- var bp_list = new string [bp == null ? 0 : 1];
- if (bp != null)
- bp_list [0] = $"dotnet:{bp.LocalId}";
-
- o = JObject.FromObject (new {
- callFrames = callFrames,
- reason = "other", //other means breakpoint
- hitBreakpoints = bp_list,
- });
-
- SendEvent ("Debugger.paused", o, token);
- }
-
- async Task OnDefaultContext (int ctx_id, JObject aux_data, CancellationToken token)
- {
- Debug ("Default context created, clearing state and sending events");
-
- //reset all bps
- foreach (var b in this.breakpoints){
- b.State = BreakPointState.Pending;
- }
- this.runtime_ready = false;
-
- var o = JObject.FromObject (new {
- expression = MonoCommands.IS_RUNTIME_READY_VAR,
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true
- });
- this.ctx_id = ctx_id;
- this.aux_ctx_data = aux_data;
-
- Debug ("checking if the runtime is ready");
- var res = await SendCommand ("Runtime.evaluate", o, token);
- var is_ready = res.Value? ["result"]? ["value"]?.Value ();
- //Debug ($"\t{is_ready}");
- if (is_ready.HasValue && is_ready.Value == true) {
- Debug ("RUNTIME LOOK READY. GO TIME!");
- await OnRuntimeReady (token);
- }
- }
-
-
- async Task OnResume (CancellationToken token)
- {
- //discard frames
- this.current_callstack = null;
- await Task.CompletedTask;
- }
-
- async Task Step (int msg_id, StepKind kind, CancellationToken token)
- {
-
- var o = JObject.FromObject (new {
- expression = string.Format (MonoCommands.START_SINGLE_STEPPING, (int)kind),
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true,
- });
-
- var res = await SendCommand ("Runtime.evaluate", o, token);
-
- SendResponse (msg_id, Result.Ok (new JObject ()), token);
-
- this.current_callstack = null;
-
- await SendCommand ("Debugger.resume", new JObject (), token);
- }
-
- async Task GetDetails(int msg_id, int object_id, CancellationToken token, string command)
- {
- var o = JObject.FromObject(new
- {
- expression = string.Format(command, object_id),
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true,
- });
-
- var res = await SendCommand("Runtime.evaluate", o, token);
-
- //if we fail we just buble that to the IDE (and let it panic over it)
- if (res.IsErr)
- {
- SendResponse(msg_id, res, token);
- return;
- }
-
- try {
- var values = res.Value?["result"]?["value"]?.Values().ToArray() ?? Array.Empty();
- var var_list = new List();
-
- // Trying to inspect the stack frame for DotNetDispatcher::InvokeSynchronously
- // results in a "Memory access out of bounds", causing 'values' to be null,
- // so skip returning variable values in that case.
- for (int i = 0; i < values.Length; i+=2)
- {
- string fieldName = (string)values[i]["name"];
- if (fieldName.Contains("k__BackingField")){
- fieldName = fieldName.Replace("k__BackingField", "");
- fieldName = fieldName.Replace("<", "");
- fieldName = fieldName.Replace(">", "");
- }
- var value = values [i + 1]? ["value"];
- if (((string)value ["description"]) == null)
- value ["description"] = value ["value"]?.ToString ();
-
- var_list.Add(JObject.FromObject(new {
- name = fieldName,
- value
- }));
-
- }
- o = JObject.FromObject(new
- {
- result = var_list
- });
- } catch (Exception) {
- Debug ($"failed to parse {res.Value}");
- }
- SendResponse(msg_id, Result.Ok(o), token);
- }
-
-
- async Task GetScopeProperties (int msg_id, int scope_id, CancellationToken token)
- {
- var scope = this.current_callstack.FirstOrDefault (s => s.Id == scope_id);
- var vars = scope.Method.GetLiveVarsAt (scope.Location.CliLocation.Offset);
-
-
- var var_ids = string.Join (",", vars.Select (v => v.Index));
-
- var o = JObject.FromObject (new {
- expression = string.Format (MonoCommands.GET_SCOPE_VARIABLES, scope.Id, var_ids),
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true,
- });
-
- var res = await SendCommand ("Runtime.evaluate", o, token);
-
- //if we fail we just buble that to the IDE (and let it panic over it)
- if (res.IsErr) {
- SendResponse (msg_id, res, token);
- return;
- }
-
- try {
- var values = res.Value? ["result"]? ["value"]?.Values ().ToArray ();
-
- var var_list = new List ();
- int i = 0;
- // Trying to inspect the stack frame for DotNetDispatcher::InvokeSynchronously
- // results in a "Memory access out of bounds", causing 'values' to be null,
- // so skip returning variable values in that case.
- while (values != null && i < vars.Length && i < values.Length) {
- var value = values [i] ["value"];
- if (((string)value ["description"]) == null)
- value ["description"] = value ["value"]?.ToString ();
-
- var_list.Add (JObject.FromObject (new {
- name = vars [i].Name,
- value
- }));
- i++;
- }
- //Async methods are special in the way that local variables can be lifted to generated class fields
- //value of "this" comes here either
- while (i < values.Length) {
- String name = values [i] ["name"].ToString ();
-
- if (name.IndexOf (">", StringComparison.Ordinal) > 0)
- name = name.Substring (1, name.IndexOf (">", StringComparison.Ordinal) - 1);
-
- var value = values [i + 1] ["value"];
- if (((string)value ["description"]) == null)
- value ["description"] = value ["value"]?.ToString ();
-
- var_list.Add (JObject.FromObject (new {
- name,
- value
- }));
- i = i + 2;
- }
- o = JObject.FromObject (new {
- result = var_list
- });
- SendResponse (msg_id, Result.Ok (o), token);
- }
- catch (Exception) {
- SendResponse (msg_id, res, token);
- }
- }
-
- async Task EnableBreakPoint (Breakpoint bp, CancellationToken token)
- {
- var asm_name = bp.Location.CliLocation.Method.Assembly.Name;
- var method_token = bp.Location.CliLocation.Method.Token;
- var il_offset = bp.Location.CliLocation.Offset;
-
- var o = JObject.FromObject (new {
- expression = string.Format (MonoCommands.SET_BREAK_POINT, asm_name, method_token, il_offset),
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true,
- });
-
- var res = await SendCommand ("Runtime.evaluate", o, token);
- var ret_code = res.Value? ["result"]? ["value"]?.Value ();
-
- if (ret_code.HasValue) {
- bp.RemoteId = ret_code.Value;
- bp.State = BreakPointState.Active;
- //Debug ($"BP local id {bp.LocalId} enabled with remote id {bp.RemoteId}");
- }
-
- return res;
- }
-
- async Task RuntimeReady (CancellationToken token)
- {
-
- var o = JObject.FromObject (new {
- expression = MonoCommands.GET_LOADED_FILES,
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true,
- });
- var loaded_pdbs = await SendCommand ("Runtime.evaluate", o, token);
- var the_value = loaded_pdbs.Value? ["result"]? ["value"];
- var the_pdbs = the_value?.ToObject ();
- this.store = new DebugStore (the_pdbs);
-
- foreach (var s in store.AllSources ()) {
- var ok = JObject.FromObject (new {
- scriptId = s.SourceId.ToString (),
- url = s.Url,
- executionContextId = this.ctx_id,
- hash = s.DocHashCode,
- executionContextAuxData = this.aux_ctx_data,
- dotNetUrl = s.DotNetUrl
- });
- //Debug ($"\tsending {s.Url}");
- SendEvent ("Debugger.scriptParsed", ok, token);
- }
-
- o = JObject.FromObject (new {
- expression = MonoCommands.CLEAR_ALL_BREAKPOINTS,
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true,
- });
-
- var clear_result = await SendCommand ("Runtime.evaluate", o, token);
- if (clear_result.IsErr) {
- Debug ($"Failed to clear breakpoints due to {clear_result}");
- }
-
-
- runtime_ready = true;
-
- foreach (var bp in breakpoints) {
- if (bp.State != BreakPointState.Pending)
- continue;
- var res = await EnableBreakPoint (bp, token);
- var ret_code = res.Value? ["result"]? ["value"]?.Value ();
-
- //if we fail we just buble that to the IDE (and let it panic over it)
- if (!ret_code.HasValue) {
- //FIXME figure out how to inform the IDE of that.
- Info ($"FAILED TO ENABLE BP {bp.LocalId}");
- bp.State = BreakPointState.Disabled;
- }
- }
- }
-
- async Task RemoveBreakpoint(int msg_id, JObject args, CancellationToken token) {
- var bpid = args? ["breakpointId"]?.Value ();
- if (bpid?.StartsWith ("dotnet:") != true)
- return false;
-
- var the_id = int.Parse (bpid.Substring ("dotnet:".Length));
-
- var bp = breakpoints.FirstOrDefault (b => b.LocalId == the_id);
- if (bp == null) {
- Info ($"Could not find dotnet bp with id {the_id}");
- return false;
- }
-
- breakpoints.Remove (bp);
- //FIXME verify result (and log?)
- var res = await RemoveBreakPoint (bp, token);
-
- return true;
- }
-
-
- async Task RemoveBreakPoint (Breakpoint bp, CancellationToken token)
- {
- var o = JObject.FromObject (new {
- expression = string.Format (MonoCommands.REMOVE_BREAK_POINT, bp.RemoteId),
- objectGroup = "mono_debugger",
- includeCommandLineAPI = false,
- silent = false,
- returnByValue = true,
- });
-
- var res = await SendCommand ("Runtime.evaluate", o, token);
- var ret_code = res.Value? ["result"]? ["value"]?.Value ();
-
- if (ret_code.HasValue) {
- bp.RemoteId = -1;
- bp.State = BreakPointState.Disabled;
- }
-
- return res;
- }
-
- async Task SetBreakPoint (int msg_id, BreakPointRequest req, CancellationToken token)
- {
- var bp_loc = store.FindBestBreakpoint (req);
- Info ($"BP request for '{req}' runtime ready {runtime_ready} location '{bp_loc}'");
- if (bp_loc == null) {
-
- Info ($"Could not resolve breakpoint request: {req}");
- SendResponse (msg_id, Result.Err(JObject.FromObject (new {
- code = (int)MonoErrorCodes.BpNotFound,
- message = $"C# Breakpoint at {req} not found."
- })), token);
- return;
- }
-
- Breakpoint bp = null;
- if (!runtime_ready) {
- bp = new Breakpoint (bp_loc, local_breakpoint_id++, BreakPointState.Pending);
- } else {
- bp = new Breakpoint (bp_loc, local_breakpoint_id++, BreakPointState.Disabled);
-
- var res = await EnableBreakPoint (bp, token);
- var ret_code = res.Value? ["result"]? ["value"]?.Value ();
-
- //if we fail we just buble that to the IDE (and let it panic over it)
- if (!ret_code.HasValue) {
- SendResponse (msg_id, res, token);
- return;
- }
- }
-
- var locations = new List ();
-
- locations.Add (JObject.FromObject (new {
- scriptId = bp_loc.Id.ToString (),
- lineNumber = bp_loc.Line,
- columnNumber = bp_loc.Column
- }));
-
- breakpoints.Add (bp);
-
- var ok = JObject.FromObject (new {
- breakpointId = $"dotnet:{bp.LocalId}",
- locations = locations,
- });
-
- SendResponse (msg_id, Result.Ok (ok), token);
- }
-
- bool GetPossibleBreakpoints (int msg_id, SourceLocation start, SourceLocation end, CancellationToken token)
- {
- var bps = store.FindPossibleBreakpoints (start, end);
- if (bps == null)
- return false;
-
- var loc = new List ();
- foreach (var b in bps) {
- loc.Add (b.ToJObject ());
- }
-
- var o = JObject.FromObject (new {
- locations = loc
- });
-
- SendResponse (msg_id, Result.Ok (o), token);
-
- return true;
- }
-
- void OnCompileDotnetScript (int msg_id, CancellationToken token)
- {
- var o = JObject.FromObject (new { });
-
- SendResponse (msg_id, Result.Ok (o), token);
-
- }
-
- async Task OnGetScriptSource (int msg_id, string script_id, CancellationToken token)
- {
- var id = new SourceId (script_id);
- var src_file = store.GetFileById (id);
-
- var res = new StringWriter ();
- //res.WriteLine ($"//{id}");
-
- try {
- var uri = new Uri (src_file.Url);
- if (uri.IsFile && File.Exists(uri.LocalPath)) {
- using (var f = new StreamReader (File.Open (src_file.SourceUri.LocalPath, FileMode.Open))) {
- await res.WriteAsync (await f.ReadToEndAsync ());
- }
-
- var o = JObject.FromObject (new {
- scriptSource = res.ToString ()
- });
-
- SendResponse (msg_id, Result.Ok (o), token);
- } else if(src_file.SourceLinkUri != null) {
- var doc = await new WebClient ().DownloadStringTaskAsync (src_file.SourceLinkUri);
- await res.WriteAsync (doc);
-
- var o = JObject.FromObject (new {
- scriptSource = res.ToString ()
- });
-
- SendResponse (msg_id, Result.Ok (o), token);
- } else {
- var o = JObject.FromObject (new {
- scriptSource = $"// Unable to find document {src_file.SourceUri}"
- });
-
- SendResponse (msg_id, Result.Ok (o), token);
- }
- } catch (Exception e) {
- var o = JObject.FromObject (new {
- scriptSource = $"// Unable to read document ({e.Message})\n" +
- $"Local path: {src_file?.SourceUri}\n" +
- $"SourceLink path: {src_file?.SourceLinkUri}\n"
- });
-
- SendResponse (msg_id, Result.Ok (o), token);
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Templates/.gitignore b/src/Components/Blazor/Templates/.gitignore
deleted file mode 100644
index 6216d1eae6..0000000000
--- a/src/Components/Blazor/Templates/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# We only track the .template.config.src items in source control
-# The .template.config files are generated on build
-src/content/**/.template.config/
diff --git a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj
deleted file mode 100644
index 55364eee45..0000000000
--- a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
- netstandard2.0
- Microsoft.AspNetCore.Blazor.Templates.nuspec
- false
- False
- False
- False
- false
- none
- false
- $(NoWarn);2008
- Templates for ASP.NET Core Blazor projects.
- aspnet;templates;blazor;spa
- false
-
-
-
-
-
-
-
-
- <_TemplateConfigMainFile Include="content\**\.template.config.src\template.json" />
- <_TemplateConfigDir Include="@(_TemplateConfigMainFile->'$([System.IO.Path]::GetDirectoryName('%(_TemplateConfigMainFile.FullPath)'))')" />
- <_TemplateConfigFileToCopy Include="%(_TemplateConfigDir.Identity)\**\*.*">
- $([System.IO.Path]::GetDirectoryName('%(_TemplateConfigDir.Identity)'))\.template.config\
-
-
-
-
-
-
-
-
-
-
-
-
-
- %(DestDir)%(RecursiveDir)%(Filename)%(Extension)
- $(GeneratedContentProperties)
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Validation/src/ComparePropertyAttribute.cs b/src/Components/Blazor/Validation/src/ComparePropertyAttribute.cs
deleted file mode 100644
index 3f74ce647f..0000000000
--- a/src/Components/Blazor/Validation/src/ComparePropertyAttribute.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace System.ComponentModel.DataAnnotations
-{
- ///
- /// A that compares two properties
- ///
- [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
- public sealed class ComparePropertyAttribute : CompareAttribute
- {
- ///
- /// Initializes a new instance of .
- ///
- /// The property to compare with the current property.
- public ComparePropertyAttribute(string otherProperty)
- : base(otherProperty)
- {
- }
-
- ///
- protected override ValidationResult IsValid(object value, ValidationContext validationContext)
- {
- var validationResult = base.IsValid(value, validationContext);
- if (validationResult == ValidationResult.Success)
- {
- return validationResult;
- }
-
- return new ValidationResult(validationResult.ErrorMessage, new[] { validationContext.MemberName });
- }
- }
-}
-
diff --git a/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj b/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj
deleted file mode 100644
index 53cc678edb..0000000000
--- a/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- netstandard2.1
- Provides experimental support for validation using DataAnnotations.
- false
- false
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/Validation/src/ObjectGraphDataAnnotationsValidator.cs b/src/Components/Blazor/Validation/src/ObjectGraphDataAnnotationsValidator.cs
deleted file mode 100644
index df1971e0a2..0000000000
--- a/src/Components/Blazor/Validation/src/ObjectGraphDataAnnotationsValidator.cs
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-
-namespace Microsoft.AspNetCore.Components.Forms
-{
- public class ObjectGraphDataAnnotationsValidator : ComponentBase
- {
- private static readonly object ValidationContextValidatorKey = new object();
- private static readonly object ValidatedObjectsKey = new object();
- private ValidationMessageStore _validationMessageStore;
-
- [CascadingParameter]
- internal EditContext EditContext { get; set; }
-
- protected override void OnInitialized()
- {
- _validationMessageStore = new ValidationMessageStore(EditContext);
-
- // Perform object-level validation (starting from the root model) on request
- EditContext.OnValidationRequested += (sender, eventArgs) =>
- {
- _validationMessageStore.Clear();
- ValidateObject(EditContext.Model, new HashSet());
- EditContext.NotifyValidationStateChanged();
- };
-
- // Perform per-field validation on each field edit
- EditContext.OnFieldChanged += (sender, eventArgs) =>
- ValidateField(EditContext, _validationMessageStore, eventArgs.FieldIdentifier);
- }
-
- internal void ValidateObject(object value, HashSet visited)
- {
- if (value is null)
- {
- return;
- }
-
- if (!visited.Add(value))
- {
- // Already visited this object.
- return;
- }
-
- if (value is IEnumerable enumerable)
- {
- var index = 0;
- foreach (var item in enumerable)
- {
- ValidateObject(item, visited);
- index++;
- }
-
- return;
- }
-
- var validationResults = new List();
- ValidateObject(value, visited, validationResults);
-
- // Transfer results to the ValidationMessageStore
- foreach (var validationResult in validationResults)
- {
- if (!validationResult.MemberNames.Any())
- {
- _validationMessageStore.Add(new FieldIdentifier(value, string.Empty), validationResult.ErrorMessage);
- continue;
- }
-
- foreach (var memberName in validationResult.MemberNames)
- {
- var fieldIdentifier = new FieldIdentifier(value, memberName);
- _validationMessageStore.Add(fieldIdentifier, validationResult.ErrorMessage);
- }
- }
- }
-
- private void ValidateObject(object value, HashSet visited, List validationResults)
- {
- var validationContext = new ValidationContext(value);
- validationContext.Items.Add(ValidationContextValidatorKey, this);
- validationContext.Items.Add(ValidatedObjectsKey, visited);
- Validator.TryValidateObject(value, validationContext, validationResults, validateAllProperties: true);
- }
-
- internal static bool TryValidateRecursive(object value, ValidationContext validationContext)
- {
- if (validationContext.Items.TryGetValue(ValidationContextValidatorKey, out var result) && result is ObjectGraphDataAnnotationsValidator validator)
- {
- var visited = (HashSet)validationContext.Items[ValidatedObjectsKey];
- validator.ValidateObject(value, visited);
-
- return true;
- }
-
- return false;
- }
-
- private static void ValidateField(EditContext editContext, ValidationMessageStore messages, in FieldIdentifier fieldIdentifier)
- {
- // DataAnnotations only validates public properties, so that's all we'll look for
- var propertyInfo = fieldIdentifier.Model.GetType().GetProperty(fieldIdentifier.FieldName);
- if (propertyInfo != null)
- {
- var propertyValue = propertyInfo.GetValue(fieldIdentifier.Model);
- var validationContext = new ValidationContext(fieldIdentifier.Model)
- {
- MemberName = propertyInfo.Name
- };
- var results = new List();
-
- Validator.TryValidateProperty(propertyValue, validationContext, results);
- messages.Clear(fieldIdentifier);
- messages.Add(fieldIdentifier, results.Select(result => result.ErrorMessage));
-
- // We have to notify even if there were no messages before and are still no messages now,
- // because the "state" that changed might be the completion of some async validation task
- editContext.NotifyValidationStateChanged();
- }
- }
- }
-}
diff --git a/src/Components/Blazor/Validation/src/ValidateComplexTypeAttribute.cs b/src/Components/Blazor/Validation/src/ValidateComplexTypeAttribute.cs
deleted file mode 100644
index 4769d84767..0000000000
--- a/src/Components/Blazor/Validation/src/ValidateComplexTypeAttribute.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using Microsoft.AspNetCore.Components.Forms;
-
-namespace System.ComponentModel.DataAnnotations
-{
- ///
- /// A that indicates that the property is a complex or collection type that further needs to be validated.
- ///
- /// By default does not recurse in to complex property types during validation.
- /// When used in conjunction with , this property allows the validation system to validate
- /// complex or collection type properties.
- ///
- ///
- [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
- public sealed class ValidateComplexTypeAttribute : ValidationAttribute
- {
- ///
- protected override ValidationResult IsValid(object value, ValidationContext validationContext)
- {
- if (!ObjectGraphDataAnnotationsValidator.TryValidateRecursive(value, validationContext))
- {
- throw new InvalidOperationException($"{nameof(ValidateComplexTypeAttribute)} can only used with {nameof(ObjectGraphDataAnnotationsValidator)}.");
- }
-
- return ValidationResult.Success;
- }
- }
-}
diff --git a/src/Components/Blazor/Validation/test/ObjectGraphDataAnnotationsValidatorTest.cs b/src/Components/Blazor/Validation/test/ObjectGraphDataAnnotationsValidatorTest.cs
deleted file mode 100644
index 6703eb35d5..0000000000
--- a/src/Components/Blazor/Validation/test/ObjectGraphDataAnnotationsValidatorTest.cs
+++ /dev/null
@@ -1,540 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using Microsoft.AspNetCore.Components.Forms;
-using Xunit;
-
-namespace Microsoft.AspNetCore.Components
-{
- public class ObjectGraphDataAnnotationsValidatorTest
- {
- public class SimpleModel
- {
- [Required]
- public string Name { get; set; }
-
- [Range(1, 16)]
- public int Age { get; set; }
- }
-
- [Fact]
- public void ValidateObject_SimpleObject()
- {
- var model = new SimpleModel
- {
- Age = 23,
- };
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(() => model.Name);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => model.Age);
- Assert.Single(messages);
-
- Assert.Equal(2, editContext.GetValidationMessages().Count());
- }
-
- [Fact]
- public void ValidateObject_SimpleObject_AllValid()
- {
- var model = new SimpleModel { Name = "Test", Age = 5 };
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(() => model.Name);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => model.Age);
- Assert.Empty(messages);
-
- Assert.Empty(editContext.GetValidationMessages());
- }
-
- public class ModelWithComplexProperty
- {
- [Required]
- public string Property1 { get; set; }
-
- [ValidateComplexType]
- public SimpleModel SimpleModel { get; set; }
- }
-
- [Fact]
- public void ValidateObject_NullComplexProperty()
- {
- var model = new ModelWithComplexProperty();
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(() => model.Property1);
- Assert.Single(messages);
-
- Assert.Single(editContext.GetValidationMessages());
- }
-
- [Fact]
- public void ValidateObject_ModelWithComplexProperties()
- {
- var model = new ModelWithComplexProperty { SimpleModel = new SimpleModel() };
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(() => model.Property1);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => model.SimpleModel);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => model.SimpleModel.Age);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => model.SimpleModel.Name);
- Assert.Single(messages);
-
- Assert.Equal(3, editContext.GetValidationMessages().Count());
- }
-
- [Fact]
- public void ValidateObject_ModelWithComplexProperties_SomeValid()
- {
- var model = new ModelWithComplexProperty
- {
- Property1 = "Value",
- SimpleModel = new SimpleModel { Name = "Some Value" },
- };
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(() => model.Property1);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => model.SimpleModel);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => model.SimpleModel.Age);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => model.SimpleModel.Name);
- Assert.Empty(messages);
-
- Assert.Single(editContext.GetValidationMessages());
- }
-
- public class TestValidatableObject : IValidatableObject
- {
- [Required]
- public string Name { get; set; }
-
- public IEnumerable Validate(ValidationContext validationContext)
- {
- yield return new ValidationResult("Custom validation error");
- }
- }
-
- public class ModelWithValidatableComplexProperty
- {
- [Required]
- public string Property1 { get; set; }
-
- [ValidateComplexType]
- public TestValidatableObject Property2 { get; set; } = new TestValidatableObject();
- }
-
- [Fact]
- public void ValidateObject_ValidatableComplexProperty()
- {
- var model = new ModelWithValidatableComplexProperty();
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(() => model.Property1);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => model.Property2);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => model.Property2.Name);
- Assert.Single(messages);
-
- Assert.Equal(2, editContext.GetValidationMessages().Count());
- }
-
- [Fact]
- public void ValidateObject_ValidatableComplexProperty_ValidatesIValidatableProperty()
- {
- var model = new ModelWithValidatableComplexProperty
- {
- Property2 = new TestValidatableObject { Name = "test" },
- };
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(() => model.Property1);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(new FieldIdentifier(model.Property2, string.Empty));
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => model.Property2.Name);
- Assert.Empty(messages);
-
- Assert.Equal(2, editContext.GetValidationMessages().Count());
- }
-
- [Fact]
- public void ValidateObject_ModelIsIValidatable_PropertyHasError()
- {
- var model = new TestValidatableObject();
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(new FieldIdentifier(model, string.Empty));
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => model.Name);
- Assert.Single(messages);
-
- Assert.Single(editContext.GetValidationMessages());
- }
-
- [Fact]
- public void ValidateObject_ModelIsIValidatable_ModelHasError()
- {
- var model = new TestValidatableObject { Name = "test" };
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(new FieldIdentifier(model, string.Empty));
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => model.Name);
- Assert.Empty(messages);
-
- Assert.Single(editContext.GetValidationMessages());
- }
-
- [Fact]
- public void ValidateObject_CollectionModel()
- {
- var model = new List
- {
- new SimpleModel(),
- new SimpleModel { Name = "test", },
- };
-
- var editContext = Validate(model);
-
- var item = model[0];
- var messages = editContext.GetValidationMessages(new FieldIdentifier(model, "0"));
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => item.Name);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => item.Age);
- Assert.Single(messages);
-
- item = model[1];
- messages = editContext.GetValidationMessages(new FieldIdentifier(model, "1"));
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => item.Name);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => item.Age);
- Assert.Single(messages);
-
- Assert.Equal(3, editContext.GetValidationMessages().Count());
- }
-
- [Fact]
- public void ValidateObject_CollectionValidatableModel()
- {
- var model = new List
- {
- new TestValidatableObject(),
- new TestValidatableObject { Name = "test", },
- };
-
- var editContext = Validate(model);
-
- var item = model[0];
- var messages = editContext.GetValidationMessages(() => item.Name);
- Assert.Single(messages);
-
- item = model[1];
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => item.Name);
- Assert.Empty(messages);
-
- Assert.Equal(2, editContext.GetValidationMessages().Count());
- }
-
- private class Level1Validation
- {
- [ValidateComplexType]
- public Level2Validation Level2 { get; set; }
- }
-
- public class Level2Validation
- {
- [ValidateComplexType]
- public SimpleModel Level3 { get; set; }
- }
-
- [Fact]
- public void ValidateObject_ManyLevels()
- {
- var model = new Level1Validation
- {
- Level2 = new Level2Validation
- {
- Level3 = new SimpleModel
- {
- Age = 47,
- }
- }
- };
-
- var editContext = Validate(model);
- var level3 = model.Level2.Level3;
-
- var messages = editContext.GetValidationMessages(() => level3.Name);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => level3.Age);
- Assert.Single(messages);
-
- Assert.Equal(2, editContext.GetValidationMessages().Count());
- }
-
- private class Person
- {
- [Required]
- public string Name { get; set; }
-
- [ValidateComplexType]
- public Person Related { get; set; }
- }
-
- [Fact]
- public void ValidateObject_RecursiveRelation()
- {
- var model = new Person { Related = new Person() };
- model.Related.Related = model;
-
- var editContext = Validate(model);
-
- var messages = editContext.GetValidationMessages(() => model.Name);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => model.Related.Name);
- Assert.Single(messages);
-
- Assert.Equal(2, editContext.GetValidationMessages().Count());
- }
-
- [Fact]
- public void ValidateObject_RecursiveRelation_OverManySteps()
- {
- var person1 = new Person();
- var person2 = new Person { Name = "Valid name" };
- var person3 = new Person();
- var person4 = new Person();
-
- person1.Related = person2;
- person2.Related = person3;
- person3.Related = person4;
- person4.Related = person1;
-
- var editContext = Validate(person1);
-
- var messages = editContext.GetValidationMessages(() => person1.Name);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => person2.Name);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => person3.Name);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => person4.Name);
- Assert.Single(messages);
-
- Assert.Equal(3, editContext.GetValidationMessages().Count());
- }
-
- private class Node
- {
- [Required]
- public string Id { get; set; }
-
- [ValidateComplexType]
- public List Related { get; set; } = new List();
- }
-
- [Fact]
- public void ValidateObject_RecursiveRelation_ViaCollection()
- {
- var node1 = new Node();
- var node2 = new Node { Id = "Valid Id" };
- var node3 = new Node();
- node1.Related.Add(node2);
- node2.Related.Add(node3);
- node3.Related.Add(node1);
-
- var editContext = Validate(node1);
-
- var messages = editContext.GetValidationMessages(() => node1.Id);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => node2.Id);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => node3.Id);
- Assert.Single(messages);
-
- Assert.Equal(2, editContext.GetValidationMessages().Count());
- }
-
- [Fact]
- public void ValidateObject_RecursiveRelation_InCollection()
- {
- var person1 = new Person();
- var person2 = new Person { Name = "Valid name" };
- var person3 = new Person();
- var person4 = new Person();
-
- person1.Related = person2;
- person2.Related = person3;
- person3.Related = person4;
- person4.Related = person1;
-
- var editContext = Validate(person1);
-
- var messages = editContext.GetValidationMessages(() => person1.Name);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => person2.Name);
- Assert.Empty(messages);
-
- messages = editContext.GetValidationMessages(() => person3.Name);
- Assert.Single(messages);
-
- messages = editContext.GetValidationMessages(() => person4.Name);
- Assert.Single(messages);
-
- Assert.Equal(3, editContext.GetValidationMessages().Count());
- }
-
- [Fact]
- public void ValidateField_PropertyValid()
- {
- var model = new SimpleModel { Age = 1 };
- var fieldIdentifier = FieldIdentifier.Create(() => model.Age);
-
- var editContext = ValidateField(model, fieldIdentifier);
- var messages = editContext.GetValidationMessages(fieldIdentifier);
- Assert.Empty(messages);
-
- Assert.Empty(editContext.GetValidationMessages());
- }
-
- [Fact]
- public void ValidateField_PropertyInvalid()
- {
- var model = new SimpleModel { Age = 42 };
- var fieldIdentifier = FieldIdentifier.Create(() => model.Age);
-
- var editContext = ValidateField(model, fieldIdentifier);
- var messages = editContext.GetValidationMessages(fieldIdentifier);
- Assert.Single(messages);
-
- Assert.Single(editContext.GetValidationMessages());
- }
-
- [Fact]
- public void ValidateField_AfterSubmitValidation()
- {
- var model = new SimpleModel { Age = 42 };
- var fieldIdentifier = FieldIdentifier.Create(() => model.Age);
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(fieldIdentifier);
- Assert.Single(messages);
-
- Assert.Equal(2, editContext.GetValidationMessages().Count());
-
- model.Age = 4;
-
- editContext.NotifyFieldChanged(fieldIdentifier);
- messages = editContext.GetValidationMessages(fieldIdentifier);
- Assert.Empty(messages);
-
- Assert.Single(editContext.GetValidationMessages());
- }
-
- [Fact]
- public void ValidateField_ModelWithComplexProperty()
- {
- var model = new ModelWithComplexProperty
- {
- SimpleModel = new SimpleModel { Age = 1 },
- };
- var fieldIdentifier = FieldIdentifier.Create(() => model.SimpleModel.Name);
-
- var editContext = ValidateField(model, fieldIdentifier);
- var messages = editContext.GetValidationMessages(fieldIdentifier);
- Assert.Single(messages);
-
- Assert.Single(editContext.GetValidationMessages());
- }
-
- [Fact]
- public void ValidateField_ModelWithComplexProperty_AfterSubmitValidation()
- {
- var model = new ModelWithComplexProperty
- {
- Property1 = "test",
- SimpleModel = new SimpleModel { Age = 29, Name = "Test" },
- };
- var fieldIdentifier = FieldIdentifier.Create(() => model.SimpleModel.Age);
-
- var editContext = Validate(model);
- var messages = editContext.GetValidationMessages(fieldIdentifier);
- Assert.Single(messages);
-
- model.SimpleModel.Age = 9;
- editContext.NotifyFieldChanged(fieldIdentifier);
-
- messages = editContext.GetValidationMessages(fieldIdentifier);
- Assert.Empty(messages);
- Assert.Empty(editContext.GetValidationMessages());
- }
-
- private static EditContext Validate(object model)
- {
- var editContext = new EditContext(model);
- var validator = new TestObjectGraphDataAnnotationsValidator { EditContext = editContext, };
- validator.OnInitialized();
-
- editContext.Validate();
-
- return editContext;
- }
-
- private static EditContext ValidateField(object model, in FieldIdentifier field)
- {
- var editContext = new EditContext(model);
- var validator = new TestObjectGraphDataAnnotationsValidator { EditContext = editContext, };
- validator.OnInitialized();
-
- editContext.NotifyFieldChanged(field);
-
- return editContext;
- }
-
- private class TestObjectGraphDataAnnotationsValidator : ObjectGraphDataAnnotationsValidator
- {
- public new void OnInitialized() => base.OnInitialized();
- }
- }
-}
diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj
deleted file mode 100644
index e27de695c1..0000000000
--- a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- netstandard2.1
- Exe
- true
- 3.0
-
-
-
-
-
-
-
diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Client/wwwroot/index.html b/src/Components/Blazor/testassets/HostedInAspNet.Client/wwwroot/index.html
deleted file mode 100644
index a47b1ad84e..0000000000
--- a/src/Components/Blazor/testassets/HostedInAspNet.Client/wwwroot/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Sample Blazor app
-
-
- Loading...
-
-
-
-
diff --git a/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj b/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj
deleted file mode 100644
index 32156c56b8..0000000000
--- a/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- netstandard2.1
- true
- 3.0
-
-
-
-
-
-
-
diff --git a/src/Components/Components.sln b/src/Components/Components.sln
index c88695cf66..99c12e091d 100644
--- a/src/Components/Components.sln
+++ b/src/Components/Components.sln
@@ -9,19 +9,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Compon
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Analyzers.Tests", "Analyzers\test\Microsoft.AspNetCore.Components.Analyzers.Tests.csproj", "{F000C49D-3857-42A4-918D-DA4C08691FE2}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Blazor", "Blazor", "{7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebAssembly", "WebAssembly", "{7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor", "Blazor\Blazor\src\Microsoft.AspNetCore.Blazor.csproj", "{641922CD-E6F5-41E7-A085-EE07C2A7328D}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly", "WebAssembly\WebAssembly\src\Microsoft.AspNetCore.Components.WebAssembly.csproj", "{641922CD-E6F5-41E7-A085-EE07C2A7328D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Tests", "Blazor\Blazor\test\Microsoft.AspNetCore.Blazor.Tests.csproj", "{958AD6D2-174B-4B5B-BEFC-FA64B5159334}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.Tests", "WebAssembly\WebAssembly\test\Microsoft.AspNetCore.Components.WebAssembly.Tests.csproj", "{958AD6D2-174B-4B5B-BEFC-FA64B5159334}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Build", "Blazor\Build\src\Microsoft.AspNetCore.Blazor.Build.csproj", "{E8AD67A4-77D3-4B85-AE19-4711388B62B1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.Build", "WebAssembly\Build\src\Microsoft.AspNetCore.Components.WebAssembly.Build.csproj", "{E8AD67A4-77D3-4B85-AE19-4711388B62B1}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Build.Tests", "Blazor\Build\test\Microsoft.AspNetCore.Blazor.Build.Tests.csproj", "{E38FDBB0-08C1-444E-A449-69C8A59D721B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.Build.Tests", "WebAssembly\Build\test\Microsoft.AspNetCore.Components.WebAssembly.Build.Tests.csproj", "{E38FDBB0-08C1-444E-A449-69C8A59D721B}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DevServer", "Blazor\DevServer\src\Microsoft.AspNetCore.Blazor.DevServer.csproj", "{A6C8050D-7C18-4585-ADCF-833AC1765847}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.DevServer", "WebAssembly\DevServer\src\Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj", "{A6C8050D-7C18-4585-ADCF-833AC1765847}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Server", "Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj", "{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.Server", "WebAssembly\Server\src\Microsoft.AspNetCore.Components.WebAssembly.Server.csproj", "{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{A7ABAC29-F73F-456D-AE54-46842CFC2E10}"
EndProject
@@ -206,10 +206,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Signal
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Http.Connections.Client", "..\SignalR\clients\csharp\Http.Connections.Client\src\Microsoft.AspNetCore.Http.Connections.Client.csproj", "{F88118E1-6F4A-4F89-B047-5FFD2889B9F0}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.HttpClient", "Blazor\Http\src\Microsoft.AspNetCore.Blazor.HttpClient.csproj", "{74D21785-2FAB-4266-B7C4-E311EC8EE0DF}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.HttpClient.Tests", "Blazor\Http\test\Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj", "{E4C01A3F-D3C1-4639-A6A9-930E918843DD}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Web.Tests", "Web\test\Microsoft.AspNetCore.Components.Web.Tests.csproj", "{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authorization", "Authorization", "{08791FEE-761D-40EF-B701-1D31FD1E6E53}"
@@ -236,23 +232,41 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor", "Ignitor\src\Igni
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor.Test", "Ignitor\test\Ignitor.Test.csproj", "{F31E8118-014E-4CCE-8A48-5282F7B9BB3E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DataAnnotations.Validation", "Blazor\Validation\src\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj", "{B70F90C7-2696-4050-B24E-BF0308F4E059}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests", "Blazor\Validation\test\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests.csproj", "{A5617A9D-C71E-44DE-936C-27611EB40A02}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mono.WebAssembly.Interop", "Mono.WebAssembly.Interop", "{21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.WebAssembly.Interop", "Blazor\Mono.WebAssembly.Interop\src\Mono.WebAssembly.Interop.csproj", "{D141CFEE-D10A-406B-8963-F86FA13732E3}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsApp.Server", "test\testassets\ComponentsApp.Server\ComponentsApp.Server.csproj", "{F2E27E1C-2E47-42C1-9AC7-36265A381717}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarkapps", "benchmarkapps", "{CCC82E97-7B58-43E2-BBBD-23D82F926367}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wasm.Performance", "Wasm.Performance", "{F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wasm.Performance.Driver", "benchmarkapps\Wasm.Performance\Driver\Wasm.Performance.Driver.csproj", "{CA9948CA-B3FA-4C2E-A726-5E47BAD19457}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wasm.Performance.Driver", "benchmarkapps\Wasm.Performance\Driver\Wasm.Performance.Driver.csproj", "{CA9948CA-B3FA-4C2E-A726-5E47BAD19457}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wasm.Performance.TestApp", "benchmarkapps\Wasm.Performance\TestApp\Wasm.Performance.TestApp.csproj", "{97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wasm.Performance.TestApp", "benchmarkapps\Wasm.Performance\TestApp\Wasm.Performance.TestApp.csproj", "{97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebAssembly", "WebAssembly", "{346EC9B8-BF36-4A5E-A1A3-77879931713A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{1FA95650-E56E-470A-82A3-BC6572E4D6CD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.Server.Tests", "WebAssembly\Server\test\Microsoft.AspNetCore.Components.WebAssembly.Server.Tests.csproj", "{3D0ED658-9DAC-4066-A587-795321FA1C98}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{42E3C95D-A41E-4E14-96FD-AAE8F340FD7E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Authentication.WebAssembly.Msal", "WebAssembly\Authentication.Msal\src\Microsoft.Authentication.WebAssembly.Msal.csproj", "{4B4E4247-7BBF-444E-9737-407D34821D70}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.Build.BrotliCompression", "WebAssembly\Compression\src\Microsoft.AspNetCore.Components.WebAssembly.Build.BrotliCompression.csproj", "{1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.DebugProxy", "WebAssembly\DebugProxy\src\Microsoft.AspNetCore.Components.WebAssembly.DebugProxy.csproj", "{B118AE2F-8D1D-413F-BC5D-060DF7CB707D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DevServer", "DevServer", "{C6B58D53-04E2-4D65-B445-B510A3CB7569}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.JSInterop.WebAssembly", "WebAssembly\JSInterop\src\Microsoft.JSInterop.WebAssembly.csproj", "{8FDD9F2E-B940-4A5F-83FD-5486D0853D76}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.Authentication", "WebAssembly\WebAssembly.Authentication\src\Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj", "{5CD61479-5181-4A5B-B90F-9F34316248B3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests", "WebAssembly\WebAssembly.Authentication\test\Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests.csproj", "{6B0D6C08-FC30-4822-9464-4D24FF4CDC17}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authentication", "Authentication", "{81250121-9B43-40B1-BF11-CE4458F2676C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.WebAssembly.HttpHandler", "WebAssembly\WebAssemblyHttpHandler\src\Microsoft.AspNetCore.Components.WebAssembly.HttpHandler.csproj", "{031AD67E-DDDE-4A20-874A-8D0A791C6F4C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -1344,30 +1358,6 @@ Global
{F88118E1-6F4A-4F89-B047-5FFD2889B9F0}.Release|x64.Build.0 = Release|Any CPU
{F88118E1-6F4A-4F89-B047-5FFD2889B9F0}.Release|x86.ActiveCfg = Release|Any CPU
{F88118E1-6F4A-4F89-B047-5FFD2889B9F0}.Release|x86.Build.0 = Release|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|x64.ActiveCfg = Debug|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|x64.Build.0 = Debug|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|x86.ActiveCfg = Debug|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Debug|x86.Build.0 = Debug|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Release|Any CPU.Build.0 = Release|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Release|x64.ActiveCfg = Release|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Release|x64.Build.0 = Release|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Release|x86.ActiveCfg = Release|Any CPU
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF}.Release|x86.Build.0 = Release|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Debug|x64.ActiveCfg = Debug|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Debug|x64.Build.0 = Debug|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Debug|x86.ActiveCfg = Debug|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Debug|x86.Build.0 = Debug|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|Any CPU.Build.0 = Release|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|x64.ActiveCfg = Release|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|x64.Build.0 = Release|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|x86.ActiveCfg = Release|Any CPU
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD}.Release|x86.Build.0 = Release|Any CPU
{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1476,42 +1466,6 @@ Global
{F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|x64.Build.0 = Release|Any CPU
{F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|x86.ActiveCfg = Release|Any CPU
{F31E8118-014E-4CCE-8A48-5282F7B9BB3E}.Release|x86.Build.0 = Release|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Debug|x64.ActiveCfg = Debug|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Debug|x64.Build.0 = Debug|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Debug|x86.ActiveCfg = Debug|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Debug|x86.Build.0 = Debug|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Release|Any CPU.Build.0 = Release|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Release|x64.ActiveCfg = Release|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Release|x64.Build.0 = Release|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Release|x86.ActiveCfg = Release|Any CPU
- {B70F90C7-2696-4050-B24E-BF0308F4E059}.Release|x86.Build.0 = Release|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Debug|x64.ActiveCfg = Debug|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Debug|x64.Build.0 = Debug|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Debug|x86.ActiveCfg = Debug|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Debug|x86.Build.0 = Debug|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|Any CPU.Build.0 = Release|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x64.ActiveCfg = Release|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x64.Build.0 = Release|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x86.ActiveCfg = Release|Any CPU
- {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x86.Build.0 = Release|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x64.ActiveCfg = Debug|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x64.Build.0 = Debug|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x86.ActiveCfg = Debug|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x86.Build.0 = Debug|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|Any CPU.Build.0 = Release|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x64.ActiveCfg = Release|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x64.Build.0 = Release|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x86.ActiveCfg = Release|Any CPU
- {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x86.Build.0 = Release|Any CPU
{F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1548,6 +1502,102 @@ Global
{97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x64.Build.0 = Release|Any CPU
{97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x86.ActiveCfg = Release|Any CPU
{97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x86.Build.0 = Release|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Debug|x64.Build.0 = Debug|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Debug|x86.Build.0 = Debug|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Release|x64.ActiveCfg = Release|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Release|x64.Build.0 = Release|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Release|x86.ActiveCfg = Release|Any CPU
+ {3D0ED658-9DAC-4066-A587-795321FA1C98}.Release|x86.Build.0 = Release|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Debug|x64.Build.0 = Debug|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Debug|x86.Build.0 = Debug|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Release|x64.ActiveCfg = Release|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Release|x64.Build.0 = Release|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Release|x86.ActiveCfg = Release|Any CPU
+ {4B4E4247-7BBF-444E-9737-407D34821D70}.Release|x86.Build.0 = Release|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Debug|x64.Build.0 = Debug|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Debug|x86.Build.0 = Debug|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Release|x64.ActiveCfg = Release|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Release|x64.Build.0 = Release|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Release|x86.ActiveCfg = Release|Any CPU
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE}.Release|x86.Build.0 = Release|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Debug|x64.Build.0 = Debug|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Debug|x86.Build.0 = Debug|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Release|x64.ActiveCfg = Release|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Release|x64.Build.0 = Release|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Release|x86.ActiveCfg = Release|Any CPU
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D}.Release|x86.Build.0 = Release|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Debug|x64.Build.0 = Debug|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Debug|x86.Build.0 = Debug|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Release|x64.ActiveCfg = Release|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Release|x64.Build.0 = Release|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Release|x86.ActiveCfg = Release|Any CPU
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76}.Release|x86.Build.0 = Release|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Debug|x64.Build.0 = Debug|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Debug|x86.Build.0 = Debug|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Release|x64.ActiveCfg = Release|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Release|x64.Build.0 = Release|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Release|x86.ActiveCfg = Release|Any CPU
+ {5CD61479-5181-4A5B-B90F-9F34316248B3}.Release|x86.Build.0 = Release|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Debug|x64.Build.0 = Debug|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Debug|x86.Build.0 = Debug|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Release|x64.ActiveCfg = Release|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Release|x64.Build.0 = Release|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Release|x86.ActiveCfg = Release|Any CPU
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17}.Release|x86.Build.0 = Release|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Debug|x64.Build.0 = Debug|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Debug|x86.Build.0 = Debug|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Release|x64.ActiveCfg = Release|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Release|x64.Build.0 = Release|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Release|x86.ActiveCfg = Release|Any CPU
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1555,12 +1605,12 @@ Global
GlobalSection(NestedProjects) = preSolution
{ECE91401-329E-4615-8684-8E910D2741C4} = {E059A46B-56E3-41E2-83F4-B5D180056F3B}
{F000C49D-3857-42A4-918D-DA4C08691FE2} = {E059A46B-56E3-41E2-83F4-B5D180056F3B}
- {641922CD-E6F5-41E7-A085-EE07C2A7328D} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {958AD6D2-174B-4B5B-BEFC-FA64B5159334} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {E8AD67A4-77D3-4B85-AE19-4711388B62B1} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {E38FDBB0-08C1-444E-A449-69C8A59D721B} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {A6C8050D-7C18-4585-ADCF-833AC1765847} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {641922CD-E6F5-41E7-A085-EE07C2A7328D} = {346EC9B8-BF36-4A5E-A1A3-77879931713A}
+ {958AD6D2-174B-4B5B-BEFC-FA64B5159334} = {346EC9B8-BF36-4A5E-A1A3-77879931713A}
+ {E8AD67A4-77D3-4B85-AE19-4711388B62B1} = {1FA95650-E56E-470A-82A3-BC6572E4D6CD}
+ {E38FDBB0-08C1-444E-A449-69C8A59D721B} = {1FA95650-E56E-470A-82A3-BC6572E4D6CD}
+ {A6C8050D-7C18-4585-ADCF-833AC1765847} = {C6B58D53-04E2-4D65-B445-B510A3CB7569}
+ {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA} = {42E3C95D-A41E-4E14-96FD-AAE8F340FD7E}
{A7ABAC29-F73F-456D-AE54-46842CFC2E10} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{FD37F740-A654-4117-BFB6-9112CE4C1D3B} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10}
{C1E2C117-BE47-4E29-94B3-753262D97A5C} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10}
@@ -1645,8 +1695,6 @@ Global
{DA137BD4-F7F1-4D53-855F-5EC40CEA36B0} = {2FC10057-7A0A-4E34-8302-879925BC0102}
{0CDAB70B-71DC-43BE-ACB7-AD2EE3541FFB} = {2FC10057-7A0A-4E34-8302-879925BC0102}
{F88118E1-6F4A-4F89-B047-5FFD2889B9F0} = {2FC10057-7A0A-4E34-8302-879925BC0102}
- {74D21785-2FAB-4266-B7C4-E311EC8EE0DF} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {E4C01A3F-D3C1-4639-A6A9-930E918843DD} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
{DE297C91-B3E9-4C6F-B74D-0AF9EFEBF684} = {A27FF193-195B-4474-8E6C-840B2E339373}
{956F540A-3CDA-4913-9373-1A4E8A93BDD8} = {08791FEE-761D-40EF-B701-1D31FD1E6E53}
{B13CDE69-ED22-4664-AAD7-686ED8CD5E88} = {08791FEE-761D-40EF-B701-1D31FD1E6E53}
@@ -1656,14 +1704,23 @@ Global
{BBF37AF9-8290-4B70-8BA8-0F6017B3B620} = {46E4300C-5726-4108-B9A2-18BB94EB26ED}
{CD0EF85C-4187-4515-A355-E5A0D4485F40} = {BDE2397D-C53A-4783-8B3A-1F54F48A6926}
{F31E8118-014E-4CCE-8A48-5282F7B9BB3E} = {BDE2397D-C53A-4783-8B3A-1F54F48A6926}
- {B70F90C7-2696-4050-B24E-BF0308F4E059} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {A5617A9D-C71E-44DE-936C-27611EB40A02} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
- {D141CFEE-D10A-406B-8963-F86FA13732E3} = {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05}
{F2E27E1C-2E47-42C1-9AC7-36265A381717} = {44E0D4F3-4430-4175-B482-0D1AEE4BB699}
{F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A} = {CCC82E97-7B58-43E2-BBBD-23D82F926367}
{CA9948CA-B3FA-4C2E-A726-5E47BAD19457} = {F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A}
{97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB} = {F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A}
+ {346EC9B8-BF36-4A5E-A1A3-77879931713A} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {1FA95650-E56E-470A-82A3-BC6572E4D6CD} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {3D0ED658-9DAC-4066-A587-795321FA1C98} = {42E3C95D-A41E-4E14-96FD-AAE8F340FD7E}
+ {42E3C95D-A41E-4E14-96FD-AAE8F340FD7E} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {4B4E4247-7BBF-444E-9737-407D34821D70} = {81250121-9B43-40B1-BF11-CE4458F2676C}
+ {1A4C96E8-3FAF-48FB-9F3C-068FAAAB3FEE} = {1FA95650-E56E-470A-82A3-BC6572E4D6CD}
+ {B118AE2F-8D1D-413F-BC5D-060DF7CB707D} = {C6B58D53-04E2-4D65-B445-B510A3CB7569}
+ {C6B58D53-04E2-4D65-B445-B510A3CB7569} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {8FDD9F2E-B940-4A5F-83FD-5486D0853D76} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {5CD61479-5181-4A5B-B90F-9F34316248B3} = {81250121-9B43-40B1-BF11-CE4458F2676C}
+ {6B0D6C08-FC30-4822-9464-4D24FF4CDC17} = {81250121-9B43-40B1-BF11-CE4458F2676C}
+ {81250121-9B43-40B1-BF11-CE4458F2676C} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
+ {031AD67E-DDDE-4A20-874A-8D0A791C6F4C} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE}
diff --git a/src/Components/ComponentsNoDeps.slnf b/src/Components/ComponentsNoDeps.slnf
index 7e09eeea25..df42481d3c 100644
--- a/src/Components/ComponentsNoDeps.slnf
+++ b/src/Components/ComponentsNoDeps.slnf
@@ -6,22 +6,6 @@
"Analyzers\\test\\Microsoft.AspNetCore.Components.Analyzers.Tests.csproj",
"Authorization\\src\\Microsoft.AspNetCore.Components.Authorization.csproj",
"Authorization\\test\\Microsoft.AspNetCore.Components.Authorization.Tests.csproj",
- "Blazor\\Blazor\\src\\Microsoft.AspNetCore.Blazor.csproj",
- "Blazor\\Blazor\\test\\Microsoft.AspNetCore.Blazor.Tests.csproj",
- "Blazor\\Build\\src\\Microsoft.AspNetCore.Blazor.Build.csproj",
- "Blazor\\Build\\test\\Microsoft.AspNetCore.Blazor.Build.Tests.csproj",
- "Blazor\\DevServer\\src\\Microsoft.AspNetCore.Blazor.DevServer.csproj",
- "Blazor\\Http\\src\\Microsoft.AspNetCore.Blazor.HttpClient.csproj",
- "Blazor\\Http\\test\\Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj",
- "Blazor\\Mono.WebAssembly.Interop\\src\\Mono.WebAssembly.Interop.csproj",
- "Blazor\\Server\\src\\Microsoft.AspNetCore.Blazor.Server.csproj",
- "Blazor\\Validation\\src\\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj",
- "Blazor\\Validation\\test\\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests.csproj",
- "Blazor\\testassets\\HostedInAspNet.Client\\HostedInAspNet.Client.csproj",
- "Blazor\\testassets\\HostedInAspNet.Server\\HostedInAspNet.Server.csproj",
- "Blazor\\testassets\\MonoSanityClient\\MonoSanityClient.csproj",
- "Blazor\\testassets\\MonoSanity\\MonoSanity.csproj",
- "Blazor\\testassets\\StandaloneApp\\StandaloneApp.csproj",
"Components\\perf\\Microsoft.AspNetCore.Components.Performance.csproj",
"Components\\src\\Microsoft.AspNetCore.Components.csproj",
"Components\\test\\Microsoft.AspNetCore.Components.Tests.csproj",
@@ -32,12 +16,27 @@
"Samples\\BlazorServerApp\\BlazorServerApp.csproj",
"Server\\src\\Microsoft.AspNetCore.Components.Server.csproj",
"Server\\test\\Microsoft.AspNetCore.Components.Server.Tests.csproj",
+ "WebAssembly\\Authentication.Msal\\src\\Microsoft.Authentication.WebAssembly.Msal.csproj",
+ "WebAssembly\\Build\\src\\Microsoft.AspNetCore.Components.WebAssembly.Build.csproj",
+ "WebAssembly\\Build\\test\\Microsoft.AspNetCore.Components.WebAssembly.Build.Tests.csproj",
+ "WebAssembly\\Compression\\src\\Microsoft.AspNetCore.Components.WebAssembly.Build.BrotliCompression.csproj",
+ "WebAssembly\\DebugProxy\\src\\Microsoft.AspNetCore.Components.WebAssembly.DebugProxy.csproj",
+ "WebAssembly\\DevServer\\src\\Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj",
+ "WebAssembly\\JSInterop\\src\\Microsoft.JSInterop.WebAssembly.csproj",
+ "WebAssembly\\Server\\src\\Microsoft.AspNetCore.Components.WebAssembly.Server.csproj",
+ "WebAssembly\\Server\\test\\Microsoft.AspNetCore.Components.WebAssembly.Server.Tests.csproj",
+ "WebAssembly\\WebAssembly.Authentication\\src\\Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj",
+ "WebAssembly\\WebAssembly.Authentication\\test\\Microsoft.AspNetCore.Components.WebAssembly.Authentication.Tests.csproj",
+ "WebAssembly\\WebAssemblyHttpHandler\\src\\Microsoft.AspNetCore.Components.WebAssembly.HttpHandler.csproj",
+ "WebAssembly\\WebAssembly\\src\\Microsoft.AspNetCore.Components.WebAssembly.csproj",
+ "WebAssembly\\WebAssembly\\test\\Microsoft.AspNetCore.Components.WebAssembly.Tests.csproj",
"Web\\src\\Microsoft.AspNetCore.Components.Web.csproj",
"Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj",
"benchmarkapps\\Wasm.Performance\\Driver\\Wasm.Performance.Driver.csproj",
"benchmarkapps\\Wasm.Performance\\TestApp\\Wasm.Performance.TestApp.csproj",
"test\\E2ETest\\Microsoft.AspNetCore.Components.E2ETests.csproj",
"test\\testassets\\BasicTestApp\\BasicTestApp.csproj",
+ "test\\testassets\\ComponentsApp.Server\\ComponentsApp.Server.csproj",
"test\\testassets\\TestContentPackage\\TestContentPackage.csproj",
"test\\testassets\\TestServer\\Components.TestServer.csproj"
]
diff --git a/src/Components/Directory.Build.props b/src/Components/Directory.Build.props
index fb709cba97..9fe61c3404 100644
--- a/src/Components/Directory.Build.props
+++ b/src/Components/Directory.Build.props
@@ -10,11 +10,11 @@
- aspnetcore;components
+ true
+
-
- 3.1.0
+
+ aspnetcore;components
$(MSBuildThisFileDirectory)Shared\
diff --git a/src/Components/Directory.Build.targets b/src/Components/Directory.Build.targets
index d6569c4088..c72c9c4c35 100644
--- a/src/Components/Directory.Build.targets
+++ b/src/Components/Directory.Build.targets
@@ -3,26 +3,6 @@
true
-
-
-
-
-
- netcoreapp3.1
- Microsoft.AspNetCore.App
- $(LatestAspNetCoreReferenceVersion)
- $(LatestAspNetCoreReferenceVersion)
- Microsoft.AspNetCore.App.Ref
- $(LatestAspNetCoreReferenceVersion)
- Microsoft.AspNetCore.App.Runtime.**RID**
- linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86
- true
-
-
-
-
@@ -35,7 +15,29 @@
Private="false" />
-
+
+
+
+
+
+
+
+
+
+ <_HttpHandlerAssembly Include="@(_BlazorUserRuntimeAssembly)"
+ Condition="%(_BlazorUserRuntimeAssembly.ProjectReferenceOriginalItemSpec) == '$(RepoRoot)src\Components\WebAssembly\WebAssemblyHttpHandler\src\Microsoft.AspNetCore.Components.WebAssembly.HttpHandler.csproj'" />
+
+ <_BlazorUserRuntimeAssembly Remove="@(_HttpHandlerAssembly)" />
+
+
diff --git a/src/Components/Samples/BlazorServerApp/BlazorServerApp.csproj b/src/Components/Samples/BlazorServerApp/BlazorServerApp.csproj
index 2a82b7453a..101fe45c13 100644
--- a/src/Components/Samples/BlazorServerApp/BlazorServerApp.csproj
+++ b/src/Components/Samples/BlazorServerApp/BlazorServerApp.csproj
@@ -12,7 +12,6 @@
-
diff --git a/src/Components/Web.JS/dist/Release/blazor.server.js b/src/Components/Web.JS/dist/Release/blazor.server.js
index 30d3ae3949..98d9cb6e39 100644
--- a/src/Components/Web.JS/dist/Release/blazor.server.js
+++ b/src/Components/Web.JS/dist/Release/blazor.server.js
@@ -1,15 +1,19 @@
-!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=49)}([function(e,t,n){"use strict";var r;n.d(t,"a",function(){return r}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"c",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return l}),n.d(t,"h",function(){return f}),n.d(t,"e",function(){return h}),n.d(t,"d",function(){return p}),n.d(t,"b",function(){return d});var r=n(0),o=n(7),i=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},a=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1&&this.subject.observers.splice(e,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(e){})},e}(),d=function(){function e(e){this.minimumLogLevel=e,this.outputConsole=console}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[e]+": "+t)}},e}()},function(e,t,n){"use strict";n.r(t);var r,o,i=n(3),a=n(4),s=n(43),c=n(0),u=(r=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])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this)||this;return n.logger=t,n}return u(t,e),t.prototype.send=function(e){var t=this;return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?new Promise(function(n,r){var o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=!0,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");var s=e.headers;s&&Object.keys(s).forEach(function(e){o.setRequestHeader(e,s[e])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=function(){o.abort(),r(new i.a)}),e.timeout&&(o.timeout=e.timeout),o.onload=function(){e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?n(new a.b(o.status,o.statusText,o.response||o.responseText)):r(new i.b(o.statusText,o.status))},o.onerror=function(){t.logger.log(c.a.Warning,"Error from HTTP request. "+o.status+": "+o.statusText+"."),r(new i.b(o.statusText,o.status))},o.ontimeout=function(){t.logger.log(c.a.Warning,"Timeout from HTTP request."),r(new i.c)},o.send(e.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(a.a),f=function(){var 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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t){var n=e.call(this)||this;return"undefined"!=typeof XMLHttpRequest?n.httpClient=new l(t):n.httpClient=new s.a(t),n}return f(t,e),t.prototype.send=function(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?this.httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(e){return this.httpClient.getCookieString(e)},t}(a.a),p=n(44);!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"}(o||(o={}));var d,g=n(1),y=function(){function e(){this.observers=[]}return e.prototype.next=function(e){for(var t=0,n=this.observers;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+i.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},e.prototype.constructTransport=function(e){switch(e){case E.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new A(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case E.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new O(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case E.LongPolling:return new x(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+e+".")}},e.prototype.startTransport=function(e,t){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(e){return n.stopConnection(e)},this.transport.connect(e,t)},e.prototype.resolveTransportOrError=function(e,t,n){var r=E[e.transport];if(null==r)return this.logger.log(c.a.Debug,"Skipping transport '"+e.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+e.transport+"' because it is not supported by this client.");if(!function(e,t){return!e||0!=(t&e)}(t,r))return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it was disabled by the client."),new Error("'"+E[r]+"' is disabled by the client.");if(!(e.transferFormats.map(function(e){return S[e]}).indexOf(n)>=0))return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it does not support the requested transfer format '"+S[n]+"'."),new Error("'"+E[r]+"' does not support "+S[n]+".");if(r===E.WebSockets&&!this.options.WebSocket||r===E.ServerSentEvents&&!this.options.EventSource)return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it is not supported in your environment.'"),new Error("'"+E[r]+"' is not supported in your environment.");this.logger.log(c.a.Debug,"Selecting transport '"+E[r]+"'.");try{return this.constructTransport(r)}catch(e){return e}},e.prototype.isITransport=function(e){return e&&"object"==typeof e&&"connect"in e},e.prototype.stopConnection=function(e){if(this.logger.log(c.a.Debug,"HttpConnection.stopConnection("+e+") called while in state "+this.connectionState+"."),this.transport=void 0,e=this.stopError||e,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),e?this.logger.log(c.a.Error,"Connection disconnected with error '"+e+"'."):this.logger.log(c.a.Information,"Connection disconnected."),this.connectionId=void 0,this.connectionState="Disconnected",this.onclose&&this.connectionStarted){this.connectionStarted=!1;try{this.onclose(e)}catch(t){this.logger.log(c.a.Error,"HttpConnection.onclose("+e+") threw error '"+t+"'.")}}}else this.logger.log(c.a.Warning,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(c.a.Debug,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is already in the disconnected state.")},e.prototype.resolveUrl=function(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!g.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+e+"'.");var t=window.document.createElement("a");return t.href=e,this.logger.log(c.a.Information,"Normalizing '"+e+"' to '"+t.href+"'."),t.href},e.prototype.resolveNegotiateUrl=function(e){var t=e.indexOf("?"),n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===t?"":e.substring(t)).indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},e}();var q=function(){function e(e){this.transport=e,this.buffer=[],this.executing=!0,this.sendBufferedData=new W,this.transportResult=new W,this.sendLoopPromise=this.sendLoop()}return e.prototype.send=function(e){return this.bufferData(e),this.transportResult||(this.transportResult=new W),this.transportResult.promise},e.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},e.prototype.bufferData=function(e){if(this.buffer.length&&typeof this.buffer[0]!=typeof e)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof e);this.buffer.push(e),this.sendBufferedData.resolve()},e.prototype.sendLoop=function(){return B(this,void 0,void 0,function(){var t,n,r;return j(this,function(o){switch(o.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(o.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new W,t=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):e.concatBuffers(this.buffer),this.buffer.length=0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return o.sent(),t.resolve(),[3,5];case 4:return r=o.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},e.concatBuffers=function(e){for(var t=e.map(function(e){return e.byteLength}).reduce(function(e,t){return e+t}),n=new Uint8Array(t),r=0,o=0,i=e;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1&&this.subject.observers.splice(e,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch((function(e){}))},e}(),d=function(){function e(e){this.minimumLogLevel=e,this.outputConsole=console}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[e]+": "+t)}},e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return V})),n.d(t,"AbortError",(function(){return i.a})),n.d(t,"HttpError",(function(){return i.b})),n.d(t,"TimeoutError",(function(){return i.c})),n.d(t,"HttpClient",(function(){return a.a})),n.d(t,"HttpResponse",(function(){return a.b})),n.d(t,"DefaultHttpClient",(function(){return h})),n.d(t,"HubConnection",(function(){return E})),n.d(t,"HubConnectionState",(function(){return d})),n.d(t,"HubConnectionBuilder",(function(){return K})),n.d(t,"MessageType",(function(){return o})),n.d(t,"LogLevel",(function(){return c.a})),n.d(t,"HttpTransportType",(function(){return m})),n.d(t,"TransferFormat",(function(){return w})),n.d(t,"NullLogger",(function(){return q.a})),n.d(t,"JsonHubProtocol",(function(){return z})),n.d(t,"Subject",(function(){return y}));var r,o,i=n(3),a=n(4),s=n(44),c=n(0),u=(r=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])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this)||this;return n.logger=t,n}return u(t,e),t.prototype.send=function(e){var t=this;return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?new Promise((function(n,r){var o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=!0,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");var s=e.headers;s&&Object.keys(s).forEach((function(e){o.setRequestHeader(e,s[e])})),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=function(){o.abort(),r(new i.a)}),e.timeout&&(o.timeout=e.timeout),o.onload=function(){e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?n(new a.b(o.status,o.statusText,o.response||o.responseText)):r(new i.b(o.statusText,o.status))},o.onerror=function(){t.logger.log(c.a.Warning,"Error from HTTP request. "+o.status+": "+o.statusText+"."),r(new i.b(o.statusText,o.status))},o.ontimeout=function(){t.logger.log(c.a.Warning,"Timeout from HTTP request."),r(new i.c)},o.send(e.content||"")})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(a.a),f=function(){var 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])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t){var n=e.call(this)||this;return"undefined"!=typeof XMLHttpRequest?n.httpClient=new l(t):n.httpClient=new s.a(t),n}return f(t,e),t.prototype.send=function(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?this.httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(e){return this.httpClient.getCookieString(e)},t}(a.a),p=n(45);!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"}(o||(o={}));var d,g=n(1),y=function(){function e(){this.observers=[]}return e.prototype.next=function(e){for(var t=0,n=this.observers;t0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+i.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}}))}))},e.prototype.constructTransport=function(e){switch(e){case m.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new O(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case m.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new R(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case m.LongPolling:return new T(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+e+".")}},e.prototype.startTransport=function(e,t){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(e){return n.stopConnection(e)},this.transport.connect(e,t)},e.prototype.resolveTransportOrError=function(e,t,n){var r=m[e.transport];if(null==r)return this.logger.log(c.a.Debug,"Skipping transport '"+e.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+e.transport+"' because it is not supported by this client.");if(!function(e,t){return!e||0!=(t&e)}(t,r))return this.logger.log(c.a.Debug,"Skipping transport '"+m[r]+"' because it was disabled by the client."),new Error("'"+m[r]+"' is disabled by the client.");if(!(e.transferFormats.map((function(e){return w[e]})).indexOf(n)>=0))return this.logger.log(c.a.Debug,"Skipping transport '"+m[r]+"' because it does not support the requested transfer format '"+w[n]+"'."),new Error("'"+m[r]+"' does not support "+w[n]+".");if(r===m.WebSockets&&!this.options.WebSocket||r===m.ServerSentEvents&&!this.options.EventSource)return this.logger.log(c.a.Debug,"Skipping transport '"+m[r]+"' because it is not supported in your environment.'"),new Error("'"+m[r]+"' is not supported in your environment.");this.logger.log(c.a.Debug,"Selecting transport '"+m[r]+"'.");try{return this.constructTransport(r)}catch(e){return e}},e.prototype.isITransport=function(e){return e&&"object"==typeof e&&"connect"in e},e.prototype.stopConnection=function(e){if(this.logger.log(c.a.Debug,"HttpConnection.stopConnection("+e+") called while in state "+this.connectionState+"."),this.transport=void 0,e=this.stopError||e,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),e?this.logger.log(c.a.Error,"Connection disconnected with error '"+e+"'."):this.logger.log(c.a.Information,"Connection disconnected."),this.connectionId=void 0,this.connectionState="Disconnected",this.onclose&&this.connectionStarted){this.connectionStarted=!1;try{this.onclose(e)}catch(t){this.logger.log(c.a.Error,"HttpConnection.onclose("+e+") threw error '"+t+"'.")}}}else this.logger.log(c.a.Warning,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(c.a.Debug,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is already in the disconnected state.")},e.prototype.resolveUrl=function(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!g.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+e+"'.");var t=window.document.createElement("a");return t.href=e,this.logger.log(c.a.Information,"Normalizing '"+e+"' to '"+t.href+"'."),t.href},e.prototype.resolveNegotiateUrl=function(e){var t=e.indexOf("?"),n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===t?"":e.substring(t)).indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},e}();var F=function(){function e(e){this.transport=e,this.buffer=[],this.executing=!0,this.sendBufferedData=new H,this.transportResult=new H,this.sendLoopPromise=this.sendLoop()}return e.prototype.send=function(e){return this.bufferData(e),this.transportResult||(this.transportResult=new H),this.transportResult.promise},e.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},e.prototype.bufferData=function(e){if(this.buffer.length&&typeof this.buffer[0]!=typeof e)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof e);this.buffer.push(e),this.sendBufferedData.resolve()},e.prototype.sendLoop=function(){return M(this,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){switch(o.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(o.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new H,t=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):e.concatBuffers(this.buffer),this.buffer.length=0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return o.sent(),t.resolve(),[3,5];case 4:return r=o.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}}))}))},e.concatBuffers=function(e){for(var t=e.map((function(e){return e.byteLength})).reduce((function(e,t){return e+t})),n=new Uint8Array(t),r=0,o=0,i=e;o
+ * @license MIT
+ */
+var r=n(55),o=n(56),i=n(57);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return m(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function O(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function A(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(10))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0,"must have a non-negative type"),o(a,"must have a decode function"),this.registerEncoder((function(e){return e instanceof t}),(function(t){var o=i(),a=r.allocUnsafe(1);return a.writeInt8(e,0),o.append(a),o.append(n(t)),o})),this.registerDecoder(e,a),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:s.IncompleteBufferError}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p("_blazorLogicalChildren"),o=p("_blazorLogicalParent"),i=p("_blazorLogicalEnd");function a(e,t){if(e.childNodes.length>0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function s(e,t,n){var i=e;if(e instanceof Comment&&(u(i)&&u(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(c(i))throw new Error("Not implemented: moving existing logical children");var a=u(t);if(n0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=c,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=u,t.permuteLogicalChildren=function(e,t){var n=u(e);t.forEach((function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=c(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)})),t.forEach((function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)})),t.forEach((function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)})),t.forEach((function(e){n[e.toSiblingIndex]=e.moveRangeStart}))},t.getClosestDomElement=l},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function a(e){t.push(e)}function s(e,t,n,r){var o=u();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),a=o.invokeDotNetFromJS(e,t,n,i);return a?f(a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function c(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var a=o++,s=new Promise((function(e,t){n[a]={resolve:e,reject:t}}));try{var c=JSON.stringify(i,g);u().beginInvokeDotNetFromJS(a,e,t,r,c)}catch(e){l(a,!1,e)}return s}function u(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,(function(e,n){return t.reduce((function(t,n){return n(e,t)}),n)})):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach((function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e})),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=a,e.invokeMethod=function(e,t){for(var n=[],r=2;r1)for(var n=1;nthis.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,a,s=!!e,c=this._offset(n),u=r-n,l=u,f=s&&t||0,h=c[1];if(0===n&&r==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(a=0;a(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l);break}this._bufs[a].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new a(o)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]>>0)}t.readInt32LE=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},t.readUint32LE=i,t.readUint64LE=function(e,t){var n=i(e,t+4);if(n>o)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*r+i(e,t)},t.readLEB128=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldAutoStart=function(){return!(!document||!document.currentScript||"false"===document.currentScript.getAttribute("autostart"))}},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),c=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(C(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var u,w="",_=!1,I=["{","}"];(p(n)&&(_=!0,I=["[","]"]),C(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||_&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=_?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,w,I)):I[0]+w+I[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),P(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function C(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(60);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var e=new Date,t=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",T(),t.format.apply(t,arguments))},t.inherits=n(61),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var x="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(x&&e[x]){var t;if("function"!=typeof(t=e[x]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,x,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):I(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(_,e):_(e))}function _(e){p("emit readable"),e.emit("readable"),x(e)}function I(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function L(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(D,t,e))}function D(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function O(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):C(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&L(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(c):n.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,x(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==O(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=h.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=y(c,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(38).EventEmitter},function(e,t,n){"use strict";var r=n(23);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(67).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var u=n(21);u.inherits=n(15);var l={deprecate:n(70)},f=n(39),h=n(14).Buffer,p=o.Uint8Array||function(){};var d,g=n(40);function y(){}function v(e,t){s=s||n(11),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),_(e,t))}(e,n,r,t,o);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?c(w,e,n,a,o):w(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(11),!(d.call(b,this)||this instanceof s))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(20),n(68).setImmediate,n(10))},function(e,t,n){"use strict";e.exports=a;var r=n(11),o=n(21);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=200&&c.statusCode<300?r(new a.b(c.statusCode,c.statusMessage||"",u)):o(new i.b(c.statusMessage||"",c.statusCode||0))}));t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})}))},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(a.a)}).call(this,n(6).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(8),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),i=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),i=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(6).Buffer)},,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0?a-4:a;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=d,a/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){var r=n(59);
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh
* @license MIT
- */
-var r=n(50),o=n(51),i=n(52);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function A(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,i){return i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(23),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(21);i.inherits=n(15);var a=n(36),s=n(41);i.inherits(f,a);for(var c=o(s.prototype),u=0;u=0,"must have a non-negative type"),o(a,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),a=r.allocUnsafe(1);return a.writeInt8(e,0),o.append(a),o.append(n(t)),o}),this.registerDecoder(e,a),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:s.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function s(e,t,n){var i=e;if(e instanceof Comment&&(u(i)&&u(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(c(i))throw new Error("Not implemented: moving existing logical children");var a=u(t);if(n0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=c,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=u,t.permuteLogicalChildren=function(e,t){var n=u(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=c(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function a(e){t.push(e)}function s(e,t,n,r){var o=u();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),a=o.invokeDotNetFromJS(e,t,n,i);return a?f(a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function c(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var a=o++,s=new Promise(function(e,t){n[a]={resolve:e,reject:t}});try{var c=JSON.stringify(i,g);u().beginInvokeDotNetFromJS(a,e,t,r,c)}catch(e){l(a,!1,e)}return s}function u(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=a,e.invokeMethod=function(e,t){for(var n=[],r=2;r1)for(var n=1;nthis.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,a,s=!!e,c=this._offset(n),u=r-n,l=u,f=s&&t||0,h=c[1];if(0===n&&r==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(a=0;a(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l);break}this._bufs[a].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new a(o)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),c=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(C(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var u,w="",_=!1,I=["{","}"];(p(n)&&(_=!0,I=["[","]"]),C(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||_&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=_?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,w,I)):I[0]+w+I[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function C(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(54);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),T[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(55),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):T(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(I,e):I(e))}function I(e){p("emit readable"),e.emit("readable"),R(e)}function T(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(L,t,e))}function L(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):_(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&O(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&O(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(c):n.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==M(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=d(c,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(37).EventEmitter},function(e,t,n){"use strict";var r=n(23);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(61).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var u=n(21);u.inherits=n(15);var l={deprecate:n(64)},f=n(38),h=n(14).Buffer,p=o.Uint8Array||function(){};var d,g=n(39);function y(){}function v(e,t){s=s||n(10),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),_(e,t))}(e,n,r,t,o);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?c(w,e,n,a,o):w(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(10),!(d.call(b,this)||this instanceof s))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)})}function _(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(20),n(62).setImmediate,n(9))},function(e,t,n){"use strict";e.exports=a;var r=n(10),o=n(21);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=200&&c.statusCode<300?r(new a.b(c.statusCode,c.statusMessage||"",u)):o(new i.b(c.statusMessage||"",c.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(a.a)}).call(this,n(6).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(8),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),i=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),i=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(6).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0?r-4:r,f=0;f>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=d,a/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh
- * @license MIT
- */
-function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(35).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;ai)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]Retry Alternatively, reload
',this.message=this.modal.querySelector("h5"),this.button=this.modal.querySelector("button"),this.reloadParagraph=this.modal.querySelector("p"),this.button.addEventListener("click",function(){return r(a,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:this.show(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.Blazor.reconnect()];case 2:return t.sent()||this.rejected(),[3,4];case 3:return e=t.sent(),this.logger.log(i.LogLevel.Error,e),this.failed(),[3,4];case 4:return[2]}})})}),this.reloadParagraph.querySelector("a").addEventListener("click",function(){return location.reload()})}return e.prototype.show=function(){this.addedToDom||(this.addedToDom=!0,this.document.body.appendChild(this.modal)),this.modal.style.display="block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server..."},e.prototype.hide=function(){this.modal.style.display="none"},e.prototype.failed=function(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.message.innerHTML="Reconnection failed. Try reloading the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. Reload the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="3.1.1-dev"}]);
\ No newline at end of file
+ */function o(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(s=l[u],!m(e[s],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function w(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function S(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&v(o,n,"Missing expected exception"+r);var i="string"==typeof r,s=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||s)&&v(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(y(e.actual),128)+" "+e.operator+" "+g(y(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),i=r.indexOf("\n"+o);if(i>=0){var a=r.indexOf("\n",i+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(h.AssertionError,Error),h.fail=v,h.ok=b,h.equal=function(e,t,n){e!=t&&v(e,t,n,"==",h.equal)},h.notEqual=function(e,t,n){e==t&&v(e,t,n,"!=",h.notEqual)},h.deepEqual=function(e,t,n){m(e,t,!1)||v(e,t,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,n){m(e,t,!0)||v(e,t,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,n){m(e,t,!1)&&v(e,t,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,n,r){m(t,n,!0)&&v(t,n,r,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,n){e!==t&&v(e,t,n,"===",h.strictEqual)},h.notStrictEqual=function(e,t,n){e===t&&v(e,t,n,"!==",h.notStrictEqual)},h.throws=function(e,t,n){S(!0,e,t,n)},h.doesNotThrow=function(e,t,n){S(!1,e,t,n)},h.ifError=function(e){if(e)throw e},h.strict=r((function e(t,n){t||v(t,!0,n,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var C=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(10))},function(e,t,n){"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),u=1;u0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(69),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(10))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){d(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(37)).Stream=t,t.Readable=t,t.Writable=n(42),t.Duplex=n(11),t.Transform=n(43),t.PassThrough=n(73)},function(e,t,n){"use strict";e.exports=i;var r=n(43),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(36).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;a.1)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,a){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce((function(e,t){return e.append(s(t,!0)),e}),o().append(l));else{if(!a&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a,s=[];for(n=0;n>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce((function(e,t){return e.append(t)}),o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return i(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return i(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return i(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}}))}))},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}}))}))},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(34),o=n(33),i=function(){function e(e){this.batchData=e;var t=new u(e);this.arrayRangeReader=new l(e),this.arrayBuilderSegmentReader=new f(e),this.diffReader=new a(e),this.editReader=new s(e,t),this.frameReader=new c(e,t)}return e.prototype.updatedComponents=function(){return o.readInt32LE(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return o.readInt32LE(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return o.readInt32LE(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return o.readInt32LE(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return o.readInt32LE(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return o.readInt32LE(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return o.readUint64LE(this.batchData,n)},e}();t.OutOfProcessRenderBatch=i;var a=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return o.readInt32LE(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),s=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return o.readInt32LE(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return o.readInt32LE(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return o.readInt32LE(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return o.readInt32LE(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=o.readInt32LE(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return o.readInt32LE(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return o.readInt32LE(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=o.readInt32LE(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return o.readInt32LE(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=o.readInt32LE(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=o.readInt32LE(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=o.readInt32LE(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=o.readInt32LE(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=o.readInt32LE(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return o.readUint64LE(this.batchDataUint8,e+12)},e}(),u=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=o.readInt32LE(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t=o.readInt32LE(this.batchDataUint8,this.stringTableStartIndex+4*e),n=o.readLEB128(this.batchDataUint8,t),i=t+o.numLEB128Bytes(n),a=new Uint8Array(this.batchDataUint8.buffer,this.batchDataUint8.byteOffset+i,n);return r.decodeUtf8(a)},e}(),l=function(){function e(e){this.batchDataUint8=e}return e.prototype.count=function(e){return o.readInt32LE(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}(),f=function(){function e(e){this.batchDataUint8=e}return e.prototype.offset=function(e){return 0},e.prototype.count=function(e){return o.readInt32LE(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]Retry Alternatively, reload
',this.message=this.modal.querySelector("h5"),this.button=this.modal.querySelector("button"),this.reloadParagraph=this.modal.querySelector("p"),this.button.addEventListener("click",(function(){return r(a,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:this.show(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.Blazor.reconnect()];case 2:return t.sent()||this.rejected(),[3,4];case 3:return e=t.sent(),this.logger.log(i.LogLevel.Error,e),this.failed(),[3,4];case 4:return[2]}}))}))})),this.reloadParagraph.querySelector("a").addEventListener("click",(function(){return location.reload()}))}return e.prototype.show=function(){this.addedToDom||(this.addedToDom=!0,this.document.body.appendChild(this.modal)),this.modal.style.display="block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server..."},e.prototype.hide=function(){this.modal.style.display="none"},e.prototype.failed=function(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.message.innerHTML="Reconnection failed. Try reloading the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",(function(){return location.reload()}))},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. Reload the page to restore functionality.",this.message.querySelector("a").addEventListener("click",(function(){return location.reload()}))},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return u})),n.d(t,"MessagePackHubProtocol",(function(){return c}));var r=n(6),o=n(12),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}(),u="3.1.5"}]);
\ No newline at end of file
diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js
index 16dd578625..a12eaa04dc 100644
--- a/src/Components/Web.JS/dist/Release/blazor.webassembly.js
+++ b/src/Components/Web.JS/dist/Release/blazor.webassembly.js
@@ -1 +1 @@
-!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function u(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=u,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");u(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),u=r.values(o),l=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function u(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(l(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=l,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=l(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function u(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function l(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,u=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var l=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,l)}catch(e){c(i,!1,e)}return u}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]>2,r=Module.HEAPU32[n+1];if(r>s)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*l+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var c=document.createElement("a");function d(e){return e+12}function f(e,t,n){var r="["+e+"] "+t+":"+n;return Module.mono_bind_static_method(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=u,this.editReader=l,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,u.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},u={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,l.structLength)}},l={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]);
\ No newline at end of file
+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=46)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function u(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=u,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");u(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),u=r.values(o),s=r.count(o),c=t.referenceFrames(),l=r.values(c),f=t.diffReader,d=0;d0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function u(e,t,n){var a=e;if(e instanceof Comment&&(c(a)&&c(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(s(a))throw new Error("Not implemented: moving existing logical children");var i=c(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=s,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return c(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=c,t.permuteLogicalChildren=function(e,t){var n=c(e);t.forEach((function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=s(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)})),t.forEach((function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):d(r,e)})),t.forEach((function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)})),t.forEach((function(e){n[e.toSiblingIndex]=e.moveRangeStart}))},t.getClosestDomElement=l},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function u(e,t,n,r){var o=c();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,m),i=o.invokeDotNetFromJS(e,t,n,a);return i?f(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function s(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,u=new Promise((function(e,t){n[i]={resolve:e,reject:t}}));try{var s=JSON.stringify(a,m);c().beginInvokeDotNetFromJS(i,e,t,r,s)}catch(e){l(i,!1,e)}return u}function c(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,(function(e,n){return t.reduce((function(t,n){return n(e,t)}),n)})):null}function d(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach((function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e})),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]>>0)}t.readInt32LE=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},t.readUint32LE=a,t.readUint64LE=function(e,t){var n=a(e,t+4);if(n>o)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*r+a(e,t)},t.readLEB128=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var a=e[t+o];if(n|=(127&a)<65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldAutoStart=function(){return!(!document||!document.currentScript||"false"===document.currentScript.getAttribute("autostart"))}},,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,u)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),n(17),n(24);var i=n(18),u=n(47),s=n(5),c=n(50),l=n(35),f=n(19),d=n(51),p=n(52),h=n(53),m=!1;function v(e){return r(this,void 0,void 0,(function(){var t,n,l,v,y,b=this;return o(this,(function(g){switch(g.label){case 0:if(m)throw new Error("Blazor has already started.");return m=!0,f.setEventDispatcher((function(e,t){return DotNet.invokeMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","DispatchEvent",e,JSON.stringify(t))})),t=i.setPlatform(u.monoPlatform),window.Blazor.platform=t,window.Blazor._internal.renderBatch=function(e,t){s.renderBatch(e,new c.SharedMemoryRenderBatch(t))},window.Blazor._internal.navigationManager.listenForNavigationEvents((function(e,t){return r(b,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,DotNet.invokeMethodAsync("Microsoft.AspNetCore.Components.WebAssembly","NotifyLocationChanged",e,t)];case 1:return n.sent(),[2]}}))}))})),[4,h.BootConfigResult.initAsync()];case 1:return n=g.sent(),[4,Promise.all([d.WebAssemblyResourceLoader.initAsync(n.bootConfig,e||{}),p.WebAssemblyConfigLoader.initAsync(n)])];case 2:l=a.apply(void 0,[g.sent(),1]),v=l[0],g.label=3;case 3:return g.trys.push([3,5,,6]),[4,t.start(v)];case 4:return g.sent(),[3,6];case 5:throw y=g.sent(),new Error("Failed to start platform. Reason: "+y);case 6:return t.callEntryPoint(v.bootConfig.entryAssembly),[2]}}))}))}window.Blazor.start=v,l.shouldAutoStart()&&v().catch((function(e){"undefined"!=typeof Module&&Module.printErr?Module.printErr(e):console.error(e)}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function u(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,u)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]