diff -Nru dotnet8-8.0.102-8.0.2/Components.md dotnet8-8.0.103-8.0.3/Components.md --- dotnet8-8.0.102-8.0.2/Components.md 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/Components.md 2024-03-08 08:33:13.000000000 +0000 @@ -8,13 +8,13 @@ - `src/arcade` -*[dotnet/arcade@61ae141](https://github.com/dotnet/arcade/tree/61ae141d2bf3534619265c8f691fd55dc3e75147)* +*[dotnet/arcade@da98edc](https://github.com/dotnet/arcade/tree/da98edc4c3ea539f109ea320672136ceb32591a7)* - `src/aspire` *[_git/dotnet-aspire@48e42f5](https://dev.azure.com/dnceng/internal/_git/dotnet-aspire/?version=GC48e42f59d64d84b404e904996a9ed61f2a17a569)* - `src/aspnetcore` -*[_git/dotnet-aspnetcore@da7e989](https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/?version=GCda7e9894ce22ef8cc02e5acc56e95a6f8cf8f644)* +*[_git/dotnet-aspnetcore@88ec3bc](https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/?version=GC88ec3bc3f37e76fbcc932a25f9f0c1c29fe2b343)* - `src/aspnetcore/src/submodules/googletest` - *[google/googletest@7e33b6a](https://github.com/google/googletest/tree/7e33b6a1c497ced1e98fc60175aeb4678419281c)* + *[google/googletest@4872968](https://github.com/google/googletest/tree/48729681ad88a89061344ee541b4548833077e00)* - `src/aspnetcore/src/submodules/MessagePack-CSharp` *[aspnet/MessagePack-CSharp@ecc4e18](https://github.com/aspnet/MessagePack-CSharp/tree/ecc4e18ad7a0c7db51cd7e3d2997a291ed01444d)* - `src/cecil` @@ -26,13 +26,13 @@ - `src/diagnostics` *[dotnet/diagnostics@5ce78f6](https://github.com/dotnet/diagnostics/tree/5ce78f66d89ea529e459abddb129ab36cb5bd936)* - `src/emsdk` -*[dotnet/emsdk@2fc2ffd](https://github.com/dotnet/emsdk/tree/2fc2ffd960930318f33fcaa690cbdbc55d72f52d)* +*[dotnet/emsdk@9a29abd](https://github.com/dotnet/emsdk/tree/9a29abdd764a4de0f253ed368871877a47725247)* - `src/format` -*[dotnet/format@28925c0](https://github.com/dotnet/format/tree/28925c0e519d66c80328aacf973b74e40bb1d5bd)* +*[dotnet/format@d237e17](https://github.com/dotnet/format/tree/d237e172b324021b97effa244af44d63d1a8bb7e)* - `src/fsharp` -*[dotnet/fsharp@424e4b7](https://github.com/dotnet/fsharp/tree/424e4b7cffb7656efd63f7a905a2498e39011104)* +*[dotnet/fsharp@fc5e9ed](https://github.com/dotnet/fsharp/tree/fc5e9eda234e2b69aa479f4f83faddc31fdd4da7)* - `src/installer` -*[dotnet/installer@b7800db](https://github.com/dotnet/installer/tree/b7800db369acbd1bbae91f2fad199e69f8f600b4)* +*[dotnet/installer@6a90b4b](https://github.com/dotnet/installer/tree/6a90b4b4bc6034fa0cf75368f0ccb9ed98b4651c)* - `src/msbuild` *[dotnet/msbuild@b5265ef](https://github.com/dotnet/msbuild/tree/b5265ef370a651f8c3458110b804e5cbf869eeb5)* - `src/nuget-client` @@ -46,9 +46,9 @@ - `src/roslyn-analyzers` *[dotnet/roslyn-analyzers@b4d9a13](https://github.com/dotnet/roslyn-analyzers/tree/b4d9a1334d5189172977ba8fddd00bda70161e4a)* - `src/runtime` -*[_git/dotnet-runtime@1381d5e](https://dev.azure.com/dnceng/internal/_git/dotnet-runtime/?version=GC1381d5ebd2ab1f292848d5b19b80cf71ac332508)* +*[_git/dotnet-runtime@9f4b1f5](https://dev.azure.com/dnceng/internal/_git/dotnet-runtime/?version=GC9f4b1f5d664afdfc80e1508ab7ed099dff210fbd)* - `src/sdk` -*[_git/dotnet-sdk@4dc3605](https://dev.azure.com/dnceng/internal/_git/dotnet-sdk/?version=GC4dc36050406554319d333a791a3e1dd8262cfd1b)* +*[_git/dotnet-sdk@413c870](https://dev.azure.com/dnceng/internal/_git/dotnet-sdk/?version=GC413c870a447075a90b8827353acb28ed37bab9dc)* - `src/source-build-externals` *[_git/dotnet-source-build-externals@0f0f1f0](https://dev.azure.com/dnceng/internal/_git/dotnet-source-build-externals/?version=GC0f0f1f0f33830f27ed0ff357145d2464b96b1a3e)* - `src/source-build-externals/src/abstractions-xunit` @@ -82,7 +82,7 @@ - `src/symreader` *[dotnet/symreader@2c8079e](https://github.com/dotnet/symreader/tree/2c8079e2e8e78c0cd11ac75a32014756136ecdb9)* - `src/templating` -*[dotnet/templating@1fd4794](https://github.com/dotnet/templating/tree/1fd47947d9b0fd7d5f9700d59b2a7636e3ee9284)* +*[dotnet/templating@8e0e60a](https://github.com/dotnet/templating/tree/8e0e60adf58a813c3b8eee5eef465447116eef4e)* - `src/test-templates` *[dotnet/test-templates@1e5f360](https://github.com/dotnet/test-templates/tree/1e5f3603af2277910aad946736ee23283e7f3e16)* - `src/vstest` diff -Nru dotnet8-8.0.102-8.0.2/debian/changelog dotnet8-8.0.103-8.0.3/debian/changelog --- dotnet8-8.0.102-8.0.2/debian/changelog 2024-02-12 20:08:53.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/debian/changelog 2024-03-08 08:26:16.000000000 +0000 @@ -1,3 +1,11 @@ +dotnet8 (8.0.103-8.0.3-0ubuntu1~22.04.1) jammy-security; urgency=medium + + * New upstream release + * SECURITY UPDATE: denial of service + - CVE-2024-21392: DoS in .NET Core / YARP HTTP / 2 WebSocket support. + + -- Ian Constantin Fri, 08 Mar 2024 10:26:16 +0200 + dotnet8 (8.0.102-8.0.2-0ubuntu1~22.04.1) jammy-security; urgency=medium * New upstream release diff -Nru dotnet8-8.0.102-8.0.2/eng/Versions.props dotnet8-8.0.103-8.0.3/eng/Versions.props --- dotnet8-8.0.102-8.0.2/eng/Versions.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/eng/Versions.props 2024-03-08 08:33:13.000000000 +0000 @@ -30,7 +30,7 @@ These URLs can't be composed from their base URL and version as we read them from the prep.sh and pipeline scripts, outside of MSBuild. --> - https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.8.0.101-servicing.23601.1.centos.8-x64.tar.gz - https://dotnetcli.azureedge.net/source-built-artifacts/sdks/dotnet-sdk-8.0.101-centos.8-x64.tar.gz + https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.8.0.102-servicing.24073.1.centos.8-x64.tar.gz + https://dotnetcli.azureedge.net/source-built-artifacts/sdks/dotnet-sdk-8.0.102-centos.8-x64.tar.gz diff -Nru dotnet8-8.0.102-8.0.2/eng/common/post-build/publish-using-darc.ps1 dotnet8-8.0.103-8.0.3/eng/common/post-build/publish-using-darc.ps1 --- dotnet8-8.0.102-8.0.2/eng/common/post-build/publish-using-darc.ps1 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/eng/common/post-build/publish-using-darc.ps1 2024-03-08 08:33:13.000000000 +0000 @@ -12,7 +12,7 @@ try { . $PSScriptRoot\post-build-utils.ps1 - $darc = Get-Darc + $darc = Get-Darc $optionalParams = [System.Collections.ArrayList]::new() @@ -46,7 +46,7 @@ } Write-Host 'done.' -} +} catch { Write-Host $_ Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to publish build '$BuildId' to default channels." diff -Nru dotnet8-8.0.102-8.0.2/eng/common/templates/job/publish-build-assets.yml dotnet8-8.0.103-8.0.3/eng/common/templates/job/publish-build-assets.yml --- dotnet8-8.0.102-8.0.2/eng/common/templates/job/publish-build-assets.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/eng/common/templates/job/publish-build-assets.yml 2024-03-08 08:33:13.000000000 +0000 @@ -58,7 +58,7 @@ demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: $(DncEngInternalBuildPool) + name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: @@ -71,7 +71,7 @@ checkDownloadedFiles: true condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: NuGetAuthenticate@1 - task: PowerShell@2 @@ -86,7 +86,7 @@ /p:OfficialBuildId=$(Build.BuildNumber) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: powershell@2 displayName: Create ReleaseConfigs Artifact inputs: @@ -95,7 +95,7 @@ Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId) Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)" Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild) - + - task: PublishBuildArtifacts@1 displayName: Publish ReleaseConfigs Artifact inputs: @@ -121,7 +121,7 @@ - task: PublishBuildArtifacts@1 displayName: Publish SymbolPublishingExclusionsFile Artifact - condition: eq(variables['SymbolExclusionFile'], 'true') + condition: eq(variables['SymbolExclusionFile'], 'true') inputs: PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' PublishLocation: Container @@ -137,7 +137,7 @@ displayName: Publish Using Darc inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' -MaestroToken '$(MaestroApiAccessToken)' @@ -148,4 +148,4 @@ - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - template: /eng/common/templates/steps/publish-logs.yml parameters: - JobLabel: 'Publish_Artifacts_Logs' + JobLabel: 'Publish_Artifacts_Logs' diff -Nru dotnet8-8.0.102-8.0.2/eng/common/templates/post-build/post-build.yml dotnet8-8.0.103-8.0.3/eng/common/templates/post-build/post-build.yml --- dotnet8-8.0.102-8.0.2/eng/common/templates/post-build/post-build.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/eng/common/templates/post-build/post-build.yml 2024-03-08 08:33:13.000000000 +0000 @@ -39,7 +39,7 @@ displayName: Enable NuGet validation type: boolean default: true - + - name: publishInstallersAndChecksums displayName: Publish installers and checksums type: boolean @@ -131,8 +131,8 @@ displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ - job: displayName: Signing Validation @@ -221,9 +221,9 @@ displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 - arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ - -ExtractPath $(Agent.BuildDirectory)/Extract/ - -GHRepoName $(Build.Repository.Name) + arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ + -ExtractPath $(Agent.BuildDirectory)/Extract/ + -GHRepoName $(Build.Repository.Name) -GHCommit $(Build.SourceVersion) -SourcelinkCliVersion $(SourceLinkCLIVersion) continueOnError: true @@ -258,7 +258,7 @@ demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: $(DncEngInternalBuildPool) + name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -272,7 +272,7 @@ displayName: Publish Using Darc inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' -MaestroToken '$(MaestroApiAccessToken)' diff -Nru dotnet8-8.0.102-8.0.2/eng/common/templates/variables/pool-providers.yml dotnet8-8.0.103-8.0.3/eng/common/templates/variables/pool-providers.yml --- dotnet8-8.0.102-8.0.2/eng/common/templates/variables/pool-providers.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/eng/common/templates/variables/pool-providers.yml 2024-03-08 08:33:13.000000000 +0000 @@ -1,15 +1,15 @@ -# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, # otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. -# Motivation: +# Motivation: # Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS # (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing # (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. -# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services -# team needs to move resources around and create new and potentially differently-named pools. Using this template +# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services +# team needs to move resources around and create new and potentially differently-named pools. Using this template # file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. -# How to use: +# How to use: # This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). # If we find alternate naming conventions in broad usage it can be added to the condition below. # @@ -54,4 +54,4 @@ False, 'NetCore1ESPool-Internal' ) - ] \ No newline at end of file + ] diff -Nru dotnet8-8.0.102-8.0.2/global.json dotnet8-8.0.103-8.0.3/global.json --- dotnet8-8.0.102-8.0.2/global.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/global.json 2024-03-08 08:33:13.000000000 +0000 @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "8.0.101" + "dotnet": "8.0.102" }, "msbuild-sdks": { "Microsoft.Build.CentralPackageVersions": "2.0.1", diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/AllRepoVersions.props dotnet8-8.0.103-8.0.3/prereqs/git-info/AllRepoVersions.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/AllRepoVersions.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/AllRepoVersions.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,12 +1,12 @@  - 61ae141d2bf3534619265c8f691fd55dc3e75147 - 8.0.0-beta.24059.4 + da98edc4c3ea539f109ea320672136ceb32591a7 + 8.0.0-beta.24113.2 48e42f59d64d84b404e904996a9ed61f2a17a569 8.0.0-preview.1.23557.2 - da7e9894ce22ef8cc02e5acc56e95a6f8cf8f644 - 8.0.2-servicing.24068.4 + 88ec3bc3f37e76fbcc932a25f9f0c1c29fe2b343 + 8.0.3-servicing.24116.15 45dd3a73dd5b64b010c4251303b3664bb30df029 0.11.4-alpha.23509.2 02fe27cd6a9b001c8feb7938e6ef4b3799745759 @@ -15,13 +15,13 @@ 8.0.0-preview.6.23463.1 5ce78f66d89ea529e459abddb129ab36cb5bd936 7.0.0-preview.23211.1 - 2fc2ffd960930318f33fcaa690cbdbc55d72f52d - 8.0.2-servicing.24062.1 - 28925c0e519d66c80328aacf973b74e40bb1d5bd - 8.0.456602 - 424e4b7cffb7656efd63f7a905a2498e39011104 - 8.0.101-beta.23563.2 - b7800db369acbd1bbae91f2fad199e69f8f600b4 + 9a29abdd764a4de0f253ed368871877a47725247 + 8.0.3-servicing.24108.3 + d237e172b324021b97effa244af44d63d1a8bb7e + 8.0.511601 + fc5e9eda234e2b69aa479f4f83faddc31fdd4da7 + 8.0.102-beta.24081.2 + 6a90b4b4bc6034fa0cf75368f0ccb9ed98b4651c 8.0.100 b5265ef370a651f8c3458110b804e5cbf869eeb5 17.8.5-preview-24055-02 @@ -33,10 +33,10 @@ 3.11.0-beta1.23525.2 263571123fc3dc4a638e071234ac9fbf91913962 4.8.0-7.24067.24 - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 - 8.0.2-servicing.24067.11 - 4dc36050406554319d333a791a3e1dd8262cfd1b - 8.0.102-servicing.24069.16 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd + 8.0.3-servicing.24114.23 + 413c870a447075a90b8827353acb28ed37bab9dc + 8.0.103-servicing.24116.86 0f0f1f0f33830f27ed0ff357145d2464b96b1a3e 8.0.0-alpha.1.23577.6 95f83e27806330fec09edd96e06bba3acabe3f35 @@ -45,8 +45,8 @@ 8.0.0-beta.23615.1 2c8079e2e8e78c0cd11ac75a32014756136ecdb9 2.1.0-beta.23253.1 - 1fd47947d9b0fd7d5f9700d59b2a7636e3ee9284 - 8.0.102-servicing.24068.1 + 8e0e60adf58a813c3b8eee5eef465447116eef4e + 8.0.103-servicing.24115.27 1e5f3603af2277910aad946736ee23283e7f3e16 1.1.0-rc.23410.2 aa59400b11e1aeee2e8af48928dbd48748a8bef9 diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/arcade.props dotnet8-8.0.103-8.0.3/prereqs/git-info/arcade.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/arcade.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/arcade.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@  - 61ae141d2bf3534619265c8f691fd55dc3e75147 - 20240109.4 - 8.0.0-beta.24059.4 + da98edc4c3ea539f109ea320672136ceb32591a7 + 20240213.2 + 8.0.0-beta.24113.2 beta false diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/aspnetcore.props dotnet8-8.0.103-8.0.3/prereqs/git-info/aspnetcore.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/aspnetcore.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/aspnetcore.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@  - da7e9894ce22ef8cc02e5acc56e95a6f8cf8f644 - 20240118.4 - 8.0.2-servicing.24068.4 + 88ec3bc3f37e76fbcc932a25f9f0c1c29fe2b343 + 20240216.15 + 8.0.3-servicing.24116.15 servicing false diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/emsdk.props dotnet8-8.0.103-8.0.3/prereqs/git-info/emsdk.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/emsdk.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/emsdk.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@  - 2fc2ffd960930318f33fcaa690cbdbc55d72f52d - 20240112.1 - 8.0.2-servicing.24062.1 + 9a29abdd764a4de0f253ed368871877a47725247 + 20240208.3 + 8.0.3-servicing.24108.3 servicing false diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/format.props dotnet8-8.0.103-8.0.3/prereqs/git-info/format.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/format.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/format.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@  - 28925c0e519d66c80328aacf973b74e40bb1d5bd - 20231129.1 - 8.0.456602 + d237e172b324021b97effa244af44d63d1a8bb7e + 20240217.1 + 8.0.511601 true diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/fsharp.props dotnet8-8.0.103-8.0.3/prereqs/git-info/fsharp.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/fsharp.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/fsharp.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@  - 424e4b7cffb7656efd63f7a905a2498e39011104 - 20231113.2 - 8.0.101-beta.23563.2 + fc5e9eda234e2b69aa479f4f83faddc31fdd4da7 + 20240131.2 + 8.0.102-beta.24081.2 beta false diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/installer.props dotnet8-8.0.103-8.0.3/prereqs/git-info/installer.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/installer.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/installer.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,8 +1,8 @@  - b7800db369acbd1bbae91f2fad199e69f8f600b4 - 20240123.1 + 6a90b4b4bc6034fa0cf75368f0ccb9ed98b4651c + 20240217.1 8.0.100 true diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/runtime.props dotnet8-8.0.103-8.0.3/prereqs/git-info/runtime.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/runtime.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/runtime.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@  - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 - 20240117.11 - 8.0.2-servicing.24067.11 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd + 20240214.23 + 8.0.3-servicing.24114.23 servicing false diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/sdk.props dotnet8-8.0.103-8.0.3/prereqs/git-info/sdk.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/sdk.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/sdk.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@  - 4dc36050406554319d333a791a3e1dd8262cfd1b - 20240119.16 - 8.0.102-servicing.24069.16 + 413c870a447075a90b8827353acb28ed37bab9dc + 20240216.86 + 8.0.103-servicing.24116.86 servicing false diff -Nru dotnet8-8.0.102-8.0.2/prereqs/git-info/templating.props dotnet8-8.0.103-8.0.3/prereqs/git-info/templating.props --- dotnet8-8.0.102-8.0.2/prereqs/git-info/templating.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/prereqs/git-info/templating.props 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@  - 1fd47947d9b0fd7d5f9700d59b2a7636e3ee9284 - 20240118.1 - 8.0.102-servicing.24068.1 + 8e0e60adf58a813c3b8eee5eef465447116eef4e + 20240215.27 + 8.0.103-servicing.24115.27 servicing false diff -Nru dotnet8-8.0.102-8.0.2/release.info dotnet8-8.0.103-8.0.3/release.info --- dotnet8-8.0.102-8.0.2/release.info 2024-02-08 12:54:59.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/release.info 2024-03-08 08:33:20.000000000 +0000 @@ -1,2 +1,2 @@ RM_GIT_REPO=https://github.com/dotnet/dotnet -RM_GIT_COMMIT=d396b0c4d3e51c2d8d679b2f7233912bc5bfc2fa +RM_GIT_COMMIT=49a39629323839c28481dd42545ce44d11c75c5a diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/eng/Versions.props dotnet8-8.0.103-8.0.3/src/arcade/eng/Versions.props --- dotnet8-8.0.102-8.0.2/src/arcade/eng/Versions.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/eng/Versions.props 2024-03-08 08:33:13.000000000 +0000 @@ -100,7 +100,7 @@ 1.0.5 1.3.2 1.3.2 - 1.0.0-v3.14.0.5722 + 3.14.0-8606.20240208.1 7.10.6071 5.3.0.1 4.18.4 diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/eng/common/post-build/publish-using-darc.ps1 dotnet8-8.0.103-8.0.3/src/arcade/eng/common/post-build/publish-using-darc.ps1 --- dotnet8-8.0.102-8.0.2/src/arcade/eng/common/post-build/publish-using-darc.ps1 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/eng/common/post-build/publish-using-darc.ps1 2024-03-08 08:33:13.000000000 +0000 @@ -12,7 +12,7 @@ try { . $PSScriptRoot\post-build-utils.ps1 - $darc = Get-Darc + $darc = Get-Darc $optionalParams = [System.Collections.ArrayList]::new() @@ -46,7 +46,7 @@ } Write-Host 'done.' -} +} catch { Write-Host $_ Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to publish build '$BuildId' to default channels." diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/eng/common/templates/job/publish-build-assets.yml dotnet8-8.0.103-8.0.3/src/arcade/eng/common/templates/job/publish-build-assets.yml --- dotnet8-8.0.102-8.0.2/src/arcade/eng/common/templates/job/publish-build-assets.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/eng/common/templates/job/publish-build-assets.yml 2024-03-08 08:33:13.000000000 +0000 @@ -58,7 +58,7 @@ demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: $(DncEngInternalBuildPool) + name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: @@ -71,7 +71,7 @@ checkDownloadedFiles: true condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: NuGetAuthenticate@1 - task: PowerShell@2 @@ -86,7 +86,7 @@ /p:OfficialBuildId=$(Build.BuildNumber) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: powershell@2 displayName: Create ReleaseConfigs Artifact inputs: @@ -95,7 +95,7 @@ Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId) Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)" Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild) - + - task: PublishBuildArtifacts@1 displayName: Publish ReleaseConfigs Artifact inputs: @@ -121,7 +121,7 @@ - task: PublishBuildArtifacts@1 displayName: Publish SymbolPublishingExclusionsFile Artifact - condition: eq(variables['SymbolExclusionFile'], 'true') + condition: eq(variables['SymbolExclusionFile'], 'true') inputs: PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' PublishLocation: Container @@ -137,7 +137,7 @@ displayName: Publish Using Darc inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' -MaestroToken '$(MaestroApiAccessToken)' @@ -148,4 +148,4 @@ - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - template: /eng/common/templates/steps/publish-logs.yml parameters: - JobLabel: 'Publish_Artifacts_Logs' + JobLabel: 'Publish_Artifacts_Logs' diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/eng/common/templates/post-build/post-build.yml dotnet8-8.0.103-8.0.3/src/arcade/eng/common/templates/post-build/post-build.yml --- dotnet8-8.0.102-8.0.2/src/arcade/eng/common/templates/post-build/post-build.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/eng/common/templates/post-build/post-build.yml 2024-03-08 08:33:13.000000000 +0000 @@ -39,7 +39,7 @@ displayName: Enable NuGet validation type: boolean default: true - + - name: publishInstallersAndChecksums displayName: Publish installers and checksums type: boolean @@ -131,8 +131,8 @@ displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ - job: displayName: Signing Validation @@ -221,9 +221,9 @@ displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 - arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ - -ExtractPath $(Agent.BuildDirectory)/Extract/ - -GHRepoName $(Build.Repository.Name) + arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ + -ExtractPath $(Agent.BuildDirectory)/Extract/ + -GHRepoName $(Build.Repository.Name) -GHCommit $(Build.SourceVersion) -SourcelinkCliVersion $(SourceLinkCLIVersion) continueOnError: true @@ -258,7 +258,7 @@ demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: $(DncEngInternalBuildPool) + name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -272,7 +272,7 @@ displayName: Publish Using Darc inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' -MaestroToken '$(MaestroApiAccessToken)' diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/eng/common/templates/variables/pool-providers.yml dotnet8-8.0.103-8.0.3/src/arcade/eng/common/templates/variables/pool-providers.yml --- dotnet8-8.0.102-8.0.2/src/arcade/eng/common/templates/variables/pool-providers.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/eng/common/templates/variables/pool-providers.yml 2024-03-08 08:33:13.000000000 +0000 @@ -1,15 +1,15 @@ -# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, # otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. -# Motivation: +# Motivation: # Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS # (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing # (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. -# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services -# team needs to move resources around and create new and potentially differently-named pools. Using this template +# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services +# team needs to move resources around and create new and potentially differently-named pools. Using this template # file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. -# How to use: +# How to use: # This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). # If we find alternate naming conventions in broad usage it can be added to the condition below. # @@ -54,4 +54,4 @@ False, 'NetCore1ESPool-Internal' ) - ] \ No newline at end of file + ] diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/eng/promote-build.yml dotnet8-8.0.103-8.0.3/src/arcade/eng/promote-build.yml --- dotnet8-8.0.102-8.0.2/src/arcade/eng/promote-build.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/eng/promote-build.yml 2024-03-08 08:33:13.000000000 +0000 @@ -14,22 +14,17 @@ - name: PromoteToChannelIds displayName: Which Maestro channels' IDs should the build be promoted to? (comma separated) - type: string + type: string default: ' ' - - name: UseServicingBuildPool - displayName: If true, use the assigned 'Servicing' pool for publishing jobs - type: boolean - default: false - - name: SymbolPublishingAdditionalParameters displayName: Additional (MSBuild) properties for symbol publishing - type: string + type: string default: ' ' - name: ArtifactsPublishingAdditionalParameters displayName: Additional (MSBuild) properties for general asset publishing - type: string + type: string default: ' ' # The parameters below here are legacy. They are passed by add-build-to-channel @@ -38,27 +33,27 @@ - name: EnableSourceLinkValidation displayName: Should Sourcelink validation be performed? - type: boolean + type: boolean default: false - name: EnableNugetValidation displayName: Should NuGet metadata validation be performed? - type: boolean + type: boolean default: false - name: EnableSigningValidation displayName: Should signing validation be performed? - type: boolean + type: boolean default: false - name: PublishInstallersAndChecksums displayName: Should installers and checksums be published? - type: boolean + type: boolean default: true - name: SigningValidationAdditionalParameters displayName: Additional (MSBuild) properties for signing validation - type: string + type: string default: ' ' trigger: none @@ -70,4 +65,3 @@ BARBuildId: ${{ parameters.BARBuildId }} symbolPublishingAdditionalParameters: ${{ parameters.SymbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.ArtifactsPublishingAdditionalParameters }} - useServicingBuildPools : ${{ parameters.UseServicingBuildPool }} diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/eng/publishing/v3/publish.yml dotnet8-8.0.103-8.0.3/src/arcade/eng/publishing/v3/publish.yml --- dotnet8-8.0.102-8.0.2/src/arcade/eng/publishing/v3/publish.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/eng/publishing/v3/publish.yml 2024-03-08 08:33:13.000000000 +0000 @@ -4,7 +4,6 @@ BARBuildId: '' symbolPublishingAdditionalParameters: '' buildQuality: 'daily' - useServicingBuildPools: false stages: - stage: publish @@ -19,7 +18,7 @@ - group: AzureDevOps-Artifact-Feeds-Pats - group: DotNet-MSRC-Storage - group: Publish-Build-Assets - + # Default Maestro++ API Endpoint and API Version - name: MaestroApiEndPoint value: "https://maestro.dot.net" @@ -33,16 +32,9 @@ ${{ if eq(variables['System.TeamProject'], 'DevDiv') }}: name: VSEngSS-MicroBuild2022-1ES demands: Cmd - # If it's not devdiv, it's dnceng: - # Publishing cannot use /eng/common/templates/variables/pool-providers.yml since it always runs from 'main', - # including in the servicing build case. Instead the 'useServicingBuildPools' parameter dictates this. - # If useServicingBuildPools = false, it's a main branch. - ${{ if and(ne(variables['System.TeamProject'], 'DevDiv'), eq(parameters['useServicingBuildPools'], false)) }}: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals windows.vs2019.amd64 - # If useServicingBuildPools = true, it's a release branch: - ${{ if and(ne(variables['System.TeamProject'], 'DevDiv'), eq(parameters['useServicingBuildPools'], true)) }}: - name: NetCore1ESPool-Svc-Internal + # If it's not devdiv, it's dnceng: + ${{ else }}: + name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: @@ -80,7 +72,7 @@ $channelNames += "'$($channelInfo.name)'" } - + $azureDevOpsBuildNumber = $buildInfo.azureDevOpsBuildNumber $azureDevOpsRepository = "Unknown" $lastIndexOfSlash = $buildInfo.azureDevOpsRepository.LastIndexOf('/') @@ -100,7 +92,7 @@ $buildNumberName = $buildNumberName.Substring(0, 255) } - # Set tags on publishing for visibility + # Set tags on publishing for visibility Write-Host "##vso[build.updatebuildnumber]$buildNumberName" Write-Host "##vso[build.addbuildtag]Channel(s) - $channelNames" diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props 2024-03-08 08:33:13.000000000 +0000 @@ -107,7 +107,7 @@ 1.0.0 2.1.3 1.1.286 - 1.0.0-v3.14.0.5722 + 3.14.0-8606.20240208.1 diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj 2024-03-08 08:33:13.000000000 +0000 @@ -72,6 +72,8 @@ SNBinaryPath="$(NuGetPackageRoot)sn\$(SNVersion)\sn.exe" MicroBuildCorePath="$(NuGetPackageRoot)microbuild.core\$(MicroBuildCoreVersion)" WixToolsPath="$(WixInstallPath)" - TarToolPath="$(NuGetPackageRoot)microsoft.dotnet.tar\$(MicrosoftDotNetSignToolVersion)\tools\net8.0\any\Microsoft.Dotnet.Tar.dll"/> + TarToolPath="$(NuGetPackageRoot)microsoft.dotnet.tar\$(MicrosoftDotNetSignToolVersion)\tools\net8.0\any\Microsoft.Dotnet.Tar.dll" + RepackParallelism="$(SignToolRepackParallelism)" + MaximumParallelFileSize="$(SignToolRepackMaximumParallelFileSize)" /> diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.props 2024-03-08 08:33:13.000000000 +0000 @@ -65,6 +65,14 @@ Signing + + + + 16 + + 128 + + diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs 2024-03-08 08:33:13.000000000 +0000 @@ -439,6 +439,16 @@ symbolTargetType: InternalSymbolTargets, filenamesToExclude: FilenamesToExclude), + // .NET 7 Private, + new TargetChannelConfig( + id: 4099, + isInternal: true, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "internal/7.0-private" }, + targetFeeds: DotNet7InternalFeeds, + symbolTargetType: InternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + // .NET 7.0.1xx SDK, new TargetChannelConfig( id: 2237, @@ -559,122 +569,222 @@ symbolTargetType: InternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8 RC 1, + // .NET 8 Private, + new TargetChannelConfig( + id: 4120, + isInternal: true, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "internal/8.0-private" }, + targetFeeds: DotNet8InternalFeeds, + symbolTargetType: InternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 8.0.1xx SDK, new TargetChannelConfig( - id: 3871, + id: 3074, isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "8.0-rc1" }, + akaMSChannelNames: new List() { "8.0.1xx", "8.0" }, targetFeeds: DotNet8Feeds, symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8 RC 1 Internal, + // .NET 8.0.1xx SDK Internal, new TargetChannelConfig( - id: 3879, + id: 3881, isInternal: true, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "internal/8.0-rc1" }, + akaMSChannelNames: new List() { "internal/8.0.1xx", "internal/8.0" }, targetFeeds: DotNet8InternalFeeds, symbolTargetType: InternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8 RC 2, + // .NET 8.0.2xx SDK, new TargetChannelConfig( - id: 3872, + id: 4036, isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "8.0-rc2" }, + akaMSChannelNames: new List() { "8.0.2xx", "8.0" }, targetFeeds: DotNet8Feeds, symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8 RC 2 Internal + // .NET 8.0.2xx SDK Internal, new TargetChannelConfig( - id: 3878, + id: 4266, isInternal: true, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "internal/8.0-rc2" }, + akaMSChannelNames: new List() { "internal/8.0.2xx", "internal/8.0" }, targetFeeds: DotNet8InternalFeeds, symbolTargetType: InternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8.0.1xx SDK, + // .NET 8.0.3xx SDK, new TargetChannelConfig( - id: 3074, + id: 4267, isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "8.0.1xx", "8.0" }, + akaMSChannelNames: new List() { "8.0.3xx", "8.0" }, targetFeeds: DotNet8Feeds, symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8.0.1xx SDK Internal, + // .NET 9, new TargetChannelConfig( - id: 3881, - isInternal: true, + id: 3883, + isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "internal/8.0.1xx", "internal/8.0" }, - targetFeeds: DotNet8InternalFeeds, - symbolTargetType: InternalSymbolTargets, + akaMSChannelNames: new List() { "9.0" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8.0.1xx SDK RC 1, + // .NET 9.0.1xx SDK, new TargetChannelConfig( - id: 3873, + id: 3884, isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "8.0.1xx-rc1", "8.0-rc1" }, - targetFeeds: DotNet8Feeds, + akaMSChannelNames: new List() { "9.0.1xx", "9.0" }, + targetFeeds: DotNet9Feeds, symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8.0.1xx SDK RC 1 Internal, + // .NET 9 Preview 1 new TargetChannelConfig( - id: 3876, - isInternal: true, + id: 4289, + isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "internal/8.0.1xx-rc1", "internal/8.0-rc1" }, - targetFeeds: DotNet8InternalFeeds, - symbolTargetType: InternalSymbolTargets, + akaMSChannelNames: new List() { "9.0-preview1" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8.0.1xx SDK RC 2, + // .NET 9 Preview 2 new TargetChannelConfig( - id: 3874, + id: 4290, isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "8.0.1xx-rc2", "8.0-rc2" }, - targetFeeds: DotNet8Feeds, + akaMSChannelNames: new List() { "9.0-preview2" }, + targetFeeds: DotNet9Feeds, symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 8.0.1xx SDK RC 2 Internal, + // .NET 9 Preview 3 new TargetChannelConfig( - id: 3875, - isInternal: true, + id: 4291, + isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "internal/8.0.1xx-rc2", "internal/8.0-rc2" }, - targetFeeds: DotNet8InternalFeeds, - symbolTargetType: InternalSymbolTargets, + akaMSChannelNames: new List() { "9.0-preview3" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 9, + // .NET 9 Preview 4 new TargetChannelConfig( - id: 3883, + id: 4292, isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "9.0" }, + akaMSChannelNames: new List() { "9.0-preview4" }, targetFeeds: DotNet9Feeds, symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), - // .NET 9.0.1xx SDK, + // .NET 9 Preview 5 new TargetChannelConfig( - id: 3884, + id: 4293, isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, - akaMSChannelNames: new List() { "9.0.1xx", "9.0" }, + akaMSChannelNames: new List() { "9.0-preview5" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9 Preview 6 + new TargetChannelConfig( + id: 4294, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview6" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9 Preview 7 + new TargetChannelConfig( + id: 4295, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview7" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9.0.1xx SDK Preview 1 + new TargetChannelConfig( + id: 4296, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview1", "9.0.1xx-preview1" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9.0.1xx SDK Preview 2 + new TargetChannelConfig( + id: 4297, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview2", "9.0.1xx-preview2" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9.0.1xx SDK Preview 3 + new TargetChannelConfig( + id: 4298, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview3", "9.0.1xx-preview3" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9.0.1xx SDK Preview 4 + new TargetChannelConfig( + id: 4299, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview4", "9.0.1xx-preview4" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9.0.1xx SDK Preview 5 + new TargetChannelConfig( + id: 4300, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview5", "9.0.1xx-preview5" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9.0.1xx SDK Preview 6 + new TargetChannelConfig( + id: 4301, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview6", "9.0.1xx-preview6" }, + targetFeeds: DotNet9Feeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude), + + // .NET 9.0.1xx SDK Preview 7 + new TargetChannelConfig( + id: 4302, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List() { "9.0-preview7", "9.0.1xx-preview7" }, targetFeeds: DotNet9Feeds, symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude), @@ -786,6 +896,39 @@ symbolTargetType: InternalSymbolTargets, filenamesToExclude: FilenamesToExclude, flatten: false), + + // .NET AP 1, + new TargetChannelConfig( + id: 4122, + isInternal: true, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List(), + targetFeeds: DotNetToolsInternalFeeds, + symbolTargetType: InternalSymbolTargets, + filenamesToExclude: FilenamesToExclude, + flatten: false), + + // .NET AP 2, + new TargetChannelConfig( + id: 4123, + isInternal: true, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List(), + targetFeeds: DotNetToolsInternalFeeds, + symbolTargetType: InternalSymbolTargets, + filenamesToExclude: FilenamesToExclude, + flatten: false), + + // .NET AP 3, + new TargetChannelConfig( + id: 4124, + isInternal: true, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List(), + targetFeeds: DotNetToolsInternalFeeds, + symbolTargetType: InternalSymbolTargets, + filenamesToExclude: FilenamesToExclude, + flatten: false), // General Testing, new TargetChannelConfig( @@ -973,6 +1116,16 @@ isInternal: false, publishingInfraVersion: PublishingInfraVersion.Latest, akaMSChannelNames: new List(), + targetFeeds: DotNetToolsFeeds, + symbolTargetType: PublicAndInternalSymbolTargets, + filenamesToExclude: FilenamesToExclude, + flatten: false), + // VS 17.10 + new TargetChannelConfig( + id: 4165, + isInternal: false, + publishingInfraVersion: PublishingInfraVersion.Latest, + akaMSChannelNames: new List(), targetFeeds: DotNetToolsFeeds, symbolTargetType: PublicAndInternalSymbolTargets, filenamesToExclude: FilenamesToExclude, diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/wix.targets dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/wix.targets --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/wix.targets 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/wix.targets 2024-03-08 08:33:13.000000000 +0000 @@ -25,7 +25,7 @@ - 1.0.0-v3.14.0.5722 + 3.14.0.8606 $(BaseIntermediateOutputPath)WixTools.$(WixVersion)/ $(WixToolsDir) diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkload.wix.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkload.wix.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkload.wix.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/CreateVisualStudioWorkload.wix.cs 2024-03-08 08:33:13.000000000 +0000 @@ -90,6 +90,16 @@ set; } + /// + /// The directory to use for locating workload pack packages. + /// + [Required] + public string PackageSource + { + get; + set; + } + public bool UseWorkloadPackGroupsForVS { get; diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Msi/WorkloadManifestMsi.wix.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Msi/WorkloadManifestMsi.wix.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Msi/WorkloadManifestMsi.wix.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/Msi/WorkloadManifestMsi.wix.cs 2024-03-08 08:33:13.000000000 +0000 @@ -105,7 +105,8 @@ candle.AddSourceFiles(packageContentWxs, EmbeddedTemplates.Extract("DependencyProvider.wxs", WixSourceDirectory), EmbeddedTemplates.Extract("dotnethome_x64.wxs", WixSourceDirectory), - EmbeddedTemplates.Extract("ManifestProduct.wxs", WixSourceDirectory)); + EmbeddedTemplates.Extract("ManifestProduct.wxs", WixSourceDirectory), + EmbeddedTemplates.Extract("Registry.wxs", WixSourceDirectory)); if (IsSxS) { @@ -142,6 +143,7 @@ candle.AddPreprocessorDefinition(PreprocessorDefinitionNames.DependencyProviderKeyName, $"{providerKeyName}"); candle.AddPreprocessorDefinition(PreprocessorDefinitionNames.SourceDir, $"{packageDataDirectory}"); candle.AddPreprocessorDefinition(PreprocessorDefinitionNames.SdkFeatureBandVersion, $"{Package.SdkFeatureBand}"); + candle.AddPreprocessorDefinition(PreprocessorDefinitionNames.InstallationRecordKey, $"InstalledManifests"); // The temporary installer in the SDK (6.0) used lower invariants of the manifest ID. // We have to do the same to ensure the keypath generation produces stable GUIDs. diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiTemplate/ManifestProduct.wxs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiTemplate/ManifestProduct.wxs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiTemplate/ManifestProduct.wxs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/MsiTemplate/ManifestProduct.wxs 2024-03-08 08:33:13.000000000 +0000 @@ -57,6 +57,7 @@ + diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/VisualStudioWorkloadTaskBase.wix.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/VisualStudioWorkloadTaskBase.wix.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/VisualStudioWorkloadTaskBase.wix.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/VisualStudioWorkloadTaskBase.wix.cs 2024-03-08 08:33:13.000000000 +0000 @@ -2,15 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; -using Microsoft.Deployment.DotNet.Releases; -using Microsoft.DotNet.Build.Tasks.Workloads.Msi; -using Microsoft.DotNet.Build.Tasks.Workloads.Swix; namespace Microsoft.DotNet.Build.Tasks.Workloads { @@ -78,16 +72,6 @@ protected string PackageRootDirectory => Path.Combine(BaseIntermediateOutputPath, "pkg"); /// - /// The directory to use for locating workload pack packages. - /// - [Required] - public string PackageSource - { - get; - set; - } - - /// /// A set of items containing .swixproj files that can be build to generate /// Visual Studio Installer components for workloads. /// diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/build/Microsoft.DotNet.Build.Tasks.Workloads.props dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/build/Microsoft.DotNet.Build.Tasks.Workloads.props --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/build/Microsoft.DotNet.Build.Tasks.Workloads.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads/src/build/Microsoft.DotNet.Build.Tasks.Workloads.props 2024-03-08 08:33:13.000000000 +0000 @@ -7,5 +7,6 @@ + diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/CreateVisualStudioWorkloadSetTests.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/CreateVisualStudioWorkloadSetTests.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/CreateVisualStudioWorkloadSetTests.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/CreateVisualStudioWorkloadSetTests.cs 2024-03-08 08:33:13.000000000 +0000 @@ -39,7 +39,6 @@ BaseOutputPath = BaseOutputPath, BaseIntermediateOutputPath = baseIntermediateOutputPath, BuildEngine = buildEngine, - PackageSource = TestAssetsPath, WixToolsetPath = WixToolsetPath, WorkloadSetPackageFiles = workloadSetPackages }; diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/MsiTests.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/MsiTests.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/MsiTests.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/MsiTests.cs 2024-03-08 08:33:13.000000000 +0000 @@ -18,14 +18,26 @@ [Collection("6.0.200 Toolchain manifest tests")] public class MsiTests : TestBase { - private static ITaskItem BuildManifestMsi(string path, string msiVersion = "1.2.3", string platform = "x64") + private static ITaskItem BuildManifestMsi(string path, string msiVersion = "1.2.3", string platform = "x64", string msiOutputPath = null) { TaskItem packageItem = new(path); WorkloadManifestPackage pkg = new(packageItem, PackageRootDirectory, new Version(msiVersion)); pkg.Extract(); WorkloadManifestMsi msi = new(pkg, platform, new MockBuildEngine(), WixToolsetPath, BaseIntermediateOutputPath, isSxS: true); - return msi.Build(MsiOutputPath); + return string.IsNullOrWhiteSpace(msiOutputPath) ? msi.Build(MsiOutputPath) : msi.Build(msiOutputPath); + } + + [WindowsOnlyFact] + public void WorkloadManifestsIncludeInstallationRecords() + { + ITaskItem msi603 = BuildManifestMsi(Path.Combine(TestAssetsPath, "microsoft.net.workload.mono.toolchain.manifest-6.0.200.6.0.3.nupkg"), + msiOutputPath: Path.Combine(MsiOutputPath, "mrec")); + string msiPath603 = msi603.GetMetadata(Metadata.FullPath); + + MsiUtils.GetAllRegistryKeys(msiPath603).Should().Contain(r => + r.Key == @"SOFTWARE\Microsoft\dotnet\InstalledManifests\x64\Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.200\6.0.3" + ); } [WindowsOnlyFact] diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor.csproj dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor.csproj --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.RemoteExecutor/src/Microsoft.DotNet.RemoteExecutor.csproj 2024-03-08 08:33:13.000000000 +0000 @@ -1,7 +1,7 @@  - $(NetCurrent);$(NetFrameworkMinimum) + $(NetCurrent);$(NetMinimum);$(NetFrameworkMinimum) Exe This package provides support for running tests out-of-process. diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.SignTool/src/BatchSignUtil.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.SignTool/src/BatchSignUtil.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.SignTool/src/BatchSignUtil.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.SignTool/src/BatchSignUtil.cs 2024-03-08 08:33:13.000000000 +0000 @@ -23,6 +23,8 @@ private readonly string[] _itemsToSkipStrongNameCheck; private readonly Dictionary _hashToCollisionIdMap; private Telemetry _telemetry; + private readonly int _repackParallelism; + private readonly long _maximumParallelFileSizeInBytes; internal bool SkipZipContainerSignatureMarkerCheck { get; set; } @@ -32,6 +34,8 @@ BatchSignInput batchData, string[] itemsToSkipStrongNameCheck, Dictionary hashToCollisionIdMap, + int repackParallelism = 0, + long maximumParallelFileSizeInBytes = 0, Telemetry telemetry = null) { _signTool = signTool; @@ -41,6 +45,9 @@ _itemsToSkipStrongNameCheck = itemsToSkipStrongNameCheck ?? Array.Empty(); _telemetry = telemetry; _hashToCollisionIdMap = hashToCollisionIdMap; + _repackParallelism = repackParallelism != 0 ? repackParallelism : Environment.ProcessorCount; + _maximumParallelFileSizeInBytes = maximumParallelFileSizeInBytes != 0 ? + maximumParallelFileSizeInBytes : 2048 / _repackParallelism * 1024 * 1024; } internal void Go(bool doStrongNameCheck) @@ -221,9 +228,8 @@ } _log.LogMessage(MessageImportance.High, $"Repacking {repackCount} containers."); - const int repackParallelism = 16; ParallelOptions parallelOptions = new ParallelOptions(); - parallelOptions.MaxDegreeOfParallelism = repackParallelism; + parallelOptions.MaxDegreeOfParallelism = _repackParallelism; // It's possible that there are large containers within this set that, if // repacked in parallel, could cause OOMs. To avoid this, we set a limit on the size of containers @@ -231,12 +237,11 @@ // Repack these in serial later. var largeRepackList = new List(); var smallRepackList = new List(); - const long parallelRepackLimitInBytes = (2 * 1024 / repackParallelism) * 1024 * 1024; foreach (var file in repackList) { FileInfo fileInfo = new FileInfo(file.FullPath); - if (fileInfo.Length > parallelRepackLimitInBytes) + if (fileInfo.Length > _maximumParallelFileSizeInBytes) { largeRepackList.Add(file); } diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.SignTool/src/SignToolTask.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.SignTool/src/SignToolTask.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.SignTool/src/SignToolTask.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.SignTool/src/SignToolTask.cs 2024-03-08 08:33:13.000000000 +0000 @@ -141,6 +141,16 @@ public string TarToolPath { get; set; } /// + /// Number of containers to repack in parallel. Zero will default to the processor count + /// + public int RepackParallelism { get; set; } = 0; + + /// + /// Maximum size in MB that a file may be before it is repacked serially. 0 will default to 2GB / repack parallelism + /// + public int MaximumParallelFileSize { get; set; } = 0; + + /// /// Directory to write log to. /// [Required] @@ -259,7 +269,16 @@ if (Log.HasLoggedErrors) return; - var util = new BatchSignUtil(BuildEngine, Log, signTool, ParsedSigningInput, ItemsToSkipStrongNameCheck?.Select(i => i.ItemSpec).ToArray(), configuration._hashToCollisionIdMap, telemetry: telemetry); + var util = new BatchSignUtil( + BuildEngine, + Log, + signTool, + ParsedSigningInput, + ItemsToSkipStrongNameCheck?.Select(i => i.ItemSpec).ToArray(), + configuration._hashToCollisionIdMap, + repackParallelism: RepackParallelism, + maximumParallelFileSizeInBytes: MaximumParallelFileSize * 1024 * 1024, + telemetry: telemetry); util.SkipZipContainerSignatureMarkerCheck = this.SkipZipContainerSignatureMarkerCheck; diff -Nru dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs --- dotnet8-8.0.102-8.0.2/src/arcade/src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/arcade/src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs 2024-03-08 08:33:13.000000000 +0000 @@ -319,7 +319,13 @@ var signTool = new FakeSignTool(signToolArgs, task.Log); var configuration = new Configuration(signToolArgs.TempDir, itemsToSign, strongNameSignInfo, fileSignInfo, extensionsSignInfo, dualCertificates, tarToolPath: s_tarToolPath, task.Log); var signingInput = configuration.GenerateListOfFiles(); - var util = new BatchSignUtil(task.BuildEngine, task.Log, signTool, signingInput, new string[] { }, configuration._hashToCollisionIdMap); + var util = new BatchSignUtil( + task.BuildEngine, + task.Log, + signTool, + signingInput, + new string[] { }, + configuration._hashToCollisionIdMap); var beforeSigningEngineFilesList = Directory.GetFiles(signToolArgs.TempDir, "*-engine.exe", SearchOption.AllDirectories); util.Go(doStrongNameCheck: true); diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/.editorconfig dotnet8-8.0.103-8.0.3/src/aspire/samples/.editorconfig --- dotnet8-8.0.102-8.0.2/src/aspire/samples/.editorconfig 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/.editorconfig 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -[*.{cs,vb}] - -# CA2007: Consider calling ConfigureAwait on the awaited task -dotnet_diagnostic.CA2007.severity = silent - -# IDE0073: File header -dotnet_diagnostic.IDE0073.severity = silent diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/Directory.Build.props dotnet8-8.0.103-8.0.3/src/aspire/samples/Directory.Build.props --- dotnet8-8.0.102-8.0.2/src/aspire/samples/Directory.Build.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/Directory.Build.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ - - - - - - - $(NoWarn),1573,1591,1712 - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/DaprAppHost.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/DaprAppHost.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/DaprAppHost.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/DaprAppHost.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ - - - - Exe - net8.0 - enable - enable - true - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/Directory.Build.props dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/Directory.Build.props --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/Directory.Build.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/Directory.Build.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/Directory.Build.targets dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/Directory.Build.targets --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/Directory.Build.targets 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/Directory.Build.targets 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -var builder = DistributedApplication.CreateBuilder(args); - -builder.AddDapr(); - -builder.AddProject("servicea") - .WithDaprSidecar("service-a"); - -builder.AddProject("serviceb") - .WithDaprSidecar("service-b"); - -using var app = builder.Build(); - -await app.RunAsync(); diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -{ - "profiles": { - "http": { - "commandName": "Project", - "launchBrowser": true, - "dotnetRunMessages": true, - "applicationUrl": "http://localhost:15887", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "DOTNET_ENVIRONMENT": "Development", - "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16032" - } - }, - "generate-manifest": { - "commandName": "Project", - "launchBrowser": true, - "dotnetRunMessages": true, - "commandLineArgs": "--publisher manifest --output-path aspire-manifest.json", - "applicationUrl": "http://localhost:15887", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "DOTNET_ENVIRONMENT": "Development", - "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16031" - } - } - }, - "$schema": "http://json.schemastore.org/launchsettings.json" -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/aspire-manifest.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/aspire-manifest.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/AppHost/aspire-manifest.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/AppHost/aspire-manifest.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -{ - "resources": { - "servicea": { - "type": "project.v0", - "path": "..\\ServiceA\\DaprServiceA.csproj", - "env": { - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true" - }, - "bindings": { - "http": { - "scheme": "http", - "protocol": "tcp", - "transport": "http" - }, - "https": { - "scheme": "https", - "protocol": "tcp", - "transport": "http" - } - } - }, - "serviceb": { - "type": "project.v0", - "path": "..\\ServiceB\\DaprServiceB.csproj", - "env": { - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true" - }, - "bindings": { - "http": { - "scheme": "http", - "protocol": "tcp", - "transport": "http" - }, - "https": { - "scheme": "https", - "protocol": "tcp", - "transport": "http" - } - } - }, - "service-a": { - "type": "executable.v0", - "env": {}, - "bindings": { - "grpc": { - "scheme": "tcp", - "protocol": "tcp", - "transport": "tcp" - }, - "http": { - "scheme": "tcp", - "protocol": "tcp", - "transport": "tcp" - }, - "metrics": { - "scheme": "tcp", - "protocol": "tcp", - "transport": "tcp" - } - } - }, - "service-b": { - "type": "executable.v0", - "env": {}, - "bindings": { - "grpc": { - "scheme": "tcp", - "protocol": "tcp", - "transport": "tcp" - }, - "http": { - "scheme": "tcp", - "protocol": "tcp", - "transport": "tcp" - }, - "metrics": { - "scheme": "tcp", - "protocol": "tcp", - "transport": "tcp" - } - } - } - } -} \ No newline at end of file diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/DaprServiceA.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/DaprServiceA.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/DaprServiceA.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/DaprServiceA.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - net8.0 - enable - enable - true - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using Dapr.Client; - -var builder = WebApplication.CreateBuilder(args); - -builder.AddServiceDefaults(); - -// Add services to the container. -// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); - -builder.Services.AddDaprClient(); - -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) -{ - app.UseSwagger(); - app.UseSwaggerUI(); -} - -var summaries = new[] -{ - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" -}; - -app.MapGet("/weatherforecast", (DaprClient client) => -{ - return client.InvokeMethodAsync(HttpMethod.Get, "service-b", "weatherforecast"); -}) -.WithName("GetWeatherForecast") -.WithOpenApi(); - -app.MapDefaultEndpoints(); - -app.Run(); - -internal sealed record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) -{ - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:49082", - "sslPort": 44300 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "http://localhost:5048", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:7077;http://localhost:5048", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/ServiceA.http dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/ServiceA.http --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/ServiceA.http 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/ServiceA.http 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -@ServiceA_HostAddress = http://localhost:5048 - -GET {{ServiceA_HostAddress}}/weatherforecast/ -Accept: application/json - -### diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/appsettings.Development.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/appsettings.Development.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/appsettings.Development.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/appsettings.Development.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceA/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceA/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/DaprServiceB.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/DaprServiceB.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/DaprServiceB.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/DaprServiceB.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - - - net8.0 - enable - enable - true - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -var builder = WebApplication.CreateBuilder(args); - -builder.AddServiceDefaults(); - -// Add services to the container. -// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); - -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) -{ - app.UseSwagger(); - app.UseSwaggerUI(); -} - -var summaries = new[] -{ - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" -}; - -app.MapGet("/weatherforecast", () => -{ - var forecast = Enumerable.Range(1, 5).Select(index => - new WeatherForecast - ( - DateOnly.FromDateTime(DateTime.Now.AddDays(index)), - Random.Shared.Next(-20, 55), - summaries[Random.Shared.Next(summaries.Length)] - )) - .ToArray(); - return forecast; -}) -.WithName("GetWeatherForecast") -.WithOpenApi(); - -app.MapDefaultEndpoints(); - -app.Run(); - -internal sealed record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary) -{ - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:42757", - "sslPort": 44335 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "http://localhost:5292", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:7059;http://localhost:5292", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/ServiceB.http dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/ServiceB.http --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/ServiceB.http 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/ServiceB.http 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -@ServiceB_HostAddress = http://localhost:5292 - -GET {{ServiceB_HostAddress}}/weatherforecast/ -Accept: application/json - -### diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/appsettings.Development.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/appsettings.Development.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/appsettings.Development.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/appsettings.Development.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/dapr/ServiceB/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/dapr/ServiceB/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/ApiGateway.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/ApiGateway.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/ApiGateway.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/ApiGateway.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - net8.0 - localhost:5001 - api-gateway - mcr.microsoft.com/dotnet/aspnet:8.0-preview - - - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -var builder = WebApplication.CreateBuilder(args); - -builder.AddServiceDefaults(); -builder.Services.AddReverseProxy() - .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy")) - .AddServiceDiscoveryDestinationResolver(); - -var app = builder.Build(); - -app.MapReverseProxy(); - -app.Run(); diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "applicationUrl": "http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "applicationUrl": "https://localhost:7106;http://localhost:5130", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/appsettings.Development.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/appsettings.Development.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/appsettings.Development.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/appsettings.Development.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ApiGateway/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ApiGateway/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*", - "ReverseProxy": { - "Routes": { - "catalog": { - "ClusterId": "catalog", - "Match": { - "Path": "/catalog/{**catch-all}" - }, - "Transforms": [ - { "PathRemovePrefix": "/catalog" } - ] - }, - "basket": { - "ClusterId": "basket", - "Match": { - "Path": "/basket/{**catch-all}" - }, - "Transforms": [ - { "PathRemovePrefix": "/basket" } - ] - } - }, - "Clusters": { - "catalog": { - "Destinations": { - "catalog": { - "Address": "http://catalogservice", - "Health": "http://catalogservice/readiness" - } - } - }, - "basket": { - "Destinations": { - "basket": { - "Address": "https://basketservice", - "Health": "http://basketservice/readiness" - } - } - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/AppHost.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/AppHost.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/AppHost.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/AppHost.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - - Exe - net8.0 - 1bf0740a-0dfc-45aa-9002-def9b2b17da0 - enable - true - - - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/Directory.Build.props dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/Directory.Build.props --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/Directory.Build.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/Directory.Build.props 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/Directory.Build.targets dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/Directory.Build.targets --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/Directory.Build.targets 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/Directory.Build.targets 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -var builder = DistributedApplication.CreateBuilder(args); - -builder.AddAzureProvisioning(); - -var catalogDb = builder.AddPostgresContainer("postgres").AddDatabase("catalogdb"); - -var basketCache = builder.AddRedisContainer("basketcache"); - -var catalogService = builder.AddProject("catalogservice") - .WithReference(catalogDb) - .WithReplicas(2); - -var messaging = builder.AddRabbitMQContainer("messaging"); - -var basketService = builder.AddProject("basketservice") - .WithReference(basketCache) - .WithReference(messaging); - -builder.AddProject("frontend") - .WithReference(basketService) - .WithReference(catalogService.GetEndpoint("http")); - -builder.AddProject("orderprocessor") - .WithReference(messaging) - .WithLaunchProfile("OrderProcessor"); - -builder.AddProject("apigateway") - .WithReference(basketService) - .WithReference(catalogService); - -builder.AddProject("catalogdbapp") - .WithReference(catalogDb); - -builder.Build().Run(); diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -{ - "profiles": { - "http": { - "commandName": "Project", - "launchBrowser": true, - "dotnetRunMessages": true, - "applicationUrl": "http://localhost:15888", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "DOTNET_ENVIRONMENT": "Development", - "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16031" - } - }, - "generate-manifest": { - "commandName": "Project", - "launchBrowser": true, - "dotnetRunMessages": true, - "commandLineArgs": "--publisher manifest --output-path aspire-manifest.json", - "applicationUrl": "http://localhost:15888", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "DOTNET_ENVIRONMENT": "Development", - "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16031" - } - } - }, - "$schema": "http://json.schemastore.org/launchsettings.json" -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/aspire-manifest.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/aspire-manifest.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/AppHost/aspire-manifest.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/AppHost/aspire-manifest.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,149 +0,0 @@ -{ - "resources": { - "postgres": { - "type": "postgres.server.v0" - }, - "catalogdb": { - "type": "postgres.database.v0", - "parent": "postgres" - }, - "basketcache": { - "type": "redis.v0" - }, - "catalogservice": { - "type": "project.v0", - "path": "..\\CatalogService\\CatalogService.csproj", - "env": { - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", - "ConnectionStrings__catalogdb": "{catalogdb.connectionString}" - }, - "bindings": { - "http": { - "scheme": "http", - "protocol": "tcp", - "transport": "http" - }, - "https": { - "scheme": "https", - "protocol": "tcp", - "transport": "http" - } - } - }, - "messaging": { - "type": "rabbitmq.server.v0" - }, - "basketservice": { - "type": "project.v0", - "path": "..\\BasketService\\BasketService.csproj", - "env": { - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", - "ConnectionStrings__basketcache": "{basketcache.connectionString}", - "ConnectionStrings__messaging": "{messaging.connectionString}" - }, - "bindings": { - "http": { - "scheme": "http", - "protocol": "tcp", - "transport": "http2" - }, - "https": { - "scheme": "https", - "protocol": "tcp", - "transport": "http2" - } - } - }, - "frontend": { - "type": "project.v0", - "path": "..\\MyFrontend\\MyFrontend.csproj", - "env": { - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", - "services__basketservice__0": "{basketservice.bindings.http.url}", - "services__basketservice__1": "{basketservice.bindings.https.url}", - "services__catalogservice__0": "{catalogservice.bindings.http.url}" - }, - "bindings": { - "http": { - "scheme": "http", - "protocol": "tcp", - "transport": "http" - }, - "https": { - "scheme": "https", - "protocol": "tcp", - "transport": "http" - } - } - }, - "orderprocessor": { - "type": "project.v0", - "path": "..\\OrderProcessor\\OrderProcessor.csproj", - "env": { - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", - "ConnectionStrings__messaging": "{messaging.connectionString}" - }, - "bindings": { - "http": { - "scheme": "http", - "protocol": "tcp", - "transport": "http" - }, - "https": { - "scheme": "https", - "protocol": "tcp", - "transport": "http" - } - } - }, - "apigateway": { - "type": "project.v0", - "path": "..\\ApiGateway\\ApiGateway.csproj", - "env": { - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", - "services__basketservice__0": "{basketservice.bindings.http.url}", - "services__basketservice__1": "{basketservice.bindings.https.url}", - "services__catalogservice__0": "{catalogservice.bindings.http.url}", - "services__catalogservice__1": "{catalogservice.bindings.https.url}" - }, - "bindings": { - "http": { - "scheme": "http", - "protocol": "tcp", - "transport": "http" - }, - "https": { - "scheme": "https", - "protocol": "tcp", - "transport": "http" - } - } - }, - "catalogdbapp": { - "type": "project.v0", - "path": "..\\CatalogDb\\CatalogDb.csproj", - "env": { - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", - "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", - "ConnectionStrings__catalogdb": "{catalogdb.connectionString}" - }, - "bindings": { - "http": { - "scheme": "http", - "protocol": "tcp", - "transport": "http" - }, - "https": { - "scheme": "https", - "protocol": "tcp", - "transport": "http" - } - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/BasketService.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/BasketService.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/BasketService.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/BasketService.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -using System.Text.Json; -using BasketService.Models; -using BasketService.Repositories; -using Grpc.Core; -using GrpcBasket; -using RabbitMQ.Client; -namespace BasketService; - -public class BasketService(IBasketRepository repository, IConfiguration configuration, IServiceProvider serviceProvider, ILogger logger) : Basket.BasketBase -{ - private readonly IBasketRepository _repository = repository; - private readonly IConfiguration _configuration = configuration; - private readonly ILogger _logger = logger; - private IConnection? _messageConnection; - - public override async Task GetBasketById(BasketRequest request, ServerCallContext context) - { - // Uncomment to force a delay for testing resiliency, etc. - //await Task.Delay(5000); - - var data = await _repository.GetBasketAsync(request.Id); - - if (data != null) - { - return MapToCustomerBasketResponse(data); - } - - return new CustomerBasketResponse(); - } - - public override async Task UpdateBasket(CustomerBasketRequest request, ServerCallContext context) - { - var customerBasket = MapToCustomerBasket(request); - var response = await _repository.UpdateBasketAsync(customerBasket); - - if (response is null) - { - throw new RpcException(new Status(StatusCode.NotFound, $"Basket with buyer id {request.BuyerId} does not exist")); - } - - return MapToCustomerBasketResponse(response); - } - - public override async Task CheckoutBasket(CheckoutCustomerBasketRequest request, ServerCallContext context) - { - var buyerId = request.BuyerId; - var basket = await _repository.GetBasketAsync(buyerId); - - if (basket is null) - { - throw new RpcException(new Status(StatusCode.NotFound, $"Basket with buyer id {request.BuyerId} does not exist")); - } - - var order = new Order() - { - Id = Guid.NewGuid().ToString(), - BuyerId = buyerId, - Items = basket.Items, - }; - - _logger.LogInformation("Checking out {Count} item(s) for BuyerId: {BuyerId}.", order.Items.Count, buyerId); - - _messageConnection ??= serviceProvider.GetService(); - if (_messageConnection is null) - { - _logger.LogWarning("RabbitMQ is unavailable. Ensure you have configured it in AppHosts's config / user secrets under 'ConnectionStrings:messaging'."); - } - else - { - const string configKeyName = "Aspire:RabbitMQ:Client:OrderQueueName"; - string? queueName = _configuration[configKeyName]; - if (string.IsNullOrEmpty(queueName)) - { - context.Status = new Status(StatusCode.Internal, $"Queue name not found. Please add a valid name for configuration key '{configKeyName}'."); - return new(); - } - - using var channel = _messageConnection.CreateModel(); - channel.QueueDeclare(queueName, exclusive: false); - channel.BasicPublish( - exchange: "", - routingKey: queueName, - basicProperties: null, - body: JsonSerializer.SerializeToUtf8Bytes(order)); - } - - await _repository.DeleteBasketAsync(buyerId); - - _logger.LogInformation("Order Id {Id} submitted.", order.Id); - - return new CheckoutCustomerBasketResponse(); - } - - public override async Task DeleteBasket(DeleteCustomerBasketRequest request, ServerCallContext context) - { - await _repository.DeleteBasketAsync(request.BuyerId); - return new DeleteCustomerBasketResponse(); - } - - private static CustomerBasketResponse MapToCustomerBasketResponse(CustomerBasket customerBasket) - { - var response = new CustomerBasketResponse - { - BuyerId = customerBasket.BuyerId - }; - - foreach (var item in customerBasket.Items) - { - response.Items.Add(new BasketItemResponse - { - Id = item.Id ?? Guid.NewGuid().ToString(), - OldUnitPrice = item.OldUnitPrice, - ProductId = item.ProductId, - Quantity = item.Quantity, - UnitPrice = item.UnitPrice - }); - } - - return response; - } - - private static CustomerBasket MapToCustomerBasket(CustomerBasketRequest customerBasketRequest) - { - var response = new CustomerBasket - { - BuyerId = customerBasketRequest.BuyerId - }; - - foreach (var item in customerBasketRequest.Items) - { - response.Items.Add(new BasketItem - { - Id = item.Id, - OldUnitPrice = item.OldUnitPrice, - ProductId = item.ProductId, - Quantity = item.Quantity, - UnitPrice = item.UnitPrice - }); - } - - return response; - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/BasketService.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/BasketService.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/BasketService.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/BasketService.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - net8.0 - f0611710-1eab-4ff6-a476-9610bb7a8416 - localhost:5001 - basket-service - mcr.microsoft.com/dotnet/aspnet:8.0-preview - - - - - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Models/BasketItem.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Models/BasketItem.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Models/BasketItem.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Models/BasketItem.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace BasketService.Models; - -public class BasketItem : IValidatableObject -{ - public string? Id { get; set; } - public int ProductId { get; set; } - public decimal UnitPrice { get; set; } - public decimal OldUnitPrice { get; set; } - public int Quantity { get; set; } - - public IEnumerable Validate(ValidationContext validationContext) - { - var results = new List(); - - if (Quantity < 1) - { - results.Add(new ValidationResult("Invalid number of units", new[] { "Quantity" })); - } - - return results; - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Models/CustomerBasket.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Models/CustomerBasket.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Models/CustomerBasket.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Models/CustomerBasket.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -namespace BasketService.Models; - -public class CustomerBasket -{ - public string? BuyerId { get; set; } - - public List Items { get; set; } = new(); - - public int TotalItemCount => Items.Sum(i => i.Quantity); - - public CustomerBasket() - { - } - - public CustomerBasket(string customerId) - { - BuyerId = customerId; - } -} - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Models/DecimalValue.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Models/DecimalValue.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Models/DecimalValue.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Models/DecimalValue.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -namespace GrpcBasket; - -public partial class DecimalValue -{ - private const decimal NanoFactor = 1_000_000_000; - public DecimalValue(long units, int nanos) - { - Units = units; - Nanos = nanos; - } - - public static implicit operator decimal(DecimalValue grpcDecimal) - { - return grpcDecimal.Units + grpcDecimal.Nanos / NanoFactor; - } - - public static implicit operator DecimalValue(decimal value) - { - var units = decimal.ToInt64(value); - var nanos = decimal.ToInt32((value - units) * NanoFactor); - return new DecimalValue(units, nanos); - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Models/Order.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Models/Order.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Models/Order.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Models/Order.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -namespace BasketService.Models; - -public class Order -{ - public required string Id { get; set; } - public string? BuyerId { get; set; } - - public List Items { get; set; } = new(); -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -using BasketService.Repositories; - -var builder = WebApplication.CreateBuilder(args); - -builder.AddServiceDefaults(); -builder.Services.AddGrpc(); - -builder.AddRedis("basketcache"); -builder.Services.AddTransient(); - -builder.AddRabbitMQ("messaging"); - -var app = builder.Build(); - -app.MapGrpcService(); -app.MapDefaultEndpoints(); - -app.Run(); diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "applicationUrl": "http://localhost:5304", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "applicationUrl": "https://localhost:5305;http://localhost:5304", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Protos/basket.proto dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Protos/basket.proto --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Protos/basket.proto 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Protos/basket.proto 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -syntax = "proto3"; - -option csharp_namespace = "GrpcBasket"; - -package BasketApi; - -service Basket { - rpc GetBasketById(BasketRequest) returns (CustomerBasketResponse) {} - rpc UpdateBasket(CustomerBasketRequest) returns (CustomerBasketResponse) {} - rpc CheckoutBasket(CheckoutCustomerBasketRequest) returns (CheckoutCustomerBasketResponse) {} - rpc DeleteBasket(DeleteCustomerBasketRequest) returns (DeleteCustomerBasketResponse) {} -} - -message BasketRequest { - string id = 1; -} - -message CustomerBasketRequest { - string buyerId = 1; - repeated BasketItemResponse items = 2; -} - -message CustomerBasketResponse { - string buyerId = 1; - repeated BasketItemResponse items = 2; -} - -message BasketItemResponse { - string id = 1; - int32 productId = 2; - DecimalValue unitPrice = 4; - DecimalValue oldUnitPrice = 5; - int32 quantity = 6; -} - -message CheckoutCustomerBasketRequest { - string buyerId = 1; -} - -message CheckoutCustomerBasketResponse { -} - -message DeleteCustomerBasketRequest { - string buyerId = 1; -} - -message DeleteCustomerBasketResponse { -} - -// See: https://learn.microsoft.com/dotnet/architecture/grpc-for-wcf-developers/protobuf-data-types#decimals -// Example: 12345.6789 -> { units = 12345, nanos = 678900000 } -message DecimalValue { - - // Whole units part of the amount - int64 units = 1; - - // Nano units of the amount (10^-9) - // Must be same sign as units - sfixed32 nanos = 2; -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Repositories/IBasketRepository.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Repositories/IBasketRepository.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Repositories/IBasketRepository.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Repositories/IBasketRepository.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -using BasketService.Models; - -namespace BasketService.Repositories; - -public interface IBasketRepository -{ - Task GetBasketAsync(string customerId); - IEnumerable GetUsers(); - Task UpdateBasketAsync(CustomerBasket basket); - Task DeleteBasketAsync(string id); -} - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Repositories/RedisBasketRepository.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Repositories/RedisBasketRepository.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/Repositories/RedisBasketRepository.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/Repositories/RedisBasketRepository.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -using System.Text.Json; -using BasketService.Models; -using StackExchange.Redis; - -namespace BasketService.Repositories; - -public class RedisBasketRepository(ILogger logger, IConnectionMultiplexer redis) : IBasketRepository -{ - private readonly ILogger _logger = logger; - private readonly IConnectionMultiplexer _redis = redis; - private readonly IDatabase _database = redis.GetDatabase(); - private static readonly JsonSerializerOptions s_jsonSerializerOptions = new() - { - PropertyNameCaseInsensitive = true, - }; - - public async Task DeleteBasketAsync(string id) - { - return await _database.KeyDeleteAsync(id); - } - - public IEnumerable GetUsers() - { - var server = GetServer(); - var data = server.Keys(); - - return data?.Select(k => k.ToString()) ?? Enumerable.Empty(); - } - - public async Task GetBasketAsync(string customerId) - { - var data = await _database.StringGetAsync(customerId); - - if (data.IsNullOrEmpty) - { - return null; - } - - return JsonSerializer.Deserialize(data!, s_jsonSerializerOptions); - } - - public async Task UpdateBasketAsync(CustomerBasket basket) - { - if (basket.BuyerId == null) - { - return null; - } - - var created = await _database.StringSetAsync(basket.BuyerId, JsonSerializer.Serialize(basket, s_jsonSerializerOptions)); - - if (!created) - { - _logger.LogInformation("Problem occur persisting the item."); - return null; - } - - _logger.LogInformation("Basket item persisted successfully."); - - return await GetBasketAsync(basket.BuyerId); - } - - private IServer GetServer() - { - var endpoint = _redis.GetEndPoints(); - return _redis.GetServer(endpoint.First()); - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/appsettings.Development.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/appsettings.Development.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/appsettings.Development.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/appsettings.Development.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/BasketService/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/BasketService/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning", - "Azure": "Warning" - } - }, - "AllowedHosts": "*", - "Kestrel": { - "EndpointDefaults": { - "Protocols": "Http2" - } - }, - "Aspire": { - "RabbitMQ": { - "Client": { - "OrderQueueName": "orders" - } - }, - "StackExchange": { - "Redis": { - "ConfigurationOptions": { - "ConnectRetry": 2 - } - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/CatalogDb.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/CatalogDb.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/CatalogDb.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/CatalogDb.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/CatalogDbInitializer.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/CatalogDbInitializer.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/CatalogDbInitializer.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/CatalogDbInitializer.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -using System.Diagnostics; -using Microsoft.EntityFrameworkCore; - -namespace CatalogDb; - -internal sealed class CatalogDbInitializer(IServiceProvider serviceProvider, ILogger logger) - : BackgroundService -{ - public const string ActivitySourceName = "Migrations"; - - private readonly ActivitySource _activitySource = new(ActivitySourceName); - - protected override async Task ExecuteAsync(CancellationToken cancellationToken) - { - using var scope = serviceProvider.CreateScope(); - var dbContext = scope.ServiceProvider.GetRequiredService(); - - await InitializeDatabaseAsync(dbContext, cancellationToken); - } - - private async Task InitializeDatabaseAsync(CatalogDbContext dbContext, CancellationToken cancellationToken) - { - var strategy = dbContext.Database.CreateExecutionStrategy(); - - using var activity = _activitySource.StartActivity("Migrating catalog database", ActivityKind.Client); - - var sw = Stopwatch.StartNew(); - - await strategy.ExecuteAsync(() => dbContext.Database.MigrateAsync(cancellationToken)); - - await SeedAsync(dbContext, cancellationToken); - - logger.LogInformation("Database initialization completed after {ElapsedMilliseconds}ms", sw.ElapsedMilliseconds); - } - - private async Task SeedAsync(CatalogDbContext dbContext, CancellationToken cancellationToken) - { - logger.LogInformation("Seeding database"); - - static List GetPreconfiguredCatalogBrands() - { - return [ - new() { Brand = "Azure" }, - new() { Brand = ".NET" }, - new() { Brand = "Visual Studio" }, - new() { Brand = "SQL Server" }, - new() { Brand = "Other" } - ]; - } - - static List GetPreconfiguredCatalogTypes() - { - return [ - new() { Type = "Mug" }, - new() { Type = "T-Shirt" }, - new() { Type = "Sheet" }, - new() { Type = "USB Memory Stick" } - ]; - } - - static List GetPreconfiguredItems(DbSet catalogBrands, DbSet catalogTypes) - { - var dotNet = catalogBrands.First(b => b.Brand == ".NET"); - var other = catalogBrands.First(b => b.Brand == "Other"); - - var mug = catalogTypes.First(c => c.Type == "Mug"); - var tshirt = catalogTypes.First(c => c.Type == "T-Shirt"); - var sheet = catalogTypes.First(c => c.Type == "Sheet"); - - return [ - new() { CatalogType = tshirt, CatalogBrand = dotNet, AvailableStock = 100, Description = ".NET Bot Black Hoodie", Name = ".NET Bot Black Hoodie", Price = 19.5M, PictureFileName = "1.png" }, - new() { CatalogType = mug, CatalogBrand = dotNet, AvailableStock = 100, Description = ".NET Black & White Mug", Name = ".NET Black & White Mug", Price= 8.50M, PictureFileName = "2.png" }, - new() { CatalogType = tshirt, CatalogBrand = other, AvailableStock = 100, Description = "Prism White T-Shirt", Name = "Prism White T-Shirt", Price = 12, PictureFileName = "3.png" }, - new() { CatalogType = tshirt, CatalogBrand = dotNet, AvailableStock = 100, Description = ".NET Foundation T-shirt", Name = ".NET Foundation T-shirt", Price = 12, PictureFileName = "4.png" }, - new() { CatalogType = sheet, CatalogBrand = other, AvailableStock = 100, Description = "Roslyn Red Sheet", Name = "Roslyn Red Sheet", Price = 8.5M, PictureFileName = "5.png" }, - new() { CatalogType = tshirt, CatalogBrand = dotNet, AvailableStock = 100, Description = ".NET Blue Hoodie", Name = ".NET Blue Hoodie", Price = 12, PictureFileName = "6.png" }, - new() { CatalogType = tshirt, CatalogBrand = other, AvailableStock = 100, Description = "Roslyn Red T-Shirt", Name = "Roslyn Red T-Shirt", Price = 12, PictureFileName = "7.png" }, - new() { CatalogType = tshirt, CatalogBrand = other, AvailableStock = 100, Description = "Kudu Purple Hoodie", Name = "Kudu Purple Hoodie", Price = 8.5M, PictureFileName = "8.png" }, - new() { CatalogType = mug, CatalogBrand = other, AvailableStock = 100, Description = "Cup White Mug", Name = "Cup White Mug", Price = 12, PictureFileName = "9.png" }, - new() { CatalogType = sheet, CatalogBrand = dotNet, AvailableStock = 100, Description = ".NET Foundation Sheet", Name = ".NET Foundation Sheet", Price = 12, PictureFileName = "10.png" }, - new() { CatalogType = sheet, CatalogBrand = dotNet, AvailableStock = 100, Description = "Cup Sheet", Name = "Cup Sheet", Price = 8.5M, PictureFileName = "11.png" }, - new() { CatalogType = tshirt, CatalogBrand = other, AvailableStock = 100, Description = "Prism White TShirt", Name = "Prism White TShirt", Price = 12, PictureFileName = "12.png" } - ]; - } - - if (!dbContext.CatalogBrands.Any()) - { - var brands = GetPreconfiguredCatalogBrands(); - await dbContext.CatalogBrands.AddRangeAsync(brands, cancellationToken); - - logger.LogInformation("Seeding {CatalogBrandCount} catalog brands", brands.Count); - - await dbContext.SaveChangesAsync(cancellationToken); - } - - if (!dbContext.CatalogTypes.Any()) - { - var types = GetPreconfiguredCatalogTypes(); - await dbContext.CatalogTypes.AddRangeAsync(types, cancellationToken); - - logger.LogInformation("Seeding {CatalogTypeCount} catalog item types", types.Count); - - await dbContext.SaveChangesAsync(cancellationToken); - } - - if (!dbContext.CatalogItems.Any()) - { - var items = GetPreconfiguredItems(dbContext.CatalogBrands, dbContext.CatalogTypes); - await dbContext.CatalogItems.AddRangeAsync(items, cancellationToken); - - logger.LogInformation("Seeding {CatalogItemCount} catalog items", items.Count); - - await dbContext.SaveChangesAsync(cancellationToken); - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/CatalogDbInitializerHealthCheck.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/CatalogDbInitializerHealthCheck.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/CatalogDbInitializerHealthCheck.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/CatalogDbInitializerHealthCheck.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -using Microsoft.Extensions.Diagnostics.HealthChecks; - -namespace CatalogDb; - -internal sealed class CatalogDbInitializerHealthCheck(CatalogDbInitializer dbInitializer) : IHealthCheck -{ - public Task CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) - { - var task = dbInitializer.ExecuteTask; - - return task switch - { - { IsCompletedSuccessfully: true } => Task.FromResult(HealthCheckResult.Healthy()), - { IsFaulted: true } => Task.FromResult(HealthCheckResult.Unhealthy(task.Exception?.InnerException?.Message, task.Exception)), - { IsCanceled: true } => Task.FromResult(HealthCheckResult.Unhealthy("Database initialization was canceled")), - _ => Task.FromResult(HealthCheckResult.Degraded("Database initialization is still in progress")) - }; - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Migrations/20230517065317_Initial.Designer.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Migrations/20230517065317_Initial.Designer.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Migrations/20230517065317_Initial.Designer.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Migrations/20230517065317_Initial.Designer.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -// -using CatalogDb; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace CatalogDb.Migrations -{ - [DbContext(typeof(CatalogDbContext))] - [Migration("20230517065317_Initial")] - partial class Initial - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.0-preview.3.23174.2") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.HasSequence("catalog_brand_hilo") - .IncrementsBy(10); - - modelBuilder.HasSequence("catalog_hilo") - .IncrementsBy(10); - - modelBuilder.HasSequence("catalog_type_hilo") - .IncrementsBy(10); - - modelBuilder.Entity("CatalogDb.CatalogBrand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "catalog_brand_hilo"); - - b.Property("Brand") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.HasKey("Id"); - - b.ToTable("CatalogBrand", (string)null); - }); - - modelBuilder.Entity("CatalogDb.CatalogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "catalog_hilo"); - - b.Property("AvailableStock") - .HasColumnType("integer"); - - b.Property("CatalogBrandId") - .HasColumnType("integer"); - - b.Property("CatalogTypeId") - .HasColumnType("integer"); - - b.Property("Description") - .HasColumnType("text"); - - b.Property("MaxStockThreshold") - .HasColumnType("integer"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("OnReorder") - .HasColumnType("boolean"); - - b.Property("PictureFileName") - .HasColumnType("text"); - - b.Property("Price") - .HasColumnType("numeric"); - - b.Property("RestockThreshold") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("CatalogBrandId"); - - b.HasIndex("CatalogTypeId"); - - b.ToTable("Catalog", (string)null); - }); - - modelBuilder.Entity("CatalogDb.CatalogType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "catalog_type_hilo"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.HasKey("Id"); - - b.ToTable("CatalogType", (string)null); - }); - - modelBuilder.Entity("CatalogDb.CatalogItem", b => - { - b.HasOne("CatalogDb.CatalogBrand", "CatalogBrand") - .WithMany() - .HasForeignKey("CatalogBrandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("CatalogDb.CatalogType", "CatalogType") - .WithMany() - .HasForeignKey("CatalogTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CatalogBrand"); - - b.Navigation("CatalogType"); - }); -#pragma warning restore 612, 618 - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Migrations/20230517065317_Initial.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Migrations/20230517065317_Initial.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Migrations/20230517065317_Initial.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Migrations/20230517065317_Initial.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace CatalogDb.Migrations; - -/// -public partial class Initial : Migration -{ - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateSequence( - name: "catalog_brand_hilo", - incrementBy: 10); - - migrationBuilder.CreateSequence( - name: "catalog_hilo", - incrementBy: 10); - - migrationBuilder.CreateSequence( - name: "catalog_type_hilo", - incrementBy: 10); - - migrationBuilder.CreateTable( - name: "CatalogBrand", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false), - Brand = table.Column(type: "character varying(100)", maxLength: 100, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CatalogBrand", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "CatalogType", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false), - Type = table.Column(type: "character varying(100)", maxLength: 100, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_CatalogType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Catalog", - columns: table => new - { - Id = table.Column(type: "integer", nullable: false), - Name = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), - Description = table.Column(type: "text", nullable: true), - Price = table.Column(type: "numeric", nullable: false), - PictureFileName = table.Column(type: "text", nullable: true), - CatalogTypeId = table.Column(type: "integer", nullable: false), - CatalogBrandId = table.Column(type: "integer", nullable: false), - AvailableStock = table.Column(type: "integer", nullable: false), - RestockThreshold = table.Column(type: "integer", nullable: false), - MaxStockThreshold = table.Column(type: "integer", nullable: false), - OnReorder = table.Column(type: "boolean", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Catalog", x => x.Id); - table.ForeignKey( - name: "FK_Catalog_CatalogBrand_CatalogBrandId", - column: x => x.CatalogBrandId, - principalTable: "CatalogBrand", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Catalog_CatalogType_CatalogTypeId", - column: x => x.CatalogTypeId, - principalTable: "CatalogType", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_Catalog_CatalogBrandId", - table: "Catalog", - column: "CatalogBrandId"); - - migrationBuilder.CreateIndex( - name: "IX_Catalog_CatalogTypeId", - table: "Catalog", - column: "CatalogTypeId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Catalog"); - - migrationBuilder.DropTable( - name: "CatalogBrand"); - - migrationBuilder.DropTable( - name: "CatalogType"); - - migrationBuilder.DropSequence( - name: "catalog_brand_hilo"); - - migrationBuilder.DropSequence( - name: "catalog_hilo"); - - migrationBuilder.DropSequence( - name: "catalog_type_hilo"); - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Migrations/CatalogDbContextModelSnapshot.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Migrations/CatalogDbContextModelSnapshot.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Migrations/CatalogDbContextModelSnapshot.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Migrations/CatalogDbContextModelSnapshot.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ -// -using CatalogDb; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace CatalogDb.Migrations -{ - [DbContext(typeof(CatalogDbContext))] - partial class CatalogDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.0-preview.3.23174.2") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.HasSequence("catalog_brand_hilo") - .IncrementsBy(10); - - modelBuilder.HasSequence("catalog_hilo") - .IncrementsBy(10); - - modelBuilder.HasSequence("catalog_type_hilo") - .IncrementsBy(10); - - modelBuilder.Entity("CatalogDb.CatalogBrand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "catalog_brand_hilo"); - - b.Property("Brand") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.HasKey("Id"); - - b.ToTable("CatalogBrand", (string)null); - }); - - modelBuilder.Entity("CatalogDb.CatalogItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "catalog_hilo"); - - b.Property("AvailableStock") - .HasColumnType("integer"); - - b.Property("CatalogBrandId") - .HasColumnType("integer"); - - b.Property("CatalogTypeId") - .HasColumnType("integer"); - - b.Property("Description") - .HasColumnType("text"); - - b.Property("MaxStockThreshold") - .HasColumnType("integer"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("OnReorder") - .HasColumnType("boolean"); - - b.Property("PictureFileName") - .HasColumnType("text"); - - b.Property("Price") - .HasColumnType("numeric"); - - b.Property("RestockThreshold") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("CatalogBrandId"); - - b.HasIndex("CatalogTypeId"); - - b.ToTable("Catalog", (string)null); - }); - - modelBuilder.Entity("CatalogDb.CatalogType", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property("Id"), "catalog_type_hilo"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.HasKey("Id"); - - b.ToTable("CatalogType", (string)null); - }); - - modelBuilder.Entity("CatalogDb.CatalogItem", b => - { - b.HasOne("CatalogDb.CatalogBrand", "CatalogBrand") - .WithMany() - .HasForeignKey("CatalogBrandId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("CatalogDb.CatalogType", "CatalogType") - .WithMany() - .HasForeignKey("CatalogTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CatalogBrand"); - - b.Navigation("CatalogType"); - }); -#pragma warning restore 612, 618 - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Model.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Model.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Model.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Model.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata.Builders; - -namespace CatalogDb; - -public record Catalog(int FirstId, int NextId, bool IsLastPage, IEnumerable Data); - -public class CatalogDbContext(DbContextOptions options) : DbContext(options) -{ - // https://learn.microsoft.com/ef/core/performance/advanced-performance-topics#compiled-queries - - private static readonly Func> s_getCatalogItemsQuery = - EF.CompileAsyncQuery((CatalogDbContext context, int? catalogBrandId, int? before, int? after, int pageSize) => - context.CatalogItems.AsNoTracking() - .OrderBy(ci => ci.Id) - .Where(ci => catalogBrandId == null || ci.CatalogBrandId == catalogBrandId) - .Where(ci => before == null || ci.Id <= before) - .Where(ci => after == null || ci.Id >= after) - .Take(pageSize + 1)); - - public Task> GetCatalogItemsCompiledAsync(int? catalogBrandId, int? before, int? after, int pageSize) - { - return ToListAsync(s_getCatalogItemsQuery(this, catalogBrandId, before, after, pageSize)); - } - - public DbSet CatalogItems => Set(); - public DbSet CatalogBrands => Set(); - public DbSet CatalogTypes => Set(); - - protected override void OnModelCreating(ModelBuilder builder) - { - DefineCatalogBrand(builder.Entity()); - - DefineCatalogItem(builder.Entity()); - - DefineCatalogType(builder.Entity()); - } - - private static void DefineCatalogType(EntityTypeBuilder builder) - { - builder.ToTable("CatalogType"); - - builder.HasKey(ci => ci.Id); - - builder.Property(ci => ci.Id) - .UseHiLo("catalog_type_hilo") - .IsRequired(); - - builder.Property(cb => cb.Type) - .IsRequired() - .HasMaxLength(100); - } - - private static void DefineCatalogItem(EntityTypeBuilder builder) - { - builder.ToTable("Catalog"); - - builder.Property(ci => ci.Id) - .UseHiLo("catalog_hilo") - .IsRequired(); - - builder.Property(ci => ci.Name) - .IsRequired(true) - .HasMaxLength(50); - - builder.Property(ci => ci.Price) - .IsRequired(true); - - builder.Property(ci => ci.PictureFileName) - .IsRequired(false); - - builder.Ignore(ci => ci.PictureUri); - - builder.HasOne(ci => ci.CatalogBrand) - .WithMany() - .HasForeignKey(ci => ci.CatalogBrandId); - - builder.HasOne(ci => ci.CatalogType) - .WithMany() - .HasForeignKey(ci => ci.CatalogTypeId); - } - - private static void DefineCatalogBrand(EntityTypeBuilder builder) - { - builder.ToTable("CatalogBrand"); - builder.HasKey(ci => ci.Id); - - builder.Property(ci => ci.Id) - .UseHiLo("catalog_brand_hilo") - .IsRequired(); - - builder.Property(cb => cb.Brand) - .IsRequired() - .HasMaxLength(100); - } - - private static async Task> ToListAsync(IAsyncEnumerable asyncEnumerable) - { - var results = new List(); - await foreach (var value in asyncEnumerable) - { - results.Add(value); - } - - return results; - } -} - -public class CatalogType -{ - public int Id { get; set; } - public required string Type { get; set; } -} - -public class CatalogBrand -{ - public int Id { get; set; } - public required string Brand { get; set; } -} - -public class CatalogItem -{ - public int Id { get; set; } - public required string Name { get; set; } - public string? Description { get; set; } - public decimal Price { get; set; } - public required string PictureFileName { get; set; } - public string? PictureUri { get; set; } - - public int CatalogTypeId { get; set; } - public required CatalogType CatalogType { get; set; } - - public int CatalogBrandId { get; set; } - public required CatalogBrand CatalogBrand { get; set; } - public int AvailableStock { get; set; } - public int RestockThreshold { get; set; } - public int MaxStockThreshold { get; set; } - public bool OnReorder { get; set; } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -using CatalogDb; - -var builder = WebApplication.CreateBuilder(args); - -builder.AddServiceDefaults(); -builder.AddNpgsqlDbContext("catalogdb"); - -builder.Services.AddOpenTelemetry() - .WithTracing(tracing => tracing.AddSource(CatalogDbInitializer.ActivitySourceName)); - -builder.Services.AddSingleton(); -builder.Services.AddHostedService(sp => sp.GetRequiredService()); -builder.Services.AddHealthChecks() - .AddCheck("DbInitializer", null); - -var app = builder.Build(); - -app.MapDefaultEndpoints(); - -await app.RunAsync(); - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:21203", - "sslPort": 44392 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "readiness", - "applicationUrl": "http://localhost:5193", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "readiness", - "applicationUrl": "https://localhost:7163;http://localhost:5193", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/appsettings.Development.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/appsettings.Development.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/appsettings.Development.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/appsettings.Development.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "ConnectionStrings": { - // A connection string is here to enable use of the `dotnet ef` cmd line tool from the project root. - // If the configuration value is not present or not well-formed, the app will fail at startup. - // Note that some commands require the connection string to point to a real database in order to fully - // function (e.g. `dotnet ef database update`, `dotnet ef migrations list`). - "catalogdb": "Server=localhost;Port=5432;Database=NOT_A_REAL_DB" - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogDb/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogDb/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning", - "Microsoft.EntityFrameworkCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/CatalogApi.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/CatalogApi.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/CatalogApi.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/CatalogApi.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -using CatalogDb; - -namespace CatalogService; - -public static class CatalogApi -{ - public static RouteGroupBuilder MapCatalogApi(this IEndpointRouteBuilder routes) - { - var group = routes.MapGroup("/api/v1/catalog"); - - group.WithTags("Catalog"); - - group.MapGet("items/type/all/brand/{catalogBrandId?}", async (int? catalogBrandId, CatalogDbContext catalogContext, int? before, int? after, int pageSize = 8) => - { - var itemsOnPage = await catalogContext.GetCatalogItemsCompiledAsync(catalogBrandId, before, after, pageSize); - - var (firstId, nextId) = itemsOnPage switch - { - [] => (0, 0), - [var only] => (only.Id, only.Id), - [var first, .., var last] => (first.Id, last.Id) - }; - - return new Catalog( - firstId, - nextId, - itemsOnPage.Count < pageSize, - itemsOnPage.Take(pageSize)); - }); - - group.MapGet("items/{catalogItemId:int}/image", async (int catalogItemId, CatalogDbContext catalogDbContext, IHostEnvironment environment) => - { - var item = await catalogDbContext.CatalogItems.FindAsync(catalogItemId); - - if (item is null) - { - return Results.NotFound(); - } - - var path = Path.Combine(environment.ContentRootPath, "Images", item.PictureFileName); - - if (!File.Exists(path)) - { - return Results.NotFound(); - } - - return Results.File(path, "image/jpeg"); - }) - .Produces(404) - .Produces(200, contentType: "image/jpeg"); - - return group; - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/CatalogService.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/CatalogService.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/CatalogService.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/CatalogService.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ - - - - net8.0 - 16965dbf-c1f8-4682-b7d8-e250ac520544 - preview - localhost:5001 - catalog-service - mcr.microsoft.com/dotnet/aspnet:8.0-preview - - - - - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/CatalogService.http dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/CatalogService.http --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/CatalogService.http 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/CatalogService.http 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -@MyBackend_HostAddress = http://localhost:5237 - -GET {{MyBackend_HostAddress}}/api/v1/catalog/items/type/all/brand -Accept: application/json - -### - Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/1.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/1.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/10.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/10.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/11.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/11.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/12.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/12.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/13.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/13.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/14.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/14.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/2.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/2.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/3.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/3.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/4.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/4.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/5.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/5.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/6.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/6.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/7.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/7.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/8.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/8.png differ Binary files /tmp/tmpba0bzz93/rpaI6aQ2x0/dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Images/9.png and /tmp/tmpba0bzz93/SYRo9GJ4Jv/dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Images/9.png differ diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -using CatalogDb; -using CatalogService; - -var builder = WebApplication.CreateBuilder(args); - -builder.AddServiceDefaults(); -builder.AddNpgsqlDbContext("catalogdb"); - -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddProblemDetails(); -builder.Services.AddSwaggerGen(); - -var app = builder.Build(); - -if (app.Environment.IsDevelopment()) -{ - app.UseSwagger(); - app.UseSwaggerUI(); -} -else -{ - app.UseExceptionHandler(); -} - -app.MapCatalogApi(); -app.MapDefaultEndpoints(); - -app.Run(); diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "launchUrl": "swagger", - "applicationUrl": "http://localhost:5237", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:5239;http://localhost:5237", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/appsettings.Development.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/appsettings.Development.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/appsettings.Development.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/appsettings.Development.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/CatalogService/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/CatalogService/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/api-gateway.yml dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/api-gateway.yml --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/api-gateway.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/api-gateway.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: api-gateway - labels: - app: api-gateway -spec: - selector: - matchLabels: - app: api-gateway - replicas: 1 - template: - metadata: - labels: - app: api-gateway - spec: - containers: - - name: main - image: localhost:5001/api-gateway - imagePullPolicy: Always - ports: - - containerPort: 8080 - terminationGracePeriodSeconds: 180 - minReadySeconds: 60 - strategy: - rollingUpdate: - maxUnavailable: 0 - maxSurge: 1 ---- -apiVersion: v1 -kind: Service -metadata: - name: api-gateway -spec: - type: LoadBalancer - selector: - app: api-gateway - ports: - - name: http - port: 8888 - targetPort: 8080 - #- name: https - # port: 433 diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/basket-service.yml dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/basket-service.yml --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/basket-service.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/basket-service.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: basket-service - labels: - name: basket-service -spec: - selector: - matchLabels: - name: basket-service - replicas: 3 - template: - metadata: - labels: - name: basket-service - spec: - containers: - - name: main - image: localhost:5001/basket-service - imagePullPolicy: Always - ports: - - containerPort: 8080 - - containerPort: 8443 - env: - - name: ConnectionStrings__basketCache - value: "redis" - - name: ASPNETCORE_URLS - value: "https://+:8443;http://+:8080" - - name: ASPNETCORE_Kestrel__Certificates__Default__Path - value: "/var/run/secrets/certs/tls.crt" - - name: ASPNETCORE_Kestrel__Certificates__Default__KeyPath - value: "/var/run/secrets/certs/tls.key" - volumeMounts: - - name: tls - mountPath: "/var/run/secrets/certs" - readOnly: true - volumes: - - name: tls - secret: - secretName: basket-tls - terminationGracePeriodSeconds: 180 - minReadySeconds: 60 - strategy: - rollingUpdate: - maxUnavailable: 0 - maxSurge: 1 ---- -apiVersion: v1 -kind: Service -metadata: - name: basket -spec: - selector: - name: basket-service - clusterIP: None - ports: - - name: http - port: 8080 - - name: https - port: 8443 ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: basket-tls - namespace: default -spec: - # Secret names are always required. - secretName: basket-tls - - duration: 2160h # 90d - renewBefore: 360h # 15d - subject: - organizations: - - eShop LLC - isCA: false - privateKey: - algorithm: RSA - encoding: PKCS1 - size: 2048 - usages: - - server auth - - client auth - # At least one of a DNS Name, URI, or IP address is required. - dnsNames: - - basket - # Issuer references are always required. - issuerRef: - name: ca-issuer - # We can reference ClusterIssuers by changing the kind here. - # The default value is Issuer (i.e. a locally namespaced Issuer) - kind: Issuer - # This is optional since cert-manager will default to this value however - # if you are using an external issuer, change this to that issuer group. - group: cert-manager.io diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/catalog-service.yml dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/catalog-service.yml --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/catalog-service.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/catalog-service.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: catalog-service - labels: - name: catalog-service -spec: - selector: - matchLabels: - name: catalog-service - replicas: 3 - template: - metadata: - labels: - name: catalog-service - spec: - containers: - - name: main - image: localhost:5001/catalog-service - imagePullPolicy: Always - ports: - - containerPort: 8080 - #- containerPort: 443 - env: - - name: ConnectionStrings__catalog - value: "Host=postgres-service;Database=catalog;Username=postgres;Password=postgres" - terminationGracePeriodSeconds: 180 - minReadySeconds: 60 - strategy: - rollingUpdate: - maxUnavailable: 0 - maxSurge: 1 ---- -apiVersion: v1 -kind: Service -metadata: - name: catalog -spec: - selector: - name: catalog-service - clusterIP: None - ports: - - name: http - port: 8080 - #- name: https - # port: 433 diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/cert-manager.yml dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/cert-manager.yml --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/cert-manager.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/cert-manager.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Secret -type: kubernetes.io/tls -metadata: - name: ca-key-pair - namespace: default -data: # Generated via: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=ca-issuer", converted to base64 via `base64 -w0 tls.key`, etc - tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURDVENDQWZHZ0F3SUJBZ0lVWW9xc1pzY1htQjhSb0w1WWJCdVVidnRuRFBjd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0ZERVNNQkFHQTFVRUF3d0pZMkV0YVhOemRXVnlNQjRYRFRJek1EY3lPREU0TURrMU5Wb1hEVEkwTURjeQpOekU0TURrMU5Wb3dGREVTTUJBR0ExVUVBd3dKWTJFdGFYTnpkV1Z5TUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGCkFBT0NBUThBTUlJQkNnS0NBUUVBcFU3THhLK3Foc0ZCTDNEdmtTTGNxc01VYjVlbVdmUE9UTmJUbWlCVnRPYUoKZmVqYThWbXQ5cjgvdXNxbzJlVWRRY2JwRUxwRjB5ZGFPOWhSUW1sdWQwdHRZaWVCVnU5WVE0K2Z6R1o0MVowWgpmU1NJY0ZwT1ZCVi9XRlZzd3doNmZMT0d5aGJOUG9pdkdVT2cxb1JRQ0Zod0gwdzI5aTMwYXhVNmRqalMxbW9nCkpqSk9YdkdodWN4RjErOTBDblBCRTdUQnl4QkJpN0hieUdiYmlWTjk1Y3ZmcHVTMjRPY29hMnZKUWo0dGhRN1kKZVc0Q2pocUVGbzVrdnM1K3V2Ymlja2NjcSsrRUZlSDFuTEY0V2w3dlZVekNqZVFmNkJiRWVQV2RQb3gyWVFWcApJL01iSzZzYkt4L3lieG5aR1pnZStXcXlJajc2QWRDUDhKeW53S3hlR1FJREFRQUJvMU13VVRBZEJnTlZIUTRFCkZnUVVSd3ptSUpKdU4wSWVZZ2Q0b09qSUEzZXVpZjB3SHdZRFZSMGpCQmd3Rm9BVVJ3em1JSkp1TjBJZVlnZDQKb09qSUEzZXVpZjB3RHdZRFZSMFRBUUgvQkFVd0F3RUIvekFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBQ0pUUAo5VUdMZml1NEVzKzVKbTdKajVnM1ErbEwvSjFsSkNRWDZ2TWZQWENTemtqTzU3RHA0NjRXMEhpdTdrZ1JOeDBYCjViUWVndjVJdjYxRDBSL2FLdEp3Y1hHVFRBZE5GT1Z3Uk9hNUJ2Q1RFUU1iY3o1eVBhMWNSeFYyTEErbCtMVWEKbGZyUU02OEZYRmtCWmxZSjdCdldwSkszTGRBa0IwQmM5RmpCT01iQTZCWlNEZkZtZHRuc1Q1VTFyVEdUV3dqdwppbXBqNXpYVVQrYWRvU2c0b29SOXIveGkzYjBCeC9rQzFQU1p4R2V5clFTNDNqdEljckZDOTFZU2N1S29MZDRsClJ3bzdjSWZaSFN1MDNMZm1NR2x0Nk1kNkxib1A3SDZVZGJCUjIrdUF4eExrWlNRN3F1djljMzNaVGVWQ2lhL0sKSTFtclpmd3V5K1FxK1JqdFNRPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= - tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2Z0lCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktnd2dnU2tBZ0VBQW9JQkFRQ2xUc3ZFcjZxR3dVRXYKY08rUkl0eXF3eFJ2bDZaWjg4NU0xdE9hSUZXMDVvbDk2TnJ4V2EzMnZ6KzZ5cWpaNVIxQnh1a1F1a1hUSjFvNwoyRkZDYVc1M1MyMWlKNEZXNzFoRGo1L01abmpWblJsOUpJaHdXazVVRlg5WVZXekRDSHA4czRiS0ZzMCtpSzhaClE2RFdoRkFJV0hBZlREYjJMZlJyRlRwMk9OTFdhaUFtTWs1ZThhRzV6RVhYNzNRS2M4RVR0TUhMRUVHTHNkdkkKWnR1SlUzM2x5OSttNUxiZzV5aHJhOGxDUGkyRkR0aDViZ0tPR29RV2ptUyt6bjY2OXVKeVJ4eXI3NFFWNGZXYwpzWGhhWHU5VlRNS041Qi9vRnNSNDlaMCtqSFpoQldrajh4c3JxeHNySC9Kdkdka1ptQjc1YXJJaVB2b0IwSS93Cm5LZkFyRjRaQWdNQkFBRUNnZ0VBQXRUYUR1aGE0QzdEenZGdEVHUWpyemhDOFBrM2RWamttVmZySjl1aXJZUHUKMzRyRjR2RXExb2JXcTJjd3FVc2dPelNTTmZ5dUk1UjJtbFNRS2haQlRsYTFoNDNwYkZ1bnZDclpQVkIvMmU4cApwUHFqbHlLOEx0QWFTUUV0UG5ITHNQZmRhTTFSN3BQN3NDVTM4UUN6R0dkL3VTWXVnVkk1YitoSHpYSUNUaXBHCnJLODhBTkxNbG1MQzlxRms2VUh0SFRnbDFGdnBBN0NreXZmWTd4MlBGNnpUTy84QTFWYTF2MDErY0E5UXdHV2EKT0hibWNXRXRpM0JJYlk3THN6RExOcnhMREdzS2hNcmJFM2MxSTc5OHhrTnJHVlgzSWpFWGxyMDNpTkxxQklSZApPdEFPNGgrckFYbjBzS0JpN3FEOUQ1WVNHZWxiSlZwMnk1M2tVWGpjNFFLQmdRRG5sSlZvQVh1RTg1VkEvODU2CmtYK2drdkpiNUEvY0k5Sm1oWjI2Rk9leFFLbllrMFRKWEZaSXpQcWR6R0hJL3Q3QytTbUkwSTFMTlR5R1QxS3UKZWNlT3A3SDBVaXR3czIwbzkzV1hRb2liamRyVDZwSUFaME9oNForc1NiYXEwdGxZSTZxblF0RksyVHdZeVdCZwpvS2pTN0NtMGhmTThrRVNoYkQzajR3T1A0UUtCZ1FDMnZUWUJOdm1PNjZ0UU0rTHZNY2ZuZm9ycHJZMmx1UHhxClVUbkJMVTdSVUhWTUpyZXhuUndlYXBjZnVPMVNPTkRhclNnMVg5NjJNcHpockkrQ2g0V2NTV3JDcGI2VUxaRWUKR2ZZWmFkNmdpYjJ5VERwQU95dFkxSmZ0ejdQY1doNEYxOWVpcXFwN1owVDBKandFb0lVcnRVVmxIUEFBY1pHcwoxbzlXSGcvMU9RS0JnQ1J5QTlsc2NrNElMN01kRHhmSEVqanBKMjlDd3lRNEZ3Sy9nSVVxaVJRaVF4aXNoS1RUCi9WaFR1aFZmZHZ3MDhFWHJCSmhkaWY4T0Q4cHJiVzI4Q0tYd3lsYlRIN2NLNWVFT29Oai9SWlNGakt6Uk84MEkKYzJKa3FjWnBpMi95NHZXMkYwTmZocVNxNzRSUEhQWFlFdm11NVJsZUExdkNzS3BlNkphV3daYkJBb0dCQUk2Ywp0NnJYQm9mOWNDTVZlME9GTENlRDRGRmgrcXVjNUpEc2R4QkZsYjlROVZuSzFZMHR1YVliTlhteVRyUGVWMUJ4CjFuRmhNbVFxdDdoL2ZUZzNINVRLenlDOVRUQkRKMy9BYndtQ1VCWWxxUCtlOGM3eTNtOWk2bmJUbytDU0MrQXYKaE1BVVJSd3RpZWlvZGlwK1E2L0t0aStsRjhDZzRUbHI4VTBhQlFZeEFvR0JBSUVLWjFmRm4yc0dkaDdValM5bgo1MFRDNG1CeHFQbGlPU1VWVVh2cXRic2xCYmhrd3FlNWt1aDJ6ZGNnWnZ3TnU5eE45VmgyVVBhWVFlNWxvbm9zCmIxa3oyUERDald6YkxUUzRaLzRDSXJzU3psYVNSNFI0M0RRb0Y4bS8rRlZkKzk1bGVMVW9nVXdZaVZ0MXc3SG0KYXJlalNraUdZbW9PaFh0Z0RHNEhpNUpnCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K ---- -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: ca-issuer - namespace: default -spec: - ca: - secretName: ca-key-pair \ No newline at end of file diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/deploy.cmd dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/deploy.cmd --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/deploy.cmd 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/deploy.cmd 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -kubectl apply -f ./cert-manager.yml -kubectl apply -f ./redis.yml -kubectl apply -f ./postgres.yml -kubectl apply -f ./api-gateway.yml -kubectl apply -f ./catalog-service.yml -kubectl apply -f ./basket-service.yml -kubectl apply -f ./my-frontend.yml diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/my-frontend.yml dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/my-frontend.yml --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/my-frontend.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/my-frontend.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-frontend - labels: - app: my-frontend -spec: - selector: - matchLabels: - app: my-frontend - replicas: 1 - template: - metadata: - labels: - app: my-frontend - spec: - containers: - - name: main - image: localhost:5001/my-frontend - imagePullPolicy: Always - ports: - - containerPort: 8080 - env: - - name: ASPNETCORE_ENVIRONMENT - value: "Production" - terminationGracePeriodSeconds: 180 - minReadySeconds: 60 - strategy: - rollingUpdate: - maxUnavailable: 0 - maxSurge: 1 - ---- -apiVersion: v1 -kind: Service -metadata: - name: my-frontend -spec: - type: LoadBalancer - selector: - app: my-frontend - ports: - - name: http - port: 8080 diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/postgres.yml dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/postgres.yml --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/postgres.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/postgres.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: postgres-configuration - labels: - app: postgres -data: - POSTGRES_DB: postgres - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: postgres-statefulset - labels: - app: postgres -spec: - serviceName: "postgres" - replicas: 1 - selector: - matchLabels: - app: postgres - template: - metadata: - labels: - app: postgres - spec: - containers: - - name: postgres - image: postgres:12 - envFrom: - - configMapRef: - name: postgres-configuration - ports: - - containerPort: 5432 - name: postgresdb ---- -apiVersion: v1 -kind: Service -metadata: - name: postgres-service - labels: - app: postgres -spec: - type: ClusterIP - ports: - - port: 5432 - name: postgres - selector: - app: postgres \ No newline at end of file diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/redis.yml dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/redis.yml --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/redis.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/redis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: redis -spec: - replicas: 1 - selector: - matchLabels: - app: redis - template: - metadata: - labels: - app: redis - spec: - containers: - - name: redis - image: mcr.microsoft.com/oss/bitnami/redis:6.0.8 - env: - - name: ALLOW_EMPTY_PASSWORD - value: "yes" - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 250m - memory: 256Mi - ports: - - containerPort: 6379 - name: redis ---- -apiVersion: v1 -kind: Service -metadata: - name: redis -spec: - ports: - - port: 6379 - selector: - app: redis ---- \ No newline at end of file diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/undeploy.cmd dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/undeploy.cmd --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/Deployment/undeploy.cmd 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/Deployment/undeploy.cmd 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -kubectl delete -f ./redis.yml -kubectl delete -f ./postgres.yml -kubectl delete -f ./api-gateway.yml -kubectl delete -f ./catalog-service.yml -kubectl delete -f ./basket-service.yml -kubectl delete -f ./my-frontend.yml diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/AddToCart.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/AddToCart.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/AddToCart.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/AddToCart.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -@inject BasketServiceClient BasketClient -@inject NavigationManager Navigation - - - - - - -@code { - [Parameter] - [EditorRequired] - public required CatalogItem Item { get; set; } - - [SupplyParameterFromForm] - public int ItemId { get; set; } - - private async Task HandleAddToCart() - { - await BasketClient.AddToCartAsync("user", ItemId); - - // Preserve query string - Navigation.NavigateTo($"/{new Uri(Navigation.Uri).Query}"); - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/App.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/App.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/App.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/App.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Cart.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Cart.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Cart.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Cart.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -@inject BasketServiceClient BasketClient -@inject NavigationManager Navigation - -
- @if (basketIsAvailable) - { - - - - } -
- -@code { - bool basketIsAvailable; - int itemsInCart = 0; - - [Parameter] - public EventCallback BasketAvailabilityChanged { get; set; } - - protected override async Task OnInitializedAsync() - { - var (basket, isAvailable) = await BasketClient.GetBasketAsync("user"); - - if (basket is not null) - { - itemsInCart = basket.TotalItemCount; - } - basketIsAvailable = isAvailable; - await BasketAvailabilityChanged.InvokeAsync(basketIsAvailable); - } - - private async Task HandleCheckout() - { - await BasketClient.CheckoutBasketAsync("user"); - - // Preserve query string - Navigation.NavigateTo($"/{new Uri(Navigation.Uri).Query}"); - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/AppFooter.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/AppFooter.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/AppFooter.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/AppFooter.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -@using System.Runtime.InteropServices - - - -@code { - string Message = $"Powered by {RuntimeInformation.FrameworkDescription}"; -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/MainLayout.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/MainLayout.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/MainLayout.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/MainLayout.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -@inherits LayoutComponentBase - -@Body - -
- An unhandled error has occurred. - Reload - 🗙 -
diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/MainLayout.razor.css dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/MainLayout.razor.css --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/MainLayout.razor.css 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Layout/MainLayout.razor.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -.page { - position: relative; - display: flex; - flex-direction: column; -} - -main { - flex: 1; -} - -.sidebar { - background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); -} - -.top-row { - background-color: #f7f7f7; - border-bottom: 1px solid #d6d5d5; - justify-content: flex-end; - height: 3.5rem; - display: flex; - align-items: center; -} - - .top-row ::deep a, .top-row ::deep .btn-link { - white-space: nowrap; - margin-left: 1.5rem; - text-decoration: none; - } - - .top-row ::deep a:hover, .top-row ::deep .btn-link:hover { - text-decoration: underline; - } - - .top-row ::deep a:first-child { - overflow: hidden; - text-overflow: ellipsis; - } - -@media (max-width: 640.98px) { - .top-row:not(.auth) { - display: none; - } - - .top-row.auth { - justify-content: space-between; - } - - .top-row ::deep a, .top-row ::deep .btn-link { - margin-left: 0; - } -} - -@media (min-width: 641px) { - .page { - flex-direction: row; - } - - .sidebar { - width: 250px; - height: 100vh; - position: sticky; - top: 0; - } - - .top-row { - position: sticky; - top: 0; - z-index: 1; - } - - .top-row.auth ::deep a:first-child { - flex: 1; - text-align: right; - width: 0; - } - - .top-row, article { - padding-left: 2rem !important; - padding-right: 1.5rem !important; - } -} - -#blazor-error-ui { - background: lightyellow; - bottom: 0; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); - display: none; - left: 0; - padding: 0.6rem 1.25rem 0.7rem 1.25rem; - position: fixed; - width: 100%; - z-index: 1000; -} - - #blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; - } diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/NavigationManagerExtensions.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/NavigationManagerExtensions.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/NavigationManagerExtensions.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/NavigationManagerExtensions.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -namespace Microsoft.AspNetCore.Components; - -public static class NavigationManagerExtensions -{ - public static string ToAbsolutePath(this NavigationManager navigationManager, string uri) - { - // Workaround for Blazor issue: https://github.com/dotnet/aspnetcore/issues/51380 - - if (uri.StartsWith(navigationManager.BaseUri, StringComparison.Ordinal)) - { - // The absolute URI must be of the form "{baseUri}something" (where baseUri ends with a slash), - // and from that we return "something". If baseUri includes a path, we return that path too. - return new Uri(uri).PathAndQuery; - } - - var message = $"The URI '{uri}' is not contained by the base URI '{navigationManager.BaseUri}'."; - throw new ArgumentException(message); - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Error.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Error.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Error.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Error.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -@page "/Error" - -@using System.Diagnostics - -Error - -

Error.

-

An error occurred while processing your request.

- -@if (showRequestId) -{ -

- Request ID: @requestId -

-} - -@code { - private string? requestId; - private bool showRequestId => !string.IsNullOrEmpty(requestId); - - [CascadingParameter] - public HttpContext? HttpContext { get; set; } - - protected override void OnInitialized() - { - requestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Home.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Home.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Home.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Home.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -@page "/" -@attribute [StreamRendering(true)] - -@inject CatalogServiceClient CatalogService - -eShopLite Product Catalog - -
-

<eShopLite />

-
-

Product Catalog

-
- -
- -
- @if (catalog is { Data: var data }) - { -
- @foreach (var item in data) - { -
-
- @item.Name -
- -
-
-

@item.Name

-

@item.Description

-
-

@item.Price.ToString("C")

- @if (basketIsAvailable) - { - - } -
-
-
-
- } -
- - - } - else - { -

Loading product catalog…

- } -
- - - -@code { - bool basketIsAvailable; - Catalog? catalog; - PaginationInfo paginationInfo = new(FirstId: 0, NextId: 0, HasPreviousPage: false, HasNextPage: false); - - [SupplyParameterFromQuery] - public int? Before { get; set; } - - [SupplyParameterFromQuery] - public int? After { get; set; } - - protected override async Task OnInitializedAsync() - { - catalog = await CatalogService.GetItemsAsync(Before, After); - - if (catalog is null) - { - return; - } - - paginationInfo = new PaginationInfo(catalog.FirstId, catalog.NextId, catalog.FirstId > 1, !catalog.IsLastPage); - } - - private void HandleBasketAvailabilityChanged(bool isAvailable) - { - basketIsAvailable = isAvailable; - } - - record PaginationInfo(int FirstId, int NextId, bool HasPreviousPage, bool HasNextPage); -} - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Home.razor.css dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Home.razor.css --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Home.razor.css 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Pages/Home.razor.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -.catalog-loading { - min-height: 500px; -} - -.catalog-item-image { - min-height: 295px; -} \ No newline at end of file diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Routes.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Routes.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/Routes.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/Routes.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/_Imports.razor dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/_Imports.razor --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Components/_Imports.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Components/_Imports.razor 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -@using System.Net.Http -@using System.Net.Http.Json -@using Microsoft.AspNetCore.Components.Forms -@using Microsoft.AspNetCore.Components.Routing -@using Microsoft.AspNetCore.Components.Web -@using static Microsoft.AspNetCore.Components.Web.RenderMode -@using Microsoft.AspNetCore.Components.Web.Virtualization -@using Microsoft.JSInterop -@using MyFrontend -@using MyFrontend.Components -@using MyFrontend.Components.Layout -@using MyFrontend.Services -@using BasketService.Models diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/MyFrontend.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/MyFrontend.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/MyFrontend.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/MyFrontend.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - - - net8.0 - localhost:5001 - my-frontend - mcr.microsoft.com/dotnet/aspnet:8.0-preview - - $(WarningsNotAsErrors);RZ10012;RZ10021 - - $(NoWarn);RZ10021 - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -using GrpcBasket; -using MyFrontend.Components; -using MyFrontend.Services; - -var builder = WebApplication.CreateBuilder(args); - -builder.AddServiceDefaults(); - -builder.Services.AddHttpForwarderWithServiceDiscovery(); - -builder.Services.AddHttpClient(c => c.BaseAddress = new("http://catalogservice")); - -builder.Services.AddSingleton() - .AddGrpcClient(o => o.Address = new("http://basketservice")); - -builder.Services.AddRazorComponents(); - -var app = builder.Build(); - -if (!app.Environment.IsDevelopment()) -{ - app.UseExceptionHandler("/error", createScopeForErrors: true); -} - -app.UseStaticFiles(); - -app.UseAntiforgery(); - -app.MapRazorComponents(); - -app.MapForwarder("/catalog/images/{id}", "http://catalogservice", "/api/v1/catalog/items/{id}/image"); - -app.MapDefaultEndpoints(); - -app.Run(); diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "http://localhost:5266", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "https://localhost:7269;http://localhost:5266", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Services/BasketServiceClient.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Services/BasketServiceClient.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Services/BasketServiceClient.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Services/BasketServiceClient.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -using BasketService.Models; -using Grpc.Core; -using GrpcBasket; -using Polly.Timeout; - -namespace MyFrontend.Services; - -public class BasketServiceClient(Basket.BasketClient client) -{ - public async Task<(CustomerBasket? Basket, bool IsAvailable)> GetBasketAsync(string buyerId) - { - try - { - var response = await client.GetBasketByIdAsync(new BasketRequest { Id = buyerId }); - var result = !string.IsNullOrEmpty(response.BuyerId) ? MapToCustomerBasket(response) : null; - return (result, true); - } - catch (RpcException ex) when ( - // Service name could not be resolved - ex.StatusCode is StatusCode.Unavailable || - // Polly resilience timed out after retries - (ex.StatusCode is StatusCode.Internal && ex.Status.DebugException is TimeoutRejectedException)) - { - return (null, false); - } - } - - public async Task AddToCartAsync(string buyerId, int productId) - { - var (basket, _) = await GetBasketAsync(buyerId); - basket ??= new CustomerBasket(buyerId); - var found = false; - foreach (var item in basket.Items) - { - if (item.ProductId == productId) - { - ++item.Quantity; - found = true; - break; - } - } - - if (!found) - { - basket.Items.Add(new BasketItem - { - Id = Guid.NewGuid().ToString("N"), - ProductId = productId, - Quantity = 1 - }); - } - - var response = await client.UpdateBasketAsync(MapToCustomerBasketRequest(basket)); - var result = MapToCustomerBasket(response); - return result; - } - - public async Task CheckoutBasketAsync(string buyerId) - { - _ = await client.CheckoutBasketAsync(new CheckoutCustomerBasketRequest { BuyerId = buyerId }); - } - - public async Task DeleteBasketAsync(string buyerId) - { - _ = await client.DeleteBasketAsync(new DeleteCustomerBasketRequest { BuyerId = buyerId }); - } - - private static CustomerBasketRequest MapToCustomerBasketRequest(CustomerBasket customerBasket) - { - var response = new CustomerBasketRequest - { - BuyerId = customerBasket.BuyerId - }; - - foreach (var item in customerBasket.Items) - { - response.Items.Add(new BasketItemResponse - { - Id = item.Id, - OldUnitPrice = item.OldUnitPrice, - ProductId = item.ProductId, - Quantity = item.Quantity, - UnitPrice = item.UnitPrice - }); - } - - return response; - } - - private static CustomerBasket MapToCustomerBasket(CustomerBasketResponse wireBasket) - { - var response = new CustomerBasket - { - BuyerId = wireBasket.BuyerId - }; - - foreach (var item in wireBasket.Items) - { - response.Items.Add(new BasketItem - { - Id = item.Id, - OldUnitPrice = item.OldUnitPrice, - ProductId = item.ProductId, - Quantity = item.Quantity, - UnitPrice = item.UnitPrice - }); - } - - return response; - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Services/CatalogServiceClient.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Services/CatalogServiceClient.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/Services/CatalogServiceClient.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/Services/CatalogServiceClient.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -using System.Globalization; - -namespace MyFrontend.Services; - -public class CatalogServiceClient(HttpClient client) -{ - public Task GetItemsAsync(int? before = null, int? after = null) - { - // Make the query string with encoded parameters - var query = (before, after) switch - { - (null, null) => default, - (int b, null) => QueryString.Create("before", b.ToString(CultureInfo.InvariantCulture)), - (null, int a) => QueryString.Create("after", a.ToString(CultureInfo.InvariantCulture)), - _ => throw new InvalidOperationException(), - }; - - return client.GetFromJsonAsync($"api/v1/catalog/items/type/all/brand{query}"); - } -} - -public record Catalog(int FirstId, int NextId, bool IsLastPage, IEnumerable Data); - -public record CatalogItem -{ - public int Id { get; init; } - public required string Name { get; init; } - public required string Description { get; init; } - public decimal Price { get; init; } - public string? PictureUri { get; init; } - public int CatalogBrandId { get; init; } - public required string CatalogBrand { get; init; } - public int CatalogTypeId { get; init; } - public required string CatalogType { get; init; } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/appsettings.Development.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/appsettings.Development.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/appsettings.Development.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/appsettings.Development.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/wwwroot/site.css dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/wwwroot/site.css --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/MyFrontend/wwwroot/site.css 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/MyFrontend/wwwroot/site.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,291 +0,0 @@ -:root { - --font-family: system-ui; - --border-color: #ccc; - --border-color-hover: #aaa; - --text-color: #555; - --text-heading-color: #222; - --quick-quarter-second-transition: all ease-in-out .25s; - --smooth-one-second-transition: all ease-in-out 1s; - --dotnet-purple-color: #512bd4; - --dotnet-purple-color-hover: #512bd4; -} - -html { - background: var(--dotnet-purple-color); - background: linear-gradient(0deg, rgba(81,43,212,0.15) 0%, rgba(255,255,255,1) 100%); -} - -* { - font-family: var(--font-family); - user-select: none; -} - -.d-flex { - display: flex; -} - -.flex-spacer { - flex-grow: 1; -} - -.pa-4 { - padding: 1.2rem; -} - -.animated-underline { - color: var(--text-color); - text-decoration: none; - transition: var(--quick-quarter-second-transition); -} - - .animated-underline:hover { - text-shadow: 0 0 1px black; - filter: brightness(50%); - } - - .animated-underline::after { - content: ""; - display: block; - width: 100%; - height: 1px; - background-color: var(--text-color); - transition: transform 0.2s ease-in-out; - transform: scale(0); - } - - .animated-underline:hover::after { - transform: scale(1); - } - -.justify-space-evenly { - justify-content: space-evenly; -} - -.justify-space-around { - justify-content: space-around; -} - -.justify-content-center { - justify-content: center; -} - -.justify-content-end { - justify-content: flex-end; -} - -.align-items-center { - align-items: center; -} - -.align-content-end { - align-content: flex-end; -} - -.text-align-center { - text-align: center; -} - -.pointer-events-none { - pointer-events: none; -} - -.container { - max-width: 1200px; - margin: 0 auto; - padding: 0 1rem; -} - -.grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); - grid-gap: 1rem; - transition: var(--smooth-one-second-transition); -} - -.grid-item { - border: 2px solid var(--border-color); - border-radius: 6px; - box-shadow: var(--border-color) 0px 0px 5px; - background-color: whitesmoke; -} - - .grid-item:hover { - box-shadow: var(--border-color) 0px 0px 10px; - border-color: var(--border-color-hover); - } - -.grid-item-content { - display: flex; - flex-direction: column; -} - - .grid-item-content img { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - } - - .grid-item-content:hover > img { - cursor: pointer; - filter: brightness(90%); - overflow: hidden; - transition: all ease-in-out .25s; - } - - .grid-item-content:hover .quick-view-overlay { - filter: brightness(120%); - } - -.quick-view-overlay { - position: absolute; - pointer-events: none; - cursor: pointer; - color: whitesmoke; - font-size: 1.5rem; - padding: .5rem; - margin-right: 1rem; -} - -.text { - color: var(--text-color); - text-decoration: none; -} - -.d-flex .text { - margin: .5rem 2rem; -} - -.grid-item-text { - text-align: center; - color: var(--text-color); -} - - .grid-item-text h4 { - color: var(--text-heading-color); - } - - .grid-item-text .item-price { - color: darkgreen; - font-weight: 700; - } - - .grid-item-text .item-description { - margin: .5rem; - } - -.pager { - display: flex; - justify-content: center; - align-items: center; - margin-top: 1rem; - font-size: 1.2rem; -} - - .pager .button { - text-decoration: none; - color: black; - } - - .pager .button[disable] { - pointer-events: none; - user-select: none; - color: #999; - } - - .pager .button:not([disable]):hover { - transition: all ease-in-out .5s; - background-color: var(--border-color); - } - - .pager .next { - padding: .5rem 1.5rem; - background-color: whitesmoke; - border-bottom-right-radius: 8px; - border-top-right-radius: 8px; - border: 2px solid var(--border-color); - border-left: none; - } - - .pager .next .fa { - padding-left: .5rem; - } - - .pager .previous { - padding: .5rem 1.5rem; - background-color: whitesmoke; - border-bottom-left-radius: 8px; - border-top-left-radius: 8px; - border: 2px solid var(--border-color); - border-right: none; - } - - .pager .previous .fa { - padding-right: .5rem; - } - -.cart-button:not(:disabled) { - font-size: 1.5rem; - cursor: pointer; - border: 2px solid transparent; - border-radius: 4rem; - padding: .4rem .8rem; - background-color: transparent; - transition: all ease-in-out .25s; -} - - .cart-button:not(:disabled):hover { - color: var(--dotnet-purple-color); - border-color: var(--border-color-hover); - background-color: #ccc; - } - -.fa.fa-stack-1x.badge { - color: white; - background-color: var(--dotnet-purple-color); - border-radius: 50%; - font-family: system-ui; - width: 1.5rem; - height: 1.5rem; - font-size: 1rem; - top: 15%; - right: 15%; - left: initial; - line-height: 1.5rem; - border: 2px solid white; -} - -.fa-shopping-cart.fa-stack-4x { - font-size: 4rem; -} - -.fa-stack.fa-lg.cart-stack { - line-height: 4rem; - width: 4rem; - height: 4rem; - transition: var(--quick-quarter-second-transition); -} - - .fa-stack.fa-lg.cart-stack:hover { - cursor: pointer; - filter: opacity(.7); - } - -.app-name { - font-weight: bolder; - font-size: 1.5rem; - font-family: monospace; - color: var(--dotnet-purple-color); -} - -.text-danger { - color: red; -} - -.blazor-error-boundary { - background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; - padding: 1rem 1rem 1rem 3.7rem; - color: white; -} - - .blazor-error-boundary::after { - content: "An error has occurred." - } diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/OrderProcessingWorker.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/OrderProcessingWorker.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/OrderProcessingWorker.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/OrderProcessingWorker.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -using System.Diagnostics; -using System.Text.Json; -using BasketService.Models; -using RabbitMQ.Client; -using RabbitMQ.Client.Events; - -namespace OrderProcessor; - -public class OrderProcessingWorker : BackgroundService -{ - private readonly ILogger _logger; - private readonly IConfiguration _config; - private readonly IServiceProvider _serviceProvider; - private IConnection? _messageConnection; - private IModel? _messageChannel; - - public OrderProcessingWorker(ILogger logger, IConfiguration config, IServiceProvider serviceProvider) - { - _logger = logger; - _config = config; - _serviceProvider = serviceProvider; - } - - protected override Task ExecuteAsync(CancellationToken stoppingToken) - { - return Task.Factory.StartNew(() => - { - const string configKeyName = "Aspire:RabbitMQ:Client:OrderQueueName"; - string queueName = _config[configKeyName] ?? "orders"; - - _messageConnection = _serviceProvider.GetRequiredService(); - - _messageChannel = _messageConnection.CreateModel(); - _messageChannel.QueueDeclare(queueName, exclusive: false); - - var consumer = new EventingBasicConsumer(_messageChannel); - consumer.Received += ProcessMessageAsync; - - _messageChannel.BasicConsume(queue: queueName, - autoAck: true, - consumer: consumer); - }, stoppingToken, TaskCreationOptions.LongRunning, TaskScheduler.Current); - } - - public override async Task StopAsync(CancellationToken cancellationToken) - { - await base.StopAsync(cancellationToken); - - _messageChannel?.Dispose(); - } - - private void ProcessMessageAsync(object? sender, BasicDeliverEventArgs args) - { - _logger.LogInformation($"Processing Order at: {DateTime.UtcNow}"); - - var message = args.Body; - - if (_logger.IsEnabled(LogLevel.Debug)) - { - _logger.LogDebug(""" - MessageId:{MessageId} - MessageBody:{Body} - """, args.BasicProperties.MessageId, message); - } - var order = JsonSerializer.Deserialize(message.Span) ?? new Order() { Id = "fake" }; - - Activity.Current?.AddTag("order-id", order.Id); - Activity.Current?.AddTag("product-count", order.Items.Count); - - _logger.LogInformation(""" - OrderId:{Id} - BuyerId:{BuyerId} - ProductCount:{Count} - """, order.Id, order.BuyerId, order.Items.Count); - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/OrderProcessor.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/OrderProcessor.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/OrderProcessor.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/OrderProcessor.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ - - - - net8.0 - dotnet-OrderProcessor-174b1029-6096-4b07-86b8-1b2d821d0830 - - - - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/Program.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/Program.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/Program.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/Program.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -using OrderProcessor; - -var builder = Host.CreateApplicationBuilder(args); - -builder.AddServiceDefaults(); - -builder.AddRabbitMQ("messaging"); -builder.Services.AddHostedService(); - -var host = builder.Build(); -host.Run(); diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/Properties/launchSettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/Properties/launchSettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/Properties/launchSettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/Properties/launchSettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "profiles": { - "OrderProcessor": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "DOTNET_ENVIRONMENT": "Development" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/appsettings.Development.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/appsettings.Development.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/appsettings.Development.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/appsettings.Development.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/appsettings.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/appsettings.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/OrderProcessor/appsettings.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/OrderProcessor/appsettings.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.Hosting.Lifetime": "Information", - "Azure": "Warning" - } - }, - - "Aspire": { - "RabbitMQ": { - "Client": { - "OrderQueueName": "orders" - } - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/README.md dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/README.md --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/README.md 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/README.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -## Instructions for running in Kubernetes locally - -* Install Docker Desktop -* Enable Kubernetes support in Docker Desktop -* Start a local image repository - -``` -> docker run -d -p 5001:5000 --restart always --name registry registry:2 -``` - -* Build the containers, pushing them to the local repository, and deploy to kubernetes - -``` -> ./deploy.cmd -``` diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ServiceDefaults/Extensions.cs dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ServiceDefaults/Extensions.cs --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ServiceDefaults/Extensions.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ServiceDefaults/Extensions.cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,119 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Diagnostics.HealthChecks; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Diagnostics.HealthChecks; -using Microsoft.Extensions.Logging; -using OpenTelemetry.Logs; -using OpenTelemetry.Metrics; -using OpenTelemetry.Trace; - -namespace Microsoft.Extensions.Hosting; - -public static class Extensions -{ - public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBuilder builder) - { - builder.ConfigureOpenTelemetry(); - - builder.AddDefaultHealthChecks(); - - builder.Services.AddServiceDiscovery(); - - builder.Services.ConfigureHttpClientDefaults(http => - { - // Turn on resilience by default - http.AddStandardResilienceHandler(); - - // Turn on service discovery by default - http.UseServiceDiscovery(); - }); - - return builder; - } - - public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicationBuilder builder) - { - builder.Logging.AddOpenTelemetry(logging => - { - logging.IncludeFormattedMessage = true; - logging.IncludeScopes = true; - }); - - builder.Services.AddOpenTelemetry() - .WithMetrics(metrics => - { - metrics.AddRuntimeInstrumentation() - .AddBuiltInMeters(); - }) - .WithTracing(tracing => - { - if (builder.Environment.IsDevelopment()) - { - // We want to view all traces in development - tracing.SetSampler(new AlwaysOnSampler()); - } - - tracing.AddAspNetCoreInstrumentation() - .AddGrpcClientInstrumentation() - .AddHttpClientInstrumentation(); - }); - - builder.AddOpenTelemetryExporters(); - - return builder; - } - - private static IHostApplicationBuilder AddOpenTelemetryExporters(this IHostApplicationBuilder builder) - { - var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); - - if (useOtlpExporter) - { - builder.Services.Configure(logging => logging.AddOtlpExporter()); - builder.Services.ConfigureOpenTelemetryMeterProvider(metrics => metrics.AddOtlpExporter()); - builder.Services.ConfigureOpenTelemetryTracerProvider(tracing => tracing.AddOtlpExporter()); - } - - // Uncomment the following lines to enable the Prometheus exporter (requires the OpenTelemetry.Exporter.Prometheus.AspNetCore package) - // builder.Services.AddOpenTelemetry() - // .WithMetrics(metrics => metrics.AddPrometheusExporter()); - - // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.Exporter package) - // builder.Services.AddOpenTelemetry() - // .UseAzureMonitor(); - - return builder; - } - - public static IHostApplicationBuilder AddDefaultHealthChecks(this IHostApplicationBuilder builder) - { - builder.Services.AddHealthChecks() - // Add a default liveness check to ensure app is responsive - .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); - - return builder; - } - - public static WebApplication MapDefaultEndpoints(this WebApplication app) - { - // Uncomment the following line to enable the Prometheus endpoint (requires the OpenTelemetry.Exporter.Prometheus.AspNetCore package) - // app.MapPrometheusScrapingEndpoint(); - - // All health checks must pass for app to be considered ready to accept traffic after starting - app.MapHealthChecks("/health"); - - // Only health checks tagged with the "live" tag must pass for app to be considered alive - app.MapHealthChecks("/alive", new HealthCheckOptions - { - Predicate = r => r.Tags.Contains("live") - }); - - return app; - } - - private static MeterProviderBuilder AddBuiltInMeters(this MeterProviderBuilder meterProviderBuilder) => - meterProviderBuilder.AddMeter( - "Microsoft.AspNetCore.Hosting", - "Microsoft.AspNetCore.Server.Kestrel", - "System.Net.Http"); -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ServiceDefaults/ServiceDefaults.csproj dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ServiceDefaults/ServiceDefaults.csproj --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/ServiceDefaults/ServiceDefaults.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/ServiceDefaults/ServiceDefaults.csproj 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - Library - net8.0 - - - - - - - - - - - - - - - - - - - - - - diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/azure.yaml dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/azure.yaml --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/azure.yaml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/azure.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json - -name: Aspire -hooks: - preprovision: - continueOnError: false - interactive: false - run: dotnet run --project AppHost\AppHost.csproj -- --target azure --output-path .\infra\eshoplite - shell: pwsh diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/build-containers.cmd dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/build-containers.cmd --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/build-containers.cmd 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/build-containers.cmd 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -pushd ApiGateway -dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer -p:PublishSingleFile=true --self-contained true -popd - -pushd CatalogService -dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer -p:PublishSingleFile=true --self-contained true -popd - -pushd BasketService -dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer -p:PublishSingleFile=true --self-contained true -popd - -pushd MyFrontend -dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer -p:PublishSingleFile=true --self-contained true -popd diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/deploy.cmd dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/deploy.cmd --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/deploy.cmd 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/deploy.cmd 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -call ./build-containers.cmd - -pushd Deployment -call ./undeploy.cmd -call ./deploy.cmd -popd diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/eShopLite.sln dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/eShopLite.sln --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/eShopLite.sln 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/eShopLite.sln 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.33716.462 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiGateway", "ApiGateway\ApiGateway.csproj", "{B97E0EFC-E8A8-44A2-A7D4-4BEB0BD07E79}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BasketService", "BasketService\BasketService.csproj", "{22E22164-27AE-4BC5-9A85-C16F0F5E49F7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CatalogService", "CatalogService\CatalogService.csproj", "{F8F2A226-59D7-4023-A7BE-602B6B0366D2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceDefaults", "ServiceDefaults\ServiceDefaults.csproj", "{938E6618-3061-4908-82AB-A2463F6B7BE8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyFrontend", "MyFrontend\MyFrontend.csproj", "{A92E2CCE-5B2B-461E-80AA-1669FE2EEF2E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppHost", "AppHost\AppHost.csproj", "{96FDD139-88F1-46DC-8487-4D5D7F1E5A8D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrderProcessor", "OrderProcessor\OrderProcessor.csproj", "{7926680B-CE02-4AE8-AED2-E95678309289}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B97E0EFC-E8A8-44A2-A7D4-4BEB0BD07E79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B97E0EFC-E8A8-44A2-A7D4-4BEB0BD07E79}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B97E0EFC-E8A8-44A2-A7D4-4BEB0BD07E79}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B97E0EFC-E8A8-44A2-A7D4-4BEB0BD07E79}.Release|Any CPU.Build.0 = Release|Any CPU - {22E22164-27AE-4BC5-9A85-C16F0F5E49F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {22E22164-27AE-4BC5-9A85-C16F0F5E49F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {22E22164-27AE-4BC5-9A85-C16F0F5E49F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {22E22164-27AE-4BC5-9A85-C16F0F5E49F7}.Release|Any CPU.Build.0 = Release|Any CPU - {F8F2A226-59D7-4023-A7BE-602B6B0366D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F8F2A226-59D7-4023-A7BE-602B6B0366D2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F8F2A226-59D7-4023-A7BE-602B6B0366D2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F8F2A226-59D7-4023-A7BE-602B6B0366D2}.Release|Any CPU.Build.0 = Release|Any CPU - {938E6618-3061-4908-82AB-A2463F6B7BE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {938E6618-3061-4908-82AB-A2463F6B7BE8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {938E6618-3061-4908-82AB-A2463F6B7BE8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {938E6618-3061-4908-82AB-A2463F6B7BE8}.Release|Any CPU.Build.0 = Release|Any CPU - {A92E2CCE-5B2B-461E-80AA-1669FE2EEF2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A92E2CCE-5B2B-461E-80AA-1669FE2EEF2E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A92E2CCE-5B2B-461E-80AA-1669FE2EEF2E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A92E2CCE-5B2B-461E-80AA-1669FE2EEF2E}.Release|Any CPU.Build.0 = Release|Any CPU - {96FDD139-88F1-46DC-8487-4D5D7F1E5A8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96FDD139-88F1-46DC-8487-4D5D7F1E5A8D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96FDD139-88F1-46DC-8487-4D5D7F1E5A8D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96FDD139-88F1-46DC-8487-4D5D7F1E5A8D}.Release|Any CPU.Build.0 = Release|Any CPU - {7926680B-CE02-4AE8-AED2-E95678309289}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7926680B-CE02-4AE8-AED2-E95678309289}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7926680B-CE02-4AE8-AED2-E95678309289}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7926680B-CE02-4AE8-AED2-E95678309289}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8990AED3-C6AA-45CF-B4C0-771D7DF7CB96} - EndGlobalSection -EndGlobal diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/infra/eshoplite/app.bicep dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/infra/eshoplite/app.bicep --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/infra/eshoplite/app.bicep 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/infra/eshoplite/app.bicep 1970-01-01 00:00:00.000000000 +0000 @@ -1,410 +0,0 @@ -param location string = resourceGroup().location -param acrPullRoleDefinitionName string = '7f951dda-4ed3-4680-a7ca-43fe172d538d' -param acrPushRoleDefinitionName string = '8311e382-0749-4cb8-b61a-304f252e45ec' -param contributorRoleDefinitionName string = 'b24988ac-6180-42a0-ab88-20f7382dd24c' -@secure() -param postgresServerPassword string = newGuid() -resource storemydata2srv 'Microsoft.DBforPostgreSQL/flexibleServers@2021-06-01' = { - name: 'pgsql${uniqueString(resourceGroup().id, 'storemydata2')}' - location: location - sku: { - name: 'Standard_D4ds_v4' - tier: 'GeneralPurpose' - } - properties: { - version: '12' - administratorLogin: 'postgres' - administratorLoginPassword: postgresServerPassword - storage: { - storageSizeGB: 128 - } - } -} -resource cachymccacheface2 'Microsoft.Cache/redis@2022-06-01' = { - name: 'redis${uniqueString(resourceGroup().id, 'cachymccacheface2')}' - location: location - properties: { - sku: { - name: 'Basic' - family: 'C' - capacity: 0 - } - } -} -resource logWorkspace 'Microsoft.OperationalInsights/workspaces@2021-06-01' = { - name: 'logs${uniqueString(resourceGroup().id)}' - location: location - properties: { - sku: { - name: 'PerGB2018' - } - } -} -resource containerAppEnvironment 'Microsoft.App/managedEnvironments@2022-03-01' = { - name: 'env${uniqueString(resourceGroup().id)}' - location: location - properties: { - appLogsConfiguration: { - destination: 'log-analytics' - logAnalyticsConfiguration: { - customerId: logWorkspace.properties.customerId - sharedKey: logWorkspace.listKeys().primarySharedKey - } - } - } -} -resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' = { - name: 'registry${uniqueString(resourceGroup().id)}' - location: location - sku: { - name: 'Basic' - } -} -resource acrPushIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: 'id${uniqueString(resourceGroup().id, 'push')}' - location: location -} -resource acrPullIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: 'id${uniqueString(resourceGroup().id, 'pull')}' - location: location -} -resource contributorRoleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = { - name: contributorRoleDefinitionName - scope: subscription() -} -resource acrPullRoleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = { - name: acrPullRoleDefinitionName - scope: subscription() -} -resource contributorRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(acrPushIdentity.id, contributorRoleDefinitionName, containerRegistry.id) - properties: { - principalId: acrPushIdentity.properties.principalId - roleDefinitionId: contributorRoleDefinition.id - principalType: 'ServicePrincipal' - } - scope: containerRegistry -} -resource acrPullRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { - name: guid(acrPullIdentity.id, acrPullRoleDefinitionName, containerRegistry.id) - properties: { - principalId: acrPullIdentity.properties.principalId - roleDefinitionId: acrPullRoleDefinition.id - principalType: 'ServicePrincipal' - } - scope: containerRegistry -} -resource containerImageBootstrapScript0 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: 'import${uniqueString(resourceGroup().id, 'containerImageBootstrapScript0')}' - location: location - kind: 'AzureCLI' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${acrPushIdentity.id}': { - } - } - } - properties: { - azCliVersion: '2.47.0' - retentionInterval: 'P1D' - scriptContent: 'az acr import --name ${containerRegistry.name} --source mcr.microsoft.com/azuredocs/containerapps-helloworld:latest --resource-group ${resourceGroup().name} --image catalog:latest' - } -} -resource containerApp0 'Microsoft.App/containerApps@2022-03-01' = { - name: 'catalog-${uniqueString(resourceGroup().id)}' - location: location - dependsOn: [ -containerImageBootstrapScript0 ] - identity: { - type: 'SystemAssigned,UserAssigned' - userAssignedIdentities: { - '${acrPullIdentity.id}': { - } - } - } - properties: { - managedEnvironmentId: containerAppEnvironment.id - configuration: { - ingress: { - external: true - targetPort: 80 - } - registries: [ - { - identity: acrPullIdentity.id - server: containerRegistry.properties.loginServer - } - ] - } - template: { - scale: { - minReplicas: 2 - } - containers: [ - { - name: 'container${uniqueString(resourceGroup().id)}' - image: '${containerRegistry.properties.loginServer}/catalog:latest' - env: [ - { - name: 'ConnectionStrings__Aspire.PostgreSQL' - value: 'Host=localhost;Database=catalog;Username=postgres;Password=postgres' - } - ] - resources: { - cpu: '0.25' - memory: '0.5Gi' - } - } - ] - } - } -} -resource containerImageBootstrapScript1 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: 'import${uniqueString(resourceGroup().id, 'containerImageBootstrapScript1')}' - location: location - kind: 'AzureCLI' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${acrPushIdentity.id}': { - } - } - } - properties: { - azCliVersion: '2.47.0' - retentionInterval: 'P1D' - scriptContent: 'az acr import --name ${containerRegistry.name} --source mcr.microsoft.com/azuredocs/containerapps-helloworld:latest --resource-group ${resourceGroup().name} --image basket:latest' - } -} -resource containerApp1 'Microsoft.App/containerApps@2022-03-01' = { - name: 'basket-${uniqueString(resourceGroup().id)}' - location: location - dependsOn: [ -containerImageBootstrapScript1 ] - identity: { - type: 'SystemAssigned,UserAssigned' - userAssignedIdentities: { - '${acrPullIdentity.id}': { - } - } - } - properties: { - managedEnvironmentId: containerAppEnvironment.id - configuration: { - ingress: { - external: true - targetPort: 80 - } - registries: [ - { - identity: acrPullIdentity.id - server: containerRegistry.properties.loginServer - } - ] - } - template: { - scale: { - minReplicas: 2 - } - containers: [ - { - name: 'container${uniqueString(resourceGroup().id)}' - image: '${containerRegistry.properties.loginServer}/basket:latest' - env: [ - ] - resources: { - cpu: '0.25' - memory: '0.5Gi' - } - } - ] - } - } -} -resource containerImageBootstrapScript2 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: 'import${uniqueString(resourceGroup().id, 'containerImageBootstrapScript2')}' - location: location - kind: 'AzureCLI' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${acrPushIdentity.id}': { - } - } - } - properties: { - azCliVersion: '2.47.0' - retentionInterval: 'P1D' - scriptContent: 'az acr import --name ${containerRegistry.name} --source mcr.microsoft.com/azuredocs/containerapps-helloworld:latest --resource-group ${resourceGroup().name} --image myfrontend:latest' - } -} -resource containerApp2 'Microsoft.App/containerApps@2022-03-01' = { - name: 'myfrontend-${uniqueString(resourceGroup().id)}' - location: location - dependsOn: [ -containerImageBootstrapScript2 ] - identity: { - type: 'SystemAssigned,UserAssigned' - userAssignedIdentities: { - '${acrPullIdentity.id}': { - } - } - } - properties: { - managedEnvironmentId: containerAppEnvironment.id - configuration: { - ingress: { - external: true - targetPort: 80 - } - registries: [ - { - identity: acrPullIdentity.id - server: containerRegistry.properties.loginServer - } - ] - } - template: { - scale: { - minReplicas: 2 - } - containers: [ - { - name: 'container${uniqueString(resourceGroup().id)}' - image: '${containerRegistry.properties.loginServer}/myfrontend:latest' - env: [ - ] - resources: { - cpu: '0.25' - memory: '0.5Gi' - } - } - ] - } - } -} -resource containerImageBootstrapScript3 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: 'import${uniqueString(resourceGroup().id, 'containerImageBootstrapScript3')}' - location: location - kind: 'AzureCLI' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${acrPushIdentity.id}': { - } - } - } - properties: { - azCliVersion: '2.47.0' - retentionInterval: 'P1D' - scriptContent: 'az acr import --name ${containerRegistry.name} --source mcr.microsoft.com/azuredocs/containerapps-helloworld:latest --resource-group ${resourceGroup().name} --image orderprocessor:latest' - } -} -resource containerApp3 'Microsoft.App/containerApps@2022-03-01' = { - name: 'orderprocessor-${uniqueString(resourceGroup().id)}' - location: location - dependsOn: [ -containerImageBootstrapScript3 ] - identity: { - type: 'SystemAssigned,UserAssigned' - userAssignedIdentities: { - '${acrPullIdentity.id}': { - } - } - } - properties: { - managedEnvironmentId: containerAppEnvironment.id - configuration: { - ingress: { - external: true - targetPort: 80 - } - registries: [ - { - identity: acrPullIdentity.id - server: containerRegistry.properties.loginServer - } - ] - } - template: { - scale: { - minReplicas: 2 - } - containers: [ - { - name: 'container${uniqueString(resourceGroup().id)}' - image: '${containerRegistry.properties.loginServer}/orderprocessor:latest' - env: [ - ] - resources: { - cpu: '0.25' - memory: '0.5Gi' - } - } - ] - } - } -} -resource containerImageBootstrapScript4 'Microsoft.Resources/deploymentScripts@2020-10-01' = { - name: 'import${uniqueString(resourceGroup().id, 'containerImageBootstrapScript4')}' - location: location - kind: 'AzureCLI' - identity: { - type: 'UserAssigned' - userAssignedIdentities: { - '${acrPushIdentity.id}': { - } - } - } - properties: { - azCliVersion: '2.47.0' - retentionInterval: 'P1D' - scriptContent: 'az acr import --name ${containerRegistry.name} --source mcr.microsoft.com/azuredocs/containerapps-helloworld:latest --resource-group ${resourceGroup().name} --image apigateway:latest' - } -} -resource containerApp4 'Microsoft.App/containerApps@2022-03-01' = { - name: 'apigateway-${uniqueString(resourceGroup().id)}' - location: location - dependsOn: [ -containerImageBootstrapScript4 ] - identity: { - type: 'SystemAssigned,UserAssigned' - userAssignedIdentities: { - '${acrPullIdentity.id}': { - } - } - } - properties: { - managedEnvironmentId: containerAppEnvironment.id - configuration: { - ingress: { - external: true - targetPort: 80 - } - registries: [ - { - identity: acrPullIdentity.id - server: containerRegistry.properties.loginServer - } - ] - } - template: { - scale: { - minReplicas: 2 - } - containers: [ - { - name: 'container${uniqueString(resourceGroup().id)}' - image: '${containerRegistry.properties.loginServer}/apigateway:latest' - env: [ - ] - resources: { - cpu: '0.25' - memory: '0.5Gi' - } - } - ] - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/infra/main.bicep dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/infra/main.bicep --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/infra/main.bicep 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/infra/main.bicep 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -targetScope = 'subscription' - -@minLength(1) -@maxLength(64) -@description('Name of the environment that can be used as part of naming resource convention') -param environmentName string - -@minLength(1) -@description('Primary location for all resources') -param location string - -// Tags that should be applied to all resources. -// -// Note that 'azd-service-name' tags should be applied separately to service host resources. -// Example usage: -// tags: union(tags, { 'azd-service-name': }) -var tags = { - 'azd-env-name': environmentName -} - -resource rg 'Microsoft.Resources/resourceGroups@2022-09-01' = { - name: 'rg-${environmentName}' - location: location - tags: tags -} - -// Manually added! -module app 'myapp/app.bicep' = { - name: 'app-${environmentName}' - scope: rg -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/infra/main.parameters.json dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/infra/main.parameters.json --- dotnet8-8.0.102-8.0.2/src/aspire/samples/eShopLite/infra/main.parameters.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspire/samples/eShopLite/infra/main.parameters.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "environmentName": { - "value": "${AZURE_ENV_NAME}" - }, - "location": { - "value": "${AZURE_LOCATION}" - } - } -} diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/NuGet.config dotnet8-8.0.103-8.0.3/src/aspnetcore/NuGet.config --- dotnet8-8.0.102-8.0.2/src/aspnetcore/NuGet.config 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/NuGet.config 2024-03-08 08:33:13.000000000 +0000 @@ -6,10 +6,10 @@ - + - + @@ -30,10 +30,10 @@ - + - + diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Baseline.Designer.props dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Baseline.Designer.props --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Baseline.Designer.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Baseline.Designer.props 2024-03-08 08:33:13.000000000 +0000 @@ -2,117 +2,117 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 @@ -120,137 +120,137 @@ - 8.0.1 + 8.0.2 - + - + - + - + - + - + - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - - + + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - - + + - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - - + + - 8.0.1 + 8.0.2 - - - + + + - 8.0.1 + 8.0.2 - - + + - 8.0.1 + 8.0.2 - - + + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - - + + @@ -258,142 +258,142 @@ - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - + - + - + - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - - + + - + - - + + - + - - + + - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - - + + - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 @@ -402,7 +402,7 @@ - 8.0.1 + 8.0.2 @@ -410,71 +410,71 @@ - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - + - + - + - + - + - + - + - 8.0.1 + 8.0.2 - - + + - + - - + + - 8.0.1 + 8.0.2 - - + + - 8.0.1 + 8.0.2 - - + + - 8.0.1 + 8.0.2 @@ -490,27 +490,27 @@ - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 @@ -519,79 +519,79 @@ - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - - + + - - + + - - + + - 8.0.1 + 8.0.2 - - + + - - + + - - + + - - + + @@ -599,190 +599,190 @@ - 8.0.1 + 8.0.2 - - + + - + - - + + - - - + + + - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - - - - + + + + - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 @@ -798,48 +798,48 @@ - 8.0.1 + 8.0.2 - + - + - + - + - + - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - - - + + + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 @@ -849,7 +849,7 @@ - 8.0.1 + 8.0.2 @@ -858,73 +858,73 @@ - 8.0.1 + 8.0.2 - + - + - + - + - + - + - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - + - + - + - + - + - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 @@ -953,40 +953,40 @@ - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - + - + - 8.0.1 + 8.0.2 - 8.0.1 + 8.0.2 - + - 8.0.1 + 8.0.2 diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Baseline.xml dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Baseline.xml --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Baseline.xml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Baseline.xml 2024-03-08 08:33:13.000000000 +0000 @@ -4,110 +4,110 @@ Update this list when preparing for a new patch. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Dependencies.props dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Dependencies.props --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Dependencies.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Dependencies.props 2024-03-08 08:33:13.000000000 +0000 @@ -186,6 +186,7 @@ + diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Tools.props dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Tools.props --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Tools.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Tools.props 2024-03-08 08:33:13.000000000 +0000 @@ -7,7 +7,7 @@ Since this project is evaluated before .npmproj files are loaded, this should cause the package to end up in the NuGet cache ahead of time. This is not needed in source build. --> - + diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Version.Details.xml dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Version.Details.xml --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Version.Details.xml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Version.Details.xml 2024-03-08 08:33:13.000000000 +0000 @@ -9,37 +9,37 @@ --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - a97f6ffcf78100056683c8c3b116721a89e5c58c + c2f996919858eb11d2836705d47b531b5a174c79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - a97f6ffcf78100056683c8c3b116721a89e5c58c + c2f996919858eb11d2836705d47b531b5a174c79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - a97f6ffcf78100056683c8c3b116721a89e5c58c + c2f996919858eb11d2836705d47b531b5a174c79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - a97f6ffcf78100056683c8c3b116721a89e5c58c + c2f996919858eb11d2836705d47b531b5a174c79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - a97f6ffcf78100056683c8c3b116721a89e5c58c + c2f996919858eb11d2836705d47b531b5a174c79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - a97f6ffcf78100056683c8c3b116721a89e5c58c + c2f996919858eb11d2836705d47b531b5a174c79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - a97f6ffcf78100056683c8c3b116721a89e5c58c + c2f996919858eb11d2836705d47b531b5a174c79 - + https://dev.azure.com/dnceng/internal/_git/dotnet-efcore - a97f6ffcf78100056683c8c3b116721a89e5c58c + c2f996919858eb11d2836705d47b531b5a174c79 https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -89,9 +89,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -121,9 +121,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -137,9 +137,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 5535e31a712343a63f5d7d796cd874e563e5ac14 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -179,15 +179,15 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://github.com/dotnet/source-build-externals @@ -255,9 +255,9 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -275,17 +275,17 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime 5535e31a712343a63f5d7d796cd874e563e5ac14 - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://dev.azure.com/dnceng/internal/_git/dotnet-runtime @@ -316,22 +316,22 @@ Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime. All Runtime.$rid packages should have the same version. --> - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://github.com/dotnet/xdt @@ -368,34 +368,34 @@ - + https://dev.azure.com/dnceng/internal/_git/dotnet-runtime - 1381d5ebd2ab1f292848d5b19b80cf71ac332508 + 9f4b1f5d664afdfc80e1508ab7ed099dff210fbd https://github.com/dotnet/winforms abda8e3bfa78319363526b5a5f86863ec979940e - + https://github.com/dotnet/arcade - 61ae141d2bf3534619265c8f691fd55dc3e75147 + da98edc4c3ea539f109ea320672136ceb32591a7 - + https://github.com/dotnet/arcade - 61ae141d2bf3534619265c8f691fd55dc3e75147 + da98edc4c3ea539f109ea320672136ceb32591a7 - + https://github.com/dotnet/arcade - 61ae141d2bf3534619265c8f691fd55dc3e75147 + da98edc4c3ea539f109ea320672136ceb32591a7 - + https://github.com/dotnet/arcade - 61ae141d2bf3534619265c8f691fd55dc3e75147 + da98edc4c3ea539f109ea320672136ceb32591a7 - + https://github.com/dotnet/arcade - 61ae141d2bf3534619265c8f691fd55dc3e75147 + da98edc4c3ea539f109ea320672136ceb32591a7 https://github.com/dotnet/extensions diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Versions.props dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Versions.props --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/Versions.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/Versions.props 2024-03-08 08:33:13.000000000 +0000 @@ -8,7 +8,7 @@ 8 0 - 2 + 3 true @@ -66,12 +66,12 @@ 8.0.0 - 8.0.2 - 8.0.2 - 8.0.2 - 8.0.2 - 8.0.2 - 8.0.2-servicing.24067.11 + 8.0.3 + 8.0.3 + 8.0.3 + 8.0.3 + 8.0.3 + 8.0.3-servicing.24114.23 8.0.0 8.0.0 8.0.0 @@ -84,7 +84,7 @@ 8.0.0 8.0.0 8.0.0 - 8.0.0 + 8.0.1 8.0.0 8.0.0 8.0.0 @@ -92,11 +92,11 @@ 8.0.0 8.0.0 8.0.0 - 8.0.2-servicing.24067.11 + 8.0.3-servicing.24114.23 8.0.0 8.0.0 8.0.0 - 8.0.0 + 8.0.1 8.0.0 8.0.0 8.0.0 @@ -108,7 +108,7 @@ 8.0.0 8.0.2 8.0.0 - 8.0.2-servicing.24067.11 + 8.0.3-servicing.24114.23 8.0.0 8.0.0 8.0.0 @@ -124,13 +124,13 @@ 8.0.0 8.0.0 8.0.0 - 8.0.2 + 8.0.3 8.0.0 8.0.0 8.0.0 - 8.0.2-servicing.24067.11 + 8.0.3-servicing.24114.23 - 8.0.2-servicing.24067.11 + 8.0.3-servicing.24114.23 8.0.0 8.0.1 @@ -142,14 +142,14 @@ 8.1.0-preview.23604.1 8.1.0-preview.23604.1 - 8.0.2 - 8.0.2 - 8.0.2 - 8.0.2 - 8.0.2 - 8.0.2 - 8.0.2 - 8.0.2 + 8.0.3 + 8.0.3 + 8.0.3 + 8.0.3 + 8.0.3 + 8.0.3 + 8.0.3 + 8.0.3 4.8.0-3.23518.7 4.8.0-3.23518.7 @@ -161,9 +161,9 @@ 6.2.4 6.2.4 - 8.0.0-beta.24059.4 - 8.0.0-beta.24059.4 - 8.0.0-beta.24059.4 + 8.0.0-beta.24113.2 + 8.0.0-beta.24113.2 + 8.0.0-beta.24113.2 8.0.0-alpha.1.24065.1 @@ -285,6 +285,7 @@ $(MicrosoftAspNetCoreAzureAppServicesSiteExtension70Version) $(MicrosoftAspNetCoreAzureAppServicesSiteExtension70Version) + 1.10.2 0.9.9 0.13.0 4.2.1 @@ -313,8 +314,8 @@ 1.28.0 3.0.0 7.2.4 - 4.14.1 - 4.14.1 + 4.17.0 + 4.17.0 1.4.0 4.0.0 2.6.122 @@ -327,7 +328,7 @@ $(XunitVersion) $(XunitVersion) 2.4.3 - 4.0.1 + 4.0.5 6.0.0-preview.3.21167.1 1.4.3 diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/common/post-build/publish-using-darc.ps1 dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/common/post-build/publish-using-darc.ps1 --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/common/post-build/publish-using-darc.ps1 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/common/post-build/publish-using-darc.ps1 2024-03-08 08:33:13.000000000 +0000 @@ -12,7 +12,7 @@ try { . $PSScriptRoot\post-build-utils.ps1 - $darc = Get-Darc + $darc = Get-Darc $optionalParams = [System.Collections.ArrayList]::new() @@ -46,7 +46,7 @@ } Write-Host 'done.' -} +} catch { Write-Host $_ Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to publish build '$BuildId' to default channels." diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/common/templates/job/publish-build-assets.yml dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/common/templates/job/publish-build-assets.yml --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/common/templates/job/publish-build-assets.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/common/templates/job/publish-build-assets.yml 2024-03-08 08:33:13.000000000 +0000 @@ -58,7 +58,7 @@ demands: Cmd # If it's not devdiv, it's dnceng ${{ if ne(variables['System.TeamProject'], 'DevDiv') }}: - name: $(DncEngInternalBuildPool) + name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: @@ -71,7 +71,7 @@ checkDownloadedFiles: true condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: NuGetAuthenticate@1 - task: PowerShell@2 @@ -86,7 +86,7 @@ /p:OfficialBuildId=$(Build.BuildNumber) condition: ${{ parameters.condition }} continueOnError: ${{ parameters.continueOnError }} - + - task: powershell@2 displayName: Create ReleaseConfigs Artifact inputs: @@ -95,7 +95,7 @@ Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId) Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)" Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild) - + - task: PublishBuildArtifacts@1 displayName: Publish ReleaseConfigs Artifact inputs: @@ -121,7 +121,7 @@ - task: PublishBuildArtifacts@1 displayName: Publish SymbolPublishingExclusionsFile Artifact - condition: eq(variables['SymbolExclusionFile'], 'true') + condition: eq(variables['SymbolExclusionFile'], 'true') inputs: PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' PublishLocation: Container @@ -137,7 +137,7 @@ displayName: Publish Using Darc inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + arguments: -BuildId $(BARBuildId) -PublishingInfraVersion 3 -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' -MaestroToken '$(MaestroApiAccessToken)' @@ -148,4 +148,4 @@ - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: - template: /eng/common/templates/steps/publish-logs.yml parameters: - JobLabel: 'Publish_Artifacts_Logs' + JobLabel: 'Publish_Artifacts_Logs' diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/common/templates/post-build/post-build.yml dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/common/templates/post-build/post-build.yml --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/common/templates/post-build/post-build.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/common/templates/post-build/post-build.yml 2024-03-08 08:33:13.000000000 +0000 @@ -39,7 +39,7 @@ displayName: Enable NuGet validation type: boolean default: true - + - name: publishInstallersAndChecksums displayName: Publish installers and checksums type: boolean @@ -131,8 +131,8 @@ displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ - job: displayName: Signing Validation @@ -221,9 +221,9 @@ displayName: Validate inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 - arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ - -ExtractPath $(Agent.BuildDirectory)/Extract/ - -GHRepoName $(Build.Repository.Name) + arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ + -ExtractPath $(Agent.BuildDirectory)/Extract/ + -GHRepoName $(Build.Repository.Name) -GHCommit $(Build.SourceVersion) -SourcelinkCliVersion $(SourceLinkCLIVersion) continueOnError: true @@ -258,7 +258,7 @@ demands: Cmd # If it's not devdiv, it's dnceng ${{ else }}: - name: $(DncEngInternalBuildPool) + name: NetCore1ESPool-Publishing-Internal demands: ImageOverride -equals windows.vs2019.amd64 steps: - template: setup-maestro-vars.yml @@ -272,7 +272,7 @@ displayName: Publish Using Darc inputs: filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-using-darc.ps1 - arguments: -BuildId $(BARBuildId) + arguments: -BuildId $(BARBuildId) -PublishingInfraVersion ${{ parameters.publishingInfraVersion }} -AzdoToken '$(publishing-dnceng-devdiv-code-r-build-re)' -MaestroToken '$(MaestroApiAccessToken)' diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/common/templates/variables/pool-providers.yml dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/common/templates/variables/pool-providers.yml --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/common/templates/variables/pool-providers.yml 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/common/templates/variables/pool-providers.yml 2024-03-08 08:33:13.000000000 +0000 @@ -1,15 +1,15 @@ -# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, +# Select a pool provider based off branch name. Anything with branch name containing 'release' must go into an -Svc pool, # otherwise it should go into the "normal" pools. This separates out the queueing and billing of released branches. -# Motivation: +# Motivation: # Once a given branch of a repository's output has been officially "shipped" once, it is then considered to be COGS # (Cost of goods sold) and should be moved to a servicing pool provider. This allows both separation of queueing # (allowing release builds and main PR builds to not intefere with each other) and billing (required for COGS. -# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services -# team needs to move resources around and create new and potentially differently-named pools. Using this template +# Additionally, the pool provider name itself may be subject to change when the .NET Core Engineering Services +# team needs to move resources around and create new and potentially differently-named pools. Using this template # file from an Arcade-ified repo helps guard against both having to update one's release/* branches and renaming. -# How to use: +# How to use: # This yaml assumes your shipped product branches use the naming convention "release/..." (which many do). # If we find alternate naming conventions in broad usage it can be added to the condition below. # @@ -54,4 +54,4 @@ False, 'NetCore1ESPool-Internal' ) - ] \ No newline at end of file + ] diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/targets/Wix.Common.props dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/targets/Wix.Common.props --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/targets/Wix.Common.props 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/targets/Wix.Common.props 2024-03-08 08:33:13.000000000 +0000 @@ -4,7 +4,7 @@ 2.0 3.14 - 1.0.0-v3.14.0.5722 + 3.14.0-8606.20240208.1 diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/tools/RepoTasks/RepoTasks.csproj dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/tools/RepoTasks/RepoTasks.csproj --- dotnet8-8.0.102-8.0.2/src/aspnetcore/eng/tools/RepoTasks/RepoTasks.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/eng/tools/RepoTasks/RepoTasks.csproj 2024-03-08 08:33:13.000000000 +0000 @@ -34,7 +34,7 @@ - + diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/global.json dotnet8-8.0.103-8.0.3/src/aspnetcore/global.json --- dotnet8-8.0.102-8.0.2/src/aspnetcore/global.json 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/global.json 2024-03-08 08:33:13.000000000 +0000 @@ -1,9 +1,9 @@ { "sdk": { - "version": "8.0.101" + "version": "8.0.102" }, "tools": { - "dotnet": "8.0.101", + "dotnet": "8.0.102", "runtimes": { "dotnet/x86": [ "$(MicrosoftNETCoreBrowserDebugHostTransportVersion)" @@ -26,8 +26,8 @@ "xcopy-msbuild": "17.1.0" }, "msbuild-sdks": { - "Yarn.MSBuild": "1.22.10", - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24059.4", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24059.4" + "Yarn.MSBuild": "1.22.19", + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24113.2", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.24113.2" } } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Caching/SqlServer/src/Microsoft.Extensions.Caching.SqlServer.csproj 2024-03-08 08:33:13.000000000 +0000 @@ -19,6 +19,7 @@ + diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Microsoft.AspNetCore.Components.csproj 2024-03-08 08:33:13.000000000 +0000 @@ -19,10 +19,11 @@ + - + diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/RenderTree/Renderer.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/RenderTree/Renderer.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/RenderTree/Renderer.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/RenderTree/Renderer.cs 2024-03-08 08:33:13.000000000 +0000 @@ -1065,6 +1065,15 @@ // already on the sync context (and if not, we have a bug we want to know about). Dispatcher.AssertAccess(); + // We don't allow NavigationException instances to be caught by error boundaries. + // These are special exceptions whose purpose is to be as invisible as possible to + // user code and bubble all the way up to get handled by the framework as a redirect. + if (error is NavigationException) + { + HandleException(error); + return; + } + // Find the closest error boundary, if any var candidate = errorSourceOrNull; while (candidate is not null) diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Routing/QueryParameterValueSupplier.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Routing/QueryParameterValueSupplier.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Routing/QueryParameterValueSupplier.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Routing/QueryParameterValueSupplier.cs 2024-03-08 08:33:13.000000000 +0000 @@ -51,10 +51,4 @@ return default; } - - public static bool CanSupplyValueForType(Type targetType) - { - var elementType = targetType.IsArray ? targetType.GetElementType()! : targetType; - return UrlValueConstraint.TryGetByTargetType(elementType, out _); - } } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Routing/RouteContext.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Routing/RouteContext.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Routing/RouteContext.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Routing/RouteContext.cs 2024-03-08 08:33:13.000000000 +0000 @@ -1,7 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Buffers; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Text; +using Microsoft.AspNetCore.Internal; using Microsoft.AspNetCore.Routing.Tree; using static Microsoft.AspNetCore.Internal.LinkerFlags; @@ -11,7 +15,28 @@ { public RouteContext(string path) { - Path = Uri.UnescapeDataString(path); + Path = path.Contains('%') ? GetDecodedPath(path) : path; + + [SkipLocalsInit] + static string GetDecodedPath(string path) + { + using var uriBuffer = path.Length < 128 ? + new UriBuffer(stackalloc byte[path.Length]) : + new UriBuffer(path.Length); + + var utf8Span = uriBuffer.Buffer; + + if (Encoding.UTF8.TryGetBytes(path.AsSpan(), utf8Span, out var written)) + { + utf8Span = utf8Span[..written]; + var decodedLength = UrlDecoder.DecodeInPlace(utf8Span, isFormEncoding: false); + utf8Span = utf8Span[..decodedLength]; + path = Encoding.UTF8.GetString(utf8Span); + return path; + } + + return path; + } } public string Path { get; set; } @@ -24,4 +49,27 @@ public Type? Handler => Entry?.Handler; public IReadOnlyDictionary? Parameters => RouteValues; + + private readonly ref struct UriBuffer + { + private readonly byte[]? _pooled; + + public Span Buffer { get; } + + public UriBuffer(int length) + { + _pooled = ArrayPool.Shared.Rent(length); + Buffer = _pooled.AsSpan(0, length); + } + + public UriBuffer(Span buffer) => Buffer = buffer; + + public void Dispose() + { + if (_pooled != null) + { + ArrayPool.Shared.Return(_pooled); + } + } + } } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Routing/RouteTable.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Routing/RouteTable.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Routing/RouteTable.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Routing/RouteTable.cs 2024-03-08 08:33:13.000000000 +0000 @@ -28,6 +28,18 @@ ((Type page, string template) key) => RouteTableFactory.CreateEntry(key.page, key.template)); var routeValueDictionary = new RouteValueDictionary(endpointRouteData.RouteValues); + foreach (var kvp in endpointRouteData.RouteValues) + { + if (kvp.Value is string value) + { + // At this point the values have already been URL decoded, but we might not have decoded '/' characters. + // as that can cause issues when routing the request (You wouldn't be able to accept parameters that contained '/'). + // To be consistent with existing Blazor quirks that used Uri.UnescapeDataString, we'll replace %2F with /. + // We don't want to call Uri.UnescapeDataString here as that would decode other characters that we don't want to decode, + // for example, any value that was "double" encoded (for whatever reason) within the original URL. + routeValueDictionary[kvp.Key] = value.Replace("%2F", "/", StringComparison.OrdinalIgnoreCase); + } + } ProcessParameters(entry, routeValueDictionary); return new RouteData(endpointRouteData.PageType, routeValueDictionary) { @@ -66,6 +78,19 @@ } } + foreach (var kvp in routeValues) + { + if (kvp.Value is string value) + { + // At this point the values have already been URL decoded, but we might not have decoded '/' characters. + // as that can cause issues when routing the request (You wouldn't be able to accept parameters that contained '/'). + // To be consistent with existing Blazor quirks that used Uri.UnescapeDataString, we'll replace %2F with /. + // We don't want to call Uri.UnescapeDataString here as that would decode other characters that we don't want to decode, + // for example, any value that was "double" encoded (for whatever reason) within the original URL. + routeValues[kvp.Key] = value.Replace("%2F", "/", StringComparison.OrdinalIgnoreCase); + } + } + foreach (var parameter in entry.RoutePattern.Parameters) { // Add null values for optional route parameters that weren't provided. diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Routing/SupplyParameterFromQueryValueProvider.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Routing/SupplyParameterFromQueryValueProvider.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/Routing/SupplyParameterFromQueryValueProvider.cs 1970-01-01 00:00:00.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/Routing/SupplyParameterFromQueryValueProvider.cs 2024-03-08 08:33:13.000000000 +0000 @@ -0,0 +1,152 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using Microsoft.AspNetCore.Components.Rendering; + +namespace Microsoft.AspNetCore.Components.Routing; + +internal sealed class SupplyParameterFromQueryValueProvider(NavigationManager navigationManager) : ICascadingValueSupplier, IDisposable +{ + private QueryParameterValueSupplier? _queryParameterValueSupplier; + + private HashSet? _subscribers; + private HashSet? _pendingSubscribers; + + private string? _lastUri; + private bool _isSubscribedToLocationChanges; + private bool _queryChanged; + + public bool IsFixed => false; + + public bool CanSupplyValue(in CascadingParameterInfo parameterInfo) + => parameterInfo.Attribute is SupplyParameterFromQueryAttribute; + + public object? GetCurrentValue(in CascadingParameterInfo parameterInfo) + { + TryUpdateUri(); + + var attribute = (SupplyParameterFromQueryAttribute)parameterInfo.Attribute; // Must be a valid cast because we check in CanSupplyValue + var queryParameterName = attribute.Name ?? parameterInfo.PropertyName; + return _queryParameterValueSupplier.GetQueryParameterValue(parameterInfo.PropertyType, queryParameterName); + } + + public void Subscribe(ComponentState subscriber, in CascadingParameterInfo parameterInfo) + { + if (_pendingSubscribers?.Count > 0 || (TryUpdateUri() && _isSubscribedToLocationChanges)) + { + // Renderer.RenderInExistingBatch triggers Unsubscribe via ProcessDisposalQueueInExistingBatch after subscribing with any new components, + // so this branch should be taken iff there's a pending OnLocationChanged event for the current Uri that we're already subscribed to. + _pendingSubscribers ??= new(); + _pendingSubscribers.Add(subscriber); + return; + } + + _subscribers ??= new(); + _subscribers.Add(subscriber); + SubscribeToLocationChanges(); + } + + public void Unsubscribe(ComponentState subscriber, in CascadingParameterInfo parameterInfo) + { + // ICascadingValueSupplier is internal, and Subscribe should always precede Unsubscribe. + Debug.Assert(_subscribers is not null); + _subscribers.Remove(subscriber); + _pendingSubscribers?.Remove(subscriber); + + if (_subscribers.Count == 0 && _pendingSubscribers is null or { Count: 0 }) + { + UnsubscribeFromLocationChanges(); + } + } + + [MemberNotNull(nameof(_queryParameterValueSupplier))] + private bool TryUpdateUri() + { + _queryParameterValueSupplier ??= new(); + + // NavigationManager triggers Router.OnLocationChanged which calls GetCurrentValue before this class's OnLocationHandler + // gets a chance to run, so we have to compare strings rather than rely on OnLocationChanged always running before Uri updates. + if (navigationManager.Uri == _lastUri) + { + return false; + } + + var query = GetQueryString(navigationManager.Uri); + + if (!query.Span.SequenceEqual(GetQueryString(_lastUri).Span)) + { + _queryChanged = true; + _queryParameterValueSupplier.ReadParametersFromQuery(query); + } + + _lastUri = navigationManager.Uri; + return true; + + static ReadOnlyMemory GetQueryString(string? url) + { + var queryStartPos = url?.IndexOf('?') ?? -1; + + if (queryStartPos < 0) + { + return default; + } + + Debug.Assert(url is not null); + var queryEndPos = url.IndexOf('#', queryStartPos); + return url.AsMemory(queryStartPos..(queryEndPos < 0 ? url.Length : queryEndPos)); + } + } + + private void SubscribeToLocationChanges() + { + if (_isSubscribedToLocationChanges) + { + return; + } + + _isSubscribedToLocationChanges = true; + navigationManager.LocationChanged += OnLocationChanged; + } + + private void UnsubscribeFromLocationChanges() + { + if (!_isSubscribedToLocationChanges) + { + return; + } + + _isSubscribedToLocationChanges = false; + navigationManager.LocationChanged -= OnLocationChanged; + } + + private void OnLocationChanged(object? sender, LocationChangedEventArgs args) + { + Debug.Assert(_subscribers is not null); + + TryUpdateUri(); + + if (_queryChanged) + { + foreach (var subscriber in _subscribers) + { + subscriber.NotifyCascadingValueChanged(ParameterViewLifetime.Unbound); + } + + _queryChanged = false; + } + + if (_pendingSubscribers is not null) + { + foreach (var subscriber in _pendingSubscribers) + { + _subscribers.Add(subscriber); + } + + _pendingSubscribers.Clear(); + } + } + + public void Dispose() => UnsubscribeFromLocationChanges(); +} diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/SupplyParameterFromQueryProviderServiceCollectionExtensions.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/SupplyParameterFromQueryProviderServiceCollectionExtensions.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Components/src/SupplyParameterFromQueryProviderServiceCollectionExtensions.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Components/src/SupplyParameterFromQueryProviderServiceCollectionExtensions.cs 2024-03-08 08:33:13.000000000 +0000 @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.AspNetCore.Components.Rendering; using Microsoft.AspNetCore.Components.Routing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -20,118 +19,7 @@ /// The . public static IServiceCollection AddSupplyValueFromQueryProvider(this IServiceCollection services) { - services.TryAddEnumerable(ServiceDescriptor.Scoped()); + services.TryAddEnumerable(ServiceDescriptor.Scoped()); return services; } - - internal sealed class SupplyValueFromQueryValueProvider : ICascadingValueSupplier, IDisposable - { - private readonly QueryParameterValueSupplier _queryParameterValueSupplier = new(); - private readonly NavigationManager _navigationManager; - private HashSet? _subscribers; - private bool _isSubscribedToLocationChanges; - private bool _queryParametersMightHaveChanged = true; - - public SupplyValueFromQueryValueProvider(NavigationManager navigationManager) - { - _navigationManager = navigationManager; - } - - public bool IsFixed => false; - - public bool CanSupplyValue(in CascadingParameterInfo parameterInfo) - => parameterInfo.Attribute is SupplyParameterFromQueryAttribute; - - public object? GetCurrentValue(in CascadingParameterInfo parameterInfo) - { - if (_queryParametersMightHaveChanged) - { - _queryParametersMightHaveChanged = false; - UpdateQueryParameters(); - } - - var attribute = (SupplyParameterFromQueryAttribute)parameterInfo.Attribute; // Must be a valid cast because we check in CanSupplyValue - var queryParameterName = attribute.Name ?? parameterInfo.PropertyName; - return _queryParameterValueSupplier.GetQueryParameterValue(parameterInfo.PropertyType, queryParameterName); - } - - public void Subscribe(ComponentState subscriber, in CascadingParameterInfo parameterInfo) - { - SubscribeToLocationChanges(); - - _subscribers ??= new(); - _subscribers.Add(subscriber); - } - - public void Unsubscribe(ComponentState subscriber, in CascadingParameterInfo parameterInfo) - { - _subscribers!.Remove(subscriber); - - if (_subscribers.Count == 0) - { - UnsubscribeFromLocationChanges(); - } - } - - private void UpdateQueryParameters() - { - var query = GetQueryString(_navigationManager.Uri); - - _queryParameterValueSupplier.ReadParametersFromQuery(query); - - static ReadOnlyMemory GetQueryString(string url) - { - var queryStartPos = url.IndexOf('?'); - - if (queryStartPos < 0) - { - return default; - } - - var queryEndPos = url.IndexOf('#', queryStartPos); - return url.AsMemory(queryStartPos..(queryEndPos < 0 ? url.Length : queryEndPos)); - } - } - - private void SubscribeToLocationChanges() - { - if (_isSubscribedToLocationChanges) - { - return; - } - - _isSubscribedToLocationChanges = true; - _queryParametersMightHaveChanged = true; - _navigationManager.LocationChanged += OnLocationChanged; - } - - private void UnsubscribeFromLocationChanges() - { - if (!_isSubscribedToLocationChanges) - { - return; - } - - _isSubscribedToLocationChanges = false; - _navigationManager.LocationChanged -= OnLocationChanged; - } - - private void OnLocationChanged(object? sender, LocationChangedEventArgs args) - { - _queryParametersMightHaveChanged = true; - - if (_subscribers is not null) - { - foreach (var subscriber in _subscribers) - { - subscriber.NotifyCascadingValueChanged(ParameterViewLifetime.Unbound); - } - } - } - - public void Dispose() - { - UnsubscribeFromLocationChanges(); - } - } } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/src/Builder/RazorComponentEndpointDataSource.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/src/Builder/RazorComponentEndpointDataSource.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/src/Builder/RazorComponentEndpointDataSource.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/src/Builder/RazorComponentEndpointDataSource.cs 2024-03-08 08:33:13.000000000 +0000 @@ -28,6 +28,9 @@ private List? _endpoints; private CancellationTokenSource _cancellationTokenSource; private IChangeToken _changeToken; + private IDisposable? _disposableChangeToken; // THREADING: protected by _lock + + public Func SetDisposableChangeTokenAction = disposableChangeToken => disposableChangeToken; // Internal for testing. internal ComponentApplicationBuilder Builder => _builder; @@ -45,6 +48,7 @@ _renderModeEndpointProviders = renderModeEndpointProviders.ToArray(); _factory = factory; _hotReloadService = hotReloadService; + HotReloadService.ClearCacheEvent += OnHotReloadClearCache; DefaultBuilder = new RazorComponentsEndpointConventionBuilder( _lock, builder, @@ -139,12 +143,23 @@ _cancellationTokenSource = new CancellationTokenSource(); _changeToken = new CancellationChangeToken(_cancellationTokenSource.Token); oldCancellationTokenSource?.Cancel(); + oldCancellationTokenSource?.Dispose(); if (_hotReloadService is { MetadataUpdateSupported : true }) { - ChangeToken.OnChange(_hotReloadService.GetChangeToken, UpdateEndpoints); + _disposableChangeToken?.Dispose(); + _disposableChangeToken = SetDisposableChangeTokenAction(ChangeToken.OnChange(_hotReloadService.GetChangeToken, UpdateEndpoints)); } } } + + public void OnHotReloadClearCache(Type[]? types) + { + lock (_lock) + { + _disposableChangeToken?.Dispose(); + _disposableChangeToken = null; + } + } public override IChangeToken GetChangeToken() { diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/src/DependencyInjection/HotReloadService.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/src/DependencyInjection/HotReloadService.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/src/DependencyInjection/HotReloadService.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/src/DependencyInjection/HotReloadService.cs 2024-03-08 08:33:13.000000000 +0000 @@ -18,6 +18,7 @@ private CancellationTokenSource _tokenSource = new(); private static event Action? UpdateApplicationEvent; + internal static event Action? ClearCacheEvent; public bool MetadataUpdateSupported { get; internal set; } @@ -27,11 +28,17 @@ { UpdateApplicationEvent?.Invoke(changedTypes); } + + public static void ClearCache(Type[]? types) + { + ClearCacheEvent?.Invoke(types); + } private void NotifyUpdateApplication(Type[]? changedTypes) { var current = Interlocked.Exchange(ref _tokenSource, new CancellationTokenSource()); current.Cancel(); + current.Dispose(); } public void Dispose() diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/src/DependencyInjection/HttpNavigationManager.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/src/DependencyInjection/HttpNavigationManager.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/src/DependencyInjection/HttpNavigationManager.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/src/DependencyInjection/HttpNavigationManager.cs 2024-03-08 08:33:13.000000000 +0000 @@ -11,7 +11,7 @@ protected override void NavigateToCore(string uri, NavigationOptions options) { - var absoluteUriString = ToAbsoluteUri(uri).ToString(); + var absoluteUriString = ToAbsoluteUri(uri).AbsoluteUri; throw new NavigationException(absoluteUriString); } } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/test/HotReloadServiceTests.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/test/HotReloadServiceTests.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/test/HotReloadServiceTests.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/test/HotReloadServiceTests.cs 2024-03-08 08:33:13.000000000 +0000 @@ -137,6 +137,52 @@ Assert.Empty(compositeEndpointDataSource.Endpoints); } + private sealed class WrappedChangeTokenDisposable : IDisposable + { + public bool IsDisposed { get; private set; } + private readonly IDisposable _innerDisposable; + + public WrappedChangeTokenDisposable(IDisposable innerDisposable) + { + _innerDisposable = innerDisposable; + } + + public void Dispose() + { + IsDisposed = true; + _innerDisposable.Dispose(); + } + } + + [Fact] + public void ConfirmChangeTokenDisposedHotReload() + { + // Arrange + var builder = CreateBuilder(typeof(ServerComponent)); + var services = CreateServices(typeof(MockEndpointProvider)); + var endpointDataSource = CreateDataSource(builder, services); + + WrappedChangeTokenDisposable wrappedChangeTokenDisposable = null; + + endpointDataSource.SetDisposableChangeTokenAction = (IDisposable disposableChangeToken) => { + wrappedChangeTokenDisposable = new WrappedChangeTokenDisposable(disposableChangeToken); + return wrappedChangeTokenDisposable; + }; + + var endpoint = Assert.IsType(Assert.Single(endpointDataSource.Endpoints)); + Assert.Equal("/server", endpoint.RoutePattern.RawText); + Assert.DoesNotContain(endpoint.Metadata, (element) => element is TestMetadata); + + // Make a modification and then perform a hot reload. + endpointDataSource.Conventions.Add(builder => + builder.Metadata.Add(new TestMetadata())); + HotReloadService.UpdateApplication(null); + HotReloadService.ClearCache(null); + + // Confirm the change token is disposed after ClearCache + Assert.True(wrappedChangeTokenDisposable.IsDisposed); + } + private class TestMetadata { } private ComponentApplicationBuilder CreateBuilder(params Type[] types) diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/test/RazorComponentResultTest.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/test/RazorComponentResultTest.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/test/RazorComponentResultTest.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/test/RazorComponentResultTest.cs 2024-03-08 08:33:13.000000000 +0000 @@ -516,7 +516,7 @@ protected override void NavigateToCore(string uri, NavigationOptions options) { // Equivalent to what RemoteNavigationManager would do - var absoluteUriString = ToAbsoluteUri(uri).ToString(); + var absoluteUriString = ToAbsoluteUri(uri).AbsoluteUri; throw new NavigationException(absoluteUriString); } } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/test/RazorComponentsServiceCollectionExtensionsTest.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/test/RazorComponentsServiceCollectionExtensionsTest.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Endpoints/test/RazorComponentsServiceCollectionExtensionsTest.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Endpoints/test/RazorComponentsServiceCollectionExtensionsTest.cs 2024-03-08 08:33:13.000000000 +0000 @@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms.Mapping; +using Microsoft.AspNetCore.Components.Routing; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.FileProviders; @@ -90,7 +91,7 @@ [typeof(ICascadingValueSupplier)] = new[] { typeof(SupplyParameterFromFormValueProvider), - typeof(SupplyParameterFromQueryProviderServiceCollectionExtensions.SupplyValueFromQueryValueProvider), + typeof(SupplyParameterFromQueryValueProvider), } }; } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Forms/src/FieldIdentifier.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Forms/src/FieldIdentifier.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Forms/src/FieldIdentifier.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Forms/src/FieldIdentifier.cs 2024-03-08 08:33:13.000000000 +0000 @@ -4,6 +4,7 @@ using System.Collections.Concurrent; using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; +using System.Reflection; using System.Runtime.CompilerServices; using Microsoft.AspNetCore.Components.HotReload; @@ -15,7 +16,7 @@ /// public readonly struct FieldIdentifier : IEquatable { - private static readonly ConcurrentDictionary<(Type ModelType, string FieldName), Func> _fieldAccessors = new(); + private static readonly ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func> _fieldAccessors = new(); static FieldIdentifier() { @@ -151,7 +152,7 @@ internal static object GetModelFromMemberAccess( MemberExpression member, - ConcurrentDictionary<(Type ModelType, string FieldName), Func>? cache = null) + ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func>? cache = null) { cache ??= _fieldAccessors; Func? accessor = null; @@ -160,7 +161,7 @@ { case ConstantExpression model: value = model.Value ?? throw new ArgumentException("The provided expression must evaluate to a non-null value."); - accessor = cache.GetOrAdd((value.GetType(), member.Member.Name), CreateAccessor); + accessor = cache.GetOrAdd((value.GetType(), member.Member), CreateAccessor); break; default: break; @@ -183,11 +184,12 @@ "Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "Application code does not get trimmed. We expect the members in the expression to not be trimmed.")] - static Func CreateAccessor((Type model, string member) arg) + static Func CreateAccessor((Type model, MemberInfo member) arg) { var parameter = Expression.Parameter(typeof(object), "value"); Expression expression = Expression.Convert(parameter, arg.model); - expression = Expression.PropertyOrField(expression, arg.member); + + expression = Expression.MakeMemberAccess(expression, arg.member); expression = Expression.Convert(expression, typeof(object)); var lambda = Expression.Lambda>(expression, parameter); diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Forms/test/FieldIdentifierTest.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Forms/test/FieldIdentifierTest.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Forms/test/FieldIdentifierTest.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Forms/test/FieldIdentifierTest.cs 2024-03-08 08:33:13.000000000 +0000 @@ -3,6 +3,7 @@ using System.Collections.Concurrent; using System.Linq.Expressions; +using System.Reflection; namespace Microsoft.AspNetCore.Components.Forms; @@ -142,7 +143,7 @@ public void CanCreateFromExpression_PropertyUsesCache() { var models = new TestModel[] { new TestModel(), new TestModel() }; - var cache = new ConcurrentDictionary<(Type ModelType, string FieldName), Func>(); + var cache = new ConcurrentDictionary<(Type ModelType, MemberInfo FieldName), Func>(); var result = new TestModel[2]; for (var i = 0; i < models.Length; i++) { @@ -221,6 +222,53 @@ Assert.Equal(nameof(TestModel.StringField), fieldIdentifier.FieldName); } + [Fact] + public void CanCreateFromExpression_DifferentCaseField() + { + var fieldIdentifier = FieldIdentifier.Create(() => model.Field); + Assert.Same(model, fieldIdentifier.Model); + Assert.Equal(nameof(model.Field), fieldIdentifier.FieldName); + } + + private DifferentCaseFieldModel model = new() { Field = 1 }; +#pragma warning disable CA1823 // This is used in the test above + private DifferentCaseFieldModel Model = new() { field = 2 }; +#pragma warning restore CA1823 // Avoid unused private fields + + [Fact] + public void CanCreateFromExpression_DifferentCaseProperty() + { + var fieldIdentifier = FieldIdentifier.Create(() => Model2.Property); + Assert.Same(Model2, fieldIdentifier.Model); + Assert.Equal(nameof(Model2.Property), fieldIdentifier.FieldName); + } + + protected DifferentCasePropertyModel Model2 { get; } = new() { property = 1 }; + + protected DifferentCasePropertyModel model2 { get; } = new() { Property = 2 }; + + [Fact] + public void CanCreateFromExpression_DifferentCasePropertyAndField() + { + var fieldIdentifier = FieldIdentifier.Create(() => model3.Value); + Assert.Same(model3, fieldIdentifier.Model); + Assert.Equal(nameof(Model3.Value), fieldIdentifier.FieldName); + } + + [Fact] + public void CanCreateFromExpression_NonAsciiCharacters() + { + var fieldIdentifier = FieldIdentifier.Create(() => @ÖvrigAnställning.Ort); + Assert.Same(@ÖvrigAnställning, fieldIdentifier.Model); + Assert.Equal(nameof(@ÖvrigAnställning.Ort), fieldIdentifier.FieldName); + } + + public DifferentCasePropertyFieldModel Model3 { get; } = new() { value = 1 }; + + public DifferentCasePropertyFieldModel model3 = new() { Value = 2 }; + + public ÖvrigAnställningModel @ÖvrigAnställning { get; set; } = new(); + string StringPropertyOnThisClass { get; set; } class TestModel @@ -253,4 +301,27 @@ return StringComparer.Ordinal.GetHashCode(Property); } } + + public class ÖvrigAnställningModel + { + public int Ort { get; set; } + } + + private class DifferentCaseFieldModel + { + public int Field; + public int field; + } + + protected class DifferentCasePropertyModel + { + public int Property { get; set; } + public int property { get; set; } + } + + public class DifferentCasePropertyFieldModel + { + public int Value { get; set; } + public int value; + } } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Server/src/Circuits/RemoteNavigationManager.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Server/src/Circuits/RemoteNavigationManager.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Server/src/Circuits/RemoteNavigationManager.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Server/src/Circuits/RemoteNavigationManager.cs 2024-03-08 08:33:13.000000000 +0000 @@ -87,7 +87,7 @@ if (_jsRuntime == null) { - var absoluteUriString = ToAbsoluteUri(uri).ToString(); + var absoluteUriString = ToAbsoluteUri(uri).AbsoluteUri; throw new NavigationException(absoluteUriString); } @@ -128,7 +128,7 @@ { if (_jsRuntime == null) { - var absoluteUriString = ToAbsoluteUri(Uri).ToString(); + var absoluteUriString = ToAbsoluteUri(Uri).AbsoluteUri; throw new NavigationException(absoluteUriString); } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Server/src/DependencyInjection/ComponentServiceCollectionExtensions.cs 2024-03-08 08:33:13.000000000 +0000 @@ -61,12 +61,12 @@ // user's configuration. So even if the user has multiple independent server-side // Components entrypoints, this lot is the same and repeated registrations are a no-op. services.TryAddSingleton(); - services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddSingleton(); + services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.server.js dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.server.js --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.server.js 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.server.js 2024-03-08 08:33:13.000000000 +0000 @@ -1 +1 @@ -(()=>{var e={778:()=>{},77:()=>{},203:()=>{},200:()=>{},628:()=>{},321:()=>{}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";var e,t,r;!function(e){const t=[],n="__jsObjectId",r="__dotNetObject",o="__byte[]",s="__dotNetStream",i="__jsStreamReferenceLength";let a,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,r=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in r))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=r,r=r[t]})),r instanceof Function)return r=r.bind(n),this._cachedFunctions.set(e,r),r;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const h={0:new l(window)};h[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let d,u=1;function p(e){t.push(e)}function f(e){if(e&&"object"==typeof e){h[u]=new l(e);const t={[n]:u};return u++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function g(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const r={[i]:t};try{const t=f(e);r[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return r}function m(e,n){c=e;const r=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,r}function v(){if(void 0===a)throw new Error("No call dispatcher has been set.");if(null===a)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return a}e.attachDispatcher=function(e){const t=new y(e);return void 0===a?a=t:a&&(a=null),t},e.attachReviver=p,e.invokeMethod=function(e,t,...n){return v().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return v().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=f,e.createJSStreamReference=g,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&b(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(d=e.JSCallResultType||(e.JSCallResultType={}));class y{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,r){const o=m(this,t),s=I(_(e,r)(...o||[]),n);return null==s?null:T(this,s)}beginInvokeJSFromDotNet(e,t,n,r,o){const s=new Promise((e=>{const r=m(this,n);e(_(t,o)(...r||[]))}));e&&s.then((t=>T(this,[e,!0,I(t,r)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,w(t)]))))}endInvokeDotNetFromJS(e,t,n){const r=t?m(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,r)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,r){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const o=T(this,r),s=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,o);return s?m(this,s):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,r){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const o=this._nextAsyncCallId++,s=new Promise(((e,t)=>{this._pendingAsyncCalls[o]={resolve:e,reject:t}}));try{const s=T(this,r);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(o,e,t,n,s)}catch(e){this.completePendingCall(o,!1,e)}return s}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new C;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new C;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const r=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?r.resolve(n):r.reject(n)}}function w(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function _(e,t){const n=h[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function b(e){delete h[e]}e.findJSFunction=_,e.disposeJSObjectReferenceById=b;class S{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[r]:this._id}}}e.DotNetObject=S,p((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(r))return new S(t[r],c);if(t.hasOwnProperty(n)){const e=t[n],r=h[e];if(r)return r.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(o)){const e=t[o],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(s)){const e=t[s],n=c.getDotNetStreamPromise(e);return new E(n)}}return t}));class E{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class C{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function I(e,t){switch(t){case d.Default:return e;case d.JSObjectReference:return f(e);case d.JSStreamReference:return g(e);case d.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let k=0;function T(e,t){k=0,c=e;const n=JSON.stringify(t,D);return c=void 0,n}function D(e,t){if(t instanceof S)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(k,t);const e={[o]:k};return k++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t||(t={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(r||(r={}));class o{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new o(e,t.value)}return null}}const s=new Map,i=new Map,a=[];function c(e){return s.get(e)}function l(e){const t=s.get(e);return(null==t?void 0:t.browserEventName)||e}function h(e,t){e.forEach((e=>s.set(e,t)))}function d(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),h(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),h(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...u(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),h(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),h(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),h(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>u(e)}),h(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),h(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),h(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:d(t.touches),targetTouches:d(t.targetTouches),changedTouches:d(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),h(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...u(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),h(["wheel","mousewheel"],{createEventArgs:e=>{return{...u(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),h(["cancel","close","toggle"],{createEventArgs:()=>({})});const p=["date","datetime-local","month","time","week"],f=new Map;let g,m,v=0;const y={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const r="__bl-dynamic-root:"+(++v).toString();f.set(r,e);const o=await b().invokeMethodAsync("AddRootComponent",t,r),s=new _(o,m[t]);return await s.setParameters(n),s}};class w{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class _{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new w)}setParameters(e){const t={},n=Object.entries(e||{}),r=n.length;for(const[e,r]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&r?(n.setCallback(r),t[e]=n.getJSObjectReference()):t[e]=r}return b().invokeMethodAsync("SetRootComponentParameters",this._componentId,r,t)}async dispose(){if(null!==this._componentId){await b().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function b(){if(!g)throw new Error("Dynamic root components have not been enabled in this application.");return g}const S=new Map,E=[],C=new Map;function I(t,n,r,o){var s,i;if(S.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);S.set(t,n),r&&o&&Object.keys(r).length>0&&function(t,n,r){if(g)throw new Error("Dynamic root components have already been enabled.");g=t,m=n;for(const[t,o]of Object.entries(r)){const r=e.findJSFunction(t,0);for(const e of o)r(e,n[e])}}(T(t),r,o),null===(i=null===(s=C.get(t))||void 0===s?void 0:s[0])||void 0===i||i.call(s),function(e){for(const t of E)t(e)}(t)}function k(e,t,n){return D(e,t.eventHandlerId,(()=>T(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function T(e){const t=S.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let D=(e,t,n)=>n();const R=M(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),x={submit:!0},A=M(["click","dblclick","mousedown","mousemove","mouseup"]);class P{constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++P.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new N(this.onGlobalEvent.bind(this))}setListener(e,t,n,r){const o=this.getEventHandlerInfosForElement(e,!0),s=o.getHandler(t);if(s)this.eventInfoStore.update(s.eventHandlerId,n);else{const s={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(s),o.setHandler(t,s)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,i.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let r=n.shift(),s=null,i=!1;const a=Object.prototype.hasOwnProperty.call(R,e);let l=!1;for(;r;){const u=r,p=this.getEventHandlerInfosForElement(u,!1);if(p){const n=p.getHandler(e);if(n&&(h=u,d=t.type,!((h instanceof HTMLButtonElement||h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||h instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(A,d)&&h.disabled))){if(!i){const n=c(e);s=(null==n?void 0:n.createEventArgs)?n.createEventArgs(t):{},i=!0}Object.prototype.hasOwnProperty.call(x,t.type)&&t.preventDefault(),k(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:o.fromEvent(n.renderingComponentId,t)},s)}p.stopPropagation(e)&&(l=!0),p.preventDefault(e)&&t.preventDefault()}r=a||l?void 0:n.shift()}var h,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new U:null}}P.nextEventDelegatorId=0;class N{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},a.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=l(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(R,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=l(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class U{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function M(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const B=Symbol(),L=Symbol(),$=Symbol();function O(e,t){if(B in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const r=O(t,!0);r[L]=e,n.push(r)}))}return e[B]=n,e}function F(e){const t=K(e);for(;t.length;)W(e,0)}function H(e,t){const n=document.createComment("!");return j(n,e,t),n}function j(e,t,n){const r=e;let o=e;if(e instanceof Comment){const t=K(r);if((null==t?void 0:t.length)>0){const t=Q(r),n=new Range;n.setStartBefore(e),n.setEndAfter(t),o=n.extractContents()}}const s=z(r);if(s){const e=K(s),t=Array.prototype.indexOf.call(e,r);e.splice(t,1),delete r[L]}const i=K(t);if(n0;)W(n,0)}const r=n;r.parentNode.removeChild(r)}function z(e){return e[L]||null}function q(e,t){return K(e)[t]}function J(e){const t=Y(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function K(e){return e[B]}function V(e){const t=K(z(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function X(e,t){const n=K(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=Q(e.moveRangeStart)})),t.forEach((t=>{const r=document.createComment("marker");t.moveToBeforeMarker=r;const o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):G(r,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd;let s=r;for(;s;){const e=s.nextSibling;if(n.insertBefore(s,t),s===o)break;s=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function Y(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function G(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=V(t);n?n.parentNode.insertBefore(e,n):G(e,z(t))}}}function Q(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=V(e);if(t)return t.previousSibling;{const t=z(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:Q(t)}}function Z(e){return`_bl_${e}`}const ee="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,ee)&&"string"==typeof t[ee]?function(e){const t=`[${Z(e)}]`;return document.querySelector(t)}(t[ee]):t));const te="_blazorDeferredValue";function ne(e){return"select-multiple"===e.type}function re(e,t){e.value=t||""}function oe(e,t){e instanceof HTMLSelectElement?ne(e)?function(e,t){t||(t=[]);for(let n=0;n{ke()&&function(e,t){if(0!==e.button||function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e))return;if(e.defaultPrevented)return;const n=function(e){const t=!window._blazorDisableComposedPath&&e.composedPath&&e.composedPath();if(t){for(let e=0;e{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),ie.content));var i;let a=0;for(;s.firstChild;)j(s.firstChild,o,a++)}applyAttribute(e,t,n,r){const o=e.frameReader,s=o.attributeName(r),i=o.attributeEventHandlerId(r);if(i){const e=fe(s);return void this.eventDelegator.setListener(n,e,i,t)}const a=o.attributeValue(r);this.setOrRemoveAttributeOrProperty(n,s,a)}insertFrameRange(e,t,n,r,o,s,i){const a=r;for(let a=s;a{je(t,e)})},enableNavigationInterception:function(e){if(void 0!==me&&me!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");me=e},setHasLocationChangingListeners:function(e,t){const n=Ae.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){Ne&&e===xe&&(Ne(t),Ne=null)},navigateTo:function(e,t){Be(e,t,!0)},refresh:function(e){!e&&Se()?Ee(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:Me};function Me(e){const t=document.getElementById(e);return!!t&&(t.scrollIntoView(),!0)}function Be(e,t,n=!1){const r=Ce(e),o=qe();if(t.forceLoad||!be(r)||"serverside-fullpageload"===o)!function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry);else if("clientside-router"===o)Le(r,!1,t.replaceHistoryEntry,t.historyEntryState,n);else{if("serverside-enhanced"!==o)throw new Error(`Unsupported page load mechanism: ${o}`);Ee(r,t.replaceHistoryEntry)}}async function Le(e,t,n,r=void 0,o=!1){if(Fe(),function(e){const t=e.indexOf("#");return t>-1&&location.href.replace(location.hash,"")===e.substring(0,t)}(e))return void function(e,t,n){$e(e,t,n);const r=e.indexOf("#");r!==e.length-1&&Me(e.substring(r+1))}(e,n,r);const s=ze();(o||!(null==s?void 0:s.hasLocationChangingEventListeners)||await He(e,r,t,s))&&(_e=!0,$e(e,n,r),await je(t))}function $e(e,t,n=void 0){t?history.replaceState({userState:n,_index:Re},"",e):(Re++,history.pushState({userState:n,_index:Re},"",e))}function Oe(e){return new Promise((t=>{const n=Pe;Pe=()=>{Pe=n,t()},history.go(e)}))}function Fe(){Ne&&(Ne(!1),Ne=null)}function He(e,t,n,r){return new Promise((o=>{Fe(),xe++,Ne=o,r.locationChanging(xe,e,t,n)}))}async function je(e,t){const n=null!=t?t:location.href;await Promise.all(Array.from(Ae,(async([t,r])=>{var o,s;s=t,S.has(s)&&await r.locationChanged(n,null===(o=history.state)||void 0===o?void 0:o.userState,e)})))}async function We(e){var t,n;Pe&&"serverside-enhanced"!==qe()&&await Pe(e),Re=null!==(n=null===(t=history.state)||void 0===t?void 0:t._index)&&void 0!==n?n:0}function ze(){const e=Te();if(void 0!==e)return Ae.get(e)}function qe(){return ke()?"clientside-router":Se()?"serverside-enhanced":window.Blazor._internal.isBlazorWeb?"serverside-fullpageload":"clientside-router"}const Je={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e,t){const n=document.querySelector(e);n&&(n.hasAttribute("tabindex")||(n.tabIndex=-1),n.focus({preventScroll:!0}))}},Ke={init:function(e,t,n,r=50){const o=Xe(t);(o||document.documentElement).style.overflowAnchor="none";const s=document.createRange();u(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const i=new IntersectionObserver((function(r){r.forEach((r=>{var o;if(!r.isIntersecting)return;s.setStartAfter(t),s.setEndBefore(n);const i=s.getBoundingClientRect().height,a=null===(o=r.rootBounds)||void 0===o?void 0:o.height;r.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",r.intersectionRect.top-r.boundingClientRect.top,i,a):r.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",r.boundingClientRect.bottom-r.intersectionRect.bottom,i,a)}))}),{root:o,rootMargin:`${r}px`});i.observe(t),i.observe(n);const a=d(t),c=d(n),{observersByDotNetObjectId:l,id:h}=Ye(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,r)=>{u(e.parentElement)&&(r.disconnect(),e.style.display="table-row",r.observe(e,t)),i.unobserve(e),i.observe(e)}));return n.observe(e,t),n}function u(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[h]={intersectionObserver:i,mutationObserverBefore:a,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=Ye(e),r=t[n];r&&(r.intersectionObserver.disconnect(),r.mutationObserverBefore.disconnect(),r.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},Ve=Symbol();function Xe(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:Xe(e.parentElement):null}function Ye(e){var t;const n=e._callDispatcher,r=e._id;return null!==(t=n[Ve])&&void 0!==t||(n[Ve]={}),{observersByDotNetObjectId:n[Ve],id:r}}const Ge={getAndRemoveExistingTitle:function(){var e;const t=document.head?document.head.getElementsByTagName("title"):[];if(0===t.length)return null;let n=null;for(let r=t.length-1;r>=0;r--){const o=t[r],s=o.previousSibling;s instanceof Comment&&null!==z(s)||(null===n&&(n=o.textContent),null===(e=o.parentNode)||void 0===e||e.removeChild(o))}return n}},Qe={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,r,o){const s=Ze(e,t),i=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(s.blob)})),a=await new Promise((function(e){var t;const s=Math.min(1,r/i.width),a=Math.min(1,o/i.height),c=Math.min(s,a),l=document.createElement("canvas");l.width=Math.round(i.width*c),l.height=Math.round(i.height*c),null===(t=l.getContext("2d"))||void 0===t||t.drawImage(i,0,0,l.width,l.height),l.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:s.lastModified,name:s.name,size:(null==a?void 0:a.size)||0,contentType:n,blob:a||s.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return Ze(e,t).blob}};function Ze(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const et=new Set,tt={enableNavigationPrompt:function(e){0===et.size&&window.addEventListener("beforeunload",nt),et.add(e)},disableNavigationPrompt:function(e){et.delete(e),0===et.size&&window.removeEventListener("beforeunload",nt)}};function nt(e){e.preventDefault(),e.returnValue=!0}async function rt(e,t,n){return e instanceof Blob?await async function(e,t,n){const r=e.slice(t,t+n),o=await r.arrayBuffer();return new Uint8Array(o)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)}new Map;const ot={navigateTo:function(e,t,n=!1){Be(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(s.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=i.get(t.browserEventName);n?n.push(e):i.set(t.browserEventName,[e]),a.forEach((n=>n(e,t.browserEventName)))}s.set(e,t)},rootComponents:y,runtime:{},_internal:{navigationManager:Ue,domWrapper:Je,Virtualize:Ke,PageTitle:Ge,InputFile:Qe,NavigationLock:tt,getJSDataStreamChunk:rt,attachWebRendererInterop:I}};var st;function it(e){const t={...at,...e};return e&&e.reconnectionOptions&&(t.reconnectionOptions={...at.reconnectionOptions,...e.reconnectionOptions}),t}window.Blazor=ot,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"}(st||(st={}));const at={configureSignalR:e=>{},logLevel:st.Warning,initializers:void 0,circuitHandlers:[],reconnectionOptions:{maxRetries:8,retryIntervalMilliseconds:2e4,dialogId:"components-reconnect-modal"}};class ct{log(e,t){}}ct.instance=new ct;class lt{constructor(e){this.minLevel=e}log(e,t){if(e>=this.minLevel){const n=`[${(new Date).toISOString()}] ${st[e]}: ${t}`;switch(e){case st.Critical:case st.Error:console.error(n);break;case st.Warning:console.warn(n);break;case st.Information:console.info(n);break;default:console.log(n)}}}}const ht=/^\s*Blazor-Server-Component-State:(?[a-zA-Z0-9+/=]+)$/;function dt(e,t,n="state"){var r;if(e.nodeType===Node.COMMENT_NODE){const o=e.textContent||"",s=t.exec(o),i=s&&s.groups&&s.groups[n];return i&&(null===(r=e.parentNode)||void 0===r||r.removeChild(e)),i}if(!e.hasChildNodes())return;const o=e.childNodes;for(let e=0;e.*)$/);function ft(e,t){const n=e.currentElement;var r,o,s;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){const i=pt.exec(n.textContent),a=i&&i.groups&&i.groups.descriptor;if(!a)return;!function(e){if(e.parentNode instanceof Document)throw new Error("Root components cannot be marked as interactive. The element must be rendered statically so that scripts are not evaluated multiple times.")}(n);try{const i=function(e){const t=JSON.parse(e),{type:n}=t;if("server"!==n&&"webassembly"!==n&&"auto"!==n)throw new Error(`Invalid component type '${n}'.`);return t}(a),c=function(e,t,n){const{prerenderId:r}=e;if(r){for(;n.next()&&n.currentElement;){const e=n.currentElement;if(e.nodeType!==Node.COMMENT_NODE)continue;if(!e.textContent)continue;const t=pt.exec(e.textContent),o=t&&t[1];if(o)return yt(o,r),e}throw new Error(`Could not find an end component comment for '${t}'.`)}}(i,n,e);if(t!==i.type)return;switch(i.type){case"webassembly":return o=n,s=c,vt(r=i),{...r,uniqueId:gt++,start:o,end:s};case"server":return function(e,t,n){return mt(e),{...e,uniqueId:gt++,start:t,end:n}}(i,n,c);case"auto":return function(e,t,n){return mt(e),vt(e),{...e,uniqueId:gt++,start:t,end:n}}(i,n,c)}}catch(e){throw new Error(`Found malformed component comment at ${n.textContent}`)}}}let gt=0;function mt(e){const{descriptor:t,sequence:n}=e;if(!t)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===n)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(n))throw new Error(`Error parsing the sequence '${n}' for component '${JSON.stringify(e)}'`)}function vt(e){const{assembly:t,typeName:n}=e;if(!t)throw new Error("assembly must be defined when using a descriptor.");if(!n)throw new Error("typeName must be defined when using a descriptor.");e.parameterDefinitions=e.parameterDefinitions&&atob(e.parameterDefinitions),e.parameterValues=e.parameterValues&&atob(e.parameterValues)}function yt(e,t){const n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error(`Invalid end of component comment: '${e}'`);const r=n.prerenderId;if(!r)throw new Error(`End of component comment must have a value for the prerendered property: '${e}'`);if(r!==t)throw new Error(`End of component comment prerendered property must match the start comment prerender id: '${t}', '${r}'`)}class wt{constructor(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}next(){return this.currentIndex++,this.currentIndex{n+=`0x${e<16?"0":""}${e.toString(16)} `})),n.substr(0,n.length-1)}(e)}'`)):"string"==typeof e&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function Tt(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}async function Dt(e,t,n,r,o,s){const i={},[a,c]=At();i[a]=c,e.log(bt.Trace,`(${t} transport) sending data. ${kt(o,s.logMessageContent)}.`);const l=Tt(o)?"arraybuffer":"text",h=await n.post(r,{content:o,headers:{...i,...s.headers},responseType:l,timeout:s.timeout,withCredentials:s.withCredentials});e.log(bt.Trace,`(${t} transport) request complete. Response status: ${h.statusCode}.`)}class Rt{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch((e=>{}))}}class xt{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const n=`[${(new Date).toISOString()}] ${bt[e]}: ${t}`;switch(e){case bt.Critical:case bt.Error:this.out.error(n);break;case bt.Warning:this.out.warn(n);break;case bt.Information:this.out.info(n);break;default:this.out.log(n)}}}}function At(){let e="X-SignalR-User-Agent";return It.isNode&&(e="User-Agent"),[e,Pt(Et,Nt(),It.isNode?"NodeJS":"Browser",Ut())]}function Pt(e,t,n,r){let o="Microsoft SignalR/";const s=e.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${e}; `,o+=t&&""!==t?`${t}; `:"Unknown OS; ",o+=`${n}`,o+=r?`; ${r}`:"; Unknown Runtime Version",o+=")",o}function Nt(){if(!It.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function Ut(){if(It.isNode)return process.versions.node}function Mt(e){return e.stack?e.stack:e.message?e.message:`${e}`}class Bt{writeHandshakeRequest(e){return _t.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(Tt(e)){const r=new Uint8Array(e),o=r.indexOf(_t.RecordSeparatorCode);if(-1===o)throw new Error("Message is incomplete.");const s=o+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(r.slice(0,s))),n=r.byteLength>s?r.slice(s).buffer:null}else{const r=e,o=r.indexOf(_t.RecordSeparator);if(-1===o)throw new Error("Message is incomplete.");const s=o+1;t=r.substring(0,s),n=r.length>s?r.substring(s):null}const r=_t.parse(t),o=JSON.parse(r[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[n,o]}}class Lt extends Error{constructor(e,t){const n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}}class $t extends Error{constructor(e="A timeout occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class Ot extends Error{constructor(e="An abort occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class Ft extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}}class Ht extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}}class jt extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Wt extends Error{constructor(e){const t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}}class zt extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}}var qt,Jt;!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",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"}(qt||(qt={}));class Kt{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Rt(this,e)}}class Vt{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}async _send(e){const t=this._protocol.writeMessage(e);let n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let e=()=>{},r=()=>{};Tt(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise(((t,n)=>{e=t,r=n}))),this._messages.push(new Xt(t,this._totalMessageCount,e,r))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await n}_ack(e){let t=-1;for(let n=0;nthis._nextReceivingSequenceId?this._connection.stop(new Error("Sequence ID greater than amount of messages we've received.")):this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=0!==this._messages.length?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:qt.Sequence,sequenceId:e}));const t=this._messages;for(const e of t)await this._connection.send(e._message);this._reconnectInProgress=!1}_dispose(e){null!=e||(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case qt.Invocation:case qt.StreamItem:case qt.Completion:case qt.StreamInvocation:case qt.CancelInvocation:return!0;case qt.Close:case qt.Sequence:case qt.Ping:case qt.Ack:return!1}}_ackTimer(){void 0===this._ackTimerHandle&&(this._ackTimerHandle=setTimeout((async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:qt.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}}class Xt{constructor(e,t,n,r){this._message=e,this._id=t,this._resolver=n,this._rejector=r}}!function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"}(Jt||(Jt={}));class Yt{static create(e,t,n,r,o,s,i){return new Yt(e,t,n,r,o,s,i)}constructor(e,t,n,r,o,s,i){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(bt.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Ct.isRequired(e,"connection"),Ct.isRequired(t,"logger"),Ct.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=null!=o?o:3e4,this.keepAliveIntervalInMilliseconds=null!=s?s:15e3,this._statefulReconnectBufferSize=null!=i?i:1e5,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=r,this._handshakeProtocol=new Bt,this.connection.onreceive=e=>this._processIncomingData(e),this.connection.onclose=e=>this._connectionClosed(e),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Jt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:qt.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==Jt.Disconnected&&this._connectionState!==Jt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Jt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Jt.Connecting,this._logger.log(bt.Debug,"Starting HubConnection.");try{await this._startInternal(),It.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Jt.Connected,this._connectionStarted=!0,this._logger.log(bt.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Jt.Disconnected,this._logger.log(bt.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise(((e,t)=>{this._handshakeResolver=e,this._handshakeRejecter=t}));await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const n={protocol:this._protocol.name,version:t};if(this._logger.log(bt.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(bt.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;!!this.connection.features.reconnect&&(this._messageBuffer=new Vt(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(e){throw this._logger.log(bt.Debug,`Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(e),e}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch(e){}}_stopInternal(e){if(this._connectionState===Jt.Disconnected)return this._logger.log(bt.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Jt.Disconnecting)return this._logger.log(bt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const t=this._connectionState;return this._connectionState=Jt.Disconnecting,this._logger.log(bt.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(bt.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===Jt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new Ot("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...t){const[n,r]=this._replaceStreamingParams(t),o=this._createStreamInvocation(e,t,r);let s;const i=new Kt;return i.cancelCallback=()=>{const e=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],s.then((()=>this._sendWithProtocol(e)))},this._callbacks[o.invocationId]=(e,t)=>{t?i.error(t):e&&(e.type===qt.Completion?e.error?i.error(new Error(e.error)):i.complete():i.next(e.item))},s=this._sendWithProtocol(o).catch((e=>{i.error(e),delete this._callbacks[o.invocationId]})),this._launchStreams(n,s),i}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[n,r]=this._replaceStreamingParams(t),o=this._sendWithProtocol(this._createInvocation(e,t,!0,r));return this._launchStreams(n,o),o}invoke(e,...t){const[n,r]=this._replaceStreamingParams(t),o=this._createInvocation(e,t,!1,r);return new Promise(((e,t)=>{this._callbacks[o.invocationId]=(n,r)=>{r?t(r):n&&(n.type===qt.Completion?n.error?t(new Error(n.error)):e(n.result):t(new Error(`Unexpected message type: ${n.type}`)))};const r=this._sendWithProtocol(o).catch((e=>{t(e),delete this._callbacks[o.invocationId]}));this._launchStreams(n,r)}))}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),-1===this._methods[e].indexOf(t)&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const n=this._methods[e];if(n)if(t){const r=n.indexOf(t);-1!==r&&(n.splice(r,1),0===n.length&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const e of t)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(e))switch(e.type){case qt.Invocation:this._invokeClientMethod(e);break;case qt.StreamItem:case qt.Completion:{const t=this._callbacks[e.invocationId];if(t){e.type===qt.Completion&&delete this._callbacks[e.invocationId];try{t(e)}catch(e){this._logger.log(bt.Error,`Stream callback threw error: ${Mt(e)}`)}}break}case qt.Ping:break;case qt.Close:{this._logger.log(bt.Information,"Close message received from server.");const t=e.error?new Error("Server returned an error on close: "+e.error):void 0;!0===e.allowReconnect?this.connection.stop(t):this._stopPromise=this._stopInternal(t);break}case qt.Ack:this._messageBuffer&&this._messageBuffer._ack(e);break;case qt.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(e);break;default:this._logger.log(bt.Warning,`Invalid message type: ${e.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(e){const t="Error parsing handshake response: "+e;this._logger.log(bt.Error,t);const n=new Error(t);throw this._handshakeRejecter(n),n}if(t.error){const e="Server returned handshake error: "+t.error;this._logger.log(bt.Error,e);const n=new Error(e);throw this._handshakeRejecter(n),n}return this._logger.log(bt.Debug,"Server handshake complete."),this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout((()=>this.serverTimeout()),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let e=this._nextKeepAlive-(new Date).getTime();e<0&&(e=0),this._pingServerHandle=setTimeout((async()=>{if(this._connectionState===Jt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const t=e.target.toLowerCase(),n=this._methods[t];if(!n)return this._logger.log(bt.Warning,`No client method with the name '${t}' found.`),void(e.invocationId&&(this._logger.log(bt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null))));const r=n.slice(),o=!!e.invocationId;let s,i,a;for(const n of r)try{const r=s;s=await n.apply(this,e.arguments),o&&s&&r&&(this._logger.log(bt.Error,`Multiple results provided for '${t}'. Sending error to server.`),a=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),i=void 0}catch(e){i=e,this._logger.log(bt.Error,`A callback for the method '${t}' threw error '${e}'.`)}a?await this._sendWithProtocol(a):o?(i?a=this._createCompletionMessage(e.invocationId,`${i}`,null):void 0!==s?a=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(bt.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),a=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(a)):s&&this._logger.log(bt.Error,`Result given for '${t}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(bt.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new Ot("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Jt.Disconnecting?this._completeClose(e):this._connectionState===Jt.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Jt.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Jt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(null!=e?e:new Error("Connection closed.")),this._messageBuffer=void 0),It.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(bt.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=Date.now();let n=0,r=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(n++,0,r);if(null===o)return this._logger.log(bt.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(e);if(this._connectionState=Jt.Reconnecting,e?this._logger.log(bt.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(bt.Information,"Connection reconnecting."),0!==this._reconnectingCallbacks.length){try{this._reconnectingCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(bt.Error,`An onreconnecting callback called with error '${e}' threw error '${t}'.`)}if(this._connectionState!==Jt.Reconnecting)return void this._logger.log(bt.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==o;){if(this._logger.log(bt.Information,`Reconnect attempt number ${n} will start in ${o} ms.`),await new Promise((e=>{this._reconnectDelayHandle=setTimeout(e,o)})),this._reconnectDelayHandle=void 0,this._connectionState!==Jt.Reconnecting)return void this._logger.log(bt.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=Jt.Connected,this._logger.log(bt.Information,"HubConnection reconnected successfully."),0!==this._reconnectedCallbacks.length)try{this._reconnectedCallbacks.forEach((e=>e.apply(this,[this.connection.connectionId])))}catch(e){this._logger.log(bt.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`)}return}catch(e){if(this._logger.log(bt.Information,`Reconnect attempt failed because of error '${e}'.`),this._connectionState!==Jt.Reconnecting)return this._logger.log(bt.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===Jt.Disconnecting&&this._completeClose());r=e instanceof Error?e:new Error(e.toString()),o=this._getNextRetryDelay(n++,Date.now()-t,r)}}this._logger.log(bt.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(n){return this._logger.log(bt.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach((n=>{const r=t[n];try{r(null,e)}catch(t){this._logger.log(bt.Error,`Stream 'error' callback called with '${e}' threw error: ${Mt(t)}`)}}))}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,r){if(n)return 0!==r.length?{arguments:t,streamIds:r,target:e,type:qt.Invocation}:{arguments:t,target:e,type:qt.Invocation};{const n=this._invocationId;return this._invocationId++,0!==r.length?{arguments:t,invocationId:n.toString(),streamIds:r,target:e,type:qt.Invocation}:{arguments:t,invocationId:n.toString(),target:e,type:qt.Invocation}}}_launchStreams(e,t){if(0!==e.length){t||(t=Promise.resolve());for(const n in e)e[n].subscribe({complete:()=>{t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n))))},error:e=>{let r;r=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n,r))))},next:e=>{t=t.then((()=>this._sendWithProtocol(this._createStreamItemMessage(n,e))))}})}}_replaceStreamingParams(e){const t=[],n=[];for(let r=0;r0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const n=await this._innerClient.send(e);return t&&401===n.statusCode&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):n}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Zt.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Zt.Authorization]&&delete e.headers[Zt.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}class rn extends tn{constructor(e){super(),this._logger=e;const t={_fetchType:void 0,_jar:void 0};var r;r=t,"undefined"==typeof fetch&&(r._jar=new(n(628).CookieJar),"undefined"==typeof fetch?r._fetchType=n(200):r._fetchType=fetch,r._fetchType=n(203)(r._fetchType,r._jar),1)?(this._fetchType=t._fetchType,this._jar=t._jar):this._fetchType=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw new Error("could not find global")}()),this._abortControllerType=AbortController;const o={_abortControllerType:this._abortControllerType};(function(e){return"undefined"==typeof AbortController&&(e._abortControllerType=n(778),!0)})(o)&&(this._abortControllerType=o._abortControllerType)}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new Ot;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new Ot});let r,o=null;if(e.timeout){const r=e.timeout;o=setTimeout((()=>{t.abort(),this._logger.log(bt.Warning,"Timeout from HTTP request."),n=new $t}),r)}""===e.content&&(e.content=void 0),e.content&&(e.headers=e.headers||{},Tt(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");try{r=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:!0===e.withCredentials?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(e){if(n)throw n;throw this._logger.log(bt.Warning,`Error from HTTP request. ${e}.`),e}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){const e=await on(r,"text");throw new Lt(e||r.statusText,r.status)}const s=on(r,e.responseType),i=await s;return new en(r.status,r.statusText,i)}getCookieString(e){return""}}function on(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class sn extends tn{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Ot):e.method?e.url?new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),r.withCredentials=void 0===e.withCredentials||e.withCredentials,r.setRequestHeader("X-Requested-With","XMLHttpRequest"),""===e.content&&(e.content=void 0),e.content&&(Tt(e.content)?r.setRequestHeader("Content-Type","application/octet-stream"):r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const o=e.headers;o&&Object.keys(o).forEach((e=>{r.setRequestHeader(e,o[e])})),e.responseType&&(r.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{r.abort(),n(new Ot)}),e.timeout&&(r.timeout=e.timeout),r.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),r.status>=200&&r.status<300?t(new en(r.status,r.statusText,r.response||r.responseText)):n(new Lt(r.response||r.responseText||r.statusText,r.status))},r.onerror=()=>{this._logger.log(bt.Warning,`Error from HTTP request. ${r.status}: ${r.statusText}.`),n(new Lt(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(bt.Warning,"Timeout from HTTP request."),n(new $t)},r.send(e.content)})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class an extends tn{constructor(e){if(super(),"undefined"!=typeof fetch)this._httpClient=new rn(e);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");this._httpClient=new sn(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Ot):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}var cn,ln;!function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"}(cn||(cn={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(ln||(ln={}));class hn{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class dn{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new hn,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(Ct.isRequired(e,"url"),Ct.isRequired(t,"transferFormat"),Ct.isIn(t,ln,"transferFormat"),this._url=e,this._logger.log(bt.Trace,"(LongPolling transport) Connecting."),t===ln.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,r]=At(),o={[n]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};t===ln.Binary&&(s.responseType="arraybuffer");const i=`${e}&_=${Date.now()}`;this._logger.log(bt.Trace,`(LongPolling transport) polling: ${i}.`);const a=await this._httpClient.get(i,s);200!==a.statusCode?(this._logger.log(bt.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Lt(a.statusText||"",a.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,t){try{for(;this._running;)try{const n=`${e}&_=${Date.now()}`;this._logger.log(bt.Trace,`(LongPolling transport) polling: ${n}.`);const r=await this._httpClient.get(n,t);204===r.statusCode?(this._logger.log(bt.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==r.statusCode?(this._logger.log(bt.Error,`(LongPolling transport) Unexpected response code: ${r.statusCode}.`),this._closeError=new Lt(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(bt.Trace,`(LongPolling transport) data received. ${kt(r.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(r.content)):this._logger.log(bt.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(e){this._running?e instanceof $t?this._logger.log(bt.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=e,this._running=!1):this._logger.log(bt.Trace,`(LongPolling transport) Poll errored after shutdown: ${e.message}`)}}finally{this._logger.log(bt.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?Dt(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(bt.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(bt.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[t,n]=At();e[t]=n;const r={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let o;try{await this._httpClient.delete(this._url,r)}catch(e){o=e}o?o instanceof Lt&&(404===o.statusCode?this._logger.log(bt.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(bt.Trace,`(LongPolling transport) Error sending a DELETE request: ${o}`)):this._logger.log(bt.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(bt.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(bt.Trace,e),this.onclose(this._closeError)}}}class un{constructor(e,t,n,r){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=r,this.onreceive=null,this.onclose=null}async connect(e,t){return Ct.isRequired(e,"url"),Ct.isRequired(t,"transferFormat"),Ct.isIn(t,ln,"transferFormat"),this._logger.log(bt.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise(((n,r)=>{let o,s=!1;if(t===ln.Text){if(It.isBrowser||It.isWebWorker)o=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const t=this._httpClient.getCookieString(e),n={};n.Cookie=t;const[r,s]=At();n[r]=s,o=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...n,...this._options.headers}})}try{o.onmessage=e=>{if(this.onreceive)try{this._logger.log(bt.Trace,`(SSE transport) data received. ${kt(e.data,this._options.logMessageContent)}.`),this.onreceive(e.data)}catch(e){return void this._close(e)}},o.onerror=e=>{s?this._close():r(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},o.onopen=()=>{this._logger.log(bt.Information,`SSE connected to ${this._url}`),this._eventSource=o,s=!0,n()}}catch(e){return void r(e)}}else r(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))}))}async send(e){return this._eventSource?Dt(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class pn{constructor(e,t,n,r,o,s){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=r,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,t){let n;return Ct.isRequired(e,"url"),Ct.isRequired(t,"transferFormat"),Ct.isIn(t,ln,"transferFormat"),this._logger.log(bt.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise(((r,o)=>{let s;e=e.replace(/^http/,"ws");const i=this._httpClient.getCookieString(e);let a=!1;if(It.isReactNative){const t={},[r,o]=At();t[r]=o,n&&(t[Zt.Authorization]=`Bearer ${n}`),i&&(t[Zt.Cookie]=i),s=new this._webSocketConstructor(e,void 0,{headers:{...t,...this._headers}})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);s||(s=new this._webSocketConstructor(e)),t===ln.Binary&&(s.binaryType="arraybuffer"),s.onopen=t=>{this._logger.log(bt.Information,`WebSocket connected to ${e}.`),this._webSocket=s,a=!0,r()},s.onerror=e=>{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"There was an error with the transport",this._logger.log(bt.Information,`(WebSockets transport) ${t}.`)},s.onmessage=e=>{if(this._logger.log(bt.Trace,`(WebSockets transport) data received. ${kt(e.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(e.data)}catch(e){return void this._close(e)}},s.onclose=e=>{if(a)this._close(e);else{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",o(new Error(t))}}}))}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(bt.Trace,`(WebSockets transport) sending data. ${kt(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(bt.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(e)||!1!==e.wasClean&&1e3===e.code?e instanceof Error?this.onclose(e):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)))}_isCloseEvent(e){return e&&"boolean"==typeof e.wasClean&&"number"==typeof e.code}}class fn{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Ct.isRequired(e,"url"),this._logger=function(e){return void 0===e?new xt(bt.Information):null===e?St.instance:void 0!==e.log?e:new xt(e)}(t.logger),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=void 0!==t.logMessageContent&&t.logMessageContent,"boolean"!=typeof t.withCredentials&&void 0!==t.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=void 0===t.withCredentials||t.withCredentials,t.timeout=void 0===t.timeout?1e5:t.timeout,"undefined"==typeof WebSocket||t.WebSocket||(t.WebSocket=WebSocket),"undefined"==typeof EventSource||t.EventSource||(t.EventSource=EventSource),this._httpClient=new nn(t.httpClient||new an(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||ln.Binary,Ct.isIn(e,ln,"transferFormat"),this._logger.log(bt.Debug,`Starting connection with transfer format '${ln[e]}'.`),"Disconnected"!==this._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,"Disconnecting"===this._connectionState){const e="Failed to start the HttpConnection before stop() was called.";return this._logger.log(bt.Error,e),await this._stopPromise,Promise.reject(new Ot(e))}if("Connected"!==this._connectionState){const e="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(bt.Error,e),Promise.reject(new Ot(e))}this._connectionStarted=!0}send(e){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new gn(this.transport)),this._sendQueue.send(e))}async stop(e){return"Disconnected"===this._connectionState?(this._logger.log(bt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this._connectionState?(this._logger.log(bt.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise((e=>{this._stopPromiseResolver=e})),await this._stopInternal(e),void await this._stopPromise)}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch(e){}if(this.transport){try{await this.transport.stop()}catch(e){this._logger.log(bt.Error,`HttpConnection.transport.stop() threw error '${e}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(bt.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==cn.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(cn.WebSockets),await this._startTransport(t,e)}else{let n=null,r=0;do{if(n=await this._getNegotiationResponse(t),"Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)throw new Ot("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){const e=n.accessToken;this._accessTokenFactory=()=>e,this._httpClient._accessToken=e,this._httpClient._accessTokenFactory=void 0}r++}while(n.url&&r<100);if(100===r&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,n,e)}this.transport instanceof dn&&(this.features.inherentKeepAlive=!0),"Connecting"===this._connectionState&&(this._logger.log(bt.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(e){return this._logger.log(bt.Error,"Failed to start the connection: "+e),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(e)}}async _getNegotiationResponse(e){const t={},[n,r]=At();t[n]=r;const o=this._resolveNegotiateUrl(e);this._logger.log(bt.Debug,`Sending negotiation request: ${o}.`);try{const e=await this._httpClient.post(o,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(200!==e.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${e.statusCode}'`));const n=JSON.parse(e.content);return(!n.negotiateVersion||n.negotiateVersion<1)&&(n.connectionToken=n.connectionId),n.useStatefulReconnect&&!0!==this._options._useStatefulReconnect?Promise.reject(new Wt("Client didn't negotiate Stateful Reconnect but the server did.")):n}catch(e){let t="Failed to complete negotiation with the server: "+e;return e instanceof Lt&&404===e.statusCode&&(t+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(bt.Error,t),Promise.reject(new Wt(t))}}_createConnectUrl(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+`id=${t}`:e}async _createTransport(e,t,n,r){let o=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t))return this._logger.log(bt.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(o,r),void(this.connectionId=n.connectionId);const s=[],i=n.availableTransports||[];let a=n;for(const n of i){const i=this._resolveTransportOrError(n,t,r,!0===(null==a?void 0:a.useStatefulReconnect));if(i instanceof Error)s.push(`${n.transport} failed:`),s.push(i);else if(this._isITransport(i)){if(this.transport=i,!a){try{a=await this._getNegotiationResponse(e)}catch(e){return Promise.reject(e)}o=this._createConnectUrl(e,a.connectionToken)}try{return await this._startTransport(o,r),void(this.connectionId=a.connectionId)}catch(e){if(this._logger.log(bt.Error,`Failed to start the transport '${n.transport}': ${e}`),a=void 0,s.push(new jt(`${n.transport} failed: ${e}`,cn[n.transport])),"Connecting"!==this._connectionState){const e="Failed to select transport before stop() was called.";return this._logger.log(bt.Debug,e),Promise.reject(new Ot(e))}}}}return s.length>0?Promise.reject(new zt(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case cn.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new pn(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case cn.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new un(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case cn.LongPolling:return new dn(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let r=!1;if(this.features.reconnect){try{this.features.disconnected(),await this.transport.connect(e,t),await this.features.resend()}catch{r=!0}r&&this._stopConnection(n)}else this._stopConnection(n)}:this.transport.onclose=e=>this._stopConnection(e),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,r){const o=cn[e.transport];if(null==o)return this._logger.log(bt.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,o))return this._logger.log(bt.Debug,`Skipping transport '${cn[o]}' because it was disabled by the client.`),new Ht(`'${cn[o]}' is disabled by the client.`,o);if(!(e.transferFormats.map((e=>ln[e])).indexOf(n)>=0))return this._logger.log(bt.Debug,`Skipping transport '${cn[o]}' because it does not support the requested transfer format '${ln[n]}'.`),new Error(`'${cn[o]}' does not support ${ln[n]}.`);if(o===cn.WebSockets&&!this._options.WebSocket||o===cn.ServerSentEvents&&!this._options.EventSource)return this._logger.log(bt.Debug,`Skipping transport '${cn[o]}' because it is not supported in your environment.'`),new Ft(`'${cn[o]}' is not supported in your environment.`,o);this._logger.log(bt.Debug,`Selecting transport '${cn[o]}'.`);try{return this.features.reconnect=o===cn.WebSockets?r:void 0,this._constructTransport(o)}catch(e){return e}}_isITransport(e){return e&&"object"==typeof e&&"connect"in e}_stopConnection(e){if(this._logger.log(bt.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)throw this._logger.log(bt.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),e?this._logger.log(bt.Error,`Connection disconnected with error '${e}'.`):this._logger.log(bt.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch((e=>{this._logger.log(bt.Error,`TransportSendQueue.stop() threw error '${e}'.`)})),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(bt.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}else this._logger.log(bt.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!It.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(bt.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?"true"===n.get("useStatefulReconnect")&&(this._options._useStatefulReconnect=!0):!0===this._options._useStatefulReconnect&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}}class gn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new mn,this._transportResult=new mn,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new mn),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(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()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new mn;const e=this._transportResult;this._transportResult=void 0;const t="string"==typeof this._buffer[0]?this._buffer.join(""):gn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(t){e.reject(t)}}}static _concatBuffers(e){const t=e.map((e=>e.byteLength)).reduce(((e,t)=>e+t)),n=new Uint8Array(t);let r=0;for(const t of e)n.set(new Uint8Array(t),r),r+=t.byteLength;return n.buffer}}class mn{constructor(){this.promise=new Promise(((e,t)=>[this._resolver,this._rejecter]=[e,t]))}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class vn{constructor(){this.name="json",this.version=2,this.transferFormat=ln.Text}parseMessages(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=St.instance);const n=_t.parse(e),r=[];for(const e of n){const n=JSON.parse(e);if("number"!=typeof n.type)throw new Error("Invalid payload.");switch(n.type){case qt.Invocation:this._isInvocationMessage(n);break;case qt.StreamItem:this._isStreamItemMessage(n);break;case qt.Completion:this._isCompletionMessage(n);break;case qt.Ping:case qt.Close:break;case qt.Ack:this._isAckMessage(n);break;case qt.Sequence:this._isSequenceMessage(n);break;default:t.log(bt.Information,"Unknown message type '"+n.type+"' ignored.");continue}r.push(n)}return r}writeMessage(e){return _t.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if("string"!=typeof e||""===e)throw new Error(t)}}const yn={trace:bt.Trace,debug:bt.Debug,info:bt.Information,information:bt.Information,warn:bt.Warning,warning:bt.Warning,error:bt.Error,critical:bt.Critical,none:bt.None};class wn{configureLogging(e){if(Ct.isRequired(e,"logging"),function(e){return void 0!==e.log}(e))this.logger=e;else if("string"==typeof e){const t=function(e){const t=yn[e.toLowerCase()];if(void 0!==t)return t;throw new Error(`Unknown log level: ${e}`)}(e);this.logger=new xt(t)}else this.logger=new xt(e);return this}withUrl(e,t){return Ct.isRequired(e,"url"),Ct.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions="object"==typeof t?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return Ct.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new Qt(e):this.reconnectPolicy=e:this.reconnectPolicy=new Qt,this}withServerTimeout(e){return Ct.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return Ct.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return void 0===this.httpConnectionOptions&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=null==e?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new fn(this.url,e);return Yt.create(t,this.logger||St.instance,this.protocol||new vn,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}var _n;!function(e){e[e.Default=0]="Default",e[e.Server=1]="Server",e[e.WebAssembly=2]="WebAssembly",e[e.WebView=3]="WebView"}(_n||(_n={}));var bn,Sn,En,Cn=4294967295;function In(e,t,n){var r=Math.floor(n/4294967296),o=n;e.setUint32(t,r),e.setUint32(t+4,o)}function kn(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}var Tn=("undefined"==typeof process||"never"!==(null===(bn=null===process||void 0===process?void 0:process.env)||void 0===bn?void 0:bn.TEXT_ENCODING))&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function Dn(e){for(var t=e.length,n=0,r=0;r=55296&&o<=56319&&r65535&&(h-=65536,s.push(h>>>10&1023|55296),h=56320|1023&h),s.push(h)}else s.push(a);s.length>=4096&&(i+=String.fromCharCode.apply(String,s),s.length=0)}return s.length>0&&(i+=String.fromCharCode.apply(String,s)),i}var Nn,Un=Tn?new TextDecoder:null,Mn=Tn?"undefined"!=typeof process&&"force"!==(null===(En=null===process||void 0===process?void 0:process.env)||void 0===En?void 0:En.TEXT_DECODER)?200:0:Cn,Bn=function(e,t){this.type=e,this.data=t},Ln=(Nn=function(e,t){return Nn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Nn(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Nn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),$n=function(e){function t(n){var r=e.call(this,n)||this,o=Object.create(t.prototype);return Object.setPrototypeOf(r,o),Object.defineProperty(r,"name",{configurable:!0,enumerable:!1,value:t.name}),r}return Ln(t,e),t}(Error),On={type:-1,encode:function(e){var t,n,r,o;return e instanceof Date?function(e){var t,n=e.sec,r=e.nsec;if(n>=0&&r>=0&&n<=17179869183){if(0===r&&n<=4294967295){var o=new Uint8Array(4);return(t=new DataView(o.buffer)).setUint32(0,n),o}var s=n/4294967296,i=4294967295&n;return o=new Uint8Array(8),(t=new DataView(o.buffer)).setUint32(0,r<<2|3&s),t.setUint32(4,i),o}return o=new Uint8Array(12),(t=new DataView(o.buffer)).setUint32(0,r),In(t,4,n),o}((r=1e6*((t=e.getTime())-1e3*(n=Math.floor(t/1e3))),{sec:n+(o=Math.floor(r/1e9)),nsec:r-1e9*o})):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:kn(t,4),nsec:t.getUint32(0)};default:throw new $n("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},Fn=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(On)}return e.prototype.register=function(e){var t=e.type,n=e.encode,r=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=r;else{var o=1+t;this.builtInEncoders[o]=n,this.builtInDecoders[o]=r}},e.prototype.tryToEncode=function(e,t){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: ".concat(e," bytes in UTF-8"));this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){if(e.length>xn){var t=Dn(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),An(e,this.bytes,this.pos),this.pos+=t}else t=Dn(e),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var r=e.length,o=n,s=0;s>6&31|192;else{if(i>=55296&&i<=56319&&s>12&15|224,t[o++]=i>>6&63|128):(t[o++]=i>>18&7|240,t[o++]=i>>12&63|128,t[o++]=i>>6&63|128)}t[o++]=63&i|128}else t[o++]=i}}(e,this.bytes,this.pos),this.pos+=t},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: ".concat(t));this.writeU8(198),this.writeU32(t)}var n=Hn(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var r=0,o=e;r0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){e:for(var r=0,o=this.caches[n-1];r=this.maxLengthPerKey?n[Math.random()*n.length|0]=r:n.push(r)},e.prototype.decode=function(e,t,n){var r=this.find(e,t,n);if(null!=r)return this.hit++,r;this.miss++;var o=Pn(e,t,n),s=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(s,o),o},e}(),qn=function(e,t){var n,r,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return qn(this,(function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}}))},e.prototype.decodeAsync=function(e){var t,n,r,o,s,i,a;return s=this,void 0,a=function(){var s,i,a,c,l,h,d,u;return qn(this,(function(p){switch(p.label){case 0:s=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=Jn(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,s)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{i=this.doDecodeSync(),s=!0}catch(e){if(!(e instanceof Yn))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),r={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(r)throw r.error;return[7];case 11:return[7];case 12:if(s){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,i]}throw h=(l=this).headByte,d=l.pos,u=l.totalPos,new RangeError("Insufficient data in parsing ".concat(Wn(h)," at ").concat(u," (").concat(d," in the current buffer)"))}}))},new((i=void 0)||(i=Promise))((function(e,t){function n(e){try{o(a.next(e))}catch(e){t(e)}}function r(e){try{o(a.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof i?o:new i((function(e){e(o)}))).then(n,r)}o((a=a.apply(s,[])).next())}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return function(n,r,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,i=function(){var n,r,o,s,i,a,c,l,h;return qn(this,(function(d){switch(d.label){case 0:n=t,r=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),o=Jn(e),d.label=2;case 2:return[4,Kn(o.next())];case 3:if((s=d.sent()).done)return[3,12];if(i=s.value,t&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(i),n&&(r=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,Kn(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0==--r?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=d.sent())instanceof Yn))throw a;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=d.sent(),l={error:c},[3,19];case 14:return d.trys.push([14,,17,18]),s&&!s.done&&(h=o.return)?[4,Kn(h.call(o))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(l)throw l.error;return[7];case 18:return[7];case 19:return[2]}}))}.apply(n,r||[]),a=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(e){i[e]&&(s[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||l(e,t)}))})}function l(e,t){try{(n=i[e](t)).value instanceof Kn?Promise.resolve(n.value.v).then(h,d):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function h(e){l("next",e)}function d(e){l("throw",e)}function u(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}(this,arguments)},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(r=e-128)){this.pushMapState(r),this.complete();continue e}t={}}else if(e<160){if(0!=(r=e-144)){this.pushArrayState(r),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(r=this.readU16())){this.pushArrayState(r),this.complete();continue e}t=[]}else if(221===e){if(0!==(r=this.readU32())){this.pushArrayState(r),this.complete();continue e}t=[]}else if(222===e){if(0!==(r=this.readU16())){this.pushMapState(r),this.complete();continue e}t={}}else if(223===e){if(0!==(r=this.readU32())){this.pushMapState(r),this.complete();continue e}t={}}else if(196===e){var r=this.lookU8();t=this.decodeBinary(r,1)}else if(197===e)r=this.lookU16(),t=this.decodeBinary(r,2);else if(198===e)r=this.lookU32(),t=this.decodeBinary(r,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)r=this.lookU8(),t=this.decodeExtension(r,1);else if(200===e)r=this.lookU16(),t=this.decodeExtension(r,2);else{if(201!==e)throw new $n("Unrecognized type byte: ".concat(Wn(e)));r=this.lookU32(),t=this.decodeExtension(r,4)}this.complete();for(var o=this.stack;o.length>0;){var s=o[o.length-1];if(0===s.type){if(s.array[s.position]=t,s.position++,s.position!==s.size)continue e;o.pop(),t=s.array}else{if(1===s.type){if("string"!=(i=typeof t)&&"number"!==i)throw new $n("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new $n("The key __proto__ is not allowed");s.key=t,s.type=2;continue e}if(s.map[s.key]=t,s.readCount++,s.readCount!==s.size){s.key=null,s.type=1;continue e}o.pop(),t=s.map}}return t}var i},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new $n("Unrecognized array type byte: ".concat(Wn(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new $n("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new $n("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new $n("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthMn?function(e,t,n){var r=e.subarray(t,t+n);return Un.decode(r)}(this.bytes,o,e):Pn(this.bytes,o,e),this.pos+=t+e,r},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new $n("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw Gn;var n=this.pos+t,r=this.bytes.subarray(n,n+e);return this.pos+=t+e,r},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new $n("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),r=this.decodeBinary(e,t+1);return this.extensionCodec.decode(r,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=kn(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}();class er{static write(e){let t=e.byteLength||e.length;const n=[];do{let e=127&t;t>>=7,t>0&&(e|=128),n.push(e)}while(t>0);t=e.byteLength||e.length;const r=new Uint8Array(n.length+t);return r.set(n,0),r.set(e,n.length),r.buffer}static parse(e){const t=[],n=new Uint8Array(e),r=[0,7,14,21,28];for(let 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}}const tr=new Uint8Array([145,qt.Ping]);class nr{constructor(e){this.name="messagepack",this.version=2,this.transferFormat=ln.Binary,this._errorResult=1,this._voidResult=2,this._nonVoidResult=3,e=e||{},this._encoder=new jn(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat),this._decoder=new Zn(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength)}parseMessages(e,t){if(!(n=e)||"undefined"==typeof ArrayBuffer||!(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");var n;null===t&&(t=St.instance);const r=er.parse(e),o=[];for(const e of r){const n=this._parseMessage(e,t);n&&o.push(n)}return o}writeMessage(e){switch(e.type){case qt.Invocation:return this._writeInvocation(e);case qt.StreamInvocation:return this._writeStreamInvocation(e);case qt.StreamItem:return this._writeStreamItem(e);case qt.Completion:return this._writeCompletion(e);case qt.Ping:return er.write(tr);case qt.CancelInvocation:return this._writeCancelInvocation(e);case qt.Close:return this._writeClose();case qt.Ack:return this._writeAck(e);case qt.Sequence:return this._writeSequence(e);default:throw new Error("Invalid message type.")}}_parseMessage(e,t){if(0===e.length)throw new Error("Invalid payload.");const n=this._decoder.decode(e);if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");const r=n[0];switch(r){case qt.Invocation:return this._createInvocationMessage(this._readHeaders(n),n);case qt.StreamItem:return this._createStreamItemMessage(this._readHeaders(n),n);case qt.Completion:return this._createCompletionMessage(this._readHeaders(n),n);case qt.Ping:return this._createPingMessage(n);case qt.Close:return this._createCloseMessage(n);case qt.Ack:return this._createAckMessage(n);case qt.Sequence:return this._createSequenceMessage(n);default:return t.log(bt.Information,"Unknown message type '"+r+"' ignored."),null}}_createCloseMessage(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:qt.Close}}_createPingMessage(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:qt.Ping}}_createInvocationMessage(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");const n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:qt.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:qt.Invocation}}_createStreamItemMessage(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:qt.StreamItem}}_createCompletionMessage(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");const n=t[3];if(n!==this._voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");let r,o;switch(n){case this._errorResult:r=t[4];break;case this._nonVoidResult:o=t[4]}return{error:r,headers:e,invocationId:t[2],result:o,type:qt.Completion}}_createAckMessage(e){if(e.length<1)throw new Error("Invalid payload for Ack message.");return{sequenceId:e[1],type:qt.Ack}}_createSequenceMessage(e){if(e.length<1)throw new Error("Invalid payload for Sequence message.");return{sequenceId:e[1],type:qt.Sequence}}_writeInvocation(e){let t;return t=e.streamIds?this._encoder.encode([qt.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):this._encoder.encode([qt.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),er.write(t.slice())}_writeStreamInvocation(e){let t;return t=e.streamIds?this._encoder.encode([qt.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):this._encoder.encode([qt.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),er.write(t.slice())}_writeStreamItem(e){const t=this._encoder.encode([qt.StreamItem,e.headers||{},e.invocationId,e.item]);return er.write(t.slice())}_writeCompletion(e){const t=e.error?this._errorResult:void 0!==e.result?this._nonVoidResult:this._voidResult;let n;switch(t){case this._errorResult:n=this._encoder.encode([qt.Completion,e.headers||{},e.invocationId,t,e.error]);break;case this._voidResult:n=this._encoder.encode([qt.Completion,e.headers||{},e.invocationId,t]);break;case this._nonVoidResult:n=this._encoder.encode([qt.Completion,e.headers||{},e.invocationId,t,e.result])}return er.write(n.slice())}_writeCancelInvocation(e){const t=this._encoder.encode([qt.CancelInvocation,e.headers||{},e.invocationId]);return er.write(t.slice())}_writeClose(){const e=this._encoder.encode([qt.Close,null]);return er.write(e.slice())}_writeAck(e){const t=this._encoder.encode([qt.Ack,e.sequenceId]);return er.write(t.slice())}_writeSequence(e){const t=this._encoder.encode([qt.Sequence,e.sequenceId]);return er.write(t.slice())}_readHeaders(e){const t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t}}const rr="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,or=rr?rr.decode.bind(rr):function(e){let t=0;const n=e.length,r=[],o=[];for(;t65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")},sr=Math.pow(2,32),ir=Math.pow(2,21)-1;function ar(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function cr(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function lr(e,t){const n=cr(e,t+4);if(n>ir)throw new Error(`Cannot read uint64 with high order part ${n}, because the result would exceed Number.MAX_SAFE_INTEGER.`);return n*sr+cr(e,t)}class hr{constructor(e){this.batchData=e;const t=new fr(e);this.arrayRangeReader=new gr(e),this.arrayBuilderSegmentReader=new mr(e),this.diffReader=new dr(e),this.editReader=new ur(e,t),this.frameReader=new pr(e,t)}updatedComponents(){return ar(this.batchData,this.batchData.length-20)}referenceFrames(){return ar(this.batchData,this.batchData.length-16)}disposedComponentIds(){return ar(this.batchData,this.batchData.length-12)}disposedEventHandlerIds(){return ar(this.batchData,this.batchData.length-8)}updatedComponentsEntry(e,t){const n=e+4*t;return ar(this.batchData,n)}referenceFramesEntry(e,t){return e+20*t}disposedComponentIdsEntry(e,t){const n=e+4*t;return ar(this.batchData,n)}disposedEventHandlerIdsEntry(e,t){const n=e+8*t;return lr(this.batchData,n)}}class dr{constructor(e){this.batchDataUint8=e}componentId(e){return ar(this.batchDataUint8,e)}edits(e){return e+4}editsEntry(e,t){return e+16*t}}class ur{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}editType(e){return ar(this.batchDataUint8,e)}siblingIndex(e){return ar(this.batchDataUint8,e+4)}newTreeIndex(e){return ar(this.batchDataUint8,e+8)}moveToSiblingIndex(e){return ar(this.batchDataUint8,e+8)}removedAttributeName(e){const t=ar(this.batchDataUint8,e+12);return this.stringReader.readString(t)}}class pr{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}frameType(e){return ar(this.batchDataUint8,e)}subtreeLength(e){return ar(this.batchDataUint8,e+4)}elementReferenceCaptureId(e){const t=ar(this.batchDataUint8,e+4);return this.stringReader.readString(t)}componentId(e){return ar(this.batchDataUint8,e+8)}elementName(e){const t=ar(this.batchDataUint8,e+8);return this.stringReader.readString(t)}textContent(e){const t=ar(this.batchDataUint8,e+4);return this.stringReader.readString(t)}markupContent(e){const t=ar(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeName(e){const t=ar(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeValue(e){const t=ar(this.batchDataUint8,e+8);return this.stringReader.readString(t)}attributeEventHandlerId(e){return lr(this.batchDataUint8,e+12)}}class fr{constructor(e){this.batchDataUint8=e,this.stringTableStartIndex=ar(e,e.length-4)}readString(e){if(-1===e)return null;{const n=ar(this.batchDataUint8,this.stringTableStartIndex+4*e),r=function(e,t){let n=0,r=0;for(let o=0;o<4;o++){const s=e[t+o];if(n|=(127&s)<this.nextBatchId)return this.fatalError?(this.logger.log(st.Debug,`Received a new batch ${e} but errored out on a previous batch ${this.nextBatchId-1}`),void await n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())):void this.logger.log(st.Debug,`Waiting for batch ${this.nextBatchId}. Batch ${e} not processed.`);try{this.nextBatchId++,this.logger.log(st.Debug,`Applying batch ${e}.`),function(e,t){const n=ge[e];if(!n)throw new Error(`There is no browser renderer with ID ${e}.`);const r=t.arrayRangeReader,o=t.updatedComponents(),s=r.values(o),i=r.count(o),a=t.referenceFrames(),c=r.values(a),l=t.diffReader;for(let e=0;e{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}class kr{constructor(t,n,r,o){this._firstUpdate=!0,this._renderingFailed=!1,this._disposed=!1,this._circuitId=void 0,this._applicationState=n,this._componentManager=t,this._options=r,this._logger=o,this._renderQueue=new vr(this._logger),this._dispatcher=e.attachDispatcher(this)}start(){if(this.isDisposedOrDisposing())throw new Error("Cannot start a disposed circuit.");return this._startPromise||(this._startPromise=this.startCore()),this._startPromise}updateRootComponents(e){var t,n;return this._firstUpdate?(this._firstUpdate=!1,null===(t=this._connection)||void 0===t?void 0:t.send("UpdateRootComponents",e,this._applicationState)):null===(n=this._connection)||void 0===n?void 0:n.send("UpdateRootComponents",e,"")}async startCore(){if(this._connection=await this.startConnection(),this._connection.state!==Jt.Connected)return!1;const e=JSON.stringify(this._componentManager.initialComponents.map((e=>{return t=e,{...t,start:void 0,end:void 0};var t})));if(this._circuitId=await this._connection.invoke("StartCircuit",Ue.getBaseURI(),Ue.getLocationHref(),e,this._applicationState||""),!this._circuitId)return!1;for(const e of this._options.circuitHandlers)e.onCircuitOpened&&e.onCircuitOpened();return!0}async startConnection(){var e,t;const n=new nr;n.name="blazorpack";const r=(new wn).withUrl("_blazor").withHubProtocol(n);this._options.configureSignalR(r);const o=r.build();o.on("JS.AttachComponent",((e,t)=>function(e,t,n,r){let o=ge[e];o||(o=new de(e),ge[e]=o),o.attachRootComponentToLogicalElement(n,t,!1)}(_n.Server,this.resolveElement(t),e))),o.on("JS.BeginInvokeJS",this._dispatcher.beginInvokeJSFromDotNet.bind(this._dispatcher)),o.on("JS.EndInvokeDotNet",this._dispatcher.endInvokeDotNetFromJS.bind(this._dispatcher)),o.on("JS.ReceiveByteArray",this._dispatcher.receiveByteArray.bind(this._dispatcher)),o.on("JS.BeginTransmitStream",(e=>{const t=new ReadableStream({start:t=>{o.stream("SendDotNetStreamToJS",e).subscribe({next:e=>t.enqueue(e),complete:()=>t.close(),error:e=>t.error(e)})}});this._dispatcher.supplyDotNetStream(e,t)})),o.on("JS.RenderBatch",(async(e,t)=>{var n,r;this._logger.log(bt.Debug,`Received render batch with id ${e} and ${t.byteLength} bytes.`),await this._renderQueue.processBatch(e,t,this._connection),null===(r=(n=this._componentManager).onAfterRenderBatch)||void 0===r||r.call(n,_n.Server)})),o.on("JS.EndUpdateRootComponents",(e=>{var t,n;null===(n=(t=this._componentManager).onAfterUpdateRootComponents)||void 0===n||n.call(t,e)})),o.on("JS.EndLocationChanging",ot._internal.navigationManager.endLocationChanging),o.onclose((e=>{this._interopMethodsForReconnection=function(e){const t=S.get(e);if(!t)throw new Error(`Interop methods are not registered for renderer ${e}`);return S.delete(e),t}(_n.Server),this._disposed||this._renderingFailed||this._options.reconnectionHandler.onConnectionDown(this._options.reconnectionOptions,e)})),o.on("JS.Error",(e=>{this._renderingFailed=!0,this.unhandledError(e),Ir()}));try{await o.start()}catch(e){if(this.unhandledError(e),"FailedToNegotiateWithServerError"===e.errorType)throw e;Ir(),e.innerErrors&&(e.innerErrors.some((e=>"UnsupportedTransportError"===e.errorType&&e.transport===cn.WebSockets))?this._logger.log(bt.Error,"Unable to connect, please ensure you are using an updated browser that supports WebSockets."):e.innerErrors.some((e=>"FailedToStartTransportError"===e.errorType&&e.transport===cn.WebSockets))?this._logger.log(bt.Error,"Unable to connect, please ensure WebSockets are available. A VPN or proxy may be blocking the connection."):e.innerErrors.some((e=>"DisabledTransportError"===e.errorType&&e.transport===cn.LongPolling))&&this._logger.log(bt.Error,"Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. For additional details, visit https://aka.ms/blazor-server-websockets-error."))}return(null===(t=null===(e=o.connection)||void 0===e?void 0:e.features)||void 0===t?void 0:t.inherentKeepAlive)&&this._logger.log(bt.Warning,"Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling."),o}async disconnect(){var e;await(null===(e=this._connection)||void 0===e?void 0:e.stop())}async reconnect(){if(!this._circuitId)throw new Error("Circuit host not initialized.");return this._connection.state===Jt.Connected||(this._connection=await this.startConnection(),this._interopMethodsForReconnection&&(I(_n.Server,this._interopMethodsForReconnection),this._interopMethodsForReconnection=void 0),!!await this._connection.invoke("ConnectCircuit",this._circuitId)&&(this._options.reconnectionHandler.onConnectionUp(),!0))}beginInvokeDotNetFromJS(e,t,n,r,o){this.throwIfDispatchingWhenDisposed(),this._connection.send("BeginInvokeDotNetFromJS",e?e.toString():null,t,n,r||0,o)}endInvokeJSFromDotNet(e,t,n){this.throwIfDispatchingWhenDisposed(),this._connection.send("EndInvokeJSFromDotNet",e,t,n)}sendByteArray(e,t){this.throwIfDispatchingWhenDisposed(),this._connection.send("ReceiveByteArray",e,t)}throwIfDispatchingWhenDisposed(){if(this._disposed)throw new Error("The circuit associated with this dispatcher is no longer available.")}sendLocationChanged(e,t,n){return this._connection.send("OnLocationChanged",e,t,n)}sendLocationChanging(e,t,n,r){return this._connection.send("OnLocationChanging",e,t,n,r)}sendJsDataStream(e,t,n){return function(e,t,n,r){setTimeout((async()=>{let o=5,s=(new Date).valueOf();try{const i=t instanceof Blob?t.size:t.byteLength;let a=0,c=0;for(;a1)await e.send("ReceiveJSDataChunk",n,c,h,null);else{if(!await e.invoke("ReceiveJSDataChunk",n,c,h,null))break;const t=(new Date).valueOf(),r=t-s;s=t,o=Math.max(1,Math.round(500/Math.max(1,r)))}a+=l,c++}}catch(t){await e.send("ReceiveJSDataChunk",n,-1,null,t.toString())}}),0)}(this._connection,e,t,n)}resolveElement(e){const t=function(e){const t=f.get(e);if(t)return f.delete(e),t}(e);if(t)return O(t,!0);const n=Number.parseInt(e);if(!Number.isNaN(n))return function(e){const{start:t,end:n}=e,r=t[$];if(r){if(r!==e)throw new Error("The start component comment was already associated with another component descriptor.");return t}const o=t.parentNode;if(!o)throw new Error(`Comment not connected to the DOM ${t.textContent}`);const s=O(o,!0),i=K(s);t[L]=s,t[$]=e;const a=O(t);if(n){const e=K(a),r=Array.prototype.indexOf.call(i,a)+1;let o=null;for(;o!==n;){const n=i.splice(r,1)[0];if(!n)throw new Error("Could not find the end component comment in the parent logical node list");n[L]=t,e.push(n),o=n}}return a}(this._componentManager.resolveRootComponent(n));throw new Error(`Invalid sequence number or identifier '${e}'.`)}getRootComponentManager(){return this._componentManager}unhandledError(e){this._logger.log(bt.Error,e),this.disconnect()}getDisconnectFormData(){const e=new FormData,t=this._circuitId;return e.append("circuitId",t),e}didRenderingFail(){return this._renderingFailed}isDisposedOrDisposing(){return void 0!==this._disposePromise}sendDisconnectBeacon(){if(this._disposed)return;const e=this.getDisconnectFormData();this._disposed=navigator.sendBeacon("_blazor/disconnect",e)}dispose(){return this._disposePromise||(this._disposePromise=this.disposeCore()),this._disposePromise}async disposeCore(){var e;if(!this._startPromise)return void(this._disposed=!0);await this._startPromise,this._disposed=!0,null===(e=this._connection)||void 0===e||e.stop();const t=this.getDisconnectFormData();fetch("_blazor/disconnect",{method:"POST",body:t});for(const e of this._options.circuitHandlers)e.onCircuitClosed&&e.onCircuitClosed()}}class Tr{constructor(e,t,n,r){this.maxRetries=t,this.document=n,this.logger=r,this.modal=this.document.createElement("div"),this.modal.id=e,this.maxRetries=t,this.modal.style.cssText=["position: fixed","top: 0","right: 0","bottom: 0","left: 0","z-index: 1050","display: none","overflow: hidden","background-color: #fff","opacity: 0.8","text-align: center","font-weight: bold","transition: visibility 0s linear 500ms"].join(";"),this.message=this.document.createElement("h5"),this.message.style.cssText="margin-top: 20px",this.button=this.document.createElement("button"),this.button.style.cssText="margin:5px auto 5px",this.button.textContent="Retry";const o=this.document.createElement("a");o.addEventListener("click",(()=>location.reload())),o.textContent="reload",this.reloadParagraph=this.document.createElement("p"),this.reloadParagraph.textContent="Alternatively, ",this.reloadParagraph.appendChild(o),this.modal.appendChild(this.message),this.modal.appendChild(this.button),this.modal.appendChild(this.reloadParagraph),this.loader=this.getLoader(),this.message.after(this.loader),this.button.addEventListener("click",(async()=>{this.show();try{await ot.reconnect()||this.rejected()}catch(e){this.logger.log(st.Error,e),this.failed()}}))}show(){this.document.contains(this.modal)||this.document.body.appendChild(this.modal),this.modal.style.display="block",this.loader.style.display="inline-block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server...",this.modal.style.visibility="hidden",setTimeout((()=>{this.modal.style.visibility="visible"}),0)}update(e){this.message.textContent=`Attempting to reconnect to the server: ${e} of ${this.maxRetries}`}hide(){this.modal.style.display="none"}failed(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.loader.style.display="none";const e=this.document.createTextNode("Reconnection failed. Try "),t=this.document.createElement("a");t.textContent="reloading",t.setAttribute("href",""),t.addEventListener("click",(()=>location.reload()));const n=this.document.createTextNode(" the page if you're unable to reconnect.");this.message.replaceChildren(e,t,n)}rejected(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.loader.style.display="none";const e=this.document.createTextNode("Could not reconnect to the server. "),t=this.document.createElement("a");t.textContent="Reload",t.setAttribute("href",""),t.addEventListener("click",(()=>location.reload()));const n=this.document.createTextNode(" the page to restore functionality.");this.message.replaceChildren(e,t,n)}getLoader(){const e=this.document.createElement("div");return e.style.cssText=["border: 0.3em solid #f3f3f3","border-top: 0.3em solid #3498db","border-radius: 50%","width: 2em","height: 2em","display: inline-block"].join(";"),e.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:2e3,iterations:1/0}),e}}class Dr{constructor(e,t,n){this.dialog=e,this.maxRetries=t,this.document=n,this.document=n;const r=this.document.getElementById(Dr.MaxRetriesId);r&&(r.innerText=this.maxRetries.toString())}show(){this.removeClasses(),this.dialog.classList.add(Dr.ShowClassName)}update(e){const t=this.document.getElementById(Dr.CurrentAttemptId);t&&(t.innerText=e.toString())}hide(){this.removeClasses(),this.dialog.classList.add(Dr.HideClassName)}failed(){this.removeClasses(),this.dialog.classList.add(Dr.FailedClassName)}rejected(){this.removeClasses(),this.dialog.classList.add(Dr.RejectedClassName)}removeClasses(){this.dialog.classList.remove(Dr.ShowClassName,Dr.HideClassName,Dr.FailedClassName,Dr.RejectedClassName)}}Dr.ShowClassName="components-reconnect-show",Dr.HideClassName="components-reconnect-hide",Dr.FailedClassName="components-reconnect-failed",Dr.RejectedClassName="components-reconnect-rejected",Dr.MaxRetriesId="components-reconnect-max-retries",Dr.CurrentAttemptId="components-reconnect-current-attempt";class Rr{constructor(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||ot.reconnect}onConnectionDown(e,t){if(!this._reconnectionDisplay){const t=document.getElementById(e.dialogId);this._reconnectionDisplay=t?new Dr(t,e.maxRetries,document):new Tr(e.dialogId,e.maxRetries,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new xr(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))}onConnectionUp(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)}}class xr{constructor(e,t,n,r){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=r,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}dispose(){this.isDisposed=!0,this.reconnectDisplay.hide()}async attemptPeriodicReconnection(e){for(let t=0;txr.MaximumFirstRetryInterval?xr.MaximumFirstRetryInterval:e.retryIntervalMilliseconds;if(await this.delay(n),this.isDisposed)break;try{return await this.reconnectCallback()?void 0:void this.reconnectDisplay.rejected()}catch(e){this.logger.log(st.Error,e)}}this.reconnectDisplay.failed()}delay(e){return new Promise((t=>setTimeout(t,e)))}}xr.MaximumFirstRetryInterval=3e3;class Ar{constructor(e=!0,t,n,r=0){this.singleRuntime=e,this.logger=t,this.webRendererId=r,this.afterStartedCallbacks=[],n&&this.afterStartedCallbacks.push(...n)}async importInitializersAsync(e,t){await Promise.all(e.map((e=>async function(e,n){const r=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),o=await import(r);if(void 0!==o){if(e.singleRuntime){const{beforeStart:n,afterStarted:r,beforeWebAssemblyStart:i,afterWebAssemblyStarted:a,beforeServerStart:c,afterServerStarted:l}=o;let h=n;e.webRendererId===_n.Server&&c&&(h=c),e.webRendererId===_n.WebAssembly&&i&&(h=i);let d=r;return e.webRendererId===_n.Server&&l&&(d=l),e.webRendererId===_n.WebAssembly&&a&&(d=a),s(e,h,d,t)}return function(e,t,n){var o;const i=n[0],{beforeStart:a,afterStarted:c,beforeWebStart:l,afterWebStarted:h,beforeWebAssemblyStart:d,afterWebAssemblyStarted:u,beforeServerStart:p,afterServerStarted:f}=t,g=!(l||h||d||u||p||f||!a&&!c),m=g&&i.enableClassicInitializers;if(g&&!i.enableClassicInitializers)null===(o=e.logger)||void 0===o||o.log(st.Warning,`Initializer '${r}' will be ignored because multiple runtimes are available. use 'before(web|webAssembly|server)Start' and 'after(web|webAssembly|server)Started?' instead.)`);else if(m)return s(e,a,c,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(i),d&&i.webAssembly.initializers.beforeStart.push(d),u&&i.webAssembly.initializers.afterStarted.push(u),p&&i.circuit.initializers.beforeStart.push(p),f&&i.circuit.initializers.afterStarted.push(f),h&&e.afterStartedCallbacks.push(h),l)return l(i)}(e,o,t)}function s(e,t,n,r){if(n&&e.afterStartedCallbacks.push(n),t)return t(...r)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=function(e){var t;return null===(t=C.get(e))||void 0===t?void 0:t[1]}(this.webRendererId);t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}function Pr(e){if(void 0!==Er)throw new Error("Blazor Server has already started.");return Er=new Promise(Nr.bind(null,e)),Er}async function Nr(e,t,n){await yr;const r=await async function(e){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new Ar(!1,void 0,e.initializers.afterStarted,_n.Server);const t=await fetch("_blazor/initializers",{method:"GET",credentials:"include",cache:"no-cache"}),n=await t.json(),r=new Ar(!0,void 0,void 0,_n.Server);return await r.importInitializersAsync(n,[e]),r}(br);var o;if(o=document,wr=dt(o,ht)||"",Sr=new lt(br.logLevel),_r=new kr(e,wr,br,Sr),Sr.log(st.Information,"Starting up Blazor server-side application."),ot.reconnect=async()=>!(_r.didRenderingFail()||!await _r.reconnect()&&(Sr.log(st.Information,"Reconnection attempt to the circuit was rejected by the server. This may indicate that the associated state is no longer available on the server."),1)),ot.defaultReconnectionHandler=new Rr(Sr),br.reconnectionHandler=br.reconnectionHandler||ot.defaultReconnectionHandler,ot._internal.navigationManager.listenForNavigationEvents(_n.Server,((e,t,n)=>_r.sendLocationChanged(e,t,n)),((e,t,n,r)=>_r.sendLocationChanging(e,t,n,r))),ot._internal.forceCloseConnection=()=>_r.disconnect(),ot._internal.sendJSDataStream=(e,t,n)=>_r.sendJsDataStream(e,t,n),!await _r.start())return Sr.log(st.Error,"Failed to start the circuit."),void t();const s=()=>{_r.sendDisconnectBeacon()};ot.disconnect=s,window.addEventListener("unload",s,{capture:!1,once:!0}),Sr.log(st.Information,"Blazor server-side application started."),r.invokeAfterStartedCallbacks(ot),t()}class Ur{constructor(e){this.initialComponents=e}resolveRootComponent(e){return this.initialComponents[e]}}class Mr{constructor(){this._eventListeners=new Map}static create(e){const t=new Mr;return e.addEventListener=t.addEventListener.bind(t),e.removeEventListener=t.removeEventListener.bind(t),t}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){var n;null===(n=this._eventListeners.get(e))||void 0===n||n.delete(t)}dispatchEvent(e,t){const n=this._eventListeners.get(e);if(!n)return;const r={...t,type:e};for(const e of n)e(r)}}let Br=!1;function Lr(e){if(Br)throw new Error("Blazor has already started.");Br=!0;const t=it(e);!function(e){if(br)throw new Error("Circuit options have already been configured.");if(br)throw new Error("WebAssembly options have already been configured.");yr=async function(e){const t=await e;br=it(t)}(e)}(Promise.resolve(t||{})),Mr.create(ot);const n=function(e){return ut(e,"server").sort(((e,t)=>e.sequence-t.sequence))}(document);return Pr(new Ur(n))}ot.start=Lr,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&Lr()})()})(); \ No newline at end of file +(()=>{var e={778:()=>{},77:()=>{},203:()=>{},200:()=>{},628:()=>{},321:()=>{}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";var e,t,r;!function(e){const t=[],n="__jsObjectId",r="__dotNetObject",o="__byte[]",s="__dotNetStream",i="__jsStreamReferenceLength";let a,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,r=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in r))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=r,r=r[t]})),r instanceof Function)return r=r.bind(n),this._cachedFunctions.set(e,r),r;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const h={0:new l(window)};h[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let d,u=1;function p(e){t.push(e)}function f(e){if(e&&"object"==typeof e){h[u]=new l(e);const t={[n]:u};return u++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function g(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const r={[i]:t};try{const t=f(e);r[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return r}function m(e,n){c=e;const r=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,r}function v(){if(void 0===a)throw new Error("No call dispatcher has been set.");if(null===a)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return a}e.attachDispatcher=function(e){const t=new y(e);return void 0===a?a=t:a&&(a=null),t},e.attachReviver=p,e.invokeMethod=function(e,t,...n){return v().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return v().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=f,e.createJSStreamReference=g,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&b(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(d=e.JSCallResultType||(e.JSCallResultType={}));class y{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,r){const o=m(this,t),s=I(_(e,r)(...o||[]),n);return null==s?null:T(this,s)}beginInvokeJSFromDotNet(e,t,n,r,o){const s=new Promise((e=>{const r=m(this,n);e(_(t,o)(...r||[]))}));e&&s.then((t=>T(this,[e,!0,I(t,r)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,w(t)]))))}endInvokeDotNetFromJS(e,t,n){const r=t?m(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,r)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,r){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const o=T(this,r),s=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,o);return s?m(this,s):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,r){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const o=this._nextAsyncCallId++,s=new Promise(((e,t)=>{this._pendingAsyncCalls[o]={resolve:e,reject:t}}));try{const s=T(this,r);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(o,e,t,n,s)}catch(e){this.completePendingCall(o,!1,e)}return s}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new C;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new C;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const r=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?r.resolve(n):r.reject(n)}}function w(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function _(e,t){const n=h[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function b(e){delete h[e]}e.findJSFunction=_,e.disposeJSObjectReferenceById=b;class S{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[r]:this._id}}}e.DotNetObject=S,p((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(r))return new S(t[r],c);if(t.hasOwnProperty(n)){const e=t[n],r=h[e];if(r)return r.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(o)){const e=t[o],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(s)){const e=t[s],n=c.getDotNetStreamPromise(e);return new E(n)}}return t}));class E{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class C{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function I(e,t){switch(t){case d.Default:return e;case d.JSObjectReference:return f(e);case d.JSStreamReference:return g(e);case d.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let k=0;function T(e,t){k=0,c=e;const n=JSON.stringify(t,D);return c=void 0,n}function D(e,t){if(t instanceof S)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(k,t);const e={[o]:k};return k++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t||(t={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(r||(r={}));class o{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new o(e,t.value)}return null}}const s=new Map,i=new Map,a=[];function c(e){return s.get(e)}function l(e){const t=s.get(e);return(null==t?void 0:t.browserEventName)||e}function h(e,t){e.forEach((e=>s.set(e,t)))}function d(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),h(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),h(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...u(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),h(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),h(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),h(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>u(e)}),h(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),h(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),h(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:d(t.touches),targetTouches:d(t.targetTouches),changedTouches:d(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),h(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...u(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),h(["wheel","mousewheel"],{createEventArgs:e=>{return{...u(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),h(["cancel","close","toggle"],{createEventArgs:()=>({})});const p=["date","datetime-local","month","time","week"],f=new Map;let g,m,v=0;const y={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const r="__bl-dynamic-root:"+(++v).toString();f.set(r,e);const o=await b().invokeMethodAsync("AddRootComponent",t,r),s=new _(o,m[t]);return await s.setParameters(n),s}};class w{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class _{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new w)}setParameters(e){const t={},n=Object.entries(e||{}),r=n.length;for(const[e,r]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&r?(n.setCallback(r),t[e]=n.getJSObjectReference()):t[e]=r}return b().invokeMethodAsync("SetRootComponentParameters",this._componentId,r,t)}async dispose(){if(null!==this._componentId){await b().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function b(){if(!g)throw new Error("Dynamic root components have not been enabled in this application.");return g}const S=new Map,E=[],C=new Map;function I(t,n,r,o){var s,i;if(S.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);S.set(t,n),r&&o&&Object.keys(r).length>0&&function(t,n,r){if(g)throw new Error("Dynamic root components have already been enabled.");g=t,m=n;for(const[t,o]of Object.entries(r)){const r=e.findJSFunction(t,0);for(const e of o)r(e,n[e])}}(T(t),r,o),null===(i=null===(s=C.get(t))||void 0===s?void 0:s[0])||void 0===i||i.call(s),function(e){for(const t of E)t(e)}(t)}function k(e,t,n){return D(e,t.eventHandlerId,(()=>T(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function T(e){const t=S.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let D=(e,t,n)=>n();const R=M(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),x={submit:!0},A=M(["click","dblclick","mousedown","mousemove","mouseup"]);class P{constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++P.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new U(this.onGlobalEvent.bind(this))}setListener(e,t,n,r){const o=this.getEventHandlerInfosForElement(e,!0),s=o.getHandler(t);if(s)this.eventInfoStore.update(s.eventHandlerId,n);else{const s={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(s),o.setHandler(t,s)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,i.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let r=n.shift(),s=null,i=!1;const a=Object.prototype.hasOwnProperty.call(R,e);let l=!1;for(;r;){const u=r,p=this.getEventHandlerInfosForElement(u,!1);if(p){const n=p.getHandler(e);if(n&&(h=u,d=t.type,!((h instanceof HTMLButtonElement||h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||h instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(A,d)&&h.disabled))){if(!i){const n=c(e);s=(null==n?void 0:n.createEventArgs)?n.createEventArgs(t):{},i=!0}Object.prototype.hasOwnProperty.call(x,t.type)&&t.preventDefault(),k(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:o.fromEvent(n.renderingComponentId,t)},s)}p.stopPropagation(e)&&(l=!0),p.preventDefault(e)&&t.preventDefault()}r=a||l?void 0:n.shift()}var h,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new N:null}}P.nextEventDelegatorId=0;class U{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},a.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=l(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(R,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=l(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class N{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function M(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const B=Symbol(),L=Symbol(),$=Symbol();function O(e,t){if(B in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const r=O(t,!0);r[L]=e,n.push(r)}))}return e[B]=n,e}function F(e){const t=K(e);for(;t.length;)W(e,0)}function H(e,t){const n=document.createComment("!");return j(n,e,t),n}function j(e,t,n){const r=e;let o=e;if(e instanceof Comment){const t=K(r);if((null==t?void 0:t.length)>0){const t=Q(r),n=new Range;n.setStartBefore(e),n.setEndAfter(t),o=n.extractContents()}}const s=z(r);if(s){const e=K(s),t=Array.prototype.indexOf.call(e,r);e.splice(t,1),delete r[L]}const i=K(t);if(n0;)W(n,0)}const r=n;r.parentNode.removeChild(r)}function z(e){return e[L]||null}function q(e,t){return K(e)[t]}function J(e){const t=Y(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function K(e){return e[B]}function V(e){const t=K(z(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function X(e,t){const n=K(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=Q(e.moveRangeStart)})),t.forEach((t=>{const r=document.createComment("marker");t.moveToBeforeMarker=r;const o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):G(r,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd;let s=r;for(;s;){const e=s.nextSibling;if(n.insertBefore(s,t),s===o)break;s=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function Y(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function G(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=V(t);n?n.parentNode.insertBefore(e,n):G(e,z(t))}}}function Q(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=V(e);if(t)return t.previousSibling;{const t=z(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:Q(t)}}function Z(e){return`_bl_${e}`}const ee="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,ee)&&"string"==typeof t[ee]?function(e){const t=`[${Z(e)}]`;return document.querySelector(t)}(t[ee]):t));const te="_blazorDeferredValue";function ne(e){return"select-multiple"===e.type}function re(e,t){e.value=t||""}function oe(e,t){e instanceof HTMLSelectElement?ne(e)?function(e,t){t||(t=[]);for(let n=0;n{ke()&&function(e,t){if(0!==e.button||function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e))return;if(e.defaultPrevented)return;const n=function(e){const t=e.composedPath&&e.composedPath();if(t)for(let e=0;e{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),ie.content));var i;let a=0;for(;s.firstChild;)j(s.firstChild,o,a++)}applyAttribute(e,t,n,r){const o=e.frameReader,s=o.attributeName(r),i=o.attributeEventHandlerId(r);if(i){const e=fe(s);return void this.eventDelegator.setListener(n,e,i,t)}const a=o.attributeValue(r);this.setOrRemoveAttributeOrProperty(n,s,a)}insertFrameRange(e,t,n,r,o,s,i){const a=r;for(let a=s;a{He(t,e)})},enableNavigationInterception:function(e){if(void 0!==me&&me!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");me=e},setHasLocationChangingListeners:function(e,t){const n=Ae.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){Ue&&e===xe&&(Ue(t),Ue=null)},navigateTo:function(e,t){Me(e,t,!0)},refresh:function(e){!e&&Ee()?Ce(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:Se};function Me(e,t,n=!1){const r=Ie(e),o=ze();if(t.forceLoad||!be(r)||"serverside-fullpageload"===o)!function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry);else if("clientside-router"===o)Be(r,!1,t.replaceHistoryEntry,t.historyEntryState,n);else{if("serverside-enhanced"!==o)throw new Error(`Unsupported page load mechanism: ${o}`);Ce(r,t.replaceHistoryEntry)}}async function Be(e,t,n,r=void 0,o=!1){if(Oe(),function(e){const t=new URL(e);return""!==t.hash&&location.origin===t.origin&&location.pathname===t.pathname&&location.search===t.search}(e))return Le(e,n,r),void function(e){const t=e.indexOf("#");t!==e.length-1&&Se(e.substring(t+1))}(e);const s=We();(o||!(null==s?void 0:s.hasLocationChangingEventListeners)||await Fe(e,r,t,s))&&(_e=!0,Le(e,n,r),await He(t))}function Le(e,t,n=void 0){t?history.replaceState({userState:n,_index:Re},"",e):(Re++,history.pushState({userState:n,_index:Re},"",e))}function $e(e){return new Promise((t=>{const n=Pe;Pe=()=>{Pe=n,t()},history.go(e)}))}function Oe(){Ue&&(Ue(!1),Ue=null)}function Fe(e,t,n,r){return new Promise((o=>{Oe(),xe++,Ue=o,r.locationChanging(xe,e,t,n)}))}async function He(e,t){const n=null!=t?t:location.href;await Promise.all(Array.from(Ae,(async([t,r])=>{var o,s;s=t,S.has(s)&&await r.locationChanged(n,null===(o=history.state)||void 0===o?void 0:o.userState,e)})))}async function je(e){var t,n;Pe&&"serverside-enhanced"!==ze()&&await Pe(e),Re=null!==(n=null===(t=history.state)||void 0===t?void 0:t._index)&&void 0!==n?n:0}function We(){const e=Te();if(void 0!==e)return Ae.get(e)}function ze(){return ke()?"clientside-router":Ee()?"serverside-enhanced":window.Blazor._internal.isBlazorWeb?"serverside-fullpageload":"clientside-router"}const qe={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e,t){const n=document.querySelector(e);n&&(n.hasAttribute("tabindex")||(n.tabIndex=-1),n.focus({preventScroll:!0}))}},Je={init:function(e,t,n,r=50){const o=Ve(t);(o||document.documentElement).style.overflowAnchor="none";const s=document.createRange();u(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const i=new IntersectionObserver((function(r){r.forEach((r=>{var o;if(!r.isIntersecting)return;s.setStartAfter(t),s.setEndBefore(n);const i=s.getBoundingClientRect().height,a=null===(o=r.rootBounds)||void 0===o?void 0:o.height;r.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",r.intersectionRect.top-r.boundingClientRect.top,i,a):r.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",r.boundingClientRect.bottom-r.intersectionRect.bottom,i,a)}))}),{root:o,rootMargin:`${r}px`});i.observe(t),i.observe(n);const a=d(t),c=d(n),{observersByDotNetObjectId:l,id:h}=Xe(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,r)=>{u(e.parentElement)&&(r.disconnect(),e.style.display="table-row",r.observe(e,t)),i.unobserve(e),i.observe(e)}));return n.observe(e,t),n}function u(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[h]={intersectionObserver:i,mutationObserverBefore:a,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=Xe(e),r=t[n];r&&(r.intersectionObserver.disconnect(),r.mutationObserverBefore.disconnect(),r.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},Ke=Symbol();function Ve(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:Ve(e.parentElement):null}function Xe(e){var t;const n=e._callDispatcher,r=e._id;return null!==(t=n[Ke])&&void 0!==t||(n[Ke]={}),{observersByDotNetObjectId:n[Ke],id:r}}const Ye={getAndRemoveExistingTitle:function(){var e;const t=document.head?document.head.getElementsByTagName("title"):[];if(0===t.length)return null;let n=null;for(let r=t.length-1;r>=0;r--){const o=t[r],s=o.previousSibling;s instanceof Comment&&null!==z(s)||(null===n&&(n=o.textContent),null===(e=o.parentNode)||void 0===e||e.removeChild(o))}return n}},Ge={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,r,o){const s=Qe(e,t),i=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(s.blob)})),a=await new Promise((function(e){var t;const s=Math.min(1,r/i.width),a=Math.min(1,o/i.height),c=Math.min(s,a),l=document.createElement("canvas");l.width=Math.round(i.width*c),l.height=Math.round(i.height*c),null===(t=l.getContext("2d"))||void 0===t||t.drawImage(i,0,0,l.width,l.height),l.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:s.lastModified,name:s.name,size:(null==a?void 0:a.size)||0,contentType:n,blob:a||s.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return Qe(e,t).blob}};function Qe(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const Ze=new Set,et={enableNavigationPrompt:function(e){0===Ze.size&&window.addEventListener("beforeunload",tt),Ze.add(e)},disableNavigationPrompt:function(e){Ze.delete(e),0===Ze.size&&window.removeEventListener("beforeunload",tt)}};function tt(e){e.preventDefault(),e.returnValue=!0}async function nt(e,t,n){return e instanceof Blob?await async function(e,t,n){const r=e.slice(t,t+n),o=await r.arrayBuffer();return new Uint8Array(o)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)}new Map;const rt={navigateTo:function(e,t,n=!1){Me(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(s.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=i.get(t.browserEventName);n?n.push(e):i.set(t.browserEventName,[e]),a.forEach((n=>n(e,t.browserEventName)))}s.set(e,t)},rootComponents:y,runtime:{},_internal:{navigationManager:Ne,domWrapper:qe,Virtualize:Je,PageTitle:Ye,InputFile:Ge,NavigationLock:et,getJSDataStreamChunk:nt,attachWebRendererInterop:I}};var ot;function st(e){const t={...it,...e};return e&&e.reconnectionOptions&&(t.reconnectionOptions={...it.reconnectionOptions,...e.reconnectionOptions}),t}window.Blazor=rt,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"}(ot||(ot={}));const it={configureSignalR:e=>{},logLevel:ot.Warning,initializers:void 0,circuitHandlers:[],reconnectionOptions:{maxRetries:8,retryIntervalMilliseconds:2e4,dialogId:"components-reconnect-modal"}};class at{log(e,t){}}at.instance=new at;class ct{constructor(e){this.minLevel=e}log(e,t){if(e>=this.minLevel){const n=`[${(new Date).toISOString()}] ${ot[e]}: ${t}`;switch(e){case ot.Critical:case ot.Error:console.error(n);break;case ot.Warning:console.warn(n);break;case ot.Information:console.info(n);break;default:console.log(n)}}}}const lt=/^\s*Blazor-Server-Component-State:(?[a-zA-Z0-9+/=]+)$/;function ht(e,t,n="state"){var r;if(e.nodeType===Node.COMMENT_NODE){const o=e.textContent||"",s=t.exec(o),i=s&&s.groups&&s.groups[n];return i&&(null===(r=e.parentNode)||void 0===r||r.removeChild(e)),i}if(!e.hasChildNodes())return;const o=e.childNodes;for(let e=0;e.*)$/);function pt(e,t){const n=e.currentElement;var r,o,s;if(n&&n.nodeType===Node.COMMENT_NODE&&n.textContent){const i=ut.exec(n.textContent),a=i&&i.groups&&i.groups.descriptor;if(!a)return;!function(e){if(e.parentNode instanceof Document)throw new Error("Root components cannot be marked as interactive. The element must be rendered statically so that scripts are not evaluated multiple times.")}(n);try{const i=function(e){const t=JSON.parse(e),{type:n}=t;if("server"!==n&&"webassembly"!==n&&"auto"!==n)throw new Error(`Invalid component type '${n}'.`);return t}(a),c=function(e,t,n){const{prerenderId:r}=e;if(r){for(;n.next()&&n.currentElement;){const e=n.currentElement;if(e.nodeType!==Node.COMMENT_NODE)continue;if(!e.textContent)continue;const t=ut.exec(e.textContent),o=t&&t[1];if(o)return vt(o,r),e}throw new Error(`Could not find an end component comment for '${t}'.`)}}(i,n,e);if(t!==i.type)return;switch(i.type){case"webassembly":return o=n,s=c,mt(r=i),{...r,uniqueId:ft++,start:o,end:s};case"server":return function(e,t,n){return gt(e),{...e,uniqueId:ft++,start:t,end:n}}(i,n,c);case"auto":return function(e,t,n){return gt(e),mt(e),{...e,uniqueId:ft++,start:t,end:n}}(i,n,c)}}catch(e){throw new Error(`Found malformed component comment at ${n.textContent}`)}}}let ft=0;function gt(e){const{descriptor:t,sequence:n}=e;if(!t)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===n)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(n))throw new Error(`Error parsing the sequence '${n}' for component '${JSON.stringify(e)}'`)}function mt(e){const{assembly:t,typeName:n}=e;if(!t)throw new Error("assembly must be defined when using a descriptor.");if(!n)throw new Error("typeName must be defined when using a descriptor.");e.parameterDefinitions=e.parameterDefinitions&&atob(e.parameterDefinitions),e.parameterValues=e.parameterValues&&atob(e.parameterValues)}function vt(e,t){const n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error(`Invalid end of component comment: '${e}'`);const r=n.prerenderId;if(!r)throw new Error(`End of component comment must have a value for the prerendered property: '${e}'`);if(r!==t)throw new Error(`End of component comment prerendered property must match the start comment prerender id: '${t}', '${r}'`)}class yt{constructor(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}next(){return this.currentIndex++,this.currentIndex{n+=`0x${e<16?"0":""}${e.toString(16)} `})),n.substr(0,n.length-1)}(e)}'`)):"string"==typeof e&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function kt(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}async function Tt(e,t,n,r,o,s){const i={},[a,c]=xt();i[a]=c,e.log(_t.Trace,`(${t} transport) sending data. ${It(o,s.logMessageContent)}.`);const l=kt(o)?"arraybuffer":"text",h=await n.post(r,{content:o,headers:{...i,...s.headers},responseType:l,timeout:s.timeout,withCredentials:s.withCredentials});e.log(_t.Trace,`(${t} transport) request complete. Response status: ${h.statusCode}.`)}class Dt{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch((e=>{}))}}class Rt{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const n=`[${(new Date).toISOString()}] ${_t[e]}: ${t}`;switch(e){case _t.Critical:case _t.Error:this.out.error(n);break;case _t.Warning:this.out.warn(n);break;case _t.Information:this.out.info(n);break;default:this.out.log(n)}}}}function xt(){let e="X-SignalR-User-Agent";return Ct.isNode&&(e="User-Agent"),[e,At(St,Pt(),Ct.isNode?"NodeJS":"Browser",Ut())]}function At(e,t,n,r){let o="Microsoft SignalR/";const s=e.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${e}; `,o+=t&&""!==t?`${t}; `:"Unknown OS; ",o+=`${n}`,o+=r?`; ${r}`:"; Unknown Runtime Version",o+=")",o}function Pt(){if(!Ct.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function Ut(){if(Ct.isNode)return process.versions.node}function Nt(e){return e.stack?e.stack:e.message?e.message:`${e}`}class Mt{writeHandshakeRequest(e){return wt.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(kt(e)){const r=new Uint8Array(e),o=r.indexOf(wt.RecordSeparatorCode);if(-1===o)throw new Error("Message is incomplete.");const s=o+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(r.slice(0,s))),n=r.byteLength>s?r.slice(s).buffer:null}else{const r=e,o=r.indexOf(wt.RecordSeparator);if(-1===o)throw new Error("Message is incomplete.");const s=o+1;t=r.substring(0,s),n=r.length>s?r.substring(s):null}const r=wt.parse(t),o=JSON.parse(r[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[n,o]}}class Bt extends Error{constructor(e,t){const n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}}class Lt extends Error{constructor(e="A timeout occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class $t extends Error{constructor(e="An abort occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class Ot extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}}class Ft extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}}class Ht extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}}class jt extends Error{constructor(e){const t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}}class Wt extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}}var zt,qt;!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",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"}(zt||(zt={}));class Jt{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Dt(this,e)}}class Kt{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}async _send(e){const t=this._protocol.writeMessage(e);let n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let e=()=>{},r=()=>{};kt(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise(((t,n)=>{e=t,r=n}))),this._messages.push(new Vt(t,this._totalMessageCount,e,r))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await n}_ack(e){let t=-1;for(let n=0;nthis._nextReceivingSequenceId?this._connection.stop(new Error("Sequence ID greater than amount of messages we've received.")):this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=0!==this._messages.length?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:zt.Sequence,sequenceId:e}));const t=this._messages;for(const e of t)await this._connection.send(e._message);this._reconnectInProgress=!1}_dispose(e){null!=e||(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case zt.Invocation:case zt.StreamItem:case zt.Completion:case zt.StreamInvocation:case zt.CancelInvocation:return!0;case zt.Close:case zt.Sequence:case zt.Ping:case zt.Ack:return!1}}_ackTimer(){void 0===this._ackTimerHandle&&(this._ackTimerHandle=setTimeout((async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:zt.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}}class Vt{constructor(e,t,n,r){this._message=e,this._id=t,this._resolver=n,this._rejector=r}}!function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"}(qt||(qt={}));class Xt{static create(e,t,n,r,o,s,i){return new Xt(e,t,n,r,o,s,i)}constructor(e,t,n,r,o,s,i){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(_t.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Et.isRequired(e,"connection"),Et.isRequired(t,"logger"),Et.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=null!=o?o:3e4,this.keepAliveIntervalInMilliseconds=null!=s?s:15e3,this._statefulReconnectBufferSize=null!=i?i:1e5,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=r,this._handshakeProtocol=new Mt,this.connection.onreceive=e=>this._processIncomingData(e),this.connection.onclose=e=>this._connectionClosed(e),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=qt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:zt.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==qt.Disconnected&&this._connectionState!==qt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==qt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=qt.Connecting,this._logger.log(_t.Debug,"Starting HubConnection.");try{await this._startInternal(),Ct.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=qt.Connected,this._connectionStarted=!0,this._logger.log(_t.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=qt.Disconnected,this._logger.log(_t.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise(((e,t)=>{this._handshakeResolver=e,this._handshakeRejecter=t}));await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const n={protocol:this._protocol.name,version:t};if(this._logger.log(_t.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(_t.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;!!this.connection.features.reconnect&&(this._messageBuffer=new Kt(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(e){throw this._logger.log(_t.Debug,`Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(e),e}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch(e){}}_stopInternal(e){if(this._connectionState===qt.Disconnected)return this._logger.log(_t.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===qt.Disconnecting)return this._logger.log(_t.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const t=this._connectionState;return this._connectionState=qt.Disconnecting,this._logger.log(_t.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(_t.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===qt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new $t("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...t){const[n,r]=this._replaceStreamingParams(t),o=this._createStreamInvocation(e,t,r);let s;const i=new Jt;return i.cancelCallback=()=>{const e=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],s.then((()=>this._sendWithProtocol(e)))},this._callbacks[o.invocationId]=(e,t)=>{t?i.error(t):e&&(e.type===zt.Completion?e.error?i.error(new Error(e.error)):i.complete():i.next(e.item))},s=this._sendWithProtocol(o).catch((e=>{i.error(e),delete this._callbacks[o.invocationId]})),this._launchStreams(n,s),i}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[n,r]=this._replaceStreamingParams(t),o=this._sendWithProtocol(this._createInvocation(e,t,!0,r));return this._launchStreams(n,o),o}invoke(e,...t){const[n,r]=this._replaceStreamingParams(t),o=this._createInvocation(e,t,!1,r);return new Promise(((e,t)=>{this._callbacks[o.invocationId]=(n,r)=>{r?t(r):n&&(n.type===zt.Completion?n.error?t(new Error(n.error)):e(n.result):t(new Error(`Unexpected message type: ${n.type}`)))};const r=this._sendWithProtocol(o).catch((e=>{t(e),delete this._callbacks[o.invocationId]}));this._launchStreams(n,r)}))}on(e,t){e&&t&&(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),-1===this._methods[e].indexOf(t)&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const n=this._methods[e];if(n)if(t){const r=n.indexOf(t);-1!==r&&(n.splice(r,1),0===n.length&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const e of t)if(!this._messageBuffer||this._messageBuffer._shouldProcessMessage(e))switch(e.type){case zt.Invocation:this._invokeClientMethod(e);break;case zt.StreamItem:case zt.Completion:{const t=this._callbacks[e.invocationId];if(t){e.type===zt.Completion&&delete this._callbacks[e.invocationId];try{t(e)}catch(e){this._logger.log(_t.Error,`Stream callback threw error: ${Nt(e)}`)}}break}case zt.Ping:break;case zt.Close:{this._logger.log(_t.Information,"Close message received from server.");const t=e.error?new Error("Server returned an error on close: "+e.error):void 0;!0===e.allowReconnect?this.connection.stop(t):this._stopPromise=this._stopInternal(t);break}case zt.Ack:this._messageBuffer&&this._messageBuffer._ack(e);break;case zt.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(e);break;default:this._logger.log(_t.Warning,`Invalid message type: ${e.type}.`)}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(e){const t="Error parsing handshake response: "+e;this._logger.log(_t.Error,t);const n=new Error(t);throw this._handshakeRejecter(n),n}if(t.error){const e="Server returned handshake error: "+t.error;this._logger.log(_t.Error,e);const n=new Error(e);throw this._handshakeRejecter(n),n}return this._logger.log(_t.Debug,"Server handshake complete."),this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this._timeoutHandle=setTimeout((()=>this.serverTimeout()),this.serverTimeoutInMilliseconds),void 0!==this._pingServerHandle))){let e=this._nextKeepAlive-(new Date).getTime();e<0&&(e=0),this._pingServerHandle=setTimeout((async()=>{if(this._connectionState===qt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const t=e.target.toLowerCase(),n=this._methods[t];if(!n)return this._logger.log(_t.Warning,`No client method with the name '${t}' found.`),void(e.invocationId&&(this._logger.log(_t.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null))));const r=n.slice(),o=!!e.invocationId;let s,i,a;for(const n of r)try{const r=s;s=await n.apply(this,e.arguments),o&&s&&r&&(this._logger.log(_t.Error,`Multiple results provided for '${t}'. Sending error to server.`),a=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),i=void 0}catch(e){i=e,this._logger.log(_t.Error,`A callback for the method '${t}' threw error '${e}'.`)}a?await this._sendWithProtocol(a):o?(i?a=this._createCompletionMessage(e.invocationId,`${i}`,null):void 0!==s?a=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(_t.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),a=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(a)):s&&this._logger.log(_t.Error,`Result given for '${t}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(_t.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new $t("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===qt.Disconnecting?this._completeClose(e):this._connectionState===qt.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===qt.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=qt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(null!=e?e:new Error("Connection closed.")),this._messageBuffer=void 0),Ct.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(_t.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=Date.now();let n=0,r=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(n++,0,r);if(null===o)return this._logger.log(_t.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this._completeClose(e);if(this._connectionState=qt.Reconnecting,e?this._logger.log(_t.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(_t.Information,"Connection reconnecting."),0!==this._reconnectingCallbacks.length){try{this._reconnectingCallbacks.forEach((t=>t.apply(this,[e])))}catch(t){this._logger.log(_t.Error,`An onreconnecting callback called with error '${e}' threw error '${t}'.`)}if(this._connectionState!==qt.Reconnecting)return void this._logger.log(_t.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==o;){if(this._logger.log(_t.Information,`Reconnect attempt number ${n} will start in ${o} ms.`),await new Promise((e=>{this._reconnectDelayHandle=setTimeout(e,o)})),this._reconnectDelayHandle=void 0,this._connectionState!==qt.Reconnecting)return void this._logger.log(_t.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this._startInternal(),this._connectionState=qt.Connected,this._logger.log(_t.Information,"HubConnection reconnected successfully."),0!==this._reconnectedCallbacks.length)try{this._reconnectedCallbacks.forEach((e=>e.apply(this,[this.connection.connectionId])))}catch(e){this._logger.log(_t.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`)}return}catch(e){if(this._logger.log(_t.Information,`Reconnect attempt failed because of error '${e}'.`),this._connectionState!==qt.Reconnecting)return this._logger.log(_t.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this._connectionState===qt.Disconnecting&&this._completeClose());r=e instanceof Error?e:new Error(e.toString()),o=this._getNextRetryDelay(n++,Date.now()-t,r)}}this._logger.log(_t.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(n){return this._logger.log(_t.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${n}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach((n=>{const r=t[n];try{r(null,e)}catch(t){this._logger.log(_t.Error,`Stream 'error' callback called with '${e}' threw error: ${Nt(t)}`)}}))}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,r){if(n)return 0!==r.length?{arguments:t,streamIds:r,target:e,type:zt.Invocation}:{arguments:t,target:e,type:zt.Invocation};{const n=this._invocationId;return this._invocationId++,0!==r.length?{arguments:t,invocationId:n.toString(),streamIds:r,target:e,type:zt.Invocation}:{arguments:t,invocationId:n.toString(),target:e,type:zt.Invocation}}}_launchStreams(e,t){if(0!==e.length){t||(t=Promise.resolve());for(const n in e)e[n].subscribe({complete:()=>{t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n))))},error:e=>{let r;r=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then((()=>this._sendWithProtocol(this._createCompletionMessage(n,r))))},next:e=>{t=t.then((()=>this._sendWithProtocol(this._createStreamItemMessage(n,e))))}})}}_replaceStreamingParams(e){const t=[],n=[];for(let r=0;r0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const n=await this._innerClient.send(e);return t&&401===n.statusCode&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):n}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Qt.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Qt.Authorization]&&delete e.headers[Qt.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}class nn extends en{constructor(e){super(),this._logger=e;const t={_fetchType:void 0,_jar:void 0};var r;r=t,"undefined"==typeof fetch&&(r._jar=new(n(628).CookieJar),"undefined"==typeof fetch?r._fetchType=n(200):r._fetchType=fetch,r._fetchType=n(203)(r._fetchType,r._jar),1)?(this._fetchType=t._fetchType,this._jar=t._jar):this._fetchType=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw new Error("could not find global")}()),this._abortControllerType=AbortController;const o={_abortControllerType:this._abortControllerType};(function(e){return"undefined"==typeof AbortController&&(e._abortControllerType=n(778),!0)})(o)&&(this._abortControllerType=o._abortControllerType)}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new $t;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new $t});let r,o=null;if(e.timeout){const r=e.timeout;o=setTimeout((()=>{t.abort(),this._logger.log(_t.Warning,"Timeout from HTTP request."),n=new Lt}),r)}""===e.content&&(e.content=void 0),e.content&&(e.headers=e.headers||{},kt(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");try{r=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:!0===e.withCredentials?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(e){if(n)throw n;throw this._logger.log(_t.Warning,`Error from HTTP request. ${e}.`),e}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!r.ok){const e=await rn(r,"text");throw new Bt(e||r.statusText,r.status)}const s=rn(r,e.responseType),i=await s;return new Zt(r.status,r.statusText,i)}getCookieString(e){return""}}function rn(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":default:n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`)}return n}class on extends en{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new $t):e.method?e.url?new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),r.withCredentials=void 0===e.withCredentials||e.withCredentials,r.setRequestHeader("X-Requested-With","XMLHttpRequest"),""===e.content&&(e.content=void 0),e.content&&(kt(e.content)?r.setRequestHeader("Content-Type","application/octet-stream"):r.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const o=e.headers;o&&Object.keys(o).forEach((e=>{r.setRequestHeader(e,o[e])})),e.responseType&&(r.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{r.abort(),n(new $t)}),e.timeout&&(r.timeout=e.timeout),r.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),r.status>=200&&r.status<300?t(new Zt(r.status,r.statusText,r.response||r.responseText)):n(new Bt(r.response||r.responseText||r.statusText,r.status))},r.onerror=()=>{this._logger.log(_t.Warning,`Error from HTTP request. ${r.status}: ${r.statusText}.`),n(new Bt(r.statusText,r.status))},r.ontimeout=()=>{this._logger.log(_t.Warning,"Timeout from HTTP request."),n(new Lt)},r.send(e.content)})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class sn extends en{constructor(e){if(super(),"undefined"!=typeof fetch)this._httpClient=new nn(e);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");this._httpClient=new on(e)}}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new $t):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}var an,cn;!function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"}(an||(an={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(cn||(cn={}));class ln{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}}class hn{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new ln,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(Et.isRequired(e,"url"),Et.isRequired(t,"transferFormat"),Et.isIn(t,cn,"transferFormat"),this._url=e,this._logger.log(_t.Trace,"(LongPolling transport) Connecting."),t===cn.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,r]=xt(),o={[n]:r,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};t===cn.Binary&&(s.responseType="arraybuffer");const i=`${e}&_=${Date.now()}`;this._logger.log(_t.Trace,`(LongPolling transport) polling: ${i}.`);const a=await this._httpClient.get(i,s);200!==a.statusCode?(this._logger.log(_t.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Bt(a.statusText||"",a.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,t){try{for(;this._running;)try{const n=`${e}&_=${Date.now()}`;this._logger.log(_t.Trace,`(LongPolling transport) polling: ${n}.`);const r=await this._httpClient.get(n,t);204===r.statusCode?(this._logger.log(_t.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==r.statusCode?(this._logger.log(_t.Error,`(LongPolling transport) Unexpected response code: ${r.statusCode}.`),this._closeError=new Bt(r.statusText||"",r.statusCode),this._running=!1):r.content?(this._logger.log(_t.Trace,`(LongPolling transport) data received. ${It(r.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(r.content)):this._logger.log(_t.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(e){this._running?e instanceof Lt?this._logger.log(_t.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=e,this._running=!1):this._logger.log(_t.Trace,`(LongPolling transport) Poll errored after shutdown: ${e.message}`)}}finally{this._logger.log(_t.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?Tt(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(_t.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(_t.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[t,n]=xt();e[t]=n;const r={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let o;try{await this._httpClient.delete(this._url,r)}catch(e){o=e}o?o instanceof Bt&&(404===o.statusCode?this._logger.log(_t.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(_t.Trace,`(LongPolling transport) Error sending a DELETE request: ${o}`)):this._logger.log(_t.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(_t.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(_t.Trace,e),this.onclose(this._closeError)}}}class dn{constructor(e,t,n,r){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=r,this.onreceive=null,this.onclose=null}async connect(e,t){return Et.isRequired(e,"url"),Et.isRequired(t,"transferFormat"),Et.isIn(t,cn,"transferFormat"),this._logger.log(_t.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise(((n,r)=>{let o,s=!1;if(t===cn.Text){if(Ct.isBrowser||Ct.isWebWorker)o=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const t=this._httpClient.getCookieString(e),n={};n.Cookie=t;const[r,s]=xt();n[r]=s,o=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...n,...this._options.headers}})}try{o.onmessage=e=>{if(this.onreceive)try{this._logger.log(_t.Trace,`(SSE transport) data received. ${It(e.data,this._options.logMessageContent)}.`),this.onreceive(e.data)}catch(e){return void this._close(e)}},o.onerror=e=>{s?this._close():r(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},o.onopen=()=>{this._logger.log(_t.Information,`SSE connected to ${this._url}`),this._eventSource=o,s=!0,n()}}catch(e){return void r(e)}}else r(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))}))}async send(e){return this._eventSource?Tt(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class un{constructor(e,t,n,r,o,s){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=r,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,t){let n;return Et.isRequired(e,"url"),Et.isRequired(t,"transferFormat"),Et.isIn(t,cn,"transferFormat"),this._logger.log(_t.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise(((r,o)=>{let s;e=e.replace(/^http/,"ws");const i=this._httpClient.getCookieString(e);let a=!1;if(Ct.isReactNative){const t={},[r,o]=xt();t[r]=o,n&&(t[Qt.Authorization]=`Bearer ${n}`),i&&(t[Qt.Cookie]=i),s=new this._webSocketConstructor(e,void 0,{headers:{...t,...this._headers}})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);s||(s=new this._webSocketConstructor(e)),t===cn.Binary&&(s.binaryType="arraybuffer"),s.onopen=t=>{this._logger.log(_t.Information,`WebSocket connected to ${e}.`),this._webSocket=s,a=!0,r()},s.onerror=e=>{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"There was an error with the transport",this._logger.log(_t.Information,`(WebSockets transport) ${t}.`)},s.onmessage=e=>{if(this._logger.log(_t.Trace,`(WebSockets transport) data received. ${It(e.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(e.data)}catch(e){return void this._close(e)}},s.onclose=e=>{if(a)this._close(e);else{let t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",o(new Error(t))}}}))}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(_t.Trace,`(WebSockets transport) sending data. ${It(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(_t.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!this._isCloseEvent(e)||!1!==e.wasClean&&1e3===e.code?e instanceof Error?this.onclose(e):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)))}_isCloseEvent(e){return e&&"boolean"==typeof e.wasClean&&"number"==typeof e.code}}class pn{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Et.isRequired(e,"url"),this._logger=function(e){return void 0===e?new Rt(_t.Information):null===e?bt.instance:void 0!==e.log?e:new Rt(e)}(t.logger),this.baseUrl=this._resolveUrl(e),(t=t||{}).logMessageContent=void 0!==t.logMessageContent&&t.logMessageContent,"boolean"!=typeof t.withCredentials&&void 0!==t.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.withCredentials=void 0===t.withCredentials||t.withCredentials,t.timeout=void 0===t.timeout?1e5:t.timeout,"undefined"==typeof WebSocket||t.WebSocket||(t.WebSocket=WebSocket),"undefined"==typeof EventSource||t.EventSource||(t.EventSource=EventSource),this._httpClient=new tn(t.httpClient||new sn(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||cn.Binary,Et.isIn(e,cn,"transferFormat"),this._logger.log(_t.Debug,`Starting connection with transfer format '${cn[e]}'.`),"Disconnected"!==this._connectionState)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,"Disconnecting"===this._connectionState){const e="Failed to start the HttpConnection before stop() was called.";return this._logger.log(_t.Error,e),await this._stopPromise,Promise.reject(new $t(e))}if("Connected"!==this._connectionState){const e="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(_t.Error,e),Promise.reject(new $t(e))}this._connectionStarted=!0}send(e){return"Connected"!==this._connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new fn(this.transport)),this._sendQueue.send(e))}async stop(e){return"Disconnected"===this._connectionState?(this._logger.log(_t.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this._connectionState?(this._logger.log(_t.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState="Disconnecting",this._stopPromise=new Promise((e=>{this._stopPromiseResolver=e})),await this._stopInternal(e),void await this._stopPromise)}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch(e){}if(this.transport){try{await this.transport.stop()}catch(e){this._logger.log(_t.Error,`HttpConnection.transport.stop() threw error '${e}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(_t.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation){if(this._options.transport!==an.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this._constructTransport(an.WebSockets),await this._startTransport(t,e)}else{let n=null,r=0;do{if(n=await this._getNegotiationResponse(t),"Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)throw new $t("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){const e=n.accessToken;this._accessTokenFactory=()=>e,this._httpClient._accessToken=e,this._httpClient._accessTokenFactory=void 0}r++}while(n.url&&r<100);if(100===r&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,n,e)}this.transport instanceof hn&&(this.features.inherentKeepAlive=!0),"Connecting"===this._connectionState&&(this._logger.log(_t.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(e){return this._logger.log(_t.Error,"Failed to start the connection: "+e),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(e)}}async _getNegotiationResponse(e){const t={},[n,r]=xt();t[n]=r;const o=this._resolveNegotiateUrl(e);this._logger.log(_t.Debug,`Sending negotiation request: ${o}.`);try{const e=await this._httpClient.post(o,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(200!==e.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${e.statusCode}'`));const n=JSON.parse(e.content);return(!n.negotiateVersion||n.negotiateVersion<1)&&(n.connectionToken=n.connectionId),n.useStatefulReconnect&&!0!==this._options._useStatefulReconnect?Promise.reject(new jt("Client didn't negotiate Stateful Reconnect but the server did.")):n}catch(e){let t="Failed to complete negotiation with the server: "+e;return e instanceof Bt&&404===e.statusCode&&(t+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(_t.Error,t),Promise.reject(new jt(t))}}_createConnectUrl(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+`id=${t}`:e}async _createTransport(e,t,n,r){let o=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t))return this._logger.log(_t.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(o,r),void(this.connectionId=n.connectionId);const s=[],i=n.availableTransports||[];let a=n;for(const n of i){const i=this._resolveTransportOrError(n,t,r,!0===(null==a?void 0:a.useStatefulReconnect));if(i instanceof Error)s.push(`${n.transport} failed:`),s.push(i);else if(this._isITransport(i)){if(this.transport=i,!a){try{a=await this._getNegotiationResponse(e)}catch(e){return Promise.reject(e)}o=this._createConnectUrl(e,a.connectionToken)}try{return await this._startTransport(o,r),void(this.connectionId=a.connectionId)}catch(e){if(this._logger.log(_t.Error,`Failed to start the transport '${n.transport}': ${e}`),a=void 0,s.push(new Ht(`${n.transport} failed: ${e}`,an[n.transport])),"Connecting"!==this._connectionState){const e="Failed to select transport before stop() was called.";return this._logger.log(_t.Debug,e),Promise.reject(new $t(e))}}}}return s.length>0?Promise.reject(new Wt(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case an.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new un(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case an.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new dn(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case an.LongPolling:return new hn(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let r=!1;if(this.features.reconnect){try{this.features.disconnected(),await this.transport.connect(e,t),await this.features.resend()}catch{r=!0}r&&this._stopConnection(n)}else this._stopConnection(n)}:this.transport.onclose=e=>this._stopConnection(e),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,r){const o=an[e.transport];if(null==o)return this._logger.log(_t.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,o))return this._logger.log(_t.Debug,`Skipping transport '${an[o]}' because it was disabled by the client.`),new Ft(`'${an[o]}' is disabled by the client.`,o);if(!(e.transferFormats.map((e=>cn[e])).indexOf(n)>=0))return this._logger.log(_t.Debug,`Skipping transport '${an[o]}' because it does not support the requested transfer format '${cn[n]}'.`),new Error(`'${an[o]}' does not support ${cn[n]}.`);if(o===an.WebSockets&&!this._options.WebSocket||o===an.ServerSentEvents&&!this._options.EventSource)return this._logger.log(_t.Debug,`Skipping transport '${an[o]}' because it is not supported in your environment.'`),new Ot(`'${an[o]}' is not supported in your environment.`,o);this._logger.log(_t.Debug,`Selecting transport '${an[o]}'.`);try{return this.features.reconnect=o===an.WebSockets?r:void 0,this._constructTransport(o)}catch(e){return e}}_isITransport(e){return e&&"object"==typeof e&&"connect"in e}_stopConnection(e){if(this._logger.log(_t.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)throw this._logger.log(_t.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),e?this._logger.log(_t.Error,`Connection disconnected with error '${e}'.`):this._logger.log(_t.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch((e=>{this._logger.log(_t.Error,`TransportSendQueue.stop() threw error '${e}'.`)})),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(_t.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}else this._logger.log(_t.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`)}_resolveUrl(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!Ct.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(_t.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?"true"===n.get("useStatefulReconnect")&&(this._options._useStatefulReconnect=!0):!0===this._options._useStatefulReconnect&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}}class fn{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new gn,this._transportResult=new gn,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new gn),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(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()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new gn;const e=this._transportResult;this._transportResult=void 0;const t="string"==typeof this._buffer[0]?this._buffer.join(""):fn._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(t){e.reject(t)}}}static _concatBuffers(e){const t=e.map((e=>e.byteLength)).reduce(((e,t)=>e+t)),n=new Uint8Array(t);let r=0;for(const t of e)n.set(new Uint8Array(t),r),r+=t.byteLength;return n.buffer}}class gn{constructor(){this.promise=new Promise(((e,t)=>[this._resolver,this._rejecter]=[e,t]))}resolve(){this._resolver()}reject(e){this._rejecter(e)}}class mn{constructor(){this.name="json",this.version=2,this.transferFormat=cn.Text}parseMessages(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=bt.instance);const n=wt.parse(e),r=[];for(const e of n){const n=JSON.parse(e);if("number"!=typeof n.type)throw new Error("Invalid payload.");switch(n.type){case zt.Invocation:this._isInvocationMessage(n);break;case zt.StreamItem:this._isStreamItemMessage(n);break;case zt.Completion:this._isCompletionMessage(n);break;case zt.Ping:case zt.Close:break;case zt.Ack:this._isAckMessage(n);break;case zt.Sequence:this._isSequenceMessage(n);break;default:t.log(_t.Information,"Unknown message type '"+n.type+"' ignored.");continue}r.push(n)}return r}writeMessage(e){return wt.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if("number"!=typeof e.sequenceId)throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if("string"!=typeof e||""===e)throw new Error(t)}}const vn={trace:_t.Trace,debug:_t.Debug,info:_t.Information,information:_t.Information,warn:_t.Warning,warning:_t.Warning,error:_t.Error,critical:_t.Critical,none:_t.None};class yn{configureLogging(e){if(Et.isRequired(e,"logging"),function(e){return void 0!==e.log}(e))this.logger=e;else if("string"==typeof e){const t=function(e){const t=vn[e.toLowerCase()];if(void 0!==t)return t;throw new Error(`Unknown log level: ${e}`)}(e);this.logger=new Rt(t)}else this.logger=new Rt(e);return this}withUrl(e,t){return Et.isRequired(e,"url"),Et.isNotEmpty(e,"url"),this.url=e,this.httpConnectionOptions="object"==typeof t?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return Et.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new Gt(e):this.reconnectPolicy=e:this.reconnectPolicy=new Gt,this}withServerTimeout(e){return Et.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return Et.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return void 0===this.httpConnectionOptions&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=null==e?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new pn(this.url,e);return Xt.create(t,this.logger||bt.instance,this.protocol||new mn,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}var wn;!function(e){e[e.Default=0]="Default",e[e.Server=1]="Server",e[e.WebAssembly=2]="WebAssembly",e[e.WebView=3]="WebView"}(wn||(wn={}));var _n,bn,Sn,En=4294967295;function Cn(e,t,n){var r=Math.floor(n/4294967296),o=n;e.setUint32(t,r),e.setUint32(t+4,o)}function In(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}var kn=("undefined"==typeof process||"never"!==(null===(_n=null===process||void 0===process?void 0:process.env)||void 0===_n?void 0:_n.TEXT_ENCODING))&&"undefined"!=typeof TextEncoder&&"undefined"!=typeof TextDecoder;function Tn(e){for(var t=e.length,n=0,r=0;r=55296&&o<=56319&&r65535&&(h-=65536,s.push(h>>>10&1023|55296),h=56320|1023&h),s.push(h)}else s.push(a);s.length>=4096&&(i+=String.fromCharCode.apply(String,s),s.length=0)}return s.length>0&&(i+=String.fromCharCode.apply(String,s)),i}var Pn,Un=kn?new TextDecoder:null,Nn=kn?"undefined"!=typeof process&&"force"!==(null===(Sn=null===process||void 0===process?void 0:process.env)||void 0===Sn?void 0:Sn.TEXT_DECODER)?200:0:En,Mn=function(e,t){this.type=e,this.data=t},Bn=(Pn=function(e,t){return Pn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Pn(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Pn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Ln=function(e){function t(n){var r=e.call(this,n)||this,o=Object.create(t.prototype);return Object.setPrototypeOf(r,o),Object.defineProperty(r,"name",{configurable:!0,enumerable:!1,value:t.name}),r}return Bn(t,e),t}(Error),$n={type:-1,encode:function(e){var t,n,r,o;return e instanceof Date?function(e){var t,n=e.sec,r=e.nsec;if(n>=0&&r>=0&&n<=17179869183){if(0===r&&n<=4294967295){var o=new Uint8Array(4);return(t=new DataView(o.buffer)).setUint32(0,n),o}var s=n/4294967296,i=4294967295&n;return o=new Uint8Array(8),(t=new DataView(o.buffer)).setUint32(0,r<<2|3&s),t.setUint32(4,i),o}return o=new Uint8Array(12),(t=new DataView(o.buffer)).setUint32(0,r),Cn(t,4,n),o}((r=1e6*((t=e.getTime())-1e3*(n=Math.floor(t/1e3))),{sec:n+(o=Math.floor(r/1e9)),nsec:r-1e9*o})):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:In(t,4),nsec:t.getUint32(0)};default:throw new Ln("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},On=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register($n)}return e.prototype.register=function(e){var t=e.type,n=e.encode,r=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=r;else{var o=1+t;this.builtInEncoders[o]=n,this.builtInDecoders[o]=r}},e.prototype.tryToEncode=function(e,t){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: ".concat(e," bytes in UTF-8"));this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){if(e.length>Rn){var t=Tn(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),xn(e,this.bytes,this.pos),this.pos+=t}else t=Tn(e),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var r=e.length,o=n,s=0;s>6&31|192;else{if(i>=55296&&i<=56319&&s>12&15|224,t[o++]=i>>6&63|128):(t[o++]=i>>18&7|240,t[o++]=i>>12&63|128,t[o++]=i>>6&63|128)}t[o++]=63&i|128}else t[o++]=i}}(e,this.bytes,this.pos),this.pos+=t},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: ".concat(t));this.writeU8(198),this.writeU32(t)}var n=Fn(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var r=0,o=e;r0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){e:for(var r=0,o=this.caches[n-1];r=this.maxLengthPerKey?n[Math.random()*n.length|0]=r:n.push(r)},e.prototype.decode=function(e,t,n){var r=this.find(e,t,n);if(null!=r)return this.hit++,r;this.miss++;var o=An(e,t,n),s=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(s,o),o},e}(),zn=function(e,t){var n,r,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return zn(this,(function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}}))},e.prototype.decodeAsync=function(e){var t,n,r,o,s,i,a;return s=this,void 0,a=function(){var s,i,a,c,l,h,d,u;return zn(this,(function(p){switch(p.label){case 0:s=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=qn(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,s)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{i=this.doDecodeSync(),s=!0}catch(e){if(!(e instanceof Xn))throw e}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=p.sent(),r={error:c},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(r)throw r.error;return[7];case 11:return[7];case 12:if(s){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,i]}throw h=(l=this).headByte,d=l.pos,u=l.totalPos,new RangeError("Insufficient data in parsing ".concat(jn(h)," at ").concat(u," (").concat(d," in the current buffer)"))}}))},new((i=void 0)||(i=Promise))((function(e,t){function n(e){try{o(a.next(e))}catch(e){t(e)}}function r(e){try{o(a.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof i?o:new i((function(e){e(o)}))).then(n,r)}o((a=a.apply(s,[])).next())}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return function(n,r,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,i=function(){var n,r,o,s,i,a,c,l,h;return zn(this,(function(d){switch(d.label){case 0:n=t,r=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),o=qn(e),d.label=2;case 2:return[4,Jn(o.next())];case 3:if((s=d.sent()).done)return[3,12];if(i=s.value,t&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(i),n&&(r=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,Jn(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0==--r?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=d.sent())instanceof Xn))throw a;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=d.sent(),l={error:c},[3,19];case 14:return d.trys.push([14,,17,18]),s&&!s.done&&(h=o.return)?[4,Jn(h.call(o))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(l)throw l.error;return[7];case 18:return[7];case 19:return[2]}}))}.apply(n,r||[]),a=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(e){i[e]&&(s[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||l(e,t)}))})}function l(e,t){try{(n=i[e](t)).value instanceof Jn?Promise.resolve(n.value.v).then(h,d):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function h(e){l("next",e)}function d(e){l("throw",e)}function u(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}(this,arguments)},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(r=e-128)){this.pushMapState(r),this.complete();continue e}t={}}else if(e<160){if(0!=(r=e-144)){this.pushArrayState(r),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(r=this.readU16())){this.pushArrayState(r),this.complete();continue e}t=[]}else if(221===e){if(0!==(r=this.readU32())){this.pushArrayState(r),this.complete();continue e}t=[]}else if(222===e){if(0!==(r=this.readU16())){this.pushMapState(r),this.complete();continue e}t={}}else if(223===e){if(0!==(r=this.readU32())){this.pushMapState(r),this.complete();continue e}t={}}else if(196===e){var r=this.lookU8();t=this.decodeBinary(r,1)}else if(197===e)r=this.lookU16(),t=this.decodeBinary(r,2);else if(198===e)r=this.lookU32(),t=this.decodeBinary(r,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)r=this.lookU8(),t=this.decodeExtension(r,1);else if(200===e)r=this.lookU16(),t=this.decodeExtension(r,2);else{if(201!==e)throw new Ln("Unrecognized type byte: ".concat(jn(e)));r=this.lookU32(),t=this.decodeExtension(r,4)}this.complete();for(var o=this.stack;o.length>0;){var s=o[o.length-1];if(0===s.type){if(s.array[s.position]=t,s.position++,s.position!==s.size)continue e;o.pop(),t=s.array}else{if(1===s.type){if("string"!=(i=typeof t)&&"number"!==i)throw new Ln("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new Ln("The key __proto__ is not allowed");s.key=t,s.type=2;continue e}if(s.map[s.key]=t,s.readCount++,s.readCount!==s.size){s.key=null,s.type=1;continue e}o.pop(),t=s.map}}return t}var i},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new Ln("Unrecognized array type byte: ".concat(jn(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new Ln("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new Ln("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new Ln("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthNn?function(e,t,n){var r=e.subarray(t,t+n);return Un.decode(r)}(this.bytes,o,e):An(this.bytes,o,e),this.pos+=t+e,r},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new Ln("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw Yn;var n=this.pos+t,r=this.bytes.subarray(n,n+e);return this.pos+=t+e,r},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new Ln("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),r=this.decodeBinary(e,t+1);return this.extensionCodec.decode(r,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=In(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}();class Zn{static write(e){let t=e.byteLength||e.length;const n=[];do{let e=127&t;t>>=7,t>0&&(e|=128),n.push(e)}while(t>0);t=e.byteLength||e.length;const r=new Uint8Array(n.length+t);return r.set(n,0),r.set(e,n.length),r.buffer}static parse(e){const t=[],n=new Uint8Array(e),r=[0,7,14,21,28];for(let 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}}const er=new Uint8Array([145,zt.Ping]);class tr{constructor(e){this.name="messagepack",this.version=2,this.transferFormat=cn.Binary,this._errorResult=1,this._voidResult=2,this._nonVoidResult=3,e=e||{},this._encoder=new Hn(e.extensionCodec,e.context,e.maxDepth,e.initialBufferSize,e.sortKeys,e.forceFloat32,e.ignoreUndefined,e.forceIntegerToFloat),this._decoder=new Qn(e.extensionCodec,e.context,e.maxStrLength,e.maxBinLength,e.maxArrayLength,e.maxMapLength,e.maxExtLength)}parseMessages(e,t){if(!(n=e)||"undefined"==typeof ArrayBuffer||!(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");var n;null===t&&(t=bt.instance);const r=Zn.parse(e),o=[];for(const e of r){const n=this._parseMessage(e,t);n&&o.push(n)}return o}writeMessage(e){switch(e.type){case zt.Invocation:return this._writeInvocation(e);case zt.StreamInvocation:return this._writeStreamInvocation(e);case zt.StreamItem:return this._writeStreamItem(e);case zt.Completion:return this._writeCompletion(e);case zt.Ping:return Zn.write(er);case zt.CancelInvocation:return this._writeCancelInvocation(e);case zt.Close:return this._writeClose();case zt.Ack:return this._writeAck(e);case zt.Sequence:return this._writeSequence(e);default:throw new Error("Invalid message type.")}}_parseMessage(e,t){if(0===e.length)throw new Error("Invalid payload.");const n=this._decoder.decode(e);if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");const r=n[0];switch(r){case zt.Invocation:return this._createInvocationMessage(this._readHeaders(n),n);case zt.StreamItem:return this._createStreamItemMessage(this._readHeaders(n),n);case zt.Completion:return this._createCompletionMessage(this._readHeaders(n),n);case zt.Ping:return this._createPingMessage(n);case zt.Close:return this._createCloseMessage(n);case zt.Ack:return this._createAckMessage(n);case zt.Sequence:return this._createSequenceMessage(n);default:return t.log(_t.Information,"Unknown message type '"+r+"' ignored."),null}}_createCloseMessage(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:zt.Close}}_createPingMessage(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:zt.Ping}}_createInvocationMessage(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");const n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:zt.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:zt.Invocation}}_createStreamItemMessage(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:zt.StreamItem}}_createCompletionMessage(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");const n=t[3];if(n!==this._voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");let r,o;switch(n){case this._errorResult:r=t[4];break;case this._nonVoidResult:o=t[4]}return{error:r,headers:e,invocationId:t[2],result:o,type:zt.Completion}}_createAckMessage(e){if(e.length<1)throw new Error("Invalid payload for Ack message.");return{sequenceId:e[1],type:zt.Ack}}_createSequenceMessage(e){if(e.length<1)throw new Error("Invalid payload for Sequence message.");return{sequenceId:e[1],type:zt.Sequence}}_writeInvocation(e){let t;return t=e.streamIds?this._encoder.encode([zt.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]):this._encoder.encode([zt.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments]),Zn.write(t.slice())}_writeStreamInvocation(e){let t;return t=e.streamIds?this._encoder.encode([zt.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]):this._encoder.encode([zt.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments]),Zn.write(t.slice())}_writeStreamItem(e){const t=this._encoder.encode([zt.StreamItem,e.headers||{},e.invocationId,e.item]);return Zn.write(t.slice())}_writeCompletion(e){const t=e.error?this._errorResult:void 0!==e.result?this._nonVoidResult:this._voidResult;let n;switch(t){case this._errorResult:n=this._encoder.encode([zt.Completion,e.headers||{},e.invocationId,t,e.error]);break;case this._voidResult:n=this._encoder.encode([zt.Completion,e.headers||{},e.invocationId,t]);break;case this._nonVoidResult:n=this._encoder.encode([zt.Completion,e.headers||{},e.invocationId,t,e.result])}return Zn.write(n.slice())}_writeCancelInvocation(e){const t=this._encoder.encode([zt.CancelInvocation,e.headers||{},e.invocationId]);return Zn.write(t.slice())}_writeClose(){const e=this._encoder.encode([zt.Close,null]);return Zn.write(e.slice())}_writeAck(e){const t=this._encoder.encode([zt.Ack,e.sequenceId]);return Zn.write(t.slice())}_writeSequence(e){const t=this._encoder.encode([zt.Sequence,e.sequenceId]);return Zn.write(t.slice())}_readHeaders(e){const t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t}}const nr="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,rr=nr?nr.decode.bind(nr):function(e){let t=0;const n=e.length,r=[],o=[];for(;t65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")},or=Math.pow(2,32),sr=Math.pow(2,21)-1;function ir(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function ar(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function cr(e,t){const n=ar(e,t+4);if(n>sr)throw new Error(`Cannot read uint64 with high order part ${n}, because the result would exceed Number.MAX_SAFE_INTEGER.`);return n*or+ar(e,t)}class lr{constructor(e){this.batchData=e;const t=new pr(e);this.arrayRangeReader=new fr(e),this.arrayBuilderSegmentReader=new gr(e),this.diffReader=new hr(e),this.editReader=new dr(e,t),this.frameReader=new ur(e,t)}updatedComponents(){return ir(this.batchData,this.batchData.length-20)}referenceFrames(){return ir(this.batchData,this.batchData.length-16)}disposedComponentIds(){return ir(this.batchData,this.batchData.length-12)}disposedEventHandlerIds(){return ir(this.batchData,this.batchData.length-8)}updatedComponentsEntry(e,t){const n=e+4*t;return ir(this.batchData,n)}referenceFramesEntry(e,t){return e+20*t}disposedComponentIdsEntry(e,t){const n=e+4*t;return ir(this.batchData,n)}disposedEventHandlerIdsEntry(e,t){const n=e+8*t;return cr(this.batchData,n)}}class hr{constructor(e){this.batchDataUint8=e}componentId(e){return ir(this.batchDataUint8,e)}edits(e){return e+4}editsEntry(e,t){return e+16*t}}class dr{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}editType(e){return ir(this.batchDataUint8,e)}siblingIndex(e){return ir(this.batchDataUint8,e+4)}newTreeIndex(e){return ir(this.batchDataUint8,e+8)}moveToSiblingIndex(e){return ir(this.batchDataUint8,e+8)}removedAttributeName(e){const t=ir(this.batchDataUint8,e+12);return this.stringReader.readString(t)}}class ur{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}frameType(e){return ir(this.batchDataUint8,e)}subtreeLength(e){return ir(this.batchDataUint8,e+4)}elementReferenceCaptureId(e){const t=ir(this.batchDataUint8,e+4);return this.stringReader.readString(t)}componentId(e){return ir(this.batchDataUint8,e+8)}elementName(e){const t=ir(this.batchDataUint8,e+8);return this.stringReader.readString(t)}textContent(e){const t=ir(this.batchDataUint8,e+4);return this.stringReader.readString(t)}markupContent(e){const t=ir(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeName(e){const t=ir(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeValue(e){const t=ir(this.batchDataUint8,e+8);return this.stringReader.readString(t)}attributeEventHandlerId(e){return cr(this.batchDataUint8,e+12)}}class pr{constructor(e){this.batchDataUint8=e,this.stringTableStartIndex=ir(e,e.length-4)}readString(e){if(-1===e)return null;{const n=ir(this.batchDataUint8,this.stringTableStartIndex+4*e),r=function(e,t){let n=0,r=0;for(let o=0;o<4;o++){const s=e[t+o];if(n|=(127&s)<this.nextBatchId)return this.fatalError?(this.logger.log(ot.Debug,`Received a new batch ${e} but errored out on a previous batch ${this.nextBatchId-1}`),void await n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())):void this.logger.log(ot.Debug,`Waiting for batch ${this.nextBatchId}. Batch ${e} not processed.`);try{this.nextBatchId++,this.logger.log(ot.Debug,`Applying batch ${e}.`),function(e,t){const n=ge[e];if(!n)throw new Error(`There is no browser renderer with ID ${e}.`);const r=t.arrayRangeReader,o=t.updatedComponents(),s=r.values(o),i=r.count(o),a=t.referenceFrames(),c=r.values(a),l=t.diffReader;for(let e=0;e{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}class Ir{constructor(t,n,r,o){this._firstUpdate=!0,this._renderingFailed=!1,this._disposed=!1,this._circuitId=void 0,this._applicationState=n,this._componentManager=t,this._options=r,this._logger=o,this._renderQueue=new mr(this._logger),this._dispatcher=e.attachDispatcher(this)}start(){if(this.isDisposedOrDisposing())throw new Error("Cannot start a disposed circuit.");return this._startPromise||(this._startPromise=this.startCore()),this._startPromise}updateRootComponents(e){var t,n;return this._firstUpdate?(this._firstUpdate=!1,null===(t=this._connection)||void 0===t?void 0:t.send("UpdateRootComponents",e,this._applicationState)):null===(n=this._connection)||void 0===n?void 0:n.send("UpdateRootComponents",e,"")}async startCore(){if(this._connection=await this.startConnection(),this._connection.state!==qt.Connected)return!1;const e=JSON.stringify(this._componentManager.initialComponents.map((e=>{return t=e,{...t,start:void 0,end:void 0};var t})));if(this._circuitId=await this._connection.invoke("StartCircuit",Ne.getBaseURI(),Ne.getLocationHref(),e,this._applicationState||""),!this._circuitId)return!1;for(const e of this._options.circuitHandlers)e.onCircuitOpened&&e.onCircuitOpened();return!0}async startConnection(){var e,t;const n=new tr;n.name="blazorpack";const r=(new yn).withUrl("_blazor").withHubProtocol(n);this._options.configureSignalR(r);const o=r.build();o.on("JS.AttachComponent",((e,t)=>function(e,t,n,r){let o=ge[e];o||(o=new de(e),ge[e]=o),o.attachRootComponentToLogicalElement(n,t,!1)}(wn.Server,this.resolveElement(t),e))),o.on("JS.BeginInvokeJS",this._dispatcher.beginInvokeJSFromDotNet.bind(this._dispatcher)),o.on("JS.EndInvokeDotNet",this._dispatcher.endInvokeDotNetFromJS.bind(this._dispatcher)),o.on("JS.ReceiveByteArray",this._dispatcher.receiveByteArray.bind(this._dispatcher)),o.on("JS.BeginTransmitStream",(e=>{const t=new ReadableStream({start:t=>{o.stream("SendDotNetStreamToJS",e).subscribe({next:e=>t.enqueue(e),complete:()=>t.close(),error:e=>t.error(e)})}});this._dispatcher.supplyDotNetStream(e,t)})),o.on("JS.RenderBatch",(async(e,t)=>{var n,r;this._logger.log(_t.Debug,`Received render batch with id ${e} and ${t.byteLength} bytes.`),await this._renderQueue.processBatch(e,t,this._connection),null===(r=(n=this._componentManager).onAfterRenderBatch)||void 0===r||r.call(n,wn.Server)})),o.on("JS.EndUpdateRootComponents",(e=>{var t,n;null===(n=(t=this._componentManager).onAfterUpdateRootComponents)||void 0===n||n.call(t,e)})),o.on("JS.EndLocationChanging",rt._internal.navigationManager.endLocationChanging),o.onclose((e=>{this._interopMethodsForReconnection=function(e){const t=S.get(e);if(!t)throw new Error(`Interop methods are not registered for renderer ${e}`);return S.delete(e),t}(wn.Server),this._disposed||this._renderingFailed||this._options.reconnectionHandler.onConnectionDown(this._options.reconnectionOptions,e)})),o.on("JS.Error",(e=>{this._renderingFailed=!0,this.unhandledError(e),Cr()}));try{await o.start()}catch(e){if(this.unhandledError(e),"FailedToNegotiateWithServerError"===e.errorType)throw e;Cr(),e.innerErrors&&(e.innerErrors.some((e=>"UnsupportedTransportError"===e.errorType&&e.transport===an.WebSockets))?this._logger.log(_t.Error,"Unable to connect, please ensure you are using an updated browser that supports WebSockets."):e.innerErrors.some((e=>"FailedToStartTransportError"===e.errorType&&e.transport===an.WebSockets))?this._logger.log(_t.Error,"Unable to connect, please ensure WebSockets are available. A VPN or proxy may be blocking the connection."):e.innerErrors.some((e=>"DisabledTransportError"===e.errorType&&e.transport===an.LongPolling))&&this._logger.log(_t.Error,"Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. For additional details, visit https://aka.ms/blazor-server-websockets-error."))}return(null===(t=null===(e=o.connection)||void 0===e?void 0:e.features)||void 0===t?void 0:t.inherentKeepAlive)&&this._logger.log(_t.Warning,"Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling."),o}async disconnect(){var e;await(null===(e=this._connection)||void 0===e?void 0:e.stop())}async reconnect(){if(!this._circuitId)throw new Error("Circuit host not initialized.");return this._connection.state===qt.Connected||(this._connection=await this.startConnection(),this._interopMethodsForReconnection&&(I(wn.Server,this._interopMethodsForReconnection),this._interopMethodsForReconnection=void 0),!!await this._connection.invoke("ConnectCircuit",this._circuitId)&&(this._options.reconnectionHandler.onConnectionUp(),!0))}beginInvokeDotNetFromJS(e,t,n,r,o){this.throwIfDispatchingWhenDisposed(),this._connection.send("BeginInvokeDotNetFromJS",e?e.toString():null,t,n,r||0,o)}endInvokeJSFromDotNet(e,t,n){this.throwIfDispatchingWhenDisposed(),this._connection.send("EndInvokeJSFromDotNet",e,t,n)}sendByteArray(e,t){this.throwIfDispatchingWhenDisposed(),this._connection.send("ReceiveByteArray",e,t)}throwIfDispatchingWhenDisposed(){if(this._disposed)throw new Error("The circuit associated with this dispatcher is no longer available.")}sendLocationChanged(e,t,n){return this._connection.send("OnLocationChanged",e,t,n)}sendLocationChanging(e,t,n,r){return this._connection.send("OnLocationChanging",e,t,n,r)}sendJsDataStream(e,t,n){return function(e,t,n,r){setTimeout((async()=>{let o=5,s=(new Date).valueOf();try{const i=t instanceof Blob?t.size:t.byteLength;let a=0,c=0;for(;a1)await e.send("ReceiveJSDataChunk",n,c,h,null);else{if(!await e.invoke("ReceiveJSDataChunk",n,c,h,null))break;const t=(new Date).valueOf(),r=t-s;s=t,o=Math.max(1,Math.round(500/Math.max(1,r)))}a+=l,c++}}catch(t){await e.send("ReceiveJSDataChunk",n,-1,null,t.toString())}}),0)}(this._connection,e,t,n)}resolveElement(e){const t=function(e){const t=f.get(e);if(t)return f.delete(e),t}(e);if(t)return O(t,!0);const n=Number.parseInt(e);if(!Number.isNaN(n))return function(e){const{start:t,end:n}=e,r=t[$];if(r){if(r!==e)throw new Error("The start component comment was already associated with another component descriptor.");return t}const o=t.parentNode;if(!o)throw new Error(`Comment not connected to the DOM ${t.textContent}`);const s=O(o,!0),i=K(s);t[L]=s,t[$]=e;const a=O(t);if(n){const e=K(a),r=Array.prototype.indexOf.call(i,a)+1;let o=null;for(;o!==n;){const n=i.splice(r,1)[0];if(!n)throw new Error("Could not find the end component comment in the parent logical node list");n[L]=t,e.push(n),o=n}}return a}(this._componentManager.resolveRootComponent(n));throw new Error(`Invalid sequence number or identifier '${e}'.`)}getRootComponentManager(){return this._componentManager}unhandledError(e){this._logger.log(_t.Error,e),this.disconnect()}getDisconnectFormData(){const e=new FormData,t=this._circuitId;return e.append("circuitId",t),e}didRenderingFail(){return this._renderingFailed}isDisposedOrDisposing(){return void 0!==this._disposePromise}sendDisconnectBeacon(){if(this._disposed)return;const e=this.getDisconnectFormData();this._disposed=navigator.sendBeacon("_blazor/disconnect",e)}dispose(){return this._disposePromise||(this._disposePromise=this.disposeCore()),this._disposePromise}async disposeCore(){var e;if(!this._startPromise)return void(this._disposed=!0);await this._startPromise,this._disposed=!0,null===(e=this._connection)||void 0===e||e.stop();const t=this.getDisconnectFormData();fetch("_blazor/disconnect",{method:"POST",body:t});for(const e of this._options.circuitHandlers)e.onCircuitClosed&&e.onCircuitClosed()}}class kr{constructor(e,t,n,r){this.maxRetries=t,this.document=n,this.logger=r,this.modal=this.document.createElement("div"),this.modal.id=e,this.maxRetries=t,this.modal.style.cssText=["position: fixed","top: 0","right: 0","bottom: 0","left: 0","z-index: 1050","display: none","overflow: hidden","background-color: #fff","opacity: 0.8","text-align: center","font-weight: bold","transition: visibility 0s linear 500ms"].join(";"),this.message=this.document.createElement("h5"),this.message.style.cssText="margin-top: 20px",this.button=this.document.createElement("button"),this.button.style.cssText="margin:5px auto 5px",this.button.textContent="Retry";const o=this.document.createElement("a");o.addEventListener("click",(()=>location.reload())),o.textContent="reload",this.reloadParagraph=this.document.createElement("p"),this.reloadParagraph.textContent="Alternatively, ",this.reloadParagraph.appendChild(o),this.modal.appendChild(this.message),this.modal.appendChild(this.button),this.modal.appendChild(this.reloadParagraph),this.loader=this.getLoader(),this.message.after(this.loader),this.button.addEventListener("click",(async()=>{this.show();try{await rt.reconnect()||this.rejected()}catch(e){this.logger.log(ot.Error,e),this.failed()}}))}show(){this.document.contains(this.modal)||this.document.body.appendChild(this.modal),this.modal.style.display="block",this.loader.style.display="inline-block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server...",this.modal.style.visibility="hidden",setTimeout((()=>{this.modal.style.visibility="visible"}),0)}update(e){this.message.textContent=`Attempting to reconnect to the server: ${e} of ${this.maxRetries}`}hide(){this.modal.style.display="none"}failed(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.loader.style.display="none";const e=this.document.createTextNode("Reconnection failed. Try "),t=this.document.createElement("a");t.textContent="reloading",t.setAttribute("href",""),t.addEventListener("click",(()=>location.reload()));const n=this.document.createTextNode(" the page if you're unable to reconnect.");this.message.replaceChildren(e,t,n)}rejected(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.loader.style.display="none";const e=this.document.createTextNode("Could not reconnect to the server. "),t=this.document.createElement("a");t.textContent="Reload",t.setAttribute("href",""),t.addEventListener("click",(()=>location.reload()));const n=this.document.createTextNode(" the page to restore functionality.");this.message.replaceChildren(e,t,n)}getLoader(){const e=this.document.createElement("div");return e.style.cssText=["border: 0.3em solid #f3f3f3","border-top: 0.3em solid #3498db","border-radius: 50%","width: 2em","height: 2em","display: inline-block"].join(";"),e.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:2e3,iterations:1/0}),e}}class Tr{constructor(e,t,n){this.dialog=e,this.maxRetries=t,this.document=n,this.document=n;const r=this.document.getElementById(Tr.MaxRetriesId);r&&(r.innerText=this.maxRetries.toString())}show(){this.removeClasses(),this.dialog.classList.add(Tr.ShowClassName)}update(e){const t=this.document.getElementById(Tr.CurrentAttemptId);t&&(t.innerText=e.toString())}hide(){this.removeClasses(),this.dialog.classList.add(Tr.HideClassName)}failed(){this.removeClasses(),this.dialog.classList.add(Tr.FailedClassName)}rejected(){this.removeClasses(),this.dialog.classList.add(Tr.RejectedClassName)}removeClasses(){this.dialog.classList.remove(Tr.ShowClassName,Tr.HideClassName,Tr.FailedClassName,Tr.RejectedClassName)}}Tr.ShowClassName="components-reconnect-show",Tr.HideClassName="components-reconnect-hide",Tr.FailedClassName="components-reconnect-failed",Tr.RejectedClassName="components-reconnect-rejected",Tr.MaxRetriesId="components-reconnect-max-retries",Tr.CurrentAttemptId="components-reconnect-current-attempt";class Dr{constructor(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||rt.reconnect}onConnectionDown(e,t){if(!this._reconnectionDisplay){const t=document.getElementById(e.dialogId);this._reconnectionDisplay=t?new Tr(t,e.maxRetries,document):new kr(e.dialogId,e.maxRetries,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new Rr(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))}onConnectionUp(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)}}class Rr{constructor(e,t,n,r){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=r,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}dispose(){this.isDisposed=!0,this.reconnectDisplay.hide()}async attemptPeriodicReconnection(e){for(let t=0;tRr.MaximumFirstRetryInterval?Rr.MaximumFirstRetryInterval:e.retryIntervalMilliseconds;if(await this.delay(n),this.isDisposed)break;try{return await this.reconnectCallback()?void 0:void this.reconnectDisplay.rejected()}catch(e){this.logger.log(ot.Error,e)}}this.reconnectDisplay.failed()}delay(e){return new Promise((t=>setTimeout(t,e)))}}Rr.MaximumFirstRetryInterval=3e3;class xr{constructor(e=!0,t,n,r=0){this.singleRuntime=e,this.logger=t,this.webRendererId=r,this.afterStartedCallbacks=[],n&&this.afterStartedCallbacks.push(...n)}async importInitializersAsync(e,t){await Promise.all(e.map((e=>async function(e,n){const r=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),o=await import(r);if(void 0!==o){if(e.singleRuntime){const{beforeStart:n,afterStarted:r,beforeWebAssemblyStart:i,afterWebAssemblyStarted:a,beforeServerStart:c,afterServerStarted:l}=o;let h=n;e.webRendererId===wn.Server&&c&&(h=c),e.webRendererId===wn.WebAssembly&&i&&(h=i);let d=r;return e.webRendererId===wn.Server&&l&&(d=l),e.webRendererId===wn.WebAssembly&&a&&(d=a),s(e,h,d,t)}return function(e,t,n){var o;const i=n[0],{beforeStart:a,afterStarted:c,beforeWebStart:l,afterWebStarted:h,beforeWebAssemblyStart:d,afterWebAssemblyStarted:u,beforeServerStart:p,afterServerStarted:f}=t,g=!(l||h||d||u||p||f||!a&&!c),m=g&&i.enableClassicInitializers;if(g&&!i.enableClassicInitializers)null===(o=e.logger)||void 0===o||o.log(ot.Warning,`Initializer '${r}' will be ignored because multiple runtimes are available. use 'before(web|webAssembly|server)Start' and 'after(web|webAssembly|server)Started?' instead.)`);else if(m)return s(e,a,c,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(i),d&&i.webAssembly.initializers.beforeStart.push(d),u&&i.webAssembly.initializers.afterStarted.push(u),p&&i.circuit.initializers.beforeStart.push(p),f&&i.circuit.initializers.afterStarted.push(f),h&&e.afterStartedCallbacks.push(h),l)return l(i)}(e,o,t)}function s(e,t,n,r){if(n&&e.afterStartedCallbacks.push(n),t)return t(...r)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=function(e){var t;return null===(t=C.get(e))||void 0===t?void 0:t[1]}(this.webRendererId);t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}function Ar(e){if(void 0!==Sr)throw new Error("Blazor Server has already started.");return Sr=new Promise(Pr.bind(null,e)),Sr}async function Pr(e,t,n){await vr;const r=await async function(e){if(e.initializers)return await Promise.all(e.initializers.beforeStart.map((t=>t(e)))),new xr(!1,void 0,e.initializers.afterStarted,wn.Server);const t=await fetch("_blazor/initializers",{method:"GET",credentials:"include",cache:"no-cache"}),n=await t.json(),r=new xr(!0,void 0,void 0,wn.Server);return await r.importInitializersAsync(n,[e]),r}(_r);var o;if(o=document,yr=ht(o,lt)||"",br=new ct(_r.logLevel),wr=new Ir(e,yr,_r,br),br.log(ot.Information,"Starting up Blazor server-side application."),rt.reconnect=async()=>!(wr.didRenderingFail()||!await wr.reconnect()&&(br.log(ot.Information,"Reconnection attempt to the circuit was rejected by the server. This may indicate that the associated state is no longer available on the server."),1)),rt.defaultReconnectionHandler=new Dr(br),_r.reconnectionHandler=_r.reconnectionHandler||rt.defaultReconnectionHandler,rt._internal.navigationManager.listenForNavigationEvents(wn.Server,((e,t,n)=>wr.sendLocationChanged(e,t,n)),((e,t,n,r)=>wr.sendLocationChanging(e,t,n,r))),rt._internal.forceCloseConnection=()=>wr.disconnect(),rt._internal.sendJSDataStream=(e,t,n)=>wr.sendJsDataStream(e,t,n),!await wr.start())return br.log(ot.Error,"Failed to start the circuit."),void t();const s=()=>{wr.sendDisconnectBeacon()};rt.disconnect=s,window.addEventListener("unload",s,{capture:!1,once:!0}),br.log(ot.Information,"Blazor server-side application started."),r.invokeAfterStartedCallbacks(rt),t()}class Ur{constructor(e){this.initialComponents=e}resolveRootComponent(e){return this.initialComponents[e]}}class Nr{constructor(){this._eventListeners=new Map}static create(e){const t=new Nr;return e.addEventListener=t.addEventListener.bind(t),e.removeEventListener=t.removeEventListener.bind(t),t}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){var n;null===(n=this._eventListeners.get(e))||void 0===n||n.delete(t)}dispatchEvent(e,t){const n=this._eventListeners.get(e);if(!n)return;const r={...t,type:e};for(const e of n)e(r)}}let Mr=!1;function Br(e){if(Mr)throw new Error("Blazor has already started.");Mr=!0;const t=st(e);!function(e){if(_r)throw new Error("Circuit options have already been configured.");if(_r)throw new Error("WebAssembly options have already been configured.");vr=async function(e){const t=await e;_r=st(t)}(e)}(Promise.resolve(t||{})),Nr.create(rt);const n=function(e){return dt(e,"server").sort(((e,t)=>e.sequence-t.sequence))}(document);return Ar(new Ur(n))}rt.start=Br,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&Br()})()})(); \ No newline at end of file diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.webview.js dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.webview.js --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.webview.js 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/dist/Release/blazor.webview.js 2024-03-08 08:33:13.000000000 +0000 @@ -1 +1 @@ -(()=>{"use strict";var e,t,n,r={d:(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};r.d({},{e:()=>Ot}),function(e){const t=[],n="__jsObjectId",r="__dotNetObject",o="__byte[]",a="__dotNetStream",i="__jsStreamReferenceLength";let s,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,r=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in r))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=r,r=r[t]})),r instanceof Function)return r=r.bind(n),this._cachedFunctions.set(e,r),r;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const u={0:new l(window)};u[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let d,h=1;function f(e){t.push(e)}function m(e){if(e&&"object"==typeof e){u[h]=new l(e);const t={[n]:h};return h++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function p(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const r={[i]:t};try{const t=m(e);r[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return r}function b(e,n){c=e;const r=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,r}function v(){if(void 0===s)throw new Error("No call dispatcher has been set.");if(null===s)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return s}e.attachDispatcher=function(e){const t=new g(e);return void 0===s?s=t:s&&(s=null),t},e.attachReviver=f,e.invokeMethod=function(e,t,...n){return v().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return v().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=m,e.createJSStreamReference=p,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&E(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(d=e.JSCallResultType||(e.JSCallResultType={}));class g{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,r){const o=b(this,t),a=D(w(e,r)(...o||[]),n);return null==a?null:N(this,a)}beginInvokeJSFromDotNet(e,t,n,r,o){const a=new Promise((e=>{const r=b(this,n);e(w(t,o)(...r||[]))}));e&&a.then((t=>N(this,[e,!0,D(t,r)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,y(t)]))))}endInvokeDotNetFromJS(e,t,n){const r=t?b(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,r)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,r){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const o=N(this,r),a=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,o);return a?b(this,a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,r){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const o=this._nextAsyncCallId++,a=new Promise(((e,t)=>{this._pendingAsyncCalls[o]={resolve:e,reject:t}}));try{const a=N(this,r);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(o,e,t,n,a)}catch(e){this.completePendingCall(o,!1,e)}return a}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new C;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new C;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const r=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?r.resolve(n):r.reject(n)}}function y(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function w(e,t){const n=u[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function E(e){delete u[e]}e.findJSFunction=w,e.disposeJSObjectReferenceById=E;class S{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[r]:this._id}}}e.DotNetObject=S,f((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(r))return new S(t[r],c);if(t.hasOwnProperty(n)){const e=t[n],r=u[e];if(r)return r.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(o)){const e=t[o],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(a)){const e=t[a],n=c.getDotNetStreamPromise(e);return new I(n)}}return t}));class I{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class C{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function D(e,t){switch(t){case d.Default:return e;case d.JSObjectReference:return m(e);case d.JSStreamReference:return p(e);case d.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let A=0;function N(e,t){A=0,c=e;const n=JSON.stringify(t,k);return c=void 0,n}function k(e,t){if(t instanceof S)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(A,t);const e={[o]:A};return A++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t||(t={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(n||(n={}));class o{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new o(e,t.value)}return null}}const a=new Map,i=new Map,s=[];function c(e){return a.get(e)}function l(e){const t=a.get(e);return(null==t?void 0:t.browserEventName)||e}function u(e,t){e.forEach((e=>a.set(e,t)))}function d(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),u(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),u(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...h(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),u(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),u(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),u(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>h(e)}),u(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),u(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),u(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:d(t.touches),targetTouches:d(t.targetTouches),changedTouches:d(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),u(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...h(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),u(["wheel","mousewheel"],{createEventArgs:e=>{return{...h(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),u(["cancel","close","toggle"],{createEventArgs:()=>({})});const f=["date","datetime-local","month","time","week"],m=new Map;let p,b,v=0;const g={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const r="__bl-dynamic-root:"+(++v).toString();m.set(r,e);const o=await E().invokeMethodAsync("AddRootComponent",t,r),a=new w(o,b[t]);return await a.setParameters(n),a}};class y{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class w{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new y)}setParameters(e){const t={},n=Object.entries(e||{}),r=n.length;for(const[e,r]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&r?(n.setCallback(r),t[e]=n.getJSObjectReference()):t[e]=r}return E().invokeMethodAsync("SetRootComponentParameters",this._componentId,r,t)}async dispose(){if(null!==this._componentId){await E().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function E(){if(!p)throw new Error("Dynamic root components have not been enabled in this application.");return p}const S=new Map,I=[],C=new Map;function D(e,t,n){return N(e,t.eventHandlerId,(()=>A(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function A(e){const t=S.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let N=(e,t,n)=>n();const k=x(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),R={submit:!0},T=x(["click","dblclick","mousedown","mousemove","mouseup"]);class _{constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++_.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new O(this.onGlobalEvent.bind(this))}setListener(e,t,n,r){const o=this.getEventHandlerInfosForElement(e,!0),a=o.getHandler(t);if(a)this.eventInfoStore.update(a.eventHandlerId,n);else{const a={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(a),o.setHandler(t,a)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,i.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let r=n.shift(),a=null,i=!1;const s=Object.prototype.hasOwnProperty.call(k,e);let l=!1;for(;r;){const h=r,f=this.getEventHandlerInfosForElement(h,!1);if(f){const n=f.getHandler(e);if(n&&(u=h,d=t.type,!((u instanceof HTMLButtonElement||u instanceof HTMLInputElement||u instanceof HTMLTextAreaElement||u instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(T,d)&&u.disabled))){if(!i){const n=c(e);a=(null==n?void 0:n.createEventArgs)?n.createEventArgs(t):{},i=!0}Object.prototype.hasOwnProperty.call(R,t.type)&&t.preventDefault(),D(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:o.fromEvent(n.renderingComponentId,t)},a)}f.stopPropagation(e)&&(l=!0),f.preventDefault(e)&&t.preventDefault()}r=s||l?void 0:n.shift()}var u,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new L:null}}_.nextEventDelegatorId=0;class O{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},s.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=l(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(k,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=l(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class L{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function x(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const F=Symbol(),M=Symbol();function P(e,t){if(F in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const r=P(t,!0);r[M]=e,n.push(r)}))}return e[F]=n,e}function B(e){const t=W(e);for(;t.length;)J(e,0)}function j(e,t){const n=document.createComment("!");return H(n,e,t),n}function H(e,t,n){const r=e;let o=e;if(e instanceof Comment){const t=W(r);if((null==t?void 0:t.length)>0){const t=G(r),n=new Range;n.setStartBefore(e),n.setEndAfter(t),o=n.extractContents()}}const a=U(r);if(a){const e=W(a),t=Array.prototype.indexOf.call(e,r);e.splice(t,1),delete r[M]}const i=W(t);if(n0;)J(n,0)}const r=n;r.parentNode.removeChild(r)}function U(e){return e[M]||null}function z(e,t){return W(e)[t]}function $(e){const t=X(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function W(e){return e[F]}function K(e){const t=W(U(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function V(e,t){const n=W(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=G(e.moveRangeStart)})),t.forEach((t=>{const r=document.createComment("marker");t.moveToBeforeMarker=r;const o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):Y(r,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd;let a=r;for(;a;){const e=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function X(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function Y(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=K(t);n?n.parentNode.insertBefore(e,n):Y(e,U(t))}}}function G(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=K(e);if(t)return t.previousSibling;{const t=U(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:G(t)}}function q(e){return`_bl_${e}`}Symbol();const Z="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,Z)&&"string"==typeof t[Z]?function(e){const t=`[${q(e)}]`;return document.querySelector(t)}(t[Z]):t));const Q="_blazorDeferredValue";function ee(e){return"select-multiple"===e.type}function te(e,t){e.value=t||""}function ne(e,t){e instanceof HTMLSelectElement?ee(e)?function(e,t){t||(t=[]);for(let n=0;n{Ce()&&function(e,t){if(0!==e.button||function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e))return;if(e.defaultPrevented)return;const n=function(e){const t=!window._blazorDisableComposedPath&&e.composedPath&&e.composedPath();if(t){for(let e=0;e{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),oe.content));var i;let s=0;for(;a.firstChild;)H(a.firstChild,o,s++)}applyAttribute(e,t,n,r){const o=e.frameReader,a=o.attributeName(r),i=o.attributeEventHandlerId(r);if(i){const e=he(a);return void this.eventDelegator.setListener(n,e,i,t)}const s=o.attributeValue(r);this.setOrRemoveAttributeOrProperty(n,a,s)}insertFrameRange(e,t,n,r,o,a,i){const s=r;for(let s=a;s{He(t,e)})},enableNavigationInterception:function(e){if(void 0!==me&&me!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");me=e},setHasLocationChangingListeners:function(e,t){const n=Re.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){_e&&e===ke&&(_e(t),_e=null)},navigateTo:function(e,t){xe(e,t,!0)},refresh:function(e){!e&&we()?Ee(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:Le};function Le(e){const t=document.getElementById(e);return!!t&&(t.scrollIntoView(),!0)}function xe(e,t,n=!1){const r=Se(e),o=ze();if(t.forceLoad||!ye(r)||"serverside-fullpageload"===o)!function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry);else if("clientside-router"===o)Fe(r,!1,t.replaceHistoryEntry,t.historyEntryState,n);else{if("serverside-enhanced"!==o)throw new Error(`Unsupported page load mechanism: ${o}`);Ee(r,t.replaceHistoryEntry)}}async function Fe(e,t,n,r=void 0,o=!1){if(Be(),function(e){const t=e.indexOf("#");return t>-1&&location.href.replace(location.hash,"")===e.substring(0,t)}(e))return void function(e,t,n){Me(e,t,n);const r=e.indexOf("#");r!==e.length-1&&Le(e.substring(r+1))}(e,n,r);const a=Ue();(o||!(null==a?void 0:a.hasLocationChangingEventListeners)||await je(e,r,t,a))&&(ge=!0,Me(e,n,r),await He(t))}function Me(e,t,n=void 0){t?history.replaceState({userState:n,_index:Ne},"",e):(Ne++,history.pushState({userState:n,_index:Ne},"",e))}function Pe(e){return new Promise((t=>{const n=Te;Te=()=>{Te=n,t()},history.go(e)}))}function Be(){_e&&(_e(!1),_e=null)}function je(e,t,n,r){return new Promise((o=>{Be(),ke++,_e=o,r.locationChanging(ke,e,t,n)}))}async function He(e,t){const n=null!=t?t:location.href;await Promise.all(Array.from(Re,(async([t,r])=>{var o,a;a=t,S.has(a)&&await r.locationChanged(n,null===(o=history.state)||void 0===o?void 0:o.userState,e)})))}async function Je(e){var t,n;Te&&"serverside-enhanced"!==ze()&&await Te(e),Ne=null!==(n=null===(t=history.state)||void 0===t?void 0:t._index)&&void 0!==n?n:0}function Ue(){const e=De();if(void 0!==e)return Re.get(e)}function ze(){return Ce()?"clientside-router":we()?"serverside-enhanced":window.Blazor._internal.isBlazorWeb?"serverside-fullpageload":"clientside-router"}const $e={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e,t){const n=document.querySelector(e);n&&(n.hasAttribute("tabindex")||(n.tabIndex=-1),n.focus({preventScroll:!0}))}},We={init:function(e,t,n,r=50){const o=Ve(t);(o||document.documentElement).style.overflowAnchor="none";const a=document.createRange();h(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const i=new IntersectionObserver((function(r){r.forEach((r=>{var o;if(!r.isIntersecting)return;a.setStartAfter(t),a.setEndBefore(n);const i=a.getBoundingClientRect().height,s=null===(o=r.rootBounds)||void 0===o?void 0:o.height;r.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",r.intersectionRect.top-r.boundingClientRect.top,i,s):r.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",r.boundingClientRect.bottom-r.intersectionRect.bottom,i,s)}))}),{root:o,rootMargin:`${r}px`});i.observe(t),i.observe(n);const s=d(t),c=d(n),{observersByDotNetObjectId:l,id:u}=Xe(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,r)=>{h(e.parentElement)&&(r.disconnect(),e.style.display="table-row",r.observe(e,t)),i.unobserve(e),i.observe(e)}));return n.observe(e,t),n}function h(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[u]={intersectionObserver:i,mutationObserverBefore:s,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=Xe(e),r=t[n];r&&(r.intersectionObserver.disconnect(),r.mutationObserverBefore.disconnect(),r.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},Ke=Symbol();function Ve(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:Ve(e.parentElement):null}function Xe(e){var t;const n=e._callDispatcher,r=e._id;return null!==(t=n[Ke])&&void 0!==t||(n[Ke]={}),{observersByDotNetObjectId:n[Ke],id:r}}const Ye={getAndRemoveExistingTitle:function(){var e;const t=document.head?document.head.getElementsByTagName("title"):[];if(0===t.length)return null;let n=null;for(let r=t.length-1;r>=0;r--){const o=t[r],a=o.previousSibling;a instanceof Comment&&null!==U(a)||(null===n&&(n=o.textContent),null===(e=o.parentNode)||void 0===e||e.removeChild(o))}return n}},Ge={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,r,o){const a=qe(e,t),i=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(a.blob)})),s=await new Promise((function(e){var t;const a=Math.min(1,r/i.width),s=Math.min(1,o/i.height),c=Math.min(a,s),l=document.createElement("canvas");l.width=Math.round(i.width*c),l.height=Math.round(i.height*c),null===(t=l.getContext("2d"))||void 0===t||t.drawImage(i,0,0,l.width,l.height),l.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:a.lastModified,name:a.name,size:(null==s?void 0:s.size)||0,contentType:n,blob:s||a.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return qe(e,t).blob}};function qe(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const Ze=new Set,Qe={enableNavigationPrompt:function(e){0===Ze.size&&window.addEventListener("beforeunload",et),Ze.add(e)},disableNavigationPrompt:function(e){Ze.delete(e),0===Ze.size&&window.removeEventListener("beforeunload",et)}};function et(e){e.preventDefault(),e.returnValue=!0}const tt=new Map,nt={navigateTo:function(e,t,n=!1){xe(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(a.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=i.get(t.browserEventName);n?n.push(e):i.set(t.browserEventName,[e]),s.forEach((n=>n(e,t.browserEventName)))}a.set(e,t)},rootComponents:g,runtime:{},_internal:{navigationManager:Oe,domWrapper:$e,Virtualize:We,PageTitle:Ye,InputFile:Ge,NavigationLock:Qe,getJSDataStreamChunk:async function(e,t,n){return e instanceof Blob?await async function(e,t,n){const r=e.slice(t,t+n),o=await r.arrayBuffer();return new Uint8Array(o)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)},attachWebRendererInterop:function(t,n,r,o){var a,i;if(S.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);S.set(t,n),r&&o&&Object.keys(r).length>0&&function(t,n,r){if(p)throw new Error("Dynamic root components have already been enabled.");p=t,b=n;for(const[t,o]of Object.entries(r)){const r=e.findJSFunction(t,0);for(const e of o)r(e,n[e])}}(A(t),r,o),null===(i=null===(a=C.get(t))||void 0===a?void 0:a[0])||void 0===i||i.call(a),function(e){for(const t of I)t(e)}(t)}}};window.Blazor=nt;let rt=!1;const ot="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,at=ot?ot.decode.bind(ot):function(e){let t=0;const n=e.length,r=[],o=[];for(;t65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")},it=Math.pow(2,32),st=Math.pow(2,21)-1;function ct(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function lt(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function ut(e,t){const n=lt(e,t+4);if(n>st)throw new Error(`Cannot read uint64 with high order part ${n}, because the result would exceed Number.MAX_SAFE_INTEGER.`);return n*it+lt(e,t)}class dt{constructor(e){this.batchData=e;const t=new pt(e);this.arrayRangeReader=new bt(e),this.arrayBuilderSegmentReader=new vt(e),this.diffReader=new ht(e),this.editReader=new ft(e,t),this.frameReader=new mt(e,t)}updatedComponents(){return ct(this.batchData,this.batchData.length-20)}referenceFrames(){return ct(this.batchData,this.batchData.length-16)}disposedComponentIds(){return ct(this.batchData,this.batchData.length-12)}disposedEventHandlerIds(){return ct(this.batchData,this.batchData.length-8)}updatedComponentsEntry(e,t){const n=e+4*t;return ct(this.batchData,n)}referenceFramesEntry(e,t){return e+20*t}disposedComponentIdsEntry(e,t){const n=e+4*t;return ct(this.batchData,n)}disposedEventHandlerIdsEntry(e,t){const n=e+8*t;return ut(this.batchData,n)}}class ht{constructor(e){this.batchDataUint8=e}componentId(e){return ct(this.batchDataUint8,e)}edits(e){return e+4}editsEntry(e,t){return e+16*t}}class ft{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}editType(e){return ct(this.batchDataUint8,e)}siblingIndex(e){return ct(this.batchDataUint8,e+4)}newTreeIndex(e){return ct(this.batchDataUint8,e+8)}moveToSiblingIndex(e){return ct(this.batchDataUint8,e+8)}removedAttributeName(e){const t=ct(this.batchDataUint8,e+12);return this.stringReader.readString(t)}}class mt{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}frameType(e){return ct(this.batchDataUint8,e)}subtreeLength(e){return ct(this.batchDataUint8,e+4)}elementReferenceCaptureId(e){const t=ct(this.batchDataUint8,e+4);return this.stringReader.readString(t)}componentId(e){return ct(this.batchDataUint8,e+8)}elementName(e){const t=ct(this.batchDataUint8,e+8);return this.stringReader.readString(t)}textContent(e){const t=ct(this.batchDataUint8,e+4);return this.stringReader.readString(t)}markupContent(e){const t=ct(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeName(e){const t=ct(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeValue(e){const t=ct(this.batchDataUint8,e+8);return this.stringReader.readString(t)}attributeEventHandlerId(e){return ut(this.batchDataUint8,e+12)}}class pt{constructor(e){this.batchDataUint8=e,this.stringTableStartIndex=ct(e,e.length-4)}readString(e){if(-1===e)return null;{const n=ct(this.batchDataUint8,this.stringTableStartIndex+4*e),r=function(e,t){let n=0,r=0;for(let o=0;o<4;o++){const a=e[t+o];if(n|=(127&a)<async function(e,n){const r=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),o=await import(r);if(void 0!==o){if(e.singleRuntime){const{beforeStart:n,afterStarted:r,beforeWebAssemblyStart:i,afterWebAssemblyStarted:s,beforeServerStart:c,afterServerStarted:l}=o;let u=n;e.webRendererId===Nt.Server&&c&&(u=c),e.webRendererId===Nt.WebAssembly&&i&&(u=i);let d=r;return e.webRendererId===Nt.Server&&l&&(d=l),e.webRendererId===Nt.WebAssembly&&s&&(d=s),a(e,u,d,t)}return function(e,t,n){var o;const i=n[0],{beforeStart:s,afterStarted:c,beforeWebStart:l,afterWebStarted:u,beforeWebAssemblyStart:d,afterWebAssemblyStarted:h,beforeServerStart:f,afterServerStarted:m}=t,p=!(l||u||d||h||f||m||!s&&!c),b=p&&i.enableClassicInitializers;if(p&&!i.enableClassicInitializers)null===(o=e.logger)||void 0===o||o.log(kt.Warning,`Initializer '${r}' will be ignored because multiple runtimes are available. use 'before(web|webAssembly|server)Start' and 'after(web|webAssembly|server)Started?' instead.)`);else if(b)return a(e,s,c,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(i),d&&i.webAssembly.initializers.beforeStart.push(d),h&&i.webAssembly.initializers.afterStarted.push(h),f&&i.circuit.initializers.beforeStart.push(f),m&&i.circuit.initializers.afterStarted.push(m),u&&e.afterStartedCallbacks.push(u),l)return l(i)}(e,o,t)}function a(e,t,n,r){if(n&&e.afterStartedCallbacks.push(n),t)return t(...r)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=(n=this.webRendererId,null===(r=C.get(n))||void 0===r?void 0:r[1]);var n,r;t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}let Ot,Lt=!1;async function xt(){if(Lt)throw new Error("Blazor has already started.");Lt=!0,Ot=e.attachDispatcher({beginInvokeDotNetFromJS:Et,endInvokeJSFromDotNet:St,sendByteArray:It});const t=await async function(){const e=await fetch("_framework/blazor.modules.json",{method:"GET",credentials:"include",cache:"no-cache"}),t=await e.json(),n=new _t;return await n.importInitializersAsync(t,[]),n}();(function(){const e={AttachToDocument:(e,t)=>{!function(e,t,n){const r="::before";let o=!1;if(e.endsWith("::after"))e=e.slice(0,-7),o=!0;else if(e.endsWith(r))throw new Error(`The '${r}' selector is not supported.`);const a=function(e){const t=m.get(e);if(t)return m.delete(e),t}(e)||document.querySelector(e);if(!a)throw new Error(`Could not find any element matching selector '${e}'.`);!function(e,t,n,r){let o=fe[e];o||(o=new le(e),fe[e]=o),o.attachRootComponentToLogicalElement(n,t,r)}(n,P(a,!0),t,o)}(t,e,Nt.WebView)},RenderBatch:(e,t)=>{try{const n=Tt(t);(function(e,t){const n=fe[e];if(!n)throw new Error(`There is no browser renderer with ID ${e}.`);const r=t.arrayRangeReader,o=t.updatedComponents(),a=r.values(o),i=r.count(o),s=t.referenceFrames(),c=r.values(s),l=t.diffReader;for(let e=0;e{yt=!0,console.error(`${e}\n${t}`),function(){const e=document.querySelector("#blazor-error-ui");e&&(e.style.display="block"),rt||(rt=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach((e=>{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}()},BeginInvokeJS:Ot.beginInvokeJSFromDotNet.bind(Ot),EndInvokeDotNet:Ot.endInvokeDotNetFromJS.bind(Ot),SendByteArrayToJS:Rt,Navigate:Oe.navigateTo,Refresh:Oe.refresh,SetHasLocationChangingListeners:e=>{Oe.setHasLocationChangingListeners(Nt.WebView,e)},EndLocationChanging:Oe.endLocationChanging};window.external.receiveMessage((t=>{const n=function(e){if(yt||!e||!e.startsWith(gt))return null;const t=e.substring(gt.length),[n,...r]=JSON.parse(t);return{messageType:n,args:r}}(t);if(n){if(!Object.prototype.hasOwnProperty.call(e,n.messageType))throw new Error(`Unsupported IPC message type '${n.messageType}'`);e[n.messageType].apply(null,n.args)}}))})(),nt._internal.receiveWebViewDotNetDataStream=Ft,Oe.enableNavigationInterception(Nt.WebView),Oe.listenForNavigationEvents(Nt.WebView,Ct,Dt),At("AttachPage",Oe.getBaseURI(),Oe.getLocationHref()),await t.invokeAfterStartedCallbacks(nt)}function Ft(e,t,n,r){!function(e,t,n,r,o){let a=tt.get(t);if(!a){const n=new ReadableStream({start(e){tt.set(t,e),a=e}});e.supplyDotNetStream(t,n)}o?(a.error(o),tt.delete(t)):0===r?(a.close(),tt.delete(t)):a.enqueue(n.length===r?n:n.subarray(0,r))}(Ot,e,t,n,r)}nt.start=xt,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&xt()})(); \ No newline at end of file +(()=>{"use strict";var e,t,n,r={d:(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};r.d({},{e:()=>_t}),function(e){const t=[],n="__jsObjectId",r="__dotNetObject",o="__byte[]",a="__dotNetStream",i="__jsStreamReferenceLength";let s,c;class l{constructor(e){this._jsObject=e,this._cachedFunctions=new Map}findFunction(e){const t=this._cachedFunctions.get(e);if(t)return t;let n,r=this._jsObject;if(e.split(".").forEach((t=>{if(!(t in r))throw new Error(`Could not find '${e}' ('${t}' was undefined).`);n=r,r=r[t]})),r instanceof Function)return r=r.bind(n),this._cachedFunctions.set(e,r),r;throw new Error(`The value '${e}' is not a function.`)}getWrappedObject(){return this._jsObject}}const u={0:new l(window)};u[0]._cachedFunctions.set("import",(e=>("string"==typeof e&&e.startsWith("./")&&(e=new URL(e.substr(2),document.baseURI).toString()),import(e))));let d,h=1;function f(e){t.push(e)}function m(e){if(e&&"object"==typeof e){u[h]=new l(e);const t={[n]:h};return h++,t}throw new Error(`Cannot create a JSObjectReference from the value '${e}'.`)}function p(e){let t=-1;if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Blob)t=e.size;else{if(!(e.buffer instanceof ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===e.byteLength)throw new Error(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}const r={[i]:t};try{const t=m(e);r[n]=t[n]}catch(t){throw new Error(`Cannot create a JSStreamReference from the value '${e}'.`)}return r}function b(e,n){c=e;const r=n?JSON.parse(n,((e,n)=>t.reduce(((t,n)=>n(e,t)),n))):null;return c=void 0,r}function v(){if(void 0===s)throw new Error("No call dispatcher has been set.");if(null===s)throw new Error("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");return s}e.attachDispatcher=function(e){const t=new g(e);return void 0===s?s=t:s&&(s=null),t},e.attachReviver=f,e.invokeMethod=function(e,t,...n){return v().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){return v().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=m,e.createJSStreamReference=p,e.disposeJSObjectReference=function(e){const t=e&&e[n];"number"==typeof t&&E(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(d=e.JSCallResultType||(e.JSCallResultType={}));class g{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=new Map,this._pendingDotNetToJSStreams=new Map,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){return this._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,r){const o=b(this,t),a=D(w(e,r)(...o||[]),n);return null==a?null:N(this,a)}beginInvokeJSFromDotNet(e,t,n,r,o){const a=new Promise((e=>{const r=b(this,n);e(w(t,o)(...r||[]))}));e&&a.then((t=>N(this,[e,!0,D(t,r)]))).then((t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!0,t)),(t=>this._dotNetCallDispatcher.endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,y(t)]))))}endInvokeDotNetFromJS(e,t,n){const r=t?b(this,n):new Error(n);this.completePendingCall(parseInt(e,10),t,r)}invokeDotNetStaticMethod(e,t,...n){return this.invokeDotNetMethod(e,t,null,n)}invokeDotNetStaticMethodAsync(e,t,...n){return this.invokeDotNetMethodAsync(e,t,null,n)}invokeDotNetMethod(e,t,n,r){if(this._dotNetCallDispatcher.invokeDotNetFromJS){const o=N(this,r),a=this._dotNetCallDispatcher.invokeDotNetFromJS(e,t,n,o);return a?b(this,a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeDotNetMethodAsync instead.")}invokeDotNetMethodAsync(e,t,n,r){if(e&&n)throw new Error(`For instance method calls, assemblyName should be null. Received '${e}'.`);const o=this._nextAsyncCallId++,a=new Promise(((e,t)=>{this._pendingAsyncCalls[o]={resolve:e,reject:t}}));try{const a=N(this,r);this._dotNetCallDispatcher.beginInvokeDotNetFromJS(o,e,t,n,a)}catch(e){this.completePendingCall(o,!1,e)}return a}receiveByteArray(e,t){this._byteArraysToBeRevived.set(e,t)}processByteArray(e){const t=this._byteArraysToBeRevived.get(e);return t?(this._byteArraysToBeRevived.delete(e),t):null}supplyDotNetStream(e,t){if(this._pendingDotNetToJSStreams.has(e)){const n=this._pendingDotNetToJSStreams.get(e);this._pendingDotNetToJSStreams.delete(e),n.resolve(t)}else{const n=new C;n.resolve(t),this._pendingDotNetToJSStreams.set(e,n)}}getDotNetStreamPromise(e){let t;if(this._pendingDotNetToJSStreams.has(e))t=this._pendingDotNetToJSStreams.get(e).streamPromise,this._pendingDotNetToJSStreams.delete(e);else{const n=new C;this._pendingDotNetToJSStreams.set(e,n),t=n.streamPromise}return t}completePendingCall(e,t,n){if(!this._pendingAsyncCalls.hasOwnProperty(e))throw new Error(`There is no pending async call with ID ${e}.`);const r=this._pendingAsyncCalls[e];delete this._pendingAsyncCalls[e],t?r.resolve(n):r.reject(n)}}function y(e){return e instanceof Error?`${e.message}\n${e.stack}`:e?e.toString():"null"}function w(e,t){const n=u[t];if(n)return n.findFunction(e);throw new Error(`JS object instance with ID ${t} does not exist (has it been disposed?).`)}function E(e){delete u[e]}e.findJSFunction=w,e.disposeJSObjectReferenceById=E;class S{constructor(e,t){this._id=e,this._callDispatcher=t}invokeMethod(e,...t){return this._callDispatcher.invokeDotNetMethod(null,e,this._id,t)}invokeMethodAsync(e,...t){return this._callDispatcher.invokeDotNetMethodAsync(null,e,this._id,t)}dispose(){this._callDispatcher.invokeDotNetMethodAsync(null,"__Dispose",this._id,null).catch((e=>console.error(e)))}serializeAsArg(){return{[r]:this._id}}}e.DotNetObject=S,f((function(e,t){if(t&&"object"==typeof t){if(t.hasOwnProperty(r))return new S(t[r],c);if(t.hasOwnProperty(n)){const e=t[n],r=u[e];if(r)return r.getWrappedObject();throw new Error(`JS object instance with Id '${e}' does not exist. It may have been disposed.`)}if(t.hasOwnProperty(o)){const e=t[o],n=c.processByteArray(e);if(void 0===n)throw new Error(`Byte array index '${e}' does not exist.`);return n}if(t.hasOwnProperty(a)){const e=t[a],n=c.getDotNetStreamPromise(e);return new I(n)}}return t}));class I{constructor(e){this._streamPromise=e}stream(){return this._streamPromise}async arrayBuffer(){return new Response(await this.stream()).arrayBuffer()}}class C{constructor(){this.streamPromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}function D(e,t){switch(t){case d.Default:return e;case d.JSObjectReference:return m(e);case d.JSStreamReference:return p(e);case d.JSVoidResult:return null;default:throw new Error(`Invalid JS call result type '${t}'.`)}}let A=0;function N(e,t){A=0,c=e;const n=JSON.stringify(t,R);return c=void 0,n}function R(e,t){if(t instanceof S)return t.serializeAsArg();if(t instanceof Uint8Array){c.getDotNetCallDispatcher().sendByteArray(A,t);const e={[o]:A};return A++,e}return t}}(e||(e={})),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t||(t={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup",e[e.namedEvent=10]="namedEvent"}(n||(n={}));class o{constructor(e,t){this.componentId=e,this.fieldValue=t}static fromEvent(e,t){const n=t.target;if(n instanceof Element){const t=function(e){return e instanceof HTMLInputElement?e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value}:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?{value:e.value}:null}(n);if(t)return new o(e,t.value)}return null}}const a=new Map,i=new Map,s=[];function c(e){return a.get(e)}function l(e){const t=a.get(e);return(null==t?void 0:t.browserEventName)||e}function u(e,t){e.forEach((e=>a.set(e,t)))}function d(e){const t=[];for(let n=0;ne.selected)).map((e=>e.value))}}{const e=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(t);return{value:e?!!t.checked:t.value}}}}),u(["copy","cut","paste"],{createEventArgs:e=>({type:e.type})}),u(["drag","dragend","dragenter","dragleave","dragover","dragstart","drop"],{createEventArgs:e=>{return{...h(t=e),dataTransfer:t.dataTransfer?{dropEffect:t.dataTransfer.dropEffect,effectAllowed:t.dataTransfer.effectAllowed,files:Array.from(t.dataTransfer.files).map((e=>e.name)),items:Array.from(t.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:t.dataTransfer.types}:null};var t}}),u(["focus","blur","focusin","focusout"],{createEventArgs:e=>({type:e.type})}),u(["keydown","keyup","keypress"],{createEventArgs:e=>{return{key:(t=e).key,code:t.code,location:t.location,repeat:t.repeat,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),u(["contextmenu","click","mouseover","mouseout","mousemove","mousedown","mouseup","mouseleave","mouseenter","dblclick"],{createEventArgs:e=>h(e)}),u(["error"],{createEventArgs:e=>{return{message:(t=e).message,filename:t.filename,lineno:t.lineno,colno:t.colno,type:t.type};var t}}),u(["loadstart","timeout","abort","load","loadend","progress"],{createEventArgs:e=>{return{lengthComputable:(t=e).lengthComputable,loaded:t.loaded,total:t.total,type:t.type};var t}}),u(["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"],{createEventArgs:e=>{return{detail:(t=e).detail,touches:d(t.touches),targetTouches:d(t.targetTouches),changedTouches:d(t.changedTouches),ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,type:t.type};var t}}),u(["gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup"],{createEventArgs:e=>{return{...h(t=e),pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tiltX:t.tiltX,tiltY:t.tiltY,pointerType:t.pointerType,isPrimary:t.isPrimary};var t}}),u(["wheel","mousewheel"],{createEventArgs:e=>{return{...h(t=e),deltaX:t.deltaX,deltaY:t.deltaY,deltaZ:t.deltaZ,deltaMode:t.deltaMode};var t}}),u(["cancel","close","toggle"],{createEventArgs:()=>({})});const f=["date","datetime-local","month","time","week"],m=new Map;let p,b,v=0;const g={async add(e,t,n){if(!n)throw new Error("initialParameters must be an object, even if empty.");const r="__bl-dynamic-root:"+(++v).toString();m.set(r,e);const o=await E().invokeMethodAsync("AddRootComponent",t,r),a=new w(o,b[t]);return await a.setParameters(n),a}};class y{invoke(e){return this._callback(e)}setCallback(t){this._selfJSObjectReference||(this._selfJSObjectReference=e.createJSObjectReference(this)),this._callback=t}getJSObjectReference(){return this._selfJSObjectReference}dispose(){this._selfJSObjectReference&&e.disposeJSObjectReference(this._selfJSObjectReference)}}class w{constructor(e,t){this._jsEventCallbackWrappers=new Map,this._componentId=e;for(const e of t)"eventcallback"===e.type&&this._jsEventCallbackWrappers.set(e.name.toLowerCase(),new y)}setParameters(e){const t={},n=Object.entries(e||{}),r=n.length;for(const[e,r]of n){const n=this._jsEventCallbackWrappers.get(e.toLowerCase());n&&r?(n.setCallback(r),t[e]=n.getJSObjectReference()):t[e]=r}return E().invokeMethodAsync("SetRootComponentParameters",this._componentId,r,t)}async dispose(){if(null!==this._componentId){await E().invokeMethodAsync("RemoveRootComponent",this._componentId),this._componentId=null;for(const e of this._jsEventCallbackWrappers.values())e.dispose()}}}function E(){if(!p)throw new Error("Dynamic root components have not been enabled in this application.");return p}const S=new Map,I=[],C=new Map;function D(e,t,n){return N(e,t.eventHandlerId,(()=>A(e).invokeMethodAsync("DispatchEventAsync",t,n)))}function A(e){const t=S.get(e);if(!t)throw new Error(`No interop methods are registered for renderer ${e}`);return t}let N=(e,t,n)=>n();const R=x(["abort","blur","cancel","canplay","canplaythrough","change","close","cuechange","durationchange","emptied","ended","error","focus","load","loadeddata","loadedmetadata","loadend","loadstart","mouseenter","mouseleave","pointerenter","pointerleave","pause","play","playing","progress","ratechange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeupdate","toggle","unload","volumechange","waiting","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),k={submit:!0},T=x(["click","dblclick","mousedown","mousemove","mouseup"]);class _{constructor(e){this.browserRendererId=e,this.afterClickCallbacks=[];const t=++_.nextEventDelegatorId;this.eventsCollectionKey=`_blazorEvents_${t}`,this.eventInfoStore=new O(this.onGlobalEvent.bind(this))}setListener(e,t,n,r){const o=this.getEventHandlerInfosForElement(e,!0),a=o.getHandler(t);if(a)this.eventInfoStore.update(a.eventHandlerId,n);else{const a={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(a),o.setHandler(t,a)}}getHandler(e){return this.eventInfoStore.get(e)}removeListener(e){const t=this.eventInfoStore.remove(e);if(t){const e=t.element,n=this.getEventHandlerInfosForElement(e,!1);n&&n.removeHandler(t.eventName)}}notifyAfterClick(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")}setStopPropagation(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)}setPreventDefault(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)}onGlobalEvent(e){if(!(e.target instanceof Element))return;this.dispatchGlobalEventToAllElements(e.type,e);const t=(n=e.type,i.get(n));var n;t&&t.forEach((t=>this.dispatchGlobalEventToAllElements(t,e))),"click"===e.type&&this.afterClickCallbacks.forEach((t=>t(e)))}dispatchGlobalEventToAllElements(e,t){const n=t.composedPath();let r=n.shift(),a=null,i=!1;const s=Object.prototype.hasOwnProperty.call(R,e);let l=!1;for(;r;){const h=r,f=this.getEventHandlerInfosForElement(h,!1);if(f){const n=f.getHandler(e);if(n&&(u=h,d=t.type,!((u instanceof HTMLButtonElement||u instanceof HTMLInputElement||u instanceof HTMLTextAreaElement||u instanceof HTMLSelectElement)&&Object.prototype.hasOwnProperty.call(T,d)&&u.disabled))){if(!i){const n=c(e);a=(null==n?void 0:n.createEventArgs)?n.createEventArgs(t):{},i=!0}Object.prototype.hasOwnProperty.call(k,t.type)&&t.preventDefault(),D(this.browserRendererId,{eventHandlerId:n.eventHandlerId,eventName:e,eventFieldInfo:o.fromEvent(n.renderingComponentId,t)},a)}f.stopPropagation(e)&&(l=!0),f.preventDefault(e)&&t.preventDefault()}r=s||l?void 0:n.shift()}var u,d}getEventHandlerInfosForElement(e,t){return Object.prototype.hasOwnProperty.call(e,this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new L:null}}_.nextEventDelegatorId=0;class O{constructor(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={},s.push(this.handleEventNameAliasAdded.bind(this))}add(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error(`Event ${e.eventHandlerId} is already tracked`);this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)}get(e){return this.infosByEventHandlerId[e]}addGlobalListener(e){if(e=l(e),Object.prototype.hasOwnProperty.call(this.countByEventName,e))this.countByEventName[e]++;else{this.countByEventName[e]=1;const t=Object.prototype.hasOwnProperty.call(R,e);document.addEventListener(e,this.globalListener,t)}}update(e,t){if(Object.prototype.hasOwnProperty.call(this.infosByEventHandlerId,t))throw new Error(`Event ${t} is already tracked`);const n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n}remove(e){const t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];const n=l(t.eventName);0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t}handleEventNameAliasAdded(e,t){if(Object.prototype.hasOwnProperty.call(this.countByEventName,e)){const n=this.countByEventName[e];delete this.countByEventName[e],document.removeEventListener(e,this.globalListener),this.addGlobalListener(t),this.countByEventName[t]+=n-1}}}class L{constructor(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}getHandler(e){return Object.prototype.hasOwnProperty.call(this.handlers,e)?this.handlers[e]:null}setHandler(e,t){this.handlers[e]=t}removeHandler(e){delete this.handlers[e]}preventDefault(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]}stopPropagation(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]}}function x(e){const t={};return e.forEach((e=>{t[e]=!0})),t}const F=Symbol(),M=Symbol();function P(e,t){if(F in e)return e;const n=[];if(e.childNodes.length>0){if(!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");e.childNodes.forEach((t=>{const r=P(t,!0);r[M]=e,n.push(r)}))}return e[F]=n,e}function B(e){const t=W(e);for(;t.length;)J(e,0)}function j(e,t){const n=document.createComment("!");return H(n,e,t),n}function H(e,t,n){const r=e;let o=e;if(e instanceof Comment){const t=W(r);if((null==t?void 0:t.length)>0){const t=G(r),n=new Range;n.setStartBefore(e),n.setEndAfter(t),o=n.extractContents()}}const a=U(r);if(a){const e=W(a),t=Array.prototype.indexOf.call(e,r);e.splice(t,1),delete r[M]}const i=W(t);if(n0;)J(n,0)}const r=n;r.parentNode.removeChild(r)}function U(e){return e[M]||null}function z(e,t){return W(e)[t]}function $(e){const t=X(e);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function W(e){return e[F]}function K(e){const t=W(U(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function V(e,t){const n=W(e);t.forEach((e=>{e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=G(e.moveRangeStart)})),t.forEach((t=>{const r=document.createComment("marker");t.moveToBeforeMarker=r;const o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):Y(r,e)})),t.forEach((e=>{const t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd;let a=r;for(;a;){const e=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=e}n.removeChild(t)})),t.forEach((e=>{n[e.toSiblingIndex]=e.moveRangeStart}))}function X(e){if(e instanceof Element||e instanceof DocumentFragment)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function Y(e,t){if(t instanceof Element||t instanceof DocumentFragment)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error(`Cannot append node because the parent is not a valid logical element. Parent: ${t}`);{const n=K(t);n?n.parentNode.insertBefore(e,n):Y(e,U(t))}}}function G(e){if(e instanceof Element||e instanceof DocumentFragment)return e;const t=K(e);if(t)return t.previousSibling;{const t=U(e);return t instanceof Element||t instanceof DocumentFragment?t.lastChild:G(t)}}function q(e){return`_bl_${e}`}Symbol();const Z="__internalId";e.attachReviver(((e,t)=>t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,Z)&&"string"==typeof t[Z]?function(e){const t=`[${q(e)}]`;return document.querySelector(t)}(t[Z]):t));const Q="_blazorDeferredValue";function ee(e){return"select-multiple"===e.type}function te(e,t){e.value=t||""}function ne(e,t){e instanceof HTMLSelectElement?ee(e)?function(e,t){t||(t=[]);for(let n=0;n{Ce()&&function(e,t){if(0!==e.button||function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e))return;if(e.defaultPrevented)return;const n=function(e){const t=e.composedPath&&e.composedPath();if(t)for(let e=0;e{const t=document.createElement("script");t.textContent=e.textContent,e.getAttributeNames().forEach((n=>{t.setAttribute(n,e.getAttribute(n))})),e.parentNode.replaceChild(t,e)})),oe.content));var i;let s=0;for(;a.firstChild;)H(a.firstChild,o,s++)}applyAttribute(e,t,n,r){const o=e.frameReader,a=o.attributeName(r),i=o.attributeEventHandlerId(r);if(i){const e=he(a);return void this.eventDelegator.setListener(n,e,i,t)}const s=o.attributeValue(r);this.setOrRemoveAttributeOrProperty(n,a,s)}insertFrameRange(e,t,n,r,o,a,i){const s=r;for(let s=a;s{je(t,e)})},enableNavigationInterception:function(e){if(void 0!==me&&me!==e)throw new Error("Only one interactive runtime may enable navigation interception at a time.");me=e},setHasLocationChangingListeners:function(e,t){const n=ke.get(e);if(!n)throw new Error(`Renderer with ID '${e}' is not listening for navigation events`);n.hasLocationChangingEventListeners=t},endLocationChanging:function(e,t){_e&&e===Re&&(_e(t),_e=null)},navigateTo:function(e,t){Le(e,t,!0)},refresh:function(e){!e&&Ee()?Se(location.href,!0):location.reload()},getBaseURI:()=>document.baseURI,getLocationHref:()=>location.href,scrollToElement:we};function Le(e,t,n=!1){const r=Ie(e),o=Ue();if(t.forceLoad||!ye(r)||"serverside-fullpageload"===o)!function(e,t){if(location.href===e){const t=e+"?";history.replaceState(null,"",t),location.replace(e)}else t?location.replace(e):location.href=e}(e,t.replaceHistoryEntry);else if("clientside-router"===o)xe(r,!1,t.replaceHistoryEntry,t.historyEntryState,n);else{if("serverside-enhanced"!==o)throw new Error(`Unsupported page load mechanism: ${o}`);Se(r,t.replaceHistoryEntry)}}async function xe(e,t,n,r=void 0,o=!1){if(Pe(),function(e){const t=new URL(e);return""!==t.hash&&location.origin===t.origin&&location.pathname===t.pathname&&location.search===t.search}(e))return Fe(e,n,r),void function(e){const t=e.indexOf("#");t!==e.length-1&&we(e.substring(t+1))}(e);const a=Je();(o||!(null==a?void 0:a.hasLocationChangingEventListeners)||await Be(e,r,t,a))&&(ge=!0,Fe(e,n,r),await je(t))}function Fe(e,t,n=void 0){t?history.replaceState({userState:n,_index:Ne},"",e):(Ne++,history.pushState({userState:n,_index:Ne},"",e))}function Me(e){return new Promise((t=>{const n=Te;Te=()=>{Te=n,t()},history.go(e)}))}function Pe(){_e&&(_e(!1),_e=null)}function Be(e,t,n,r){return new Promise((o=>{Pe(),Re++,_e=o,r.locationChanging(Re,e,t,n)}))}async function je(e,t){const n=null!=t?t:location.href;await Promise.all(Array.from(ke,(async([t,r])=>{var o,a;a=t,S.has(a)&&await r.locationChanged(n,null===(o=history.state)||void 0===o?void 0:o.userState,e)})))}async function He(e){var t,n;Te&&"serverside-enhanced"!==Ue()&&await Te(e),Ne=null!==(n=null===(t=history.state)||void 0===t?void 0:t._index)&&void 0!==n?n:0}function Je(){const e=De();if(void 0!==e)return ke.get(e)}function Ue(){return Ce()?"clientside-router":Ee()?"serverside-enhanced":window.Blazor._internal.isBlazorWeb?"serverside-fullpageload":"clientside-router"}const ze={focus:function(e,t){if(e instanceof HTMLElement)e.focus({preventScroll:t});else{if(!(e instanceof SVGElement))throw new Error("Unable to focus an invalid element.");if(!e.hasAttribute("tabindex"))throw new Error("Unable to focus an SVG element that does not have a tabindex.");e.focus({preventScroll:t})}},focusBySelector:function(e,t){const n=document.querySelector(e);n&&(n.hasAttribute("tabindex")||(n.tabIndex=-1),n.focus({preventScroll:!0}))}},$e={init:function(e,t,n,r=50){const o=Ke(t);(o||document.documentElement).style.overflowAnchor="none";const a=document.createRange();h(n.parentElement)&&(t.style.display="table-row",n.style.display="table-row");const i=new IntersectionObserver((function(r){r.forEach((r=>{var o;if(!r.isIntersecting)return;a.setStartAfter(t),a.setEndBefore(n);const i=a.getBoundingClientRect().height,s=null===(o=r.rootBounds)||void 0===o?void 0:o.height;r.target===t?e.invokeMethodAsync("OnSpacerBeforeVisible",r.intersectionRect.top-r.boundingClientRect.top,i,s):r.target===n&&n.offsetHeight>0&&e.invokeMethodAsync("OnSpacerAfterVisible",r.boundingClientRect.bottom-r.intersectionRect.bottom,i,s)}))}),{root:o,rootMargin:`${r}px`});i.observe(t),i.observe(n);const s=d(t),c=d(n),{observersByDotNetObjectId:l,id:u}=Ve(e);function d(e){const t={attributes:!0},n=new MutationObserver(((n,r)=>{h(e.parentElement)&&(r.disconnect(),e.style.display="table-row",r.observe(e,t)),i.unobserve(e),i.observe(e)}));return n.observe(e,t),n}function h(e){return null!==e&&(e instanceof HTMLTableElement&&""===e.style.display||"table"===e.style.display||e instanceof HTMLTableSectionElement&&""===e.style.display||"table-row-group"===e.style.display)}l[u]={intersectionObserver:i,mutationObserverBefore:s,mutationObserverAfter:c}},dispose:function(e){const{observersByDotNetObjectId:t,id:n}=Ve(e),r=t[n];r&&(r.intersectionObserver.disconnect(),r.mutationObserverBefore.disconnect(),r.mutationObserverAfter.disconnect(),e.dispose(),delete t[n])}},We=Symbol();function Ke(e){return e&&e!==document.body&&e!==document.documentElement?"visible"!==getComputedStyle(e).overflowY?e:Ke(e.parentElement):null}function Ve(e){var t;const n=e._callDispatcher,r=e._id;return null!==(t=n[We])&&void 0!==t||(n[We]={}),{observersByDotNetObjectId:n[We],id:r}}const Xe={getAndRemoveExistingTitle:function(){var e;const t=document.head?document.head.getElementsByTagName("title"):[];if(0===t.length)return null;let n=null;for(let r=t.length-1;r>=0;r--){const o=t[r],a=o.previousSibling;a instanceof Comment&&null!==U(a)||(null===n&&(n=o.textContent),null===(e=o.parentNode)||void 0===e||e.removeChild(o))}return n}},Ye={init:function(e,t){t._blazorInputFileNextFileId=0,t.addEventListener("click",(function(){t.value=""})),t.addEventListener("change",(function(){t._blazorFilesById={};const n=Array.prototype.map.call(t.files,(function(e){const n={id:++t._blazorInputFileNextFileId,lastModified:new Date(e.lastModified).toISOString(),name:e.name,size:e.size,contentType:e.type,readPromise:void 0,arrayBuffer:void 0,blob:e};return t._blazorFilesById[n.id]=n,n}));e.invokeMethodAsync("NotifyChange",n)}))},toImageFile:async function(e,t,n,r,o){const a=Ge(e,t),i=await new Promise((function(e){const t=new Image;t.onload=function(){URL.revokeObjectURL(t.src),e(t)},t.onerror=function(){t.onerror=null,URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(a.blob)})),s=await new Promise((function(e){var t;const a=Math.min(1,r/i.width),s=Math.min(1,o/i.height),c=Math.min(a,s),l=document.createElement("canvas");l.width=Math.round(i.width*c),l.height=Math.round(i.height*c),null===(t=l.getContext("2d"))||void 0===t||t.drawImage(i,0,0,l.width,l.height),l.toBlob(e,n)})),c={id:++e._blazorInputFileNextFileId,lastModified:a.lastModified,name:a.name,size:(null==s?void 0:s.size)||0,contentType:n,blob:s||a.blob};return e._blazorFilesById[c.id]=c,c},readFileData:async function(e,t){return Ge(e,t).blob}};function Ge(e,t){const n=e._blazorFilesById[t];if(!n)throw new Error(`There is no file with ID ${t}. The file list may have changed. See https://aka.ms/aspnet/blazor-input-file-multiple-selections.`);return n}const qe=new Set,Ze={enableNavigationPrompt:function(e){0===qe.size&&window.addEventListener("beforeunload",Qe),qe.add(e)},disableNavigationPrompt:function(e){qe.delete(e),0===qe.size&&window.removeEventListener("beforeunload",Qe)}};function Qe(e){e.preventDefault(),e.returnValue=!0}const et=new Map,tt={navigateTo:function(e,t,n=!1){Le(e,t instanceof Object?t:{forceLoad:t,replaceHistoryEntry:n})},registerCustomEventType:function(e,t){if(!t)throw new Error("The options parameter is required.");if(a.has(e))throw new Error(`The event '${e}' is already registered.`);if(t.browserEventName){const n=i.get(t.browserEventName);n?n.push(e):i.set(t.browserEventName,[e]),s.forEach((n=>n(e,t.browserEventName)))}a.set(e,t)},rootComponents:g,runtime:{},_internal:{navigationManager:Oe,domWrapper:ze,Virtualize:$e,PageTitle:Xe,InputFile:Ye,NavigationLock:Ze,getJSDataStreamChunk:async function(e,t,n){return e instanceof Blob?await async function(e,t,n){const r=e.slice(t,t+n),o=await r.arrayBuffer();return new Uint8Array(o)}(e,t,n):function(e,t,n){return new Uint8Array(e.buffer,e.byteOffset+t,n)}(e,t,n)},attachWebRendererInterop:function(t,n,r,o){var a,i;if(S.has(t))throw new Error(`Interop methods are already registered for renderer ${t}`);S.set(t,n),r&&o&&Object.keys(r).length>0&&function(t,n,r){if(p)throw new Error("Dynamic root components have already been enabled.");p=t,b=n;for(const[t,o]of Object.entries(r)){const r=e.findJSFunction(t,0);for(const e of o)r(e,n[e])}}(A(t),r,o),null===(i=null===(a=C.get(t))||void 0===a?void 0:a[0])||void 0===i||i.call(a),function(e){for(const t of I)t(e)}(t)}}};window.Blazor=tt;let nt=!1;const rt="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,ot=rt?rt.decode.bind(rt):function(e){let t=0;const n=e.length,r=[],o=[];for(;t65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")},at=Math.pow(2,32),it=Math.pow(2,21)-1;function st(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function ct(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function lt(e,t){const n=ct(e,t+4);if(n>it)throw new Error(`Cannot read uint64 with high order part ${n}, because the result would exceed Number.MAX_SAFE_INTEGER.`);return n*at+ct(e,t)}class ut{constructor(e){this.batchData=e;const t=new mt(e);this.arrayRangeReader=new pt(e),this.arrayBuilderSegmentReader=new bt(e),this.diffReader=new dt(e),this.editReader=new ht(e,t),this.frameReader=new ft(e,t)}updatedComponents(){return st(this.batchData,this.batchData.length-20)}referenceFrames(){return st(this.batchData,this.batchData.length-16)}disposedComponentIds(){return st(this.batchData,this.batchData.length-12)}disposedEventHandlerIds(){return st(this.batchData,this.batchData.length-8)}updatedComponentsEntry(e,t){const n=e+4*t;return st(this.batchData,n)}referenceFramesEntry(e,t){return e+20*t}disposedComponentIdsEntry(e,t){const n=e+4*t;return st(this.batchData,n)}disposedEventHandlerIdsEntry(e,t){const n=e+8*t;return lt(this.batchData,n)}}class dt{constructor(e){this.batchDataUint8=e}componentId(e){return st(this.batchDataUint8,e)}edits(e){return e+4}editsEntry(e,t){return e+16*t}}class ht{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}editType(e){return st(this.batchDataUint8,e)}siblingIndex(e){return st(this.batchDataUint8,e+4)}newTreeIndex(e){return st(this.batchDataUint8,e+8)}moveToSiblingIndex(e){return st(this.batchDataUint8,e+8)}removedAttributeName(e){const t=st(this.batchDataUint8,e+12);return this.stringReader.readString(t)}}class ft{constructor(e,t){this.batchDataUint8=e,this.stringReader=t}frameType(e){return st(this.batchDataUint8,e)}subtreeLength(e){return st(this.batchDataUint8,e+4)}elementReferenceCaptureId(e){const t=st(this.batchDataUint8,e+4);return this.stringReader.readString(t)}componentId(e){return st(this.batchDataUint8,e+8)}elementName(e){const t=st(this.batchDataUint8,e+8);return this.stringReader.readString(t)}textContent(e){const t=st(this.batchDataUint8,e+4);return this.stringReader.readString(t)}markupContent(e){const t=st(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeName(e){const t=st(this.batchDataUint8,e+4);return this.stringReader.readString(t)}attributeValue(e){const t=st(this.batchDataUint8,e+8);return this.stringReader.readString(t)}attributeEventHandlerId(e){return lt(this.batchDataUint8,e+12)}}class mt{constructor(e){this.batchDataUint8=e,this.stringTableStartIndex=st(e,e.length-4)}readString(e){if(-1===e)return null;{const n=st(this.batchDataUint8,this.stringTableStartIndex+4*e),r=function(e,t){let n=0,r=0;for(let o=0;o<4;o++){const a=e[t+o];if(n|=(127&a)<async function(e,n){const r=function(e){const t=document.baseURI;return t.endsWith("/")?`${t}${e}`:`${t}/${e}`}(n),o=await import(r);if(void 0!==o){if(e.singleRuntime){const{beforeStart:n,afterStarted:r,beforeWebAssemblyStart:i,afterWebAssemblyStarted:s,beforeServerStart:c,afterServerStarted:l}=o;let u=n;e.webRendererId===At.Server&&c&&(u=c),e.webRendererId===At.WebAssembly&&i&&(u=i);let d=r;return e.webRendererId===At.Server&&l&&(d=l),e.webRendererId===At.WebAssembly&&s&&(d=s),a(e,u,d,t)}return function(e,t,n){var o;const i=n[0],{beforeStart:s,afterStarted:c,beforeWebStart:l,afterWebStarted:u,beforeWebAssemblyStart:d,afterWebAssemblyStarted:h,beforeServerStart:f,afterServerStarted:m}=t,p=!(l||u||d||h||f||m||!s&&!c),b=p&&i.enableClassicInitializers;if(p&&!i.enableClassicInitializers)null===(o=e.logger)||void 0===o||o.log(Nt.Warning,`Initializer '${r}' will be ignored because multiple runtimes are available. use 'before(web|webAssembly|server)Start' and 'after(web|webAssembly|server)Started?' instead.)`);else if(b)return a(e,s,c,n);if(function(e){e.webAssembly?e.webAssembly.initializers||(e.webAssembly.initializers={beforeStart:[],afterStarted:[]}):e.webAssembly={initializers:{beforeStart:[],afterStarted:[]}},e.circuit?e.circuit.initializers||(e.circuit.initializers={beforeStart:[],afterStarted:[]}):e.circuit={initializers:{beforeStart:[],afterStarted:[]}}}(i),d&&i.webAssembly.initializers.beforeStart.push(d),h&&i.webAssembly.initializers.afterStarted.push(h),f&&i.circuit.initializers.beforeStart.push(f),m&&i.circuit.initializers.afterStarted.push(m),u&&e.afterStartedCallbacks.push(u),l)return l(i)}(e,o,t)}function a(e,t,n,r){if(n&&e.afterStartedCallbacks.push(n),t)return t(...r)}}(this,e))))}async invokeAfterStartedCallbacks(e){const t=(n=this.webRendererId,null===(r=C.get(n))||void 0===r?void 0:r[1]);var n,r;t&&await t,await Promise.all(this.afterStartedCallbacks.map((t=>t(e))))}}let _t,Ot=!1;async function Lt(){if(Ot)throw new Error("Blazor has already started.");Ot=!0,_t=e.attachDispatcher({beginInvokeDotNetFromJS:wt,endInvokeJSFromDotNet:Et,sendByteArray:St});const t=await async function(){const e=await fetch("_framework/blazor.modules.json",{method:"GET",credentials:"include",cache:"no-cache"}),t=await e.json(),n=new Tt;return await n.importInitializersAsync(t,[]),n}();(function(){const e={AttachToDocument:(e,t)=>{!function(e,t,n){const r="::before";let o=!1;if(e.endsWith("::after"))e=e.slice(0,-7),o=!0;else if(e.endsWith(r))throw new Error(`The '${r}' selector is not supported.`);const a=function(e){const t=m.get(e);if(t)return m.delete(e),t}(e)||document.querySelector(e);if(!a)throw new Error(`Could not find any element matching selector '${e}'.`);!function(e,t,n,r){let o=fe[e];o||(o=new le(e),fe[e]=o),o.attachRootComponentToLogicalElement(n,t,r)}(n,P(a,!0),t,o)}(t,e,At.WebView)},RenderBatch:(e,t)=>{try{const n=kt(t);(function(e,t){const n=fe[e];if(!n)throw new Error(`There is no browser renderer with ID ${e}.`);const r=t.arrayRangeReader,o=t.updatedComponents(),a=r.values(o),i=r.count(o),s=t.referenceFrames(),c=r.values(s),l=t.diffReader;for(let e=0;e{gt=!0,console.error(`${e}\n${t}`),function(){const e=document.querySelector("#blazor-error-ui");e&&(e.style.display="block"),nt||(nt=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach((e=>{e.onclick=function(e){location.reload(),e.preventDefault()}})),document.querySelectorAll("#blazor-error-ui .dismiss").forEach((e=>{e.onclick=function(e){const t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})))}()},BeginInvokeJS:_t.beginInvokeJSFromDotNet.bind(_t),EndInvokeDotNet:_t.endInvokeDotNetFromJS.bind(_t),SendByteArrayToJS:Rt,Navigate:Oe.navigateTo,Refresh:Oe.refresh,SetHasLocationChangingListeners:e=>{Oe.setHasLocationChangingListeners(At.WebView,e)},EndLocationChanging:Oe.endLocationChanging};window.external.receiveMessage((t=>{const n=function(e){if(gt||!e||!e.startsWith(vt))return null;const t=e.substring(vt.length),[n,...r]=JSON.parse(t);return{messageType:n,args:r}}(t);if(n){if(!Object.prototype.hasOwnProperty.call(e,n.messageType))throw new Error(`Unsupported IPC message type '${n.messageType}'`);e[n.messageType].apply(null,n.args)}}))})(),tt._internal.receiveWebViewDotNetDataStream=xt,Oe.enableNavigationInterception(At.WebView),Oe.listenForNavigationEvents(At.WebView,It,Ct),Dt("AttachPage",Oe.getBaseURI(),Oe.getLocationHref()),await t.invokeAfterStartedCallbacks(tt)}function xt(e,t,n,r){!function(e,t,n,r,o){let a=et.get(t);if(!a){const n=new ReadableStream({start(e){et.set(t,e),a=e}});e.supplyDotNetStream(t,n)}o?(a.error(o),et.delete(t)):0===r?(a.close(),et.delete(t)):a.enqueue(n.length===r?n:n.subarray(0,r))}(_t,e,t,n,r)}tt.start=Lt,window.DotNet=e,document&&document.currentScript&&"false"!==document.currentScript.getAttribute("autostart")&&Lt()})(); \ No newline at end of file diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationEnhancement.ts dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationEnhancement.ts --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationEnhancement.ts 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationEnhancement.ts 2024-03-08 08:33:13.000000000 +0000 @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. import { synchronizeDomContent } from '../Rendering/DomMerging/DomSync'; -import { attachProgrammaticEnhancedNavigationHandler, handleClickForNavigationInterception, hasInteractiveRouter, notifyEnhancedNavigationListners } from './NavigationUtils'; +import { attachProgrammaticEnhancedNavigationHandler, handleClickForNavigationInterception, hasInteractiveRouter, isSamePageWithHash, notifyEnhancedNavigationListners, performScrollToElementOnTheSamePage } from './NavigationUtils'; /* In effect, we have two separate client-side navigation mechanisms: @@ -84,13 +84,19 @@ return; } - if (event.target instanceof HTMLElement && !enhancedNavigationIsEnabledForElement(event.target)) { + if (event.target instanceof Element && !enhancedNavigationIsEnabledForElement(event.target)) { return; } handleClickForNavigationInterception(event, absoluteInternalHref => { + const shouldScrollToHash = isSamePageWithHash(absoluteInternalHref); history.pushState(null, /* ignored title */ '', absoluteInternalHref); - performEnhancedPageLoad(absoluteInternalHref, /* interceptedLink */ true); + + if (shouldScrollToHash) { + performScrollToElementOnTheSamePage(absoluteInternalHref); + } else { + performEnhancedPageLoad(absoluteInternalHref, /* interceptedLink */ true); + } }); } @@ -421,7 +427,7 @@ }); } -function enhancedNavigationIsEnabledForElement(element: HTMLElement): boolean { +function enhancedNavigationIsEnabledForElement(element: Element): boolean { // For links, they default to being enhanced, but you can override at any ancestor level (both positively and negatively) const closestOverride = element.closest('[data-enhance-nav]'); if (closestOverride) { diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationManager.ts dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationManager.ts --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationManager.ts 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationManager.ts 2024-03-08 08:33:13.000000000 +0000 @@ -4,7 +4,7 @@ import '@microsoft/dotnet-js-interop'; import { resetScrollAfterNextBatch } from '../Rendering/Renderer'; import { EventDelegator } from '../Rendering/Events/EventDelegator'; -import { attachEnhancedNavigationListener, getInteractiveRouterRendererId, handleClickForNavigationInterception, hasInteractiveRouter, hasProgrammaticEnhancedNavigationHandler, isWithinBaseUriSpace, performProgrammaticEnhancedNavigation, setHasInteractiveRouter, toAbsoluteUri } from './NavigationUtils'; +import { attachEnhancedNavigationListener, getInteractiveRouterRendererId, handleClickForNavigationInterception, hasInteractiveRouter, hasProgrammaticEnhancedNavigationHandler, isSamePageWithHash, isWithinBaseUriSpace, performProgrammaticEnhancedNavigation, performScrollToElementOnTheSamePage, scrollToElement, setHasInteractiveRouter, toAbsoluteUri } from './NavigationUtils'; import { WebRendererId } from '../Rendering/WebRendererId'; import { isRendererAttached } from '../Rendering/WebRendererInteropMethods'; import { IBlazor } from '../GlobalExports'; @@ -71,16 +71,6 @@ callbacks.hasLocationChangingEventListeners = hasListeners; } -export function scrollToElement(identifier: string): boolean { - const element = document.getElementById(identifier); - - if (element) { - element.scrollIntoView(); - return true; - } - - return false; -} export function attachToEventDelegator(eventDelegator: EventDelegator): void { // We need to respond to clicks on elements *after* the EventDelegator has finished @@ -97,22 +87,6 @@ }); } -function isSamePageWithHash(absoluteHref: string): boolean { - const hashIndex = absoluteHref.indexOf('#'); - return hashIndex > -1 && location.href.replace(location.hash, '') === absoluteHref.substring(0, hashIndex); -} - -function performScrollToElementOnTheSamePage(absoluteHref : string, replace: boolean, state: string | undefined = undefined): void { - saveToBrowserHistory(absoluteHref, replace, state); - - const hashIndex = absoluteHref.indexOf('#'); - if (hashIndex === absoluteHref.length - 1) { - return; - } - - const identifier = absoluteHref.substring(hashIndex + 1); - scrollToElement(identifier); -} function refresh(forceReload: boolean): void { if (!forceReload && hasProgrammaticEnhancedNavigationHandler()) { @@ -181,7 +155,8 @@ ignorePendingNavigation(); if (isSamePageWithHash(absoluteInternalHref)) { - performScrollToElementOnTheSamePage(absoluteInternalHref, replace, state); + saveToBrowserHistory(absoluteInternalHref, replace, state); + performScrollToElementOnTheSamePage(absoluteInternalHref); return; } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationUtils.ts dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationUtils.ts --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationUtils.ts 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/Web.JS/src/Services/NavigationUtils.ts 2024-03-08 08:33:13.000000000 +0000 @@ -47,6 +47,25 @@ && (nextChar === '' || nextChar === '/' || nextChar === '?' || nextChar === '#'); } +export function isSamePageWithHash(absoluteHref: string): boolean { + const url = new URL(absoluteHref); + return url.hash !== '' && location.origin === url.origin && location.pathname === url.pathname && location.search === url.search; +} + +export function performScrollToElementOnTheSamePage(absoluteHref : string): void { + const hashIndex = absoluteHref.indexOf('#'); + if (hashIndex === absoluteHref.length - 1) { + return; + } + + const identifier = absoluteHref.substring(hashIndex + 1); + scrollToElement(identifier); +} + +export function scrollToElement(identifier: string): void { + document.getElementById(identifier)?.scrollIntoView(); +} + export function attachEnhancedNavigationListener(listener: typeof enhancedNavigationListener) { enhancedNavigationListener = listener; } @@ -86,42 +105,26 @@ return event.ctrlKey || event.shiftKey || event.altKey || event.metaKey; } -function canProcessAnchor(anchorTarget: HTMLAnchorElement) { +function canProcessAnchor(anchorTarget: HTMLAnchorElement | SVGAElement) { const targetAttributeValue = anchorTarget.getAttribute('target'); const opensInSameFrame = !targetAttributeValue || targetAttributeValue === '_self'; return opensInSameFrame && anchorTarget.hasAttribute('href') && !anchorTarget.hasAttribute('download'); } -function findAnchorTarget(event: MouseEvent): HTMLAnchorElement | null { - // _blazorDisableComposedPath is a temporary escape hatch in case any problems are discovered - // in this logic. It can be removed in a later release, and should not be considered supported API. - const path = !window['_blazorDisableComposedPath'] && event.composedPath && event.composedPath(); +function findAnchorTarget(event: MouseEvent): HTMLAnchorElement | SVGAElement | null { + const path = event.composedPath && event.composedPath(); if (path) { // This logic works with events that target elements within a shadow root, // as long as the shadow mode is 'open'. For closed shadows, we can't possibly // know what internal element was clicked. for (let i = 0; i < path.length; i++) { const candidate = path[i]; - if (candidate instanceof Element && candidate.tagName === 'A') { - return candidate as HTMLAnchorElement; + if (candidate instanceof HTMLAnchorElement || candidate instanceof SVGAElement) { + return candidate; } - } - return null; - } else { - // Since we're adding use of composedPath in a patch, retain compatibility with any - // legacy browsers that don't support it by falling back on the older logic, even - // though it won't work properly with ShadowDOM. This can be removed in the next - // major release. - return findClosestAnchorAncestorLegacy(event.target as Element | null, 'A'); - } -} - -function findClosestAnchorAncestorLegacy(element: Element | null, tagName: string) { - return !element - ? null - : element.tagName === tagName - ? element - : findClosestAnchorAncestorLegacy(element.parentElement, tagName); + } + } + return null; } export function hasInteractiveRouter(): boolean { diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/WebAssembly/WebAssembly/src/Services/DefaultWebAssemblyJSRuntime.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/WebAssembly/WebAssembly/src/Services/DefaultWebAssemblyJSRuntime.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/WebAssembly/WebAssembly/src/Services/DefaultWebAssemblyJSRuntime.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/WebAssembly/WebAssembly/src/Services/DefaultWebAssemblyJSRuntime.cs 2024-03-08 08:33:13.000000000 +0000 @@ -106,6 +106,7 @@ [DynamicDependency(JsonSerialized, typeof(RootComponentOperation))] [DynamicDependency(JsonSerialized, typeof(RootComponentOperationBatch))] + [DynamicDependency(JsonSerialized, typeof(ComponentMarkerKey))] [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "The correct members will be preserved by the above DynamicDependency")] internal static RootComponentOperationBatch DeserializeOperations(string operationsJson) { diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/benchmarkapps/Wasm.Performance/dockerfile dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/benchmarkapps/Wasm.Performance/dockerfile --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/benchmarkapps/Wasm.Performance/dockerfile 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/benchmarkapps/Wasm.Performance/dockerfile 2024-03-08 08:33:13.000000000 +0000 @@ -28,7 +28,7 @@ RUN chmod +x /app/Wasm.Performance.Driver WORKDIR /app -FROM selenium/standalone-chrome:114.0 as final +FROM selenium/standalone-chrome:120.0 as final COPY --from=build ./app ./ COPY ./exec.sh ./ diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/EnhancedNavigationTest.cs 2024-03-08 08:33:13.000000000 +0000 @@ -35,7 +35,7 @@ var h1Elem = Browser.Exists(By.TagName("h1")); Browser.Equal("Hello", () => h1Elem.Text); - + Browser.Exists(By.TagName("nav")).FindElement(By.LinkText("Streaming")).Click(); // Important: we're checking the *same*

element as earlier, showing that we got to the @@ -98,7 +98,6 @@ // Check we got there, but we did *not* retain the

element Browser.Equal("Other", () => Browser.Exists(By.TagName("h1")).Text); Assert.Throws(() => originalH1Elem.Text); - } [Fact] @@ -114,7 +113,51 @@ // Check we got there, and it did retain the

element Browser.Equal("Other", () => Browser.Exists(By.TagName("h1")).Text); Assert.Equal("Other", originalH1Elem.Text); + } + + [Fact] + public void EnhancedNavWorksInsideSVGElement() + { + Navigate($"{ServerPathBase}/nav"); + + var originalH1Elem = Browser.Exists(By.TagName("h1")); + Browser.Equal("Hello", () => originalH1Elem.Text); + + Browser.Exists(By.TagName("nav")).FindElement(By.Id("svg-nav-link")).Click(); + // Check we got there, and it did retain the

element + Browser.Equal("Other", () => Browser.Exists(By.TagName("h1")).Text); + Assert.Equal("Other", originalH1Elem.Text); + } + + [Fact] + public void EnhancedNavCanBeDisabledInSVGElementContainingAnchor() + { + Navigate($"{ServerPathBase}/nav"); + + var originalH1Elem = Browser.Exists(By.TagName("h1")); + Browser.Equal("Hello", () => originalH1Elem.Text); + + Browser.Exists(By.TagName("nav")).FindElement(By.Id("svg-not-enhanced-nav-link")).Click(); + + // Check we got there, but we did *not* retain the

element + Browser.Equal("Other", () => Browser.Exists(By.TagName("h1")).Text); + Assert.Throws(() => originalH1Elem.Text); + } + + [Fact] + public void EnhancedNavCanBeDisabledInSVGElementInsideAnchor() + { + Navigate($"{ServerPathBase}/nav"); + + var originalH1Elem = Browser.Exists(By.TagName("h1")); + Browser.Equal("Hello", () => originalH1Elem.Text); + + Browser.Exists(By.TagName("nav")).FindElement(By.Id("svg-in-anchor-not-enhanced-nav-link")).Click(); + + // Check we got there, but we did *not* retain the

element + Browser.Equal("Other", () => Browser.Exists(By.TagName("h1")).Text); + Assert.Throws(() => originalH1Elem.Text); } [Fact] @@ -129,6 +172,20 @@ Browser.True(() => Browser.GetScrollY() > 500); } + [Fact] + public void CanScrollToHashWithoutPerformingFullNavigation() + { + Navigate($"{ServerPathBase}/nav/scroll-to-hash"); + Browser.Equal("Scroll to hash", () => Browser.Exists(By.TagName("h1")).Text); + + Browser.Exists(By.Id("scroll-anchor")).Click(); + Browser.True(() => Browser.GetScrollY() > 500); + Browser.True(() => Browser + .Exists(By.Id("uri-on-page-load")) + .GetAttribute("data-value") + .EndsWith("scroll-to-hash", StringComparison.Ordinal)); + } + [Theory] [InlineData("server")] [InlineData("webassembly")] @@ -284,7 +341,7 @@ Browser.Exists(By.TagName("nav")).FindElement(By.LinkText($"Interactive component navigation ({renderMode})")).Click(); Browser.Equal("Page with interactive components that navigate", () => Browser.Exists(By.TagName("h1")).Text); - + // Normally, you shouldn't store references to elements because they could become stale references // after the page re-renders. However, we want to explicitly test that the element becomes stale // across renders to ensure that a full page reload occurs. @@ -559,7 +616,7 @@ [InlineData("wasm")] public void CanReceiveNullParameterValueOnEnhancedNavigation(string renderMode) { - // See: https://github.com/dotnet/aspnetcore/issues/52434 + // See: https://github.com/dotnet/aspnetcore/issues/52434 Navigate($"{ServerPathBase}/nav"); Browser.Equal("Hello", () => Browser.Exists(By.TagName("h1")).Text); diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/InteractivityTest.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/InteractivityTest.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/InteractivityTest.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/InteractivityTest.cs 2024-03-08 08:33:13.000000000 +0000 @@ -1172,6 +1172,55 @@ Browser.Equal("True", () => Browser.FindElement(By.Id("has-circuit-context")).Text); } + [Fact] + public void InteractiveServerRootComponents_CanBecomeInteractive_WithoutInterferingWithOtherCircuits() + { + // Start by setting up 2 tabs with interactive server components. + SetUpPageWithOneInteractiveServerComponent(); + + var firstWindow = Browser.CurrentWindowHandle; + Browser.SwitchTo().NewWindow(WindowType.Tab); + var secondWindow = Browser.CurrentWindowHandle; + + SetUpPageWithOneInteractiveServerComponent(); + + // Start streaming in the second tab. + Browser.Click(By.Id("start-streaming-link")); + Browser.Equal("Streaming", () => Browser.FindElement(By.Id("status")).Text); + + // Add an interactive server component while streaming. + // This will update the existing component, but the new component + // won't become interactive until streaming ends. + Browser.Click(By.Id(AddServerPrerenderedId)); + Browser.Equal("False", () => Browser.FindElement(By.Id($"is-interactive-1")).Text); + + // Add an interactive server component in the first tab. + // This component will become interactive immediately because the response + // that rendered the component will have completed quickly. + Browser.SwitchTo().Window(firstWindow); + Browser.Click(By.Id(AddServerPrerenderedId)); + Browser.Equal("True", () => Browser.FindElement(By.Id($"is-interactive-1")).Text); + + // Stop streaming in the second tab. + // This will activate the pending component for interactivity. + // This check verifies that a circuit can activate components from its most + // recent response, even if that response isn't the most recent between all + // circuits. + Browser.SwitchTo().Window(secondWindow); + Browser.Click(By.Id("stop-streaming-link")); + Browser.Equal("True", () => Browser.FindElement(By.Id($"is-interactive-1")).Text); + + void SetUpPageWithOneInteractiveServerComponent() + { + Navigate($"{ServerPathBase}/streaming-interactivity"); + + Browser.Equal("Not streaming", () => Browser.FindElement(By.Id("status")).Text); + + Browser.Click(By.Id(AddServerPrerenderedId)); + Browser.Equal("True", () => Browser.FindElement(By.Id($"is-interactive-0")).Text); + } + } + private void BlockWebAssemblyResourceLoad() { // Force a WebAssembly resource cache miss so that we can fall back to using server interactivity diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/RedirectionTest.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/RedirectionTest.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/RedirectionTest.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/RedirectionTest.cs 2024-03-08 08:33:13.000000000 +0000 @@ -39,7 +39,7 @@ AssertElementRemoved(_originalH1Element); Browser.Equal("Scroll to hash", () => Browser.Exists(By.TagName("h1")).Text); Browser.True(() => Browser.GetScrollY() > 500); - Assert.EndsWith("/subdir/nav/scroll-to-hash#some-content", Browser.Url); + Assert.EndsWith("/subdir/nav/scroll-to-hash?foo=%F0%9F%99%82#some-content", Browser.Url); // See that 'back' takes you to the place from before the redirection Browser.Navigate().Back(); @@ -61,7 +61,7 @@ AssertElementRemoved(_originalH1Element); Browser.Equal("Scroll to hash", () => Browser.Exists(By.TagName("h1")).Text); Browser.True(() => Browser.GetScrollY() > 500); - Assert.EndsWith("/subdir/nav/scroll-to-hash#some-content", Browser.Url); + Assert.EndsWith("/subdir/nav/scroll-to-hash?foo=%F0%9F%99%82#some-content", Browser.Url); // See that 'back' takes you to the place from before the redirection Browser.Navigate().Back(); @@ -87,7 +87,7 @@ Browser.Exists(By.LinkText("Enhanced GET with internal redirection")).Click(); Browser.Equal("Scroll to hash", () => _originalH1Element.Text); - Assert.EndsWith("/subdir/nav/scroll-to-hash", Browser.Url); + Assert.EndsWith("/subdir/nav/scroll-to-hash?foo=%F0%9F%99%82", Browser.Url); // See that 'back' takes you to the place from before the redirection Browser.Navigate().Back(); @@ -108,7 +108,7 @@ // See above for why enhanced nav doesn't support preserving the hash Browser.Exists(By.CssSelector("#form-enhanced-internal button")).Click(); Browser.Equal("Scroll to hash", () => _originalH1Element.Text); - Assert.EndsWith("/subdir/nav/scroll-to-hash", Browser.Url); + Assert.EndsWith("/subdir/nav/scroll-to-hash?foo=%F0%9F%99%82", Browser.Url); // See that 'back' takes you to the place from before the redirection Browser.Navigate().Back(); @@ -129,7 +129,7 @@ // See above for why enhanced nav doesn't support preserving the hash Browser.Exists(By.LinkText("Streaming enhanced GET with internal redirection")).Click(); Browser.Equal("Scroll to hash", () => _originalH1Element.Text); - Assert.EndsWith("/subdir/nav/scroll-to-hash", Browser.Url); + Assert.EndsWith("/subdir/nav/scroll-to-hash?foo=%F0%9F%99%82", Browser.Url); // See that 'back' takes you to the place from before the redirection Browser.Navigate().Back(); @@ -150,7 +150,7 @@ // See above for why enhanced nav doesn't support preserving the hash Browser.Exists(By.CssSelector("#form-streaming-enhanced-internal button")).Click(); Browser.Equal("Scroll to hash", () => _originalH1Element.Text); - Assert.EndsWith("/subdir/nav/scroll-to-hash", Browser.Url); + Assert.EndsWith("/subdir/nav/scroll-to-hash?foo=%F0%9F%99%82", Browser.Url); // See that 'back' takes you to the place from before the redirection Browser.Navigate().Back(); @@ -205,6 +205,22 @@ // response to something like a 200 that the 'fetch' is allowed to read (embedding the // destination URL). + [Fact] + public void RedirectEnhancedGetToInternalWithErrorBoundary() + { + // This test verifies that redirection works even if an ErrorBoundary wraps + // a component throwing a NavigationException. + + Browser.Exists(By.LinkText("Enhanced GET with redirect inside error boundary")).Click(); + Browser.Equal("Scroll to hash", () => _originalH1Element.Text); + Assert.EndsWith("/subdir/nav/scroll-to-hash?foo=%F0%9F%99%82", Browser.Url); + + // See that 'back' takes you to the place from before the redirection + Browser.Navigate().Back(); + Browser.Equal("Redirections", () => _originalH1Element.Text); + Assert.EndsWith("/subdir/redirect", Browser.Url); + } + private void AssertElementRemoved(IWebElement element) { Browser.True(() => diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/UnifiedRoutingTests.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/UnifiedRoutingTests.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/UnifiedRoutingTests.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/ServerRenderingTests/UnifiedRoutingTests.cs 2024-03-08 08:33:13.000000000 +0000 @@ -24,10 +24,19 @@ public override Task InitializeAsync() => InitializeAsync(BrowserFixture.StreamingContext); - [Fact] - public void Routing_CanRenderPagesWithParameters_And_TransitionToInteractive() + [Theory] + [InlineData("routing/parameters/value", "value")] + // Issue 53138 + [InlineData("%F0%9F%99%82/routing/parameters/http%3A%2F%2Fwww.example.com%2Flogin%2Fcallback", "http://www.example.com/login/callback")] + // Note this double encodes the final 2 slashes + [InlineData("%F0%9F%99%82/routing/parameters/http%3A%2F%2Fwww.example.com%2520login%2520callback", "http://www.example.com%20login%20callback")] + // Issue 53262 + [InlineData("routing/parameters/%21%40%23%24%25%5E%26%2A%28%29_%2B-%3D%5B%5D%7B%7D%5C%5C%7C%3B%27%3A%5C%22%3E%3F.%2F", """!@#$%^&*()_+-=[]{}\\|;':\">?./""")] + // Issue 52808 + [InlineData("routing/parameters/parts%20w%2F%20issue", "parts w/ issue")] + public void Routing_CanRenderPagesWithParameters_And_TransitionToInteractive(string url, string expectedValue) { - ExecuteRoutingTestCore("routing/parameters/value", "value"); + ExecuteRoutingTestCore(url, expectedValue); } [Fact] @@ -36,10 +45,12 @@ ExecuteRoutingTestCore("routing/constraints/5", "5"); } - [Fact] - public void Routing_CanRenderPagesWithComplexSegments_And_TransitionToInteractive() + [Theory] + [InlineData("routing/complex-segment(value)", "value")] + [InlineData("%F0%9F%99%82/routing/%F0%9F%99%82complex-segment(http%3A%2F%2Fwww.example.com%2Flogin%2Fcallback)", "http://www.example.com/login/callback")] + public void Routing_CanRenderPagesWithComplexSegments_And_TransitionToInteractive(string url, string expectedValue) { - ExecuteRoutingTestCore("routing/complex-segment(value)", "value"); + ExecuteRoutingTestCore(url, expectedValue); } [Fact] @@ -54,10 +65,12 @@ ExecuteRoutingTestCore("routing/optional", "null"); } - [Fact] - public void Routing_CanRenderPagesWithCatchAllParameters_And_TransitionToInteractive() + [Theory] + [InlineData("routing/catch-all/rest/of/the/path", "rest/of/the/path")] + [InlineData("%F0%9F%99%82/routing/catch-all/http%3A%2F%2Fwww.example.com%2Flogin%2Fcallback/another", "http://www.example.com/login/callback/another")] + public void Routing_CanRenderPagesWithCatchAllParameters_And_TransitionToInteractive(string url, string expectedValue) { - ExecuteRoutingTestCore("routing/catch-all/rest/of/the/path", "rest/of/the/path"); + ExecuteRoutingTestCore(url, expectedValue); } [Fact] diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/Tests/RoutingTest.cs dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/Tests/RoutingTest.cs --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/E2ETest/Tests/RoutingTest.cs 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/E2ETest/Tests/RoutingTest.cs 2024-03-08 08:33:13.000000000 +0000 @@ -1537,7 +1537,7 @@ } [Fact] - public void CanNavigateBetweenPagesWithQueryStrings() + public void CanNavigateWithinPageWithQueryStrings() { SetUrlViaPushState("/"); @@ -1587,6 +1587,30 @@ } [Fact] + public void CanNavigateBetweenDifferentPagesWithQueryStrings() + { + SetUrlViaPushState("/"); + + // Navigate between pages with the same querystring parameter "l" for LongValues and GuidValue. + // https://github.com/dotnet/aspnetcore/issues/52483 + var app = Browser.MountTestComponent(); + app.FindElement(By.LinkText("With query parameters (none)")).Click(); + app.FindElement(By.LinkText("With IntValue and LongValues")).Click(); + app.FindElement(By.LinkText("Another page with GuidValue")).Click(); + + Browser.Equal("8b7ae9ee-de22-4dd0-8fa1-b31e66abcc79", () => app.FindElement(By.Id("value-QueryGuid")).Text); + // Verify that OnParametersSet was only called once. + Browser.Equal("1", () => app.FindElement(By.Id("param-set-count")).Text); + + app.FindElement(By.LinkText("Another page with LongValues")).Click(); + Assert.Equal("3 values (50, 100, -20)", app.FindElement(By.Id("value-LongValues")).Text); + + // We can also click back to go the preceding query while retaining the same component instance. + Browser.Navigate().Back(); + Browser.Equal("8b7ae9ee-de22-4dd0-8fa1-b31e66abcc79", () => app.FindElement(By.Id("value-QueryGuid")).Text); + } + + [Fact] public void AnchorWithHrefContainingHashSamePage_ScrollsToElementOnTheSamePage() { SetUrlViaPushState("/"); @@ -1784,4 +1808,19 @@ .FindElements(By.CssSelector("a.active")) .Select(x => x.Text)); } + + [Fact] + public void ClickOnAnchorInsideSVGElementGetsIntercepted() + { + SetUrlViaPushState("/"); + var app = Browser.MountTestComponent(); + app.FindElement(By.LinkText("Anchor inside SVG Element")).Click(); + + Browser.Equal("0", () => Browser.Exists(By.Id("location-changed-count")).Text); + + Browser.FindElement(By.Id("svg-link")).Click(); + + // If the click was intercepted then LocationChanged works + Browser.Equal("1", () => Browser.Exists(By.Id("location-changed-count")).Text); + } } diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/testassets/BasicTestApp/RouterTest/AnchorInsideSVGElement.razor dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/testassets/BasicTestApp/RouterTest/AnchorInsideSVGElement.razor --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/testassets/BasicTestApp/RouterTest/AnchorInsideSVGElement.razor 1970-01-01 00:00:00.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/testassets/BasicTestApp/RouterTest/AnchorInsideSVGElement.razor 2024-03-08 08:33:13.000000000 +0000 @@ -0,0 +1,28 @@ +@page "/SVGNavigation" +@inject NavigationManager NavigationManager +@using Microsoft.AspNetCore.Components.Routing + + + + SVG data-enhance-nav + + + +
+ +

LocationChanged: @_locationChangedCount

+ +@code { + private int _locationChangedCount = 0; + + protected override void OnInitialized() + { + NavigationManager.LocationChanged += OnLocationChanged; + } + + private void OnLocationChanged(object sender, LocationChangedEventArgs args) + { + _locationChangedCount++; + StateHasChanged(); + } +} diff -Nru dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor --- dotnet8-8.0.102-8.0.2/src/aspnetcore/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor 2024-02-08 12:54:52.000000000 +0000 +++ dotnet8-8.0.103-8.0.3/src/aspnetcore/src/Components/test/testassets/BasicTestApp/RouterTest/Links.razor 2024-03-08 08:33:13.000000000 +0000 @@ -38,6 +38,7 @@
  • Null href never matches
  • Long page with hash
  • +
  • Anchor inside SVG Element