From 71d9dc72636cdc72b73db6f2ab75a500843cfd6e Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 9 Nov 2021 14:20:11 +0100 Subject: [PATCH 1/6] - First fix for support for .NET 6 on IE11. Still not working even if Regexp seems fixed and some additional polyfills added. - Having arrayBuffer error on FileInput - Changing page does fully reload the page navigation. However it seem that events to server are working (Counter page with Submiting form alert works) --- .../Blazor.Polyfill.Server.csproj | 2 +- .../BlazorPolyfillMiddlewareExtensions.cs | 163 ++++++++++++++++-- .../Daddoon.Blazor.Polyfill.JS.csproj | 2 + .../package-lock.json | 22 +++ src/Daddoon.Blazor.Polyfill.JS/package.json | 2 + src/Daddoon.Blazor.Polyfill.JS/src/Boot.js | 7 +- .../src/Boot.js.map | 2 +- src/Daddoon.Blazor.Polyfill.JS/src/Boot.ts | 9 +- .../src/composedpath.polyfill.js | 21 +++ src/MyApp/MyApp.csproj | 2 +- src/MyApp/Pages/_Host.cshtml | 2 +- src/MyApp/wwwroot/es5module.js | 2 +- 12 files changed, 211 insertions(+), 25 deletions(-) create mode 100644 src/Daddoon.Blazor.Polyfill.JS/src/composedpath.polyfill.js diff --git a/src/Blazor.Polyfill.Server/Blazor.Polyfill.Server.csproj b/src/Blazor.Polyfill.Server/Blazor.Polyfill.Server.csproj index b0fa364..a34d933 100644 --- a/src/Blazor.Polyfill.Server/Blazor.Polyfill.Server.csproj +++ b/src/Blazor.Polyfill.Server/Blazor.Polyfill.Server.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true 5.0.102.0 Guillaume ZAHRA diff --git a/src/Blazor.Polyfill.Server/BlazorPolyfillMiddlewareExtensions.cs b/src/Blazor.Polyfill.Server/BlazorPolyfillMiddlewareExtensions.cs index bf1e66b..4ec033f 100644 --- a/src/Blazor.Polyfill.Server/BlazorPolyfillMiddlewareExtensions.cs +++ b/src/Blazor.Polyfill.Server/BlazorPolyfillMiddlewareExtensions.cs @@ -1,26 +1,24 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using System; +using Blazor.Polyfill.Server.Model; +using JavaScriptEngineSwitcher.ChakraCore; +using JavaScriptEngineSwitcher.Extensions.MsDependencyInjection; +using JavaScriptEngineSwitcher.V8; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Components.Server; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; -using Microsoft.Net.Http.Headers; -using System.IO; -using System.Reflection; -using System.Linq; -using Microsoft.AspNetCore.Components.Server; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using NUglify; using React; using React.AspNet; -using JavaScriptEngineSwitcher.Extensions.MsDependencyInjection; -using JavaScriptEngineSwitcher.V8; using React.Exceptions; -using System.Text.RegularExpressions; -using NUglify; +using System; using System.Globalization; -using System.Net; -using Blazor.Polyfill.Server.Model; -using JavaScriptEngineSwitcher.ChakraCore; -using Microsoft.Extensions.DependencyInjection.Extensions; +using System.IO; +using System.Linq; +using System.Reflection; using System.Runtime.InteropServices; +using System.Text.RegularExpressions; namespace Blazor.Polyfill.Server { @@ -360,15 +358,32 @@ private static FileContentReference GetPatchedBlazorServerFile() { string js = reader.ReadToEnd(); + + #region Patch Regex + //Patch Descriptor Regex as it make Babel crash during transform js = js.Replace("/\\W*Blazor:[^{]*(?.*)$/;", @"/[\0-\/:-@\[-\^`\{-\uFFFF]*Blazor:(?:(?!\{)[\s\S])*(.*)$/;"); + js = js.Replace("/^\\s*Blazor-Component-State:(?[a-zA-Z0-9\\+\\/=]+)$/", @"/^[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*Blazor\x2DComponent\x2DState:([\+\/-9=A-Za-z]+)$/"); + + js = js.Replace("/^\\s*Blazor:[^{]*(?.*)$/", @"/^[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*Blazor:(?:(?!\{)[\s\S])*(.*)$/"); + + #endregion Patch Regex + //Transpile code to ES5 for IE11 before manual patching - js = Transform(js, "blazor.server.js", "{\"plugins\":[\"proposal-class-properties\",\"proposal-object-rest-spread\"],\"presets\":[[\"env\",{\"targets\":{\"browsers\":[\"ie 11\"]}}], \"es2015\",\"es2016\",\"es2017\",\"stage-3\"], \"sourceType\": \"script\"}"); + js = Transform(js, "blazor.server.js", "{\"plugins\":[\"proposal-class-properties\",\"proposal-object-rest-spread\"],\"presets\":[[\"env\",{\"targets\":{\"browsers\":[\"ie 11\",\"Chrome 78\"]}}], \"es2015\",\"es2016\",\"es2017\",\"stage-3\"], \"sourceType\": \"script\"}"); + + #region Regex named groups fix //At this point, Babel has unminified the code, and fixed IE11 issues, like 'import' method calls. + //We still need to fix 'descriptor' regex evaluation code, as it was expecting a named capture group. - js = Regex.Replace(js, "([a-zA-Z]+)(.groups[ ]*&&[ ]*[a-zA-Z]+.groups.descriptor)", "$1[1]"); + js = Regex.Replace(js, "([_a-zA-Z0-9]+)(.groups[ ]*&&[ ]*[_a-zA-Z0-9]+.groups.descriptor)", "$1[1]"); + + //We still need to fix 'state' regex evaluation code, as it was expecting a named capture group. + js = Regex.Replace(js, "([_a-zA-Z0-9]+)(.groups[ ]*&&[ ]*[_a-zA-Z0-9]+.groups.state)", "$1[1]"); + + #endregion Regex named groups fix //Minify with AjaxMin (we don't want an additional external tool with NPM or else for managing this //kind of thing here... @@ -400,6 +415,118 @@ private static FileContentReference GetPatchedBlazorServerFile() #endregion PATCHED BLAZOR.SERVER.JS + #region PATCHED ASPNETCORE-BROWSER-REFRESH.JS + + //private static FileContentReference _patchedAspNetCoreBrowserRefreshFile = null; + + //private static FileContentReference GetPatchedAspNetCoreBrowserRefreshFile() + //{ + // if (_patchedAspNetCoreBrowserRefreshFile == null) + // { + // BlazorPolyfillOptions option = GetOptions(); + + // if (option.UsePackagedBlazorServerLibrary) + // { + // //Get packaged blazor.server.js + // var assembly = GetBlazorPolyfillAssembly(); + + // var resources = assembly.GetManifestResourceNames(); + // var resourceName = resources.Single(str => str.EndsWith("blazor.server.packaged.js")); + + // using (Stream stream = assembly.GetManifestResourceStream(resourceName)) + // { + // using (StreamReader reader = new StreamReader(stream)) + // { + // string js = reader.ReadToEnd(); + + // string Etag = EtagGenerator.GenerateEtagFromString(js); + + // //Computing Build time for the Last-Modified Http Header + // //We should rely on the creation date of the Microsoft API + // //not the Blazor.Polyfill.Server one as the Microsoft.AspNetCore.Components.Server + // //assembly may be updated in time. We will rely on the current creation/modification date on disk + // DateTime buildTime = GetAssemblyCreationDate(assembly); + + // _patchedBlazorServerFile = new FileContentReference() + // { + // Value = js, + // ETag = Etag, + // LastModified = buildTime, + // ContentLength = System.Text.UTF8Encoding.UTF8.GetByteCount(js).ToString(CultureInfo.InvariantCulture) + // }; + // } + // } + // } + // else + // { + // var assembly = GetAspNetCoreComponentsServerAssembly(); + + // var resources = assembly.GetManifestResourceNames(); + // var resourceName = resources.Single(str => str.EndsWith("blazor.server.js")); + + // using (Stream stream = assembly.GetManifestResourceStream(resourceName)) + // { + // using (StreamReader reader = new StreamReader(stream)) + // { + // string js = reader.ReadToEnd(); + + + // #region Patch Regex + + // //Patch Descriptor Regex as it make Babel crash during transform + // js = js.Replace("/\\W*Blazor:[^{]*(?.*)$/;", @"/[\0-\/:-@\[-\^`\{-\uFFFF]*Blazor:(?:(?!\{)[\s\S])*(.*)$/;"); + + // js = js.Replace("/^\\s*Blazor-Component-State:(?[a-zA-Z0-9\\+\\/=]+)$/", @"/^[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*Blazor\x2DComponent\x2DState:([\+\/-9=A-Za-z]+)$/"); + + // js = js.Replace("/^\\s*Blazor:[^{]*(?.*)$/", @"/^[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*Blazor:(?:(?!\{)[\s\S])*(.*)$/"); + + // #endregion Patch Regex + + // //Transpile code to ES5 for IE11 before manual patching + // js = Transform(js, "blazor.server.js", "{\"plugins\":[\"proposal-class-properties\",\"proposal-object-rest-spread\"],\"presets\":[[\"env\",{\"targets\":{\"browsers\":[\"ie 11\",\"Chrome 78\"]}}], \"es2015\",\"es2016\",\"es2017\",\"stage-3\"], \"sourceType\": \"script\"}"); + + // #region Regex named groups fix + + // //At this point, Babel has unminified the code, and fixed IE11 issues, like 'import' method calls. + + // //We still need to fix 'descriptor' regex evaluation code, as it was expecting a named capture group. + // js = Regex.Replace(js, "([a-zA-Z]+)(.groups[ ]*&&[ ]*[a-zA-Z]+.groups.descriptor)", "$1[1]"); + + // //We still need to fix 'state' regex evaluation code, as it was expecting a named capture group. + // js = Regex.Replace(js, "([a-zA-Z]+)(.groups[ ]*&&[ ]*[a-zA-Z]+.groups.state)", "$1[1]"); + + // #endregion Regex named groups fix + + // //Minify with AjaxMin (we don't want an additional external tool with NPM or else for managing this + // //kind of thing here... + // js = Uglify.Js(js).Code; + + // //Computing ETag. Should be computed last ! + // string Etag = EtagGenerator.GenerateEtagFromString(js); + + // //Computing Build time for the Last-Modified Http Header + // //We should rely on the creation date of the Microsoft API + // //not the Blazor.Polyfill.Server one as the Microsoft.AspNetCore.Components.Server + // //assembly may be updated in time. We will rely on the current creation/modification date on disk + // DateTime buildTime = GetAssemblyCreationDate(assembly); + + // _patchedBlazorServerFile = new FileContentReference() + // { + // Value = js, + // ETag = Etag, + // LastModified = buildTime, + // ContentLength = System.Text.UTF8Encoding.UTF8.GetByteCount(js).ToString(CultureInfo.InvariantCulture) + // }; + // } + // } + // } + // } + + // return _patchedBlazorServerFile; + //} + + #endregion PATCHED ASPNETCORE-BROWSER-REFRESH.JS + #region IE11 BLAZOR.POLYFILL.JS private static FileContentReference _ie11Polyfill = null; diff --git a/src/Daddoon.Blazor.Polyfill.JS/Daddoon.Blazor.Polyfill.JS.csproj b/src/Daddoon.Blazor.Polyfill.JS/Daddoon.Blazor.Polyfill.JS.csproj index 8146254..feee211 100644 --- a/src/Daddoon.Blazor.Polyfill.JS/Daddoon.Blazor.Polyfill.JS.csproj +++ b/src/Daddoon.Blazor.Polyfill.JS/Daddoon.Blazor.Polyfill.JS.csproj @@ -29,6 +29,8 @@ + + diff --git a/src/Daddoon.Blazor.Polyfill.JS/package-lock.json b/src/Daddoon.Blazor.Polyfill.JS/package-lock.json index cf2299b..80865d3 100644 --- a/src/Daddoon.Blazor.Polyfill.JS/package-lock.json +++ b/src/Daddoon.Blazor.Polyfill.JS/package-lock.json @@ -10,6 +10,8 @@ "dependencies": { "abortcontroller-polyfill": "^1.4.0", "core-js": "^3.8.2", + "get-root-node-polyfill": "^1.0.0", + "regenerator-runtime": "^0.13.9", "web-animations-js": "^2.3.2", "whatwg-fetch": "^2.0.4" }, @@ -1868,6 +1870,11 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, + "node_modules/get-root-node-polyfill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-root-node-polyfill/-/get-root-node-polyfill-1.0.0.tgz", + "integrity": "sha512-AzucsG1DdepagLF8tkxfjUqn3cCQ63MgH/tBWwPSy0BIDt8iLFZYDwnTxA08d+zdgL8l2dkPdZDe+Qkd+RMl9Q==" + }, "node_modules/get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -2886,6 +2893,11 @@ "node": ">=0.6" } }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + }, "node_modules/regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", @@ -5104,6 +5116,11 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, + "get-root-node-polyfill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-root-node-polyfill/-/get-root-node-polyfill-1.0.0.tgz", + "integrity": "sha512-AzucsG1DdepagLF8tkxfjUqn3cCQ63MgH/tBWwPSy0BIDt8iLFZYDwnTxA08d+zdgL8l2dkPdZDe+Qkd+RMl9Q==" + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -5942,6 +5959,11 @@ "set-immediate-shim": "1.0.1" } }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + }, "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", diff --git a/src/Daddoon.Blazor.Polyfill.JS/package.json b/src/Daddoon.Blazor.Polyfill.JS/package.json index 5878486..5ed96b1 100644 --- a/src/Daddoon.Blazor.Polyfill.JS/package.json +++ b/src/Daddoon.Blazor.Polyfill.JS/package.json @@ -16,6 +16,8 @@ "dependencies": { "abortcontroller-polyfill": "^1.4.0", "core-js": "^3.8.2", + "get-root-node-polyfill": "^1.0.0", + "regenerator-runtime": "^0.13.9", "web-animations-js": "^2.3.2", "whatwg-fetch": "^2.0.4" } diff --git a/src/Daddoon.Blazor.Polyfill.JS/src/Boot.js b/src/Daddoon.Blazor.Polyfill.JS/src/Boot.js index 03c1dd5..237b2e3 100644 --- a/src/Daddoon.Blazor.Polyfill.JS/src/Boot.js +++ b/src/Daddoon.Blazor.Polyfill.JS/src/Boot.js @@ -1,7 +1,8 @@ "use strict"; /* BLAZOR.POLYFILL Version 5.0.100.1 */ Object.defineProperty(exports, "__esModule", { value: true }); -require("core-js/es"); +require("core-js/stable"); +require("regenerator-runtime/runtime"); require("web-animations-js"); require("whatwg-fetch"); require("abortcontroller-polyfill/dist/polyfill-patch-fetch"); @@ -11,6 +12,10 @@ require("../src/navigator.sendbeacon.js"); require("../src/canvas-to-blob.js"); //Polyfill for 'after' method not existing on ChildNode on IE9+ require("../src/after.js"); +//Polyfill for composedPath on IE +require("../src/composedpath.polyfill.js"); +//Polyfill getRootNode +require("get-root-node-polyfill/implement"); (function () { function IsIE() { if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { diff --git a/src/Daddoon.Blazor.Polyfill.JS/src/Boot.js.map b/src/Daddoon.Blazor.Polyfill.JS/src/Boot.js.map index 8e3ca3f..a6cbe5e 100644 --- a/src/Daddoon.Blazor.Polyfill.JS/src/Boot.js.map +++ b/src/Daddoon.Blazor.Polyfill.JS/src/Boot.js.map @@ -1 +1 @@ -{"version":3,"file":"Boot.js","sourceRoot":"","sources":["Boot.ts"],"names":[],"mappings":";AAAA,uCAAuC;;AAEvC,sBAAoB;AACpB,6BAA2B;AAC3B,wBAAsB;AACtB,8DAA4D;AAC5D,8BAA4B;AAC5B,0CAAwC;AAExC,uBAAuB;AACvB,oCAAkC;AAElC,+DAA+D;AAC/D,2BAAyB;AASzB,CAAC;IACG,SAAS,IAAI;QAET,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE;YAClD,OAAO,IAAI,CAAC;SACf;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,SAAS,cAAc;QAEnB,wDAAwD;QACxD,qDAAqD;QACrD,sBAAsB;QACtB,IAAI,IAAI,EAAE,EAAE;YACR,MAAM,CAAC,SAAS,EAAE,CAAC;SACtB;QAED,IAAI,IAAI,EAAE,EAAE;YACR,yCAAyC;YACzC,IAAI,MAAM,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,EAAE;gBAChD,QAAQ,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;aACxD;SACJ;QAED,8FAA8F;QAC9F,IAA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;YACvB,UAAU,GAAG,GAAG,GAAG,UAAU,CAAC;SACjC;QAED,oDAAoD;QACpD,UAAU,GAAG,UAAU;aAClB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE1B,IAAI,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE;YAC5F,aAAa;YACb,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;SACzD;aACI;YACD,aAAa;YACb,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,iCAAiC,GAAG,QAAQ,GAAG,GAAG,CAAC,CAAC,CAAC;SACxF;IACL,CAAC,CAAA;IAED,MAAM,CAAC,QAAQ,GAAG,UAAU,QAAQ;QAChC,6EAA6E;QAC7E,8BAA8B;QAE9B,kFAAkF;QAClF,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,0GAA0G;IAC1G,IAAI,MAAM,CAAC,6BAA6B,EAAE;QACtC,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,cAAc,CAAC;QACnC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;KACrC;AACL,CAAC,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/src/Daddoon.Blazor.Polyfill.JS/src/Boot.ts b/src/Daddoon.Blazor.Polyfill.JS/src/Boot.ts index e473f26..d15ff72 100644 --- a/src/Daddoon.Blazor.Polyfill.JS/src/Boot.ts +++ b/src/Daddoon.Blazor.Polyfill.JS/src/Boot.ts @@ -1,6 +1,7 @@ /* BLAZOR.POLYFILL Version 5.0.100.1 */ -import 'core-js/es'; +import 'core-js/stable'; +import "regenerator-runtime/runtime"; import 'web-animations-js'; import 'whatwg-fetch'; import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'; @@ -13,6 +14,12 @@ import '../src/canvas-to-blob.js'; //Polyfill for 'after' method not existing on ChildNode on IE9+ import '../src/after.js'; +//Polyfill for composedPath on IE +import '../src/composedpath.polyfill.js'; + +//Polyfill getRootNode +import "get-root-node-polyfill/implement"; + declare var Symbol; declare var document; declare var window; diff --git a/src/Daddoon.Blazor.Polyfill.JS/src/composedpath.polyfill.js b/src/Daddoon.Blazor.Polyfill.JS/src/composedpath.polyfill.js new file mode 100644 index 0000000..d1a4cc6 --- /dev/null +++ b/src/Daddoon.Blazor.Polyfill.JS/src/composedpath.polyfill.js @@ -0,0 +1,21 @@ +// POLYFILLS +// Event.composedPath +// Possibly normalize to add window to Safari's chain, as it does not? +(function(E, d, w) { + if(!E.composedPath) { + E.composedPath = function() { + if (this.path) { + return this.path; + } + var target = this.target; + + this.path = []; + while (target.parentNode !== null) { + this.path.push(target); + target = target.parentNode; + } + this.path.push(d, w); + return this.path; + } + } +})(Event.prototype, document, window); \ No newline at end of file diff --git a/src/MyApp/MyApp.csproj b/src/MyApp/MyApp.csproj index c743426..f591179 100644 --- a/src/MyApp/MyApp.csproj +++ b/src/MyApp/MyApp.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 ${DefaultItemExcludes};node_modules\** diff --git a/src/MyApp/Pages/_Host.cshtml b/src/MyApp/Pages/_Host.cshtml index 389bb56..d29a81d 100644 --- a/src/MyApp/Pages/_Host.cshtml +++ b/src/MyApp/Pages/_Host.cshtml @@ -30,7 +30,7 @@ 🗙 - + diff --git a/src/MyApp/wwwroot/es5module.js b/src/MyApp/wwwroot/es5module.js index ee39892..66e41f9 100644 --- a/src/MyApp/wwwroot/es5module.js +++ b/src/MyApp/wwwroot/es5module.js @@ -142,4 +142,4 @@ function sayHi(name) { /***/ }) /******/ ]); -//# sourceMapp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Jcbn1cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9DOi8yQmVlL1NvdXJjZXMvQmxhem9yLlBvbHlmaWxsL3NyYy9NeUFwcC93d3dyb290L2pzL21vZHVsZXMvY291bnRlci5qcyIsImV4cG9ydCBmdW5jdGlvbiBzYXlIaShuYW1lKSB7XHJcbiAgICBhbGVydChcImhlbGxvIFBhZ2UhXCIpO1xyXG59XG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vQzovMkJlZS9Tb3VyY2VzL0JsYXpvci5Qb2x5ZmlsbC9zcmMvTXlBcHAvd3d3cm9vdC9qcy9tb2R1bGVzL2xpZ2h0ci5qcyIsImV4cG9ydCBmdW5jdGlvbiBzYXlIaShuYW1lKSB7XHJcbiAgICBhbGVydChcImhlbGxvIFBhZ2UhXCIpO1xyXG59XG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vQzovMkJlZS9Tb3VyY2VzL0JsYXpvci5Qb2x5ZmlsbC9zcmMvTXlBcHAvd3d3cm9vdC9qcy9tb2R1bGVzL3BhZ2UuanMiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file From e731b1e20c6ce284631f6991616b8ffb8ff3e117 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 9 Nov 2021 17:42:09 +0100 Subject: [PATCH 2/6] - Fix navigation event not working => composedPath polyfill path cache seems to be incorrect or at least not returning what we would expecting with Blazor. Instead we must compute the node hierarchy at each composedPath call. --- .../src/composedpath.polyfill.js | 11 +++++++---- src/MyApp/Startup.cs | 8 +------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Daddoon.Blazor.Polyfill.JS/src/composedpath.polyfill.js b/src/Daddoon.Blazor.Polyfill.JS/src/composedpath.polyfill.js index d1a4cc6..1c845c8 100644 --- a/src/Daddoon.Blazor.Polyfill.JS/src/composedpath.polyfill.js +++ b/src/Daddoon.Blazor.Polyfill.JS/src/composedpath.polyfill.js @@ -3,10 +3,13 @@ // Possibly normalize to add window to Safari's chain, as it does not? (function(E, d, w) { if(!E.composedPath) { - E.composedPath = function() { - if (this.path) { - return this.path; - } + E.composedPath = function () { + + //Return empty on IE11 + //if (this.path) { + // return this.path; + //} + var target = this.target; this.path = []; diff --git a/src/MyApp/Startup.cs b/src/MyApp/Startup.cs index 0e25c7b..332356c 100644 --- a/src/MyApp/Startup.cs +++ b/src/MyApp/Startup.cs @@ -1,16 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using Blazor.Polyfill.Server; using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using MyApp.Data; -using Blazor.Polyfill.Server; namespace MyApp { From dc38e17c2c61a4ba5cb700df97a77b6927bcc7f7 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 9 Nov 2021 18:40:04 +0100 Subject: [PATCH 3/6] - Added packaged version of blazor.server.js for platform like ARM that doesn't support JSEngine for transpilation at runtime - Added NuGet package for .NET 6.0.100 --- .../Blazor.Polyfill.Server.csproj | 10 ++++++--- .../dist/blazor.server.packaged.js | 22 +------------------ src/MyApp/Pages/_Host.cshtml | 2 +- src/MyApp/wwwroot/es5module.js | 2 +- 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/src/Blazor.Polyfill.Server/Blazor.Polyfill.Server.csproj b/src/Blazor.Polyfill.Server/Blazor.Polyfill.Server.csproj index a34d933..bab88cd 100644 --- a/src/Blazor.Polyfill.Server/Blazor.Polyfill.Server.csproj +++ b/src/Blazor.Polyfill.Server/Blazor.Polyfill.Server.csproj @@ -3,17 +3,21 @@ net6.0 true - 5.0.102.0 + 6.0.100.0 Guillaume ZAHRA Daddoon true - Support of Blazor server-side for Internet Explorer 11, Edge Legacy and more on .NET 5.0.100 + Support of Blazor server-side for Internet Explorer 11, Edge Legacy and more on .NET 6.0.100 https://github.com/Daddoon/Blazor.Polyfill logo_blazorpolyfill_128.png Git https://github.com/Daddoon/Blazor.Polyfill blazor blazor-server ie11 edgeHTML edge-legacy polyfill - 5.0.102.0: + +6.0.100.0: +- Support for .NET 6.0.100 + +5.0.102.0: - Added option to disable automatic React.NET registration, to give more control to advanced scenarios. - Updated V8 and Native V8 dependencies to 7.1.0 - Added V8 native dependencies for ARM64 (Linux) and ARM64 (Windows) diff --git a/src/Blazor.Polyfill.Server/dist/blazor.server.packaged.js b/src/Blazor.Polyfill.Server/dist/blazor.server.packaged.js index 568ad97..9e73c07 100644 --- a/src/Blazor.Polyfill.Server/dist/blazor.server.packaged.js +++ b/src/Blazor.Polyfill.Server/dist/blazor.server.packaged.js @@ -1,21 +1 @@ -function _getRequireWildcardCache(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return _getRequireWildcardCache=function(){return n},n}function _interopRequireWildcard(n){var t,i,f,r,u;if(n&&n.__esModule)return n;if(n===null||_typeof(n)!=="object"&&typeof n!="function")return{"default":n};if(t=_getRequireWildcardCache(),t&&t.has(n))return t.get(n);i={};f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(u=f?Object.getOwnPropertyDescriptor(n,r):null,u&&(u.get||u.set)?Object.defineProperty(i,r,u):i[r]=n[r]);return i.default=n,t&&t.set(n,i),i}function _instanceof(n,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t}function _typeof(n){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_typeof(n)}!function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};t.m=n;t.c=i;t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{enumerable:!0,get:r})};t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});Object.defineProperty(n,"__esModule",{value:!0})};t.t=function(n,i){var r,u;if((1&i&&(n=t(n)),8&i)||4&i&&"object"==_typeof(n)&&n&&n.__esModule)return n;if(r=Object.create(null),t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&i&&"string"!=typeof n)for(u in n)t.d(r,u,function(t){return n[t]}.bind(null,u));return r};t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i};t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};t.p="";t(t.s=53)}([function(n,t,i){"use strict";var r;i.d(t,"a",function(){return r}),function(n){n[n.Trace=0]="Trace";n[n.Debug=1]="Debug";n[n.Information=2]="Information";n[n.Warning=3]="Warning";n[n.Error=4]="Error";n[n.Critical=5]="Critical";n[n.None=6]="None"}(r||(r={}))},function(n,t,i){"use strict";(function(n){function s(n,t){var i="";return e(n)?(i="Binary data of length "+n.byteLength,t&&(i+=". Content: '"+function(n){var i=new Uint8Array(n),t="";return i.forEach(function(n){t+="0x"+(n<16?"0":"")+n.toString(16)+" "}),t.substr(0,t.length-1)}(n)+"'")):"string"==typeof n&&(i="String data of length "+n.length,t&&(i+=". Content: '"+n+"'")),i}function e(n){return n&&"undefined"!=typeof ArrayBuffer&&(_instanceof(n,ArrayBuffer)||n.constructor&&"ArrayBuffer"===n.constructor.name)}function w(n,t,i,u,f,o,h,l,p){return v(this,void 0,void 0,function(){var b,v,k,w,d,g,nt,tt;return y(this,function(y){switch(y.label){case 0:return v={},f?[4,f()]:[3,2];case 1:(k=y.sent())&&((b={}).Authorization="Bearer "+k,v=b);y.label=2;case 2:return w=c(),d=w[0],g=w[1],v[d]=g,n.log(r.a.Trace,"("+t+" transport) sending data. "+s(o,h)+"."),nt=e(o)?"arraybuffer":"text",[4,i.post(u,{content:o,headers:a({},v,p),responseType:nt,withCredentials:l})];case 3:return tt=y.sent(),n.log(r.a.Trace,"("+t+" transport) request complete. Response status: "+tt.statusCode+"."),[2]}})})}function b(n){return void 0===n?new f(r.a.Information):null===n?l.a.instance:n.log?n:new f(n)}function c(){var n="X-SignalR-User-Agent";return u.isNode&&(n="User-Agent"),[n,k(o,d(),nt(),g())]}function k(n,t,i,r){var u="Microsoft SignalR/",f=n.split(".");return u+=f[0]+"."+f[1],u+=" ("+n+"; ",u+=t&&""!==t?t+"; ":"Unknown OS; ",u+=""+i,u+=r?"; "+r:"; Unknown Runtime Version",u+")"}function d(){if(!u.isNode)return"";switch(n.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return n.platform}}function g(){if(u.isNode)return n.versions.node}function nt(){return u.isNode?"NodeJS":"Browser"}var h,f;i.d(t,"e",function(){return o});i.d(t,"a",function(){return p});i.d(t,"c",function(){return u});i.d(t,"g",function(){return s});i.d(t,"i",function(){return e});i.d(t,"j",function(){return w});i.d(t,"f",function(){return b});i.d(t,"d",function(){return h});i.d(t,"b",function(){return f});i.d(t,"h",function(){return c});var r=i(0),l=i(4),a=Object.assign||function(n){for(var r,i,t=1,u=arguments.length;t0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]-1&&this.subject.observers.splice(n,1);0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(){})},n}();f=function(){function n(n){this.minimumLogLevel=n;this.outputConsole=console}return n.prototype.log=function(n,t){if(n>=this.minimumLogLevel)switch(n){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[n]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[n]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[n]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[n]+": "+t)}},n}()}).call(this,i(13))},function(n,t,i){"use strict";i.r(t);i.d(t,"AbortError",function(){return a});i.d(t,"HttpError",function(){return l});i.d(t,"TimeoutError",function(){return b});i.d(t,"HttpClient",function(){return k});i.d(t,"HttpResponse",function(){return tt});i.d(t,"DefaultHttpClient",function(){return ut});i.d(t,"HubConnection",function(){return et});i.d(t,"HubConnectionState",function(){return e});i.d(t,"HubConnectionBuilder",function(){return pi});i.d(t,"MessageType",function(){return f});i.d(t,"LogLevel",function(){return r.a});i.d(t,"HttpTransportType",function(){return o});i.d(t,"TransferFormat",function(){return s});i.d(t,"NullLogger",function(){return it.a});i.d(t,"JsonHubProtocol",function(){return vt});i.d(t,"Subject",function(){return ft});i.d(t,"VERSION",function(){return u.e});var rt,g=(rt=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},function(n,t){function i(){this.constructor=n}rt(n,t);n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),l=function(n){function t(t,i){var r=this,u=this.constructor.prototype;return(r=n.call(this,t)||this).statusCode=i,r.__proto__=u,r}return g(t,n),t}(Error),b=function(n){function t(t){void 0===t&&(t="A timeout occurred.");var i=this,r=this.constructor.prototype;return(i=n.call(this,t)||this).__proto__=r,i}return g(t,n),t}(Error),a=function(n){function t(t){void 0===t&&(t="An abort occurred.");var i=this,r=this.constructor.prototype;return(i=n.call(this,t)||this).__proto__=r,i}return g(t,n),t}(Error),nt=Object.assign||function(n){for(var r,i,t=1,u=arguments.length;t0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]=200&&f.status<300?i(new tt(f.status,f.statusText,f.response||f.responseText)):u(new l(f.statusText,f.status))};f.onerror=function(){t.logger.log(r.a.Warning,"Error from HTTP request. "+f.status+": "+f.statusText+".");u(new l(f.statusText,f.status))};f.ontimeout=function(){t.logger.log(r.a.Warning,"Timeout from HTTP request.");u(new b)};f.send(n.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(k),ni=function(){var n=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ut=function(n){function t(t){var i=n.call(this)||this;if("undefined"!=typeof fetch||u.c.isNode)i.httpClient=new kt(t);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");i.httpClient=new gt(t)}return i}return ni(t,n),t.prototype.send=function(n){return n.abortSignal&&n.abortSignal.aborted?Promise.reject(new a):n.method?n.url?this.httpClient.send(n):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(n){return this.httpClient.getCookieString(n)},t}(k),ti=i(47);!function(n){n[n.Invocation=1]="Invocation";n[n.StreamItem=2]="StreamItem";n[n.Completion=3]="Completion";n[n.StreamInvocation=4]="StreamInvocation";n[n.CancelInvocation=5]="CancelInvocation";n[n.Ping=6]="Ping";n[n.Close=7]="Close"}(f||(f={}));var e,ft=function(){function n(){this.observers=[]}return n.prototype.next=function(n){for(var t=0,i=this.observers;t0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+e.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},n.prototype.constructTransport=function(n){switch(n){case o.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new hi(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket,this.options.headers||{});case o.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new fi(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource,this.options.withCredentials,this.options.headers||{});case o.LongPolling:return new ht(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.withCredentials,this.options.headers||{});default:throw new Error("Unknown transport: "+n+".");}},n.prototype.startTransport=function(n,t){var i=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(n){return i.stopConnection(n)},this.transport.connect(n,t)},n.prototype.resolveTransportOrError=function(n,t,i){var u=o[n.transport];if(null==u)return this.logger.log(r.a.Debug,"Skipping transport '"+n.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+n.transport+"' because it is not supported by this client.");if(!function(n,t){return!n||0!=(t&n)}(t,u))return this.logger.log(r.a.Debug,"Skipping transport '"+o[u]+"' because it was disabled by the client."),new Error("'"+o[u]+"' is disabled by the client.");if(!(n.transferFormats.map(function(n){return s[n]}).indexOf(i)>=0))return this.logger.log(r.a.Debug,"Skipping transport '"+o[u]+"' because it does not support the requested transfer format '"+s[i]+"'."),new Error("'"+o[u]+"' does not support "+s[i]+".");if(u===o.WebSockets&&!this.options.WebSocket||u===o.ServerSentEvents&&!this.options.EventSource)return this.logger.log(r.a.Debug,"Skipping transport '"+o[u]+"' because it is not supported in your environment.'"),new Error("'"+o[u]+"' is not supported in your environment.");this.logger.log(r.a.Debug,"Selecting transport '"+o[u]+"'.");try{return this.constructTransport(u)}catch(n){return n}},n.prototype.isITransport=function(n){return n&&"object"==_typeof(n)&&"connect"in n},n.prototype.stopConnection=function(n){var t=this;if(this.logger.log(r.a.Debug,"HttpConnection.stopConnection("+n+") called while in state "+this.connectionState+"."),this.transport=void 0,n=this.stopError||n,this.stopError=void 0,"Disconnected"!==this.connectionState){if("Connecting"===this.connectionState)throw this.logger.log(r.a.Warning,"Call to HttpConnection.stopConnection("+n+") was ignored because the connection is still in the connecting state."),new Error("HttpConnection.stopConnection("+n+") was called while the connection is still in the connecting state.");if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),n?this.logger.log(r.a.Error,"Connection disconnected with error '"+n+"'."):this.logger.log(r.a.Information,"Connection disconnected."),this.sendQueue&&(this.sendQueue.stop().catch(function(n){t.logger.log(r.a.Error,"TransportSendQueue.stop() threw error '"+n+"'.")}),this.sendQueue=void 0),this.connectionId=void 0,this.connectionState="Disconnected",this.connectionStarted){this.connectionStarted=!1;try{this.onclose&&this.onclose(n)}catch(t){this.logger.log(r.a.Error,"HttpConnection.onclose("+n+") threw error '"+t+"'.")}}}else this.logger.log(r.a.Debug,"Call to HttpConnection.stopConnection("+n+") was ignored because the connection is already in the disconnected state.")},n.prototype.resolveUrl=function(n){if(0===n.lastIndexOf("https://",0)||0===n.lastIndexOf("http://",0))return n;if(!u.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+n+"'.");var t=window.document.createElement("a");return t.href=n,this.logger.log(r.a.Information,"Normalizing '"+n+"' to '"+t.href+"'."),t.href},n.prototype.resolveNegotiateUrl=function(n){var i=n.indexOf("?"),t=n.substring(0,-1===i?n.length:i);return"/"!==t[t.length-1]&&(t+="/"),t+="negotiate",-1===(t+=-1===i?"":n.substring(i)).indexOf("negotiateVersion")&&(t+=-1===i?"?":"&",t+="negotiateVersion="+this.negotiateVersion),t},n}(),ai=function(){function n(n){this.transport=n;this.buffer=[];this.executing=!0;this.sendBufferedData=new d;this.transportResult=new d;this.sendLoopPromise=this.sendLoop()}return n.prototype.send=function(n){return this.bufferData(n),this.transportResult||(this.transportResult=new d),this.transportResult.promise},n.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},n.prototype.bufferData=function(n){if(this.buffer.length&&_typeof(this.buffer[0])!=_typeof(n))throw new Error("Expected data to be of type "+_typeof(this.buffer)+" but was of type "+_typeof(n));this.buffer.push(n);this.sendBufferedData.resolve()},n.prototype.sendLoop=function(){return c(this,void 0,void 0,function(){var t,i,r;return h(this,function(u){switch(u.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(u.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new d;t=this.transportResult;this.transportResult=void 0;i="string"==typeof this.buffer[0]?this.buffer.join(""):n.concatBuffers(this.buffer);this.buffer.length=0;u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.transport.send(i)];case 3:return u.sent(),t.resolve(),[3,5];case 4:return r=u.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},n.concatBuffers=function(n){for(var i,e=n.map(function(n){return n.byteLength}).reduce(function(n,t){return n+t}),r=new Uint8Array(e),u=0,t=0,f=n;t0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return r in n||(n[r]=[]),n}function c(n,t,f){var s=n,h,c;if(_instanceof(n,Comment)&&i(s)&&i(s).length>0)throw new Error("Not implemented: inserting non-empty logical container");if(u(s))throw new Error("Not implemented: moving existing logical children");h=i(t);f0;)n(u,0);e=u;e.parentNode.removeChild(e)};t.getLogicalParent=u;t.getLogicalSiblingEnd=function(n){return n[h]||null};t.getLogicalChild=function(n,t){return i(n)[t]};t.isSvgElement=function(n){return"http://www.w3.org/2000/svg"===l(n).namespaceURI};t.getLogicalChildrenArray=i;t.permuteLogicalChildren=function(n,t){var r=i(n);t.forEach(function(n){n.moveRangeStart=r[n.fromSiblingIndex];n.moveRangeEnd=function n(t){var r,i;return _instanceof(t,Element)?t:(r=a(t),r)?r.previousSibling:(i=u(t),_instanceof(i,Element)?i.lastChild:n(i))}(n.moveRangeStart)});t.forEach(function(t){var u=t.moveToBeforeMarker=document.createComment("marker"),i=r[t.toSiblingIndex+1];i?i.parentNode.insertBefore(u,i):o(u,n)});t.forEach(function(n){for(var u,i=n.moveToBeforeMarker,r=i.parentNode,f=n.moveRangeStart,e=n.moveRangeEnd,t=f;t;){if(u=t.nextSibling,r.insertBefore(t,i),t===e)break;t=u}r.removeChild(i)});t.forEach(function(n){r[n.toSiblingIndex]=n.moveRangeStart})};t.getClosestDomElement=l},function(n){var t=function(){return this}();try{t=t||new Function("return this")()}catch(n){"object"==(typeof window=="undefined"?"undefined":_typeof(window))&&(t=window)}n.exports=t},function(n,t,i){"use strict";function r(n){if(!_instanceof(this,r))return new r(n);s.call(this,n);u.call(this,n);n&&!1===n.readable&&(this.readable=!1);n&&!1===n.writable&&(this.writable=!1);this.allowHalfOpen=!0;n&&!1===n.allowHalfOpen&&(this.allowHalfOpen=!1);this.once("end",a)}function a(){this.allowHalfOpen||this._writableState.ended||c.nextTick(v,this)}function v(n){n.end()}var c=i(24),l=Object.keys||function(n){var t=[];for(var i in n)t.push(i);return t},o,s,u,h,f,e;for(n.exports=r,o=i(19),o.inherits=i(15),s=i(40),u=i(45),o.inherits(r,s),h=l(u.prototype),f=0;f - * @license MIT - */ -function h(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(n,t){if(h()=h())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h().toString(16)+" bytes");return 0|n}function nt(n,t){var i,u;if(r.isBuffer(n))return n.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(n)||_instanceof(n,ArrayBuffer)))return n.byteLength;if("string"!=typeof n&&(n=""+n),i=n.length,0===i)return 0;for(u=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return a(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return ht(n).length;default:if(u)return a(n).length;t=(""+t).toLowerCase();u=!0}}function ct(n,t,i){var r=!1;if(((void 0===t||t<0)&&(t=0),t>this.length)||((void 0===i||i>this.length)&&(i=this.length),i<=0)||(i>>>=0)<=(t>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return dt(this,t,i);case"utf8":case"utf-8":return ut(this,t,i);case"ascii":return bt(this,t,i);case"latin1":case"binary":return kt(this,t,i);case"base64":return wt(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase();r=!0}}function o(n,t,i){var r=n[t];n[t]=n[i];n[i]=r}function tt(n,t,i,u,f){if(0===n.length)return-1;if("string"==typeof i?(u=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=f?0:n.length-1),i<0&&(i=n.length+i),i>=n.length){if(f)return-1;i=n.length-1}else if(i<0){if(!f)return-1;i=0}if("string"==typeof t&&(t=r.from(t,u)),r.isBuffer(t))return 0===t.length?-1:it(n,t,i,u,f);if("number"==typeof t)return t&=255,r.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(n,t,i):Uint8Array.prototype.lastIndexOf.call(n,t,i):it(n,[t],i,u,f);throw new TypeError("val must be string, number or Buffer");}function it(n,t,i,r,u){function l(n,t){return 1===h?n[t]:n.readUInt16BE(t*h)}var f,h=1,c=n.length,o=t.length,e,a,s;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(n.length<2||t.length<2)return-1;h=2;c/=2;o/=2;i/=2}if(u)for(e=-1,f=i;fc&&(i=c-o),f=i;f>=0;f--){for(a=!0,s=0;sf&&(r=f):r=f,e=t.length,e%2!=0)throw new TypeError("Invalid hex string");for(r>e/2&&(r=e/2),u=0;u>8,e=i%256,r.push(e),r.push(f);return r}(t,n.length-i),n,i,r)}function wt(n,t,i){return 0===t&&i===n.length?y.fromByteArray(n):y.fromByteArray(n.slice(t,i))}function ut(n,t,i){var h,u;for(i=Math.min(n.length,i),h=[],u=t;u239?4:o>223?3:o>191?2:1;if(u+c<=i)switch(c){case 1:o<128&&(r=o);break;case 2:128==(192&(e=n[u+1]))&&(f=(31&o)<<6|63&e)>127&&(r=f);break;case 3:e=n[u+1];s=n[u+2];128==(192&e)&&128==(192&s)&&(f=(15&o)<<12|(63&e)<<6|63&s)>2047&&(f<55296||f>57343)&&(r=f);break;case 4:e=n[u+1];s=n[u+2];l=n[u+3];128==(192&e)&&128==(192&s)&&128==(192&l)&&(f=(15&o)<<18|(63&e)<<12|(63&s)<<6|63&l)>65535&&f<1114112&&(r=f)}null===r?(r=65533,c=1):r>65535&&(r-=65536,h.push(r>>>10&1023|55296),r=56320|1023&r);h.push(r);u+=c}return function(n){var r=n.length,i,t;if(r<=4096)return String.fromCharCode.apply(String,n);for(i="",t=0;tf)&&(i=f),u="",r=t;ri)throw new RangeError("Trying to access beyond buffer length");}function f(n,t,i,u,f,e){if(!r.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>f||tn.length)throw new RangeError("Index out of range");}function c(n,t,i,r){t<0&&(t=65535+t+1);for(var u=0,f=Math.min(n.length-i,2);u>>8*(r?u:1-u)}function l(n,t,i,r){t<0&&(t=4294967295+t+1);for(var u=0,f=Math.min(n.length-i,4);u>>8*(r?u:3-u)&255}function ft(n,t,i,r){if(i+r>n.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range");}function et(n,t,i,r,u){return u||ft(n,0,i,4),s.write(n,t,i,r,23,4),i+4}function ot(n,t,i,r,u){return u||ft(n,0,i,8),s.write(n,t,i,r,52,8),i+8}function ni(n){return n<16?"0"+n.toString(16):n.toString(16)}function a(n,t){var i;t=t||1/0;for(var e=n.length,u=null,r=[],f=0;f55295&&i<57344){if(!u){if(i>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(f+1===e){(t-=3)>-1&&r.push(239,191,189);continue}u=i;continue}if(i<56320){(t-=3)>-1&&r.push(239,191,189);u=i;continue}i=65536+(u-55296<<10|i-56320)}else u&&(t-=3)>-1&&r.push(239,191,189);if(u=null,i<128){if((t-=1)<0)break;r.push(i)}else if(i<2048){if((t-=2)<0)break;r.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;r.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return r}function ht(n){return y.toByteArray(function(n){if((n=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")}(n).replace(st,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function v(n,t,i,r){for(var u=0;u=t.length||u>=n.length);++u)t[u+i]=n[u];return u}var y=i(54),s=i(55),k=i(56),st;t.Buffer=r;t.SlowBuffer=function(n){return+n!=n&&(n=0),r.alloc(+n)};t.INSPECT_MAX_BYTES=50;r.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:function(){try{var n=new Uint8Array(1);return n.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===n.foo()&&"function"==typeof n.subarray&&0===n.subarray(1,1).byteLength}catch(n){return!1}}();t.kMaxLength=h();r.poolSize=8192;r._augment=function(n){return n.__proto__=r.prototype,n};r.from=function(n,t,i){return d(null,n,t,i)};r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0}));r.alloc=function(n,t,i){return function(n,t,i,r){return g(t),t<=0?e(n,t):void 0!==i?"string"==typeof r?e(n,t).fill(i,r):e(n,t).fill(i):e(n,t)}(null,n,t,i)};r.allocUnsafe=function(n){return p(null,n)};r.allocUnsafeSlow=function(n){return p(null,n)};r.isBuffer=function(n){return!(null==n||!n._isBuffer)};r.compare=function(n,t){if(!r.isBuffer(n)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(n===t)return 0;for(var u=n.length,f=t.length,i=0,e=Math.min(u,f);i0&&(n=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(n+=" ... ")),""};r.prototype.compare=function(n,t,i,u,f){if(!r.isBuffer(n))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=n?n.length:0),void 0===u&&(u=0),void 0===f&&(f=this.length),t<0||i>n.length||u<0||f>this.length)throw new RangeError("out of range index");if(u>=f&&t>=i)return 0;if(u>=f)return-1;if(t>=i)return 1;if(this===n)return 0;for(var o=(f>>>=0)-(u>>>=0),s=(i>>>=0)-(t>>>=0),l=Math.min(o,s),h=this.slice(u,f),c=n.slice(t,i),e=0;eu)&&(i=u),n.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");for(r||(r="utf8"),f=!1;;)switch(r){case"hex":return lt(this,n,t,i);case"utf8":case"utf-8":return at(this,n,t,i);case"ascii":return rt(this,n,t,i);case"latin1":case"binary":return vt(this,n,t,i);case"base64":return yt(this,n,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pt(this,n,t,i);default:if(f)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase();f=!0}};r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};r.prototype.slice=function(n,t){var f,i=this.length,e,u;if((n=~~n)<0?(n+=i)<0&&(n=0):n>i&&(n=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t0&&(f*=256);)r+=this[n+--t]*f;return r};r.prototype.readUInt8=function(n,t){return t||u(n,1,this.length),this[n]};r.prototype.readUInt16LE=function(n,t){return t||u(n,2,this.length),this[n]|this[n+1]<<8};r.prototype.readUInt16BE=function(n,t){return t||u(n,2,this.length),this[n]<<8|this[n+1]};r.prototype.readUInt32LE=function(n,t){return t||u(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+16777216*this[n+3]};r.prototype.readUInt32BE=function(n,t){return t||u(n,4,this.length),16777216*this[n]+(this[n+1]<<16|this[n+2]<<8|this[n+3])};r.prototype.readIntLE=function(n,t,i){n|=0;t|=0;i||u(n,t,this.length);for(var r=this[n],f=1,e=0;++e=(f*=128)&&(r-=Math.pow(2,8*t)),r};r.prototype.readIntBE=function(n,t,i){n|=0;t|=0;i||u(n,t,this.length);for(var f=t,e=1,r=this[n+--f];f>0&&(e*=256);)r+=this[n+--f]*e;return r>=(e*=128)&&(r-=Math.pow(2,8*t)),r};r.prototype.readInt8=function(n,t){return t||u(n,1,this.length),128&this[n]?-1*(256-this[n]):this[n]};r.prototype.readInt16LE=function(n,t){t||u(n,2,this.length);var i=this[n]|this[n+1]<<8;return 32768&i?4294901760|i:i};r.prototype.readInt16BE=function(n,t){t||u(n,2,this.length);var i=this[n+1]|this[n]<<8;return 32768&i?4294901760|i:i};r.prototype.readInt32LE=function(n,t){return t||u(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24};r.prototype.readInt32BE=function(n,t){return t||u(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]};r.prototype.readFloatLE=function(n,t){return t||u(n,4,this.length),s.read(this,n,!0,23,4)};r.prototype.readFloatBE=function(n,t){return t||u(n,4,this.length),s.read(this,n,!1,23,4)};r.prototype.readDoubleLE=function(n,t){return t||u(n,8,this.length),s.read(this,n,!0,52,8)};r.prototype.readDoubleBE=function(n,t){return t||u(n,8,this.length),s.read(this,n,!1,52,8)};r.prototype.writeUIntLE=function(n,t,i,r){(n=+n,t|=0,i|=0,r)||f(this,n,t,i,Math.pow(2,8*i)-1,0);var u=1,e=0;for(this[t]=255&n;++e=0&&(e*=256);)this[t+u]=n/e&255;return t+i};r.prototype.writeUInt8=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),this[t]=255&n,t+1};r.prototype.writeUInt16LE=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8):c(this,n,t,!0),t+2};r.prototype.writeUInt16BE=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=n>>>8,this[t+1]=255&n):c(this,n,t,!1),t+2};r.prototype.writeUInt32LE=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=n>>>24,this[t+2]=n>>>16,this[t+1]=n>>>8,this[t]=255&n):l(this,n,t,!0),t+4};r.prototype.writeUInt32BE=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=255&n):l(this,n,t,!1),t+4};r.prototype.writeIntLE=function(n,t,i,r){var u;(n=+n,t|=0,r)||(u=Math.pow(2,8*i-1),f(this,n,t,i,u-1,-u));var e=0,s=1,o=0;for(this[t]=255&n;++e>0)-o&255;return t+i};r.prototype.writeIntBE=function(n,t,i,r){var e;(n=+n,t|=0,r)||(e=Math.pow(2,8*i-1),f(this,n,t,i,e-1,-e));var u=i-1,s=1,o=0;for(this[t+u]=255&n;--u>=0&&(s*=256);)n<0&&0===o&&0!==this[t+u+1]&&(o=1),this[t+u]=(n/s>>0)-o&255;return t+i};r.prototype.writeInt8=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(n=Math.floor(n)),n<0&&(n=255+n+1),this[t]=255&n,t+1};r.prototype.writeInt16LE=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8):c(this,n,t,!0),t+2};r.prototype.writeInt16BE=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=n>>>8,this[t+1]=255&n):c(this,n,t,!1),t+2};r.prototype.writeInt32LE=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=255&n,this[t+1]=n>>>8,this[t+2]=n>>>16,this[t+3]=n>>>24):l(this,n,t,!0),t+4};r.prototype.writeInt32BE=function(n,t,i){return n=+n,t|=0,i||f(this,n,t,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),r.TYPED_ARRAY_SUPPORT?(this[t]=n>>>24,this[t+1]=n>>>16,this[t+2]=n>>>8,this[t+3]=255&n):l(this,n,t,!1),t+4};r.prototype.writeFloatLE=function(n,t,i){return et(this,n,t,!0,i)};r.prototype.writeFloatBE=function(n,t,i){return et(this,n,t,!1,i)};r.prototype.writeDoubleLE=function(n,t,i){return ot(this,n,t,!0,i)};r.prototype.writeDoubleBE=function(n,t,i){return ot(this,n,t,!1,i)};r.prototype.copy=function(n,t,i,u){if((i||(i=0),u||0===u||(u=this.length),t>=n.length&&(t=n.length),t||(t=0),u>0&&u=this.length)throw new RangeError("sourceStart out of bounds");if(u<0)throw new RangeError("sourceEnd out of bounds");u>this.length&&(u=this.length);n.length-t=0;--f)n[f+t]=this[f+i];else if(e<1e3||!r.TYPED_ARRAY_SUPPORT)for(f=0;f>>=0,i=void 0===i?this.length:i>>>0,n||(n=0),"number"==typeof n)for(f=t;f=0,"must have a non-negative type"),r(u,"must have a decode function"),this.registerEncoder(function(n){return _instanceof(n,t)},function(t){var r=o(),u=e.allocUnsafe(1);return u.writeInt8(n,0),r.append(u),r.append(i(t)),r}),this.registerDecoder(n,u),this},registerEncoder:function(n,i){return r(n,"must have an encode function"),r(i,"must have an encode function"),t.push({check:n,encode:i}),this},registerDecoder:function(n,t){return r(n>=0,"must have a non-negative type"),r(t,"must have a decode function"),i.push({type:n,decode:t}),this},encoder:u.encoder,decoder:u.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:f.IncompleteBufferError}}},function(n,t,i){"use strict";function f(n,t,i){var u=r[n];u||(u=r[n]=new e.BrowserRenderer(n));u.attachRootComponentToLogicalElement(i,t)}Object.defineProperty(t,"__esModule",{value:!0});i(26);i(17);var e=i(27),o=i(7),r={},u=!1;t.attachRootComponentToLogicalElement=f;t.attachRootComponentToElement=function(n,t,i){var r=document.querySelector(n);if(!r)throw new Error("Could not find any element matching selector '"+n+"'.");f(i||0,o.toLogicalElement(r,!0),t)};t.getRendererer=function(n){return r[n]};t.renderBatch=function(n,t){var e=r[n],v;if(!e)throw new Error("There is no browser renderer with ID "+n+".");for(var f=t.arrayRangeReader,s=t.updatedComponents(),y=f.values(s),p=f.count(s),w=t.referenceFrames(),b=f.values(w),h=t.diffReader,i=0;i1)for(t=1;t>2]}function a(n){return n+12}function o(n,t,i){var r="["+n+"] "+t+":"+i;return BINDING.bind_static_method(r)}function g(n,t){return u(this,void 0,void 0,function(){var i,r;return f(this,function(u){switch(u.label){case 0:if("function"!=typeof WebAssembly.instantiateStreaming)return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,WebAssembly.instantiateStreaming(n.response,t)];case 2:return[2,u.sent().instance];case 3:return i=u.sent(),console.info("Streaming compilation failed. Falling back to ArrayBuffer instantiation. ",i),[3,4];case 4:return[4,n.response.then(function(n){return n.arrayBuffer()})];case 5:return r=u.sent(),[4,WebAssembly.instantiate(r,t)];case 6:return[2,u.sent().instance]}})})}function y(n,t){var i=n.lastIndexOf(".");if(i<0)throw new Error("No extension to replace in '"+n+"'");return n.substr(0,i)+t}function s(){if(r)throw new Error("Assertion failed - heap is currently locked");}var u=this&&this.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){var t;n.done?u(n.value):(t=n.value,_instanceof(t,i)?t:new i(function(n){n(t)})).then(o,s)}e((r=r.apply(n,t||[])).next())})},f=this&&this.__generator||function(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]>1];var i},readInt32Field:function(n,t){return e(n+(t||0))},readUint64Field:function(n,t){return function(n){var i=n>>2,t=Module.HEAPU32[i+1];if(t>d)throw new Error("Cannot read uint64 with high order part "+t+", because the result would exceed Number.MAX_SAFE_INTEGER.");return t*k+Module.HEAPU32[i]}(n+(t||0))},readFloatField:function(n,t){return i=n+(t||0),Module.HEAPF32[i>>2];var i},readObjectField:function(n,t){return e(n+(t||0))},readStringField:function(n,t,i){var f,u=e(n+(t||0)),o;return 0===u?null:i?(o=BINDING.unbox_mono_obj(u),"boolean"==typeof o?o?"":null:o):(r?void 0===(f=r.stringCache.get(u))&&(f=BINDING.conv_string(u),r.stringCache.set(u,f)):f=BINDING.conv_string(u),f)},readStructField:function(n,t){return n+(t||0)},beginHeapLock:function(){return s(),r=new p},invokeWhenHeapUnlocked:function(n){r?r.enqueuePostReleaseAction(n):n()}};l=document.createElement("a");p=function(){function n(){this.stringCache=new Map}return n.prototype.enqueuePostReleaseAction=function(n){this.postReleaseActions||(this.postReleaseActions=[]);this.postReleaseActions.push(n)},n.prototype.release=function(){var n;if(r!==this)throw new Error("Trying to release a lock which isn't current");for(r=null;null===(n=this.postReleaseActions)||void 0===n?void 0:n.length;)this.postReleaseActions.shift()(),s()},n}()},function(n,t){"use strict";var r=this&&this.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){var t;n.done?u(n.value):(t=n.value,_instanceof(t,i)?t:new i(function(n){n(t)})).then(o,s)}e((r=r.apply(n,t||[])).next())})},u=this&&this.__generator||function(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]this.length)&&(r=this.length),i>=this.length)||r<=0)return n||u.alloc(0);var l,f,c=!!n,s=this._offset(i),a=r-i,o=a,h=c&&t||0,e=s[1];if(0===i&&r==this.length){if(!c)return 1===this._bufs.length?this._bufs[0]:u.concat(this._bufs,this.length);for(f=0;f(l=this._bufs[f].length-e))){this._bufs[f].copy(n,h,e,e+o);break}this._bufs[f].copy(n,h,e);h+=l;o-=l;e&&(e=0)}return n};r.prototype.shallowSlice=function(n,t){n=n||0;t=t||this.length;n<0&&(n+=this.length);t<0&&(t+=this.length);var u=this._offset(n),f=this._offset(t),i=this._bufs.slice(u[0],f[0]+1);return 0==f[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,f[1]),0!=u[1]&&(i[0]=i[0].slice(u[1])),new r(i)};r.prototype.toString=function(n,t,i){return this.slice(t,i).toString(n)};r.prototype.consume=function(n){for(;this._bufs.length;){if(!(n>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(n);this.length-=n;break}n-=this._bufs[0].length;this.length-=this._bufs[0].length;this._bufs.shift()}return this};r.prototype.duplicate=function(){for(var n=0,t=new r;n0&&n.invokeMethodAsync("OnSpacerAfterVisible",i.boundingClientRect.bottom-i.intersectionRect.bottom,f,e)}})},{root:e,rootMargin:u+"px"});f.observe(t);f.observe(r);o=h(t);s=h(r);i[n._id]={intersectionObserver:f,mutationObserverBefore:o,mutationObserverAfter:s}},dispose:function(n){var t=i[n._id];t&&(t.intersectionObserver.disconnect(),t.mutationObserverBefore.disconnect(),t.mutationObserverAfter.disconnect(),n.dispose(),delete i[n._id])}};var i={}},function(n,t,i){"use strict";function u(n,t){var i=n._blazorFilesById[t];if(!i)throw new Error("There is no file with ID "+t+". The file list may have changed.");return i}function o(n,t){var i=u(n,t);return i.readPromise||(i.readPromise=new Promise(function(n,t){var r=new FileReader;r.onload=function(){n(r.result)};r.onerror=function(n){t(n)};r.readAsArrayBuffer(i.blob)})),i.readPromise}var f=this&&this.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){var t;n.done?u(n.value):(t=n.value,_instanceof(t,i)?t:new i(function(n){n(t)})).then(o,s)}e((r=r.apply(n,t||[])).next())})},e=this&&this.__generator||function(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),b(i)?r.showHidden=i:i&&t._extend(r,i),u(r.showHidden)&&(r.showHidden=!1),u(r.depth)&&(r.depth=2),u(r.colors)&&(r.colors=!1),u(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=et),s(r,n,r.depth)}function et(n,t){var i=r.styles[t];return i?"\x1b["+r.colors[i][0]+"m"+n+"\x1b["+r.colors[i][1]+"m":n}function ot(n){return n}function s(n,i,r){var o,g,f,nt,rt;if(n.customInspect&&i&&v(i.inspect)&&i.inspect!==t.inspect&&(!i.constructor||i.constructor.prototype!==i))return o=i.inspect(r,n),c(o)||(o=s(n,o,r)),o;if(g=function(n,t){if(u(t))return n.stylize("undefined","undefined");if(c(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(i,"string")}return it(t)?n.stylize(""+t,"number"):b(t)?n.stylize(""+t,"boolean"):h(t)?n.stylize("null","null"):void 0}(n,i),g)return g;if(f=Object.keys(i),nt=function(n){var t={};return n.forEach(function(n){t[n]=!0}),t}(f),n.showHidden&&(f=Object.getOwnPropertyNames(i)),a(i)&&(f.indexOf("message")>=0||f.indexOf("description")>=0))return p(i);if(0===f.length){if(v(i))return rt=i.name?": "+i.name:"",n.stylize("[Function"+rt+"]","special");if(l(i))return n.stylize(RegExp.prototype.toString.call(i),"regexp");if(k(i))return n.stylize(Date.prototype.toString.call(i),"date");if(a(i))return p(i)}var ft,e="",y=!1,d=["{","}"];return(tt(i)&&(y=!0,d=["[","]"]),v(i))&&(e=" [Function"+(i.name?": "+i.name:"")+"]"),l(i)&&(e=" "+RegExp.prototype.toString.call(i)),k(i)&&(e=" "+Date.prototype.toUTCString.call(i)),a(i)&&(e=" "+p(i)),0!==f.length||y&&0!=i.length?r<0?l(i)?n.stylize(RegExp.prototype.toString.call(i),"regexp"):n.stylize("[Object]","special"):(n.seen.push(i),ft=y?function(n,t,i,r,u){for(var f=[],e=0,o=t.length;e=0&&0,n+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?i[0]+(""===t?"":t+"\n ")+" "+n.join(",\n ")+" "+i[1]:i[0]+t+" "+n.join(", ")+" "+i[1]}(ft,e,d)):d[0]+e+d[1]}function p(n){return"["+Error.prototype.toString.call(n)+"]"}function w(n,t,i,r,f,e){var o,c,l;if((l=Object.getOwnPropertyDescriptor(t,f)||{value:t[f]}).get?c=l.set?n.stylize("[Getter/Setter]","special"):n.stylize("[Getter]","special"):l.set&&(c=n.stylize("[Setter]","special")),ut(r,f)||(o="["+f+"]"),c||(n.seen.indexOf(l.value)<0?(c=h(i)?s(n,l.value,null):s(n,l.value,i-1)).indexOf("\n")>-1&&(c=e?c.split("\n").map(function(n){return" "+n}).join("\n").substr(2):"\n"+c.split("\n").map(function(n){return" "+n}).join("\n")):c=n.stylize("[Circular]","special")),u(o)){if(e&&f.match(/^\d+$/))return c;(o=JSON.stringify(""+f)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=n.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=n.stylize(o,"string"))}return o+": "+c}function tt(n){return Array.isArray(n)}function b(n){return"boolean"==typeof n}function h(n){return null===n}function it(n){return"number"==typeof n}function c(n){return"string"==typeof n}function u(n){return void 0===n}function l(n){return e(n)&&"[object RegExp]"===d(n)}function e(n){return"object"==_typeof(n)&&null!==n}function k(n){return e(n)&&"[object Date]"===d(n)}function a(n){return e(n)&&("[object Error]"===d(n)||_instanceof(n,Error))}function v(n){return"function"==typeof n}function d(n){return Object.prototype.toString.call(n)}function g(n){return n<10?"0"+n.toString(10):n.toString(10)}function st(){var n=new Date,t=[g(n.getHours()),g(n.getMinutes()),g(n.getSeconds())].join(":");return[n.getDate(),rt[n.getMonth()],t].join(" ")}function ut(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function ht(n,t){if(!n){var i=new Error("Promise was rejected with a falsy value");i.reason=n;n=i}return t(n)}var nt=Object.getOwnPropertyDescriptors||function(n){for(var i=Object.keys(n),r={},t=0;t=o)return n;switch(n){case"%s":return String(i[t++]);case"%d":return Number(i[t++]);case"%j":try{return JSON.stringify(i[t++])}catch(n){return"[Circular]"}default:return n}}),u=i[t];t0?("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(n){return s.from(n)}(t)),r?f.endEmitted?n.emit("error",new Error("stream.unshift() after end event")):p(n,f,t,!0):f.ended?n.emit("error",new Error("stream.push() after EOF")):(f.reading=!1,f.decoder&&!i?(t=f.decoder.write(t),f.objectMode||0!==t.length?p(n,f,t,!1):ft(n,f)):p(n,f,t,!1))):r||(f.reading=!1)),function(n){return!n.ended&&(n.needReadable||n.lengtht.highWaterMark&&(t.highWaterMark=function(n){return n>=8388608?n=8388608:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}(n)),n<=t.length?n:t.ended?t.length:(t.needReadable=!0,0))}function a(n){var t=n._readableState;t.needReadable=!1;t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?e.nextTick(ut,n):ut(n))}function ut(n){u("emit readable");n.emit("readable");w(n)}function ft(n,t){t.readingMore||(t.readingMore=!0,e.nextTick(ht,n,t))}function ht(n,t){for(var i=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(n,t,i){var r;return nr.length?r.length:n,e+=u===r.length?r:r.slice(0,n),0==(n-=u)){u===r.length?(++f,t.head=i.next?i.next:t.tail=null):(t.head=i,i.data=r.slice(u));break}++f}return t.length-=f,e}(n,t):function(n,t){var f=s.allocUnsafe(n),i=t.head,e=1,r,u;for(i.data.copy(f),n-=i.data.length;i=i.next;){if(r=i.data,u=n>r.length?r.length:n,r.copy(f,f.length-n,0,u),0==(n-=u)){u===r.length?(++e,t.head=i.next?i.next:t.tail=null):(t.head=i,i.data=r.slice(u));break}++e}return t.length-=e,f}(n,t),r}(n,t.buffer,t.decoder),i);var i}function b(n){var t=n._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,e.nextTick(at,t,n))}function at(n,t){n.endEmitted||0!==n.length||(n.endEmitted=!0,t.readable=!1,t.emit("end"))}function ot(n,t){for(var i=0,r=n.length;i=t.highWaterMark||t.ended))?(u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?b(this):a(this),null):0===(n=rt(n,t))&&t.ended?(0===t.length&&b(this),null):(i=t.needReadable,u("need readable",i),(0===t.length||t.length-n0?et(n,t):null)?(t.needReadable=!0,n=0):t.length-=n,0===t.length&&(t.ended||(t.needReadable=!0),f!==n&&t.ended&&b(this)),null!==r&&this.emit("data",r),r)};f.prototype._read=function(){this.emit("error",new Error("_read() is not implemented"))};f.prototype.pipe=function(n,t){function p(t,r){u("onunpipe");t===f&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),n.removeListener("close",v),n.removeListener("finish",y),n.removeListener("drain",s),n.removeListener("error",a),n.removeListener("unpipe",p),f.removeListener("end",b),f.removeListener("end",o),f.removeListener("data",g),l=!0,!i.awaitDrain||n._writableState&&!n._writableState.needDrain||s())}function b(){u("onend");n.end()}function g(t){u("ondata");h=!1;!1!==n.write(t)||h||((1===i.pipesCount&&i.pipes===n||i.pipesCount>1&&-1!==ot(i.pipes,n))&&!l&&(u("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,h=!0),f.pause())}function a(t){u("onerror",t);o();n.removeListener("error",a);0===d(n,"error")&&n.emit("error",t)}function v(){n.removeListener("finish",y);o()}function y(){u("onfinish");n.removeListener("close",v);o()}function o(){u("unpipe");f.unpipe(n)}var f=this,i=this._readableState,c,s,l,h;switch(i.pipesCount){case 0:i.pipes=n;break;case 1:i.pipes=[i.pipes,n];break;default:i.pipes.push(n)}i.pipesCount+=1;u("pipe count=%d opts=%j",i.pipesCount,t);c=(!t||!1!==t.end)&&n!==r.stdout&&n!==r.stderr?b:o;i.endEmitted?e.nextTick(c):f.once("end",c);n.on("unpipe",p);s=function(n){return function(){var t=n._readableState;u("pipeOnDrain",t.awaitDrain);t.awaitDrain&&t.awaitDrain--;0===t.awaitDrain&&d(n,"data")&&(t.flowing=!0,w(n))}}(f);n.on("drain",s);return l=!1,h=!1,f.on("data",g),function(n,t,i){if("function"==typeof n.prependListener)return n.prependListener(t,i);n._events&&n._events[t]?k(n._events[t])?n._events[t].unshift(i):n._events[t]=[i,n._events[t]]:n.on(t,i)}(n,"error",a),n.once("close",v),n.once("finish",y),n.emit("pipe",f),i.flowing||(u("pipe resume"),f.resume()),n};f.prototype.unpipe=function(n){var t=this._readableState,r={hasUnpiped:!1},f,e,i,u;if(0===t.pipesCount)return this;if(1===t.pipesCount)return n&&n!==t.pipes||(n||(n=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,n&&n.emit("unpipe",this,r)),this;if(!n){for(f=t.pipes,e=t.pipesCount,t.pipes=null,t.pipesCount=0,t.flowing=!1,i=0;i0&&f.length>h&&!f.warned)&&(f.warned=!0,o=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit"),o.name="MaxListenersExceededWarning",o.emitter=n,o.type=t,o.count=f.length,c=o,console&&console.warn&&console.warn(c)),n}function y(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(n,t,i){var u={fired:!1,wrapFn:void 0,target:n,type:t,listener:i},r=y.bind(u);return r.listener=i,u.wrapFn=r,r}function l(n,t,i){var u=n._events,r;return void 0===u?[]:(r=u[t],void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(n){for(var i=new Array(n.length),t=0;t0&&(r=i[0]),_instanceof(r,Error))throw r;s=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw s.context=r,s;}if(u=e[n],void 0===u)return!1;if("function"==typeof u)o(u,this,i);else for(h=u.length,c=v(u,h),t=0;t=0;u--)if(i[u]===t||i[u].listener===t){o=i[u].listener;e=u;break}if(e<0)return this;0===e?i.shift():function(n,t){for(;t+1=0;t--)this.removeListener(n,r[t]);return this};t.prototype.listeners=function(n){return l(this,n,!0)};t.prototype.rawListeners=function(n){return l(this,n,!1)};t.listenerCount=function(n,t){return"function"==typeof n.listenerCount?n.listenerCount(t):a.call(n,t)};t.prototype.listenerCount=a;t.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},function(n,t,i){n.exports=i(41).EventEmitter},function(n,t,i){"use strict";function u(n,t){n.emit("error",t)}var r=i(24);n.exports={destroy:function(n,t){var i=this,f=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return f||e?(t?t(n):!n||this._writableState&&this._writableState.errorEmitted||r.nextTick(u,this,n),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,function(n){!t&&n?(r.nextTick(u,i,n),i._writableState&&(i._writableState.errorEmitted=!0)):t&&t(n)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1);this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(n,t,i){"use strict";function r(n){var t;switch(this.encoding=function(n){var t=function(n){if(!n)return"utf8";for(var t;;)switch(n){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return n;default:if(t)return;n=(""+n).toLowerCase();t=!0}}(n);if("string"!=typeof t&&(u.isEncoding===e||!e(n)))throw new Error("Unknown encoding: "+n);return t||n}(n),this.encoding){case"utf16le":this.text=s;this.end=h;t=4;break;case"utf8":this.fillLast=o;t=4;break;case"base64":this.text=c;this.end=l;t=3;break;default:return this.write=a,void(this.end=v)}this.lastNeed=0;this.lastTotal=0;this.lastChar=u.allocUnsafe(t)}function f(n){return n<=127?0:n>>5==6?2:n>>4==14?3:n>>3==30?4:n>>6==2?-1:-2}function o(n){var t=this.lastTotal-this.lastNeed,i=function(n,t){if(128!=(192&t[0]))return n.lastNeed=0,"�";if(n.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return n.lastNeed=1,"�";if(n.lastNeed>2&&t.length>2&&128!=(192&t[2]))return n.lastNeed=2,"�"}}(this,n);return void 0!==i?i:this.lastNeed<=n.length?(n.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(n.copy(this.lastChar,t,0,n.length),void(this.lastNeed-=n.length))}function s(n,t){var i,r;return(n.length-t)%2==0?(i=n.toString("utf16le",t),i&&(r=i.charCodeAt(i.length-1),r>=55296&&r<=56319))?(this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],i.slice(0,-1)):i:(this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",t,n.length-1))}function h(n){var t=n&&n.length?this.write(n):"",i;return this.lastNeed?(i=this.lastTotal-this.lastNeed,t+this.lastChar.toString("utf16le",0,i)):t}function c(n,t){var i=(n.length-t)%3;return 0===i?n.toString("base64",t):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=n[n.length-1]:(this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1]),n.toString("base64",t,n.length-i))}function l(n){var t=n&&n.length?this.write(n):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function a(n){return n.toString(this.encoding)}function v(n){return n&&n.length?this.write(n):""}var u=i(66).Buffer,e=u.isEncoding||function(n){switch((n=""+n)&&n.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=r;r.prototype.write=function(n){if(0===n.length)return"";var i,t;if(this.lastNeed){if(void 0===(i=this.fillLast(n)))return"";t=this.lastNeed;this.lastNeed=0}else t=0;return t=0)?(r>0&&(n.lastNeed=r-1),r):--u=0?(r>0&&(n.lastNeed=r-2),r):--u=0?(r>0&&(2===r?r=0:n.lastNeed=r-3),r):0}(this,n,t),i;return this.lastNeed?(this.lastTotal=r,i=n.length-(r-this.lastNeed),n.copy(this.lastChar,0,i),n.toString("utf8",t,i)):n.toString("utf8",t)};r.prototype.fillLast=function(n){if(this.lastNeed<=n.length)return n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,n.length);this.lastNeed-=n.length}},function(n,t,i){"use strict";(function(t,r,u){function y(n){var t=this;this.next=null;this.entry=null;this.finish=function(){!function(n,t,i){var r=n.entry,u;for(n.entry=null;r;)u=r.callback,t.pendingcb--,u(i),r=r.next;t.corkedRequestsFree?t.corkedRequestsFree.next=n:t.corkedRequestsFree=n}(t,n)}}function it(){}function s(n,t){var r,s;o=o||i(9);n=n||{};r=_instanceof(t,o);this.objectMode=!!n.objectMode;r&&(this.objectMode=this.objectMode||!!n.writableObjectMode);var u=n.highWaterMark,f=n.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:r&&(f||0===f)?f:c;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=!1;this.needDrain=!1;this.ending=!1;this.ended=!1;this.finished=!1;this.destroyed=!1;s=!1===n.decodeStrings;this.decodeStrings=!s;this.defaultEncoding=n.defaultEncoding||"utf8";this.length=0;this.writing=!1;this.corked=0;this.sync=!0;this.bufferProcessing=!1;this.onwrite=function(n){!function(n,t){var i=n._writableState,f=i.sync,u=i.writecb,r;(function(n){n.writing=!1;n.writecb=null;n.length-=n.writelen;n.writelen=0}(i),t)?!function(n,t,i,r,u){--t.pendingcb;i?(e.nextTick(u,r),e.nextTick(h,n,t),n._writableState.errorEmitted=!0,n.emit("error",r)):(u(r),n._writableState.errorEmitted=!0,n.emit("error",r),h(n,t))}(n,i,f,t,u):(r=g(i),r||i.corked||i.bufferProcessing||!i.bufferedRequest||d(n,i),f?p(k,n,i,r,u):k(n,i,r,u))}(t,n)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=!1;this.errorEmitted=!1;this.bufferedRequestCount=0;this.corkedRequestsFree=new y(this)}function f(n){if(o=o||i(9),!(l.call(f,this)||_instanceof(this,o)))return new f(n);this._writableState=new s(n,this);this.writable=!0;n&&("function"==typeof n.write&&(this._write=n.write),"function"==typeof n.writev&&(this._writev=n.writev),"function"==typeof n.destroy&&(this._destroy=n.destroy),"function"==typeof n.final&&(this._final=n.final));w.call(this)}function v(n,t,i,r,u,f,e){t.writelen=r;t.writecb=e;t.writing=!0;t.sync=!0;i?n._writev(u,t.onwrite):n._write(u,f,t.onwrite);t.sync=!1}function k(n,t,i,r){i||function(n,t){0===t.length&&t.needDrain&&(t.needDrain=!1,n.emit("drain"))}(n,t);t.pendingcb--;r();h(n,t)}function d(n,t){var i,f,e;if(t.bufferProcessing=!0,i=t.bufferedRequest,n._writev&&i&&i.next){var s=t.bufferedRequestCount,u=new Array(s),r=t.corkedRequestsFree;for(r.entry=i,f=0,e=!0;i;)u[f]=i,i.isBuf||(e=!1),i=i.next,f+=1;u.allBuffers=e;v(n,t,!0,t.length,u,"",r.finish);t.pendingcb++;t.lastBufferedRequest=null;r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new y(t);t.bufferedRequestCount=0}else{for(;i;){var o=i.chunk,h=i.encoding,c=i.callback;if(v(n,t,!1,t.objectMode?1:o.length,o,h,c),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i;t.bufferProcessing=!1}function g(n){return n.ending&&0===n.length&&null===n.bufferedRequest&&!n.finished&&!n.writing}function rt(n,t){n._final(function(i){t.pendingcb--;i&&n.emit("error",i);t.prefinished=!0;n.emit("prefinish");h(n,t)})}function h(n,t){var i=g(t);return i&&(!function(n,t){t.prefinished||t.finalCalled||("function"==typeof n._final?(t.pendingcb++,t.finalCalled=!0,e.nextTick(rt,n,t)):(t.prefinished=!0,n.emit("prefinish")))}(n,t),0===t.pendingcb&&(t.finished=!0,n.emit("finish"))),i}var e=i(24),o,p,a;n.exports=f;p=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:e.nextTick;f.WritableState=s;a=i(19);a.inherits=i(15);var nt={deprecate:i(69)},w=i(42),c=i(14).Buffer,tt=u.Uint8Array||function(){},l,b=i(43);a.inherits(f,w);s.prototype.getBuffer=function(){for(var n=this.bufferedRequest,t=[];n;)t.push(n),n=n.next;return t},function(){try{Object.defineProperty(s.prototype,"buffer",{get:nt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(n){}}();"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(n){return!!l.call(this,n)||this===f&&n&&_instanceof(n._writableState,s)}})):l=function(n){return _instanceof(n,this)};f.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};f.prototype.write=function(n,t,i){var f,r=this._writableState,o=!1,u=!r.objectMode&&(f=n,c.isBuffer(f)||_instanceof(f,tt));return u&&!c.isBuffer(n)&&(n=function(n){return c.from(n)}(n)),"function"==typeof t&&(i=t,t=null),u?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof i&&(i=it),r.ended?function(n,t){var i=new Error("write after end");n.emit("error",i);e.nextTick(t,i)}(this,i):(u||function(n,t,i,r){var f=!0,u=!1;return null===i?u=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(u=new TypeError("Invalid non-string/buffer chunk")),u&&(n.emit("error",u),e.nextTick(r,u),f=!1),f}(this,r,n,i))&&(r.pendingcb++,o=function(n,t,i,r,u,f){var e,o,s,h;return i||(e=function(n,t,i){return n.objectMode||!1===n.decodeStrings||"string"!=typeof t||(t=c.from(t,i)),t}(t,r,u),r!==e&&(i=!0,u="buffer",r=e)),o=t.objectMode?1:r.length,t.length+=o,s=t.length-1))throw new TypeError("Unknown encoding: "+n);return this._writableState.defaultEncoding=n,this};Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});f.prototype._write=function(n,t,i){i(new Error("_write() is not implemented"))};f.prototype._writev=null;f.prototype.end=function(n,t,i){var r=this._writableState;"function"==typeof n?(i=n,n=null,t=null):"function"==typeof t&&(i=t,t=null);null!=n&&this.write(n,t);r.corked&&(r.corked=1,this.uncork());r.ending||r.finished||function(n,t,i){t.ending=!0;h(n,t);i&&(t.finished?e.nextTick(i):n.once("finish",i));t.ended=!0;n.writable=!1}(this,r,i)};Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(n){this._writableState&&(this._writableState.destroyed=n)}});f.prototype.destroy=b.destroy;f.prototype._undestroy=b.undestroy;f.prototype._destroy=function(n,t){this.end();t(n)}}).call(this,i(13),i(67).setImmediate,i(8))},function(n,t,i){"use strict";function o(n,t){var r=this._transformState,u,i;if(r.transforming=!1,u=r.writecb,!u)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null;r.writecb=null;null!=t&&this.push(t);u(n);i=this._readableState;i.reading=!1;(i.needReadable||i.lengthi?f.slice(i).buffer:null}else{if(e=t,-1===(o=e.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");i=o+1;s=e.substring(0,i);h=e.length>i?e.substring(i):null}if(l=r.a.parse(s),c=JSON.parse(l[0]),c.type)throw new Error("Expected a handshake response from the server.");return[h,c]},t}()}).call(this,i(10).Buffer)},,,,,,function(n,t,i){"use strict";function h(n){return f(this,void 0,void 0,function(){var i,t,a,u,v,y,h,l,p=this;return e(this,function(w){switch(w.label){case 0:if(s)throw new Error("Blazor has already started.");return s=!0,i=tt.resolveOptions(n),t=new d.ConsoleLogger(i.logLevel),window.Blazor.defaultReconnectionHandler=new it.DefaultReconnectionHandler(t),i.reconnectionHandler=i.reconnectionHandler||window.Blazor.defaultReconnectionHandler,t.log(r.LogLevel.Information,"Starting up blazor server-side application."),a=ut.discoverComponents(document,"server"),u=new g.CircuitDescriptor(a),[4,c(i,t,u)];case 1:return v=w.sent(),[4,u.startCircuit(v)];case 2:return w.sent()?(y=function(n){return f(p,void 0,void 0,function(){var s,f;return e(this,function(e){switch(e.label){case 0:return o?[2,!1]:(f=n)?[3,2]:[4,c(i,t,u)];case 1:f=e.sent();e.label=2;case 2:return s=f,[4,u.reconnect(s)];case 3:return e.sent()?(i.reconnectionHandler.onConnectionUp(),[2,!0]):(t.log(r.LogLevel.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."),[2,!1])}})})},h=!1,l=function(){if(!h){var n=new FormData,t=u.circuitId;n.append("circuitId",t);h=navigator.sendBeacon("_blazor/disconnect",n)}},window.Blazor.disconnect=l,window.addEventListener("unload",l,{capture:!1,once:!0}),window.Blazor.reconnect=y,t.log(r.LogLevel.Information,"Blazor server-side application started."),[2]):(t.log(r.LogLevel.Error,"Failed to start the circuit."),[2])}})})}function c(n,t,i){return f(this,void 0,void 0,function(){var h,s,f,c,a;return e(this,function(e){switch(e.label){case 0:(h=new p.MessagePackHubProtocol).name="blazorpack";s=(new y.HubConnectionBuilder).withUrl("_blazor").withHubProtocol(h);n.configureSignalR(s);f=s.build();nt.setEventDispatcher(function(n,t){f.send("DispatchBrowserEvent",JSON.stringify(n),JSON.stringify(t))});window.Blazor._internal.navigationManager.listenForNavigationEvents(function(n,t){return f.send("OnLocationChanged",n,t)});f.on("JS.AttachComponent",function(n,t){return rt.attachRootComponentToLogicalElement(0,i.resolveElement(t),n)});f.on("JS.BeginInvokeJS",u.DotNet.jsCallDispatcher.beginInvokeJSFromDotNet);f.on("JS.EndInvokeDotNet",function(n){var t;return(t=u.DotNet.jsCallDispatcher).endInvokeDotNetFromJS.apply(t,v(u.DotNet.parseJsonWithRevivers(n)))});c=k.RenderQueue.getOrCreate(t);f.on("JS.RenderBatch",function(n,i){t.log(r.LogLevel.Debug,"Received render batch with id "+n+" and "+i.byteLength+" bytes.");c.processBatch(n,i,f)});f.onclose(function(t){return!o&&n.reconnectionHandler.onConnectionDown(n.reconnectionOptions,t)});f.on("JS.Error",function(n){o=!0;l(f,n,t);w.showErrorNotification()});window.Blazor._internal.forceCloseConnection=function(){return f.stop()};e.label=1;case 1:return e.trys.push([1,3,,4]),[4,f.start()];case 2:return e.sent(),[3,4];case 3:return a=e.sent(),l(f,a,t),[3,4];case 4:return u.DotNet.attachDispatcher({beginInvokeDotNetFromJS:function(n,t,i,r,u){f.send("BeginInvokeDotNetFromJS",n?n.toString():null,t,i,r||0,u)},endInvokeJSFromDotNet:function(n,t,i){f.send("EndInvokeJSFromDotNet",n,t,i)}}),[2,f]}})})}function l(n,t,i){i.log(r.LogLevel.Error,t);n&&n.stop()}var f=this&&this.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){var t;n.done?u(n.value):(t=n.value,_instanceof(t,i)?t:new i(function(n){n(t)})).then(o,s)}e((r=r.apply(n,t||[])).next())})},e=this&&this.__generator||function(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0)&&!(r=u.next()).done;)e.push(r.value)}catch(n){f={error:n}}finally{try{r&&!r.done&&(i=u.return)&&i.call(u)}finally{if(f)throw f.error;}}return e},v=this&&this.__spread||function(){for(var n=[],t=0;t0)throw new Error("Invalid string. Length must be a multiple of 4");return t=n.indexOf("="),-1===t&&(t=i),[t,t===i?0:4-t%4]}function h(n,t,i){for(var e,f,o=[],u=t;u>18&63]+r[f>>12&63]+r[f>>6&63]+r[63&f]);return o.join("")}t.byteLength=function(n){var t=e(n),r=t[0],i=t[1];return 3*(r+i)/4-i};t.toByteArray=function(n){for(var r,c=e(n),h=c[0],s=c[1],u=new o(function(n,t,i){return 3*(t+i)/4-i}(0,h,s)),f=0,l=s>0?h-4:h,t=0;t>16&255,u[f++]=r>>8&255,u[f++]=255&r;return 2===s&&(r=i[n.charCodeAt(t)]<<2|i[n.charCodeAt(t+1)]>>4,u[f++]=255&r),1===s&&(r=i[n.charCodeAt(t)]<<10|i[n.charCodeAt(t+1)]<<4|i[n.charCodeAt(t+2)]>>2,u[f++]=r>>8&255,u[f++]=255&r),u};t.fromByteArray=function(n){for(var t,i=n.length,e=i%3,f=[],u=0,o=i-e;uo?o:u+16383));return 1===e?(t=n[i-1],f.push(r[t>>2]+r[t<<4&63]+"==")):2===e&&(t=(n[i-2]<<8)+n[i-1],f.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),f.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=f.length;u>1,e=-7,s=i?u-1:0,c=i?-1:1,h=n[t+s];for(s+=c,f=h&(1<<-e)-1,h>>=-e,e+=l;e>0;f=256*f+n[t+s],s+=c,e-=8);for(o=f&(1<<-e)-1,f>>=-e,e+=r;e>0;o=256*o+n[t+s],s+=c,e-=8);if(0===f)f=1-v;else{if(f===a)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r);f-=v}return(h?-1:1)*o*Math.pow(2,f-r)};t.write=function(n,t,i,r,u,f){var e,o,s,l=8*f-u-1,a=(1<>1,y=23===u?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:f-1,v=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,e=a):(e=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-e))<1&&(e--,s*=2),(t+=e+h>=1?y/s:y*Math.pow(2,1-h))*s>=2&&(e++,s/=2),e+h>=a?(o=0,e=a):e+h>=1?(o=(t*s-1)*Math.pow(2,u),e+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,u),e=0));u>=8;n[i+c]=255&o,c+=v,o/=256,u-=8);for(e=e<0;n[i+c]=255&e,c+=v,e/=256,l-=8);n[i+c-v]|=128*p}},function(n){var t={}.toString;n.exports=Array.isArray||function(n){return"[object Array]"==t.call(n)}},function(n,t,i){"use strict";(function(t){function h(n,t){if(n===t)return 0;for(var r=n.length,u=t.length,i=0,f=Math.min(r,u);i=0;u--)if(o[u]!==l[u])return!1;for(u=o.length-1;u>=0;u--)if(v=o[u],!e(n[v],t[v],i,r))return!1;return!0}(n,t,i,r))}return i?n===t:n==t}function d(n){return"[object Arguments]"==Object.prototype.toString.call(n)}function g(n,t){if(!n||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(n);try{if(_instanceof(n,t))return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},n)}function nt(n,t,i,r){var e,o,s;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');if("string"==typeof i&&(r=i,i=null),e=function(n){var t;try{n()}catch(n){t=n}return t}(t),r=(i&&i.name?" ("+i.name+").":".")+(r?" "+r:"."),n&&!e&&u(e,i,"Missing expected exception"+r),o="string"==typeof r,s=!n&&e&&!i,(!n&&f.isError(e)&&o&&g(e,i)||s)&&u(e,i,"Got unwanted exception"+r),n&&e&&i&&!g(e,i)||!n&&e)throw e;}var tt=i(58),r,y,s; -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -var f=i(39),it=Object.prototype.hasOwnProperty,c=Array.prototype.slice,l="foo"===function(){}.name;r=n.exports=k;y=/\s*function\s+([^\(\s]*)\s*/;r.AssertionError=function(n){var i,r,e;if(this.name="AssertionError",this.actual=n.actual,this.expected=n.expected,this.operator=n.operator,n.message?(this.message=n.message,this.generatedMessage=!1):(this.message=function(n){return w(b(n.actual),128)+" "+n.operator+" "+w(b(n.expected),128)}(this),this.generatedMessage=!0),i=n.stackStartFunction||u,Error.captureStackTrace)Error.captureStackTrace(this,i);else if(r=new Error,r.stack){var t=r.stack,o=p(i),f=t.indexOf("\n"+o);f>=0&&(e=t.indexOf("\n",f+1),t=t.substring(e+1));this.stack=t}};f.inherits(r.AssertionError,Error);r.fail=u;r.ok=k;r.equal=function(n,t,i){n!=t&&u(n,t,i,"==",r.equal)};r.notEqual=function(n,t,i){n==t&&u(n,t,i,"!=",r.notEqual)};r.deepEqual=function(n,t,i){e(n,t,!1)||u(n,t,i,"deepEqual",r.deepEqual)};r.deepStrictEqual=function(n,t,i){e(n,t,!0)||u(n,t,i,"deepStrictEqual",r.deepStrictEqual)};r.notDeepEqual=function(n,t,i){e(n,t,!1)&&u(n,t,i,"notDeepEqual",r.notDeepEqual)};r.notDeepStrictEqual=function n(t,i,r){e(t,i,!0)&&u(t,i,r,"notDeepStrictEqual",n)};r.strictEqual=function(n,t,i){n!==t&&u(n,t,i,"===",r.strictEqual)};r.notStrictEqual=function(n,t,i){n===t&&u(n,t,i,"!==",r.notStrictEqual)};r.throws=function(n,t,i){nt(!0,n,t,i)};r.doesNotThrow=function(n,t,i){nt(!1,n,t,i)};r.ifError=function(n){if(n)throw n;};r.strict=tt(function n(t,i){t||u(t,!0,i,"==",n)},r,{equal:r.strictEqual,deepEqual:r.deepStrictEqual,notEqual:r.notStrictEqual,notDeepEqual:r.notDeepStrictEqual});r.strict.strict=r.strict;s=Object.keys||function(n){var t=[];for(var i in n)it.call(n,i)&&t.push(i);return t}}).call(this,i(8))},function(n){"use strict"; -/* - object-assign - (c) Sindre Sorhus - @license MIT - */ -function u(n){if(null==n)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(n)}var t=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;n.exports=function(){var i,t,n,r;try{if(!Object.assign||(i=new String("abc"),i[5]="de","5"===Object.getOwnPropertyNames(i)[0]))return!1;for(t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;return"0123456789"!==Object.getOwnPropertyNames(t).map(function(n){return t[n]}).join("")?!1:(r={},"abcdefghijklmnopqrst".split("").forEach(function(n){r[n]=n}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join(""))}catch(i){return!1}}()?Object.assign:function(n){for(var f,o,c,e,s=u(n),h=1;h0?this.tail.next=t:this.head=t;this.tail=t;++this.length},n.prototype.unshift=function(n){var t={data:n,next:this.head};0===this.length&&(this.tail=t);this.head=t;++this.length},n.prototype.shift=function(){if(0!==this.length){var n=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,n}},n.prototype.clear=function(){this.head=this.tail=null;this.length=0},n.prototype.join=function(n){if(0===this.length)return"";for(var t=this.head,i=""+t.data;t=t.next;)i+=n+t.data;return i},n.prototype.concat=function(n){if(0===this.length)return u.alloc(0);if(1===this.length)return this.head.data;for(var i,r,f,e=u.allocUnsafe(n>>>0),t=this.head,o=0;t;)i=t.data,r=e,f=o,i.copy(r,f),o+=t.data.length,t=t.next;return e},n}();r&&r.inspect&&r.inspect.custom&&(n.exports.prototype[r.inspect.custom]=function(){var n=r.inspect({length:this.length});return this.constructor.name+" "+n})},function(){},function(n,t,i){function e(n,t){for(var i in n)t[i]=n[i]}function u(n,t,i){return r(n,t,i)}var f=i(10),r=f.Buffer;r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=f:(e(f,t),t.Buffer=u);u.prototype=Object.create(r.prototype);e(r,u);u.from=function(n,t,i){if("number"==typeof n)throw new TypeError("Argument must not be a number");return r(n,t,i)};u.alloc=function(n,t,i){if("number"!=typeof n)throw new TypeError("Argument must be a number");var u=r(n);return void 0!==t?"string"==typeof i?u.fill(t,i):u.fill(t):u.fill(0),u};u.allocUnsafe=function(n){if("number"!=typeof n)throw new TypeError("Argument must be a number");return r(n)};u.allocUnsafeSlow=function(n){if("number"!=typeof n)throw new TypeError("Argument must be a number");return f.SlowBuffer(n)}},function(n,t,i){(function(n){function r(n,t){this._id=n;this._clearFn=t}var u=void 0!==n&&n||"undefined"!=typeof self&&self||window,f=Function.prototype.apply;t.setTimeout=function(){return new r(f.call(setTimeout,u,arguments),clearTimeout)};t.setInterval=function(){return new r(f.call(setInterval,u,arguments),clearInterval)};t.clearTimeout=t.clearInterval=function(n){n&&n.close()};r.prototype.unref=r.prototype.ref=function(){};r.prototype.close=function(){this._clearFn.call(u,this._id)};t.enroll=function(n,t){clearTimeout(n._idleTimeoutId);n._idleTimeout=t};t.unenroll=function(n){clearTimeout(n._idleTimeoutId);n._idleTimeout=-1};t._unrefActive=t.active=function(n){clearTimeout(n._idleTimeoutId);var t=n._idleTimeout;t>=0&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},t))};i(68);t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==n&&n.setImmediate||this&&this.setImmediate;t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==n&&n.clearImmediate||this&&this.clearImmediate}).call(this,i(8))},function(n,t,i){(function(n,t){!function(n){"use strict";function v(n){delete c[n]}function u(n){if(l)setTimeout(u,0,n);else{var t=c[n];if(t){l=!0;try{!function(n){var i=n.callback,t=n.args;switch(t.length){case 0:i();break;case 1:i(t[0]);break;case 2:i(t[0],t[1]);break;case 3:i(t[0],t[1],t[2]);break;default:i.apply(void 0,t)}}(t)}finally{v(n);l=!1}}}}if(!n.setImmediate){var i,o,a,f,s,h=1,c={},l=!1,e=n.document,r=Object.getPrototypeOf&&Object.getPrototypeOf(n);r=r&&r.setTimeout?r:n;"[object process]"==={}.toString.call(n.process)?i=function(n){t.nextTick(function(){u(n)})}:function(){if(n.postMessage&&!n.importScripts){var t=!0,i=n.onmessage;return n.onmessage=function(){t=!1},n.postMessage("","*"),n.onmessage=i,t}}()?(f="setImmediate$"+Math.random()+"$",s=function(t){t.source===n&&"string"==typeof t.data&&0===t.data.indexOf(f)&&u(+t.data.slice(f.length))},n.addEventListener?n.addEventListener("message",s,!1):n.attachEvent("onmessage",s),i=function(t){n.postMessage(f+t,"*")}):n.MessageChannel?((a=new MessageChannel).port1.onmessage=function(n){u(n.data)},i=function(n){a.port2.postMessage(n)}):e&&"onreadystatechange"in e.createElement("script")?(o=e.documentElement,i=function(n){var t=e.createElement("script");t.onreadystatechange=function(){u(n);t.onreadystatechange=null;o.removeChild(t);t=null};o.appendChild(t)}):i=function(n){setTimeout(u,0,n)};r.setImmediate=function(n){var r,t,u;for("function"!=typeof n&&(n=new Function(""+n)),r=new Array(arguments.length-1),t=0;t0?this._transform(null,t,i):i()};n.exports.decoder=f;n.exports.encoder=u},function(n,t,i){(t=n.exports=i(40)).Stream=t;t.Readable=t;t.Writable=i(45);t.Duplex=i(9);t.Transform=i(46);t.PassThrough=i(72)},function(n,t,i){"use strict";function r(n){if(!_instanceof(this,r))return new r(n);u.call(this,n)}n.exports=r;var u=i(46),f=i(19);f.inherits=i(15);f.inherits(r,u);r.prototype._transform=function(n,t,i){i(null,n)}},function(n,t,i){function r(n){Error.call(this);Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.message=n||"unable to decode"}var u=i(23);i(39).inherits(r,Error);n.exports=function(n){function i(n,t,i){return t>=i+n}function t(n,t){return{value:n,bytesConsumed:t}}function e(n,r){var c,u,a,v,l,e;if((r=void 0===r?0:r,c=n.length-r,c<=0)||(l=n.readUInt8(r),e=0,!function(n,t){var i=function(n){switch(n){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(n);return!(-1!==i&&t=0;v--)e+=n.readUInt8(r+v+1)*Math.pow(2,8*(7-v));return t(e,9);case 208:return t(e=n.readInt8(r+1),2);case 209:return t(e=n.readInt16BE(r+1),3);case 210:return t(e=n.readInt32BE(r+1),5);case 211:return t(e=function(n,t){var f=128==(128&n[t]),r,i,u,e,o;if(f)for(r=1,i=t+7;i>=t;i--)u=(255^n[i])+r,n[i]=255&u,r=u>>8;return e=n.readUInt32BE(t+0),o=n.readUInt32BE(t+4),(4294967296*e+o)*(f?-1:1)}(n.slice(r+1,r+9),0),9);case 202:return t(e=n.readFloatBE(r+1),5);case 203:return t(e=n.readDoubleBE(r+1),9);case 217:return i(u=n.readUInt8(r+1),c,2)?t(e=n.toString("utf8",r+2,r+2+u),2+u):null;case 218:return i(u=n.readUInt16BE(r+1),c,3)?t(e=n.toString("utf8",r+3,r+3+u),3+u):null;case 219:return i(u=n.readUInt32BE(r+1),c,5)?t(e=n.toString("utf8",r+5,r+5+u),5+u):null;case 196:return i(u=n.readUInt8(r+1),c,2)?t(e=n.slice(r+2,r+2+u),2+u):null;case 197:return i(u=n.readUInt16BE(r+1),c,3)?t(e=n.slice(r+3,r+3+u),3+u):null;case 198:return i(u=n.readUInt32BE(r+1),c,5)?t(e=n.slice(r+5,r+5+u),5+u):null;case 220:return c<3?null:(u=n.readUInt16BE(r+1),s(n,r,u,3));case 221:return c<5?null:(u=n.readUInt32BE(r+1),s(n,r,u,5));case 222:return u=n.readUInt16BE(r+1),h(n,r,u,3);case 223:throw new Error("map too big to decode in JS");case 212:return f(n,r,1);case 213:return f(n,r,2);case 214:return f(n,r,4);case 215:return f(n,r,8);case 216:return f(n,r,16);case 199:return u=n.readUInt8(r+1),a=n.readUInt8(r+2),i(u,c,3)?o(n,r,a,u,3):null;case 200:return u=n.readUInt16BE(r+1),a=n.readUInt8(r+3),i(u,c,4)?o(n,r,a,u,4):null;case 201:return u=n.readUInt32BE(r+1),a=n.readUInt8(r+5),i(u,c,6)?o(n,r,a,u,6):null}if(144==(240&l))return s(n,r,u=15&l,1);if(128==(240&l))return h(n,r,u=15&l,1);if(160==(224&l))return i(u=31&l,c,1)?t(e=n.toString("utf8",r+1,r+u+1),u+1):null;if(l>=224)return t(e=l-256,1);if(l<128)return t(l,1);throw new Error("not implemented yet");}function s(n,i,r,u){var o,s=[],h=0,f;for(i+=u,o=0;o.1)&&((i=r.allocUnsafe(9))[0]=203,i.writeDoubleBE(n,1)),i}var r=i(14).Buffer,u=i(23);n.exports=function(n,t,i,e){function o(s,h){var c,l,a;if(void 0===s)throw new Error("undefined is not encodable in msgpack!");if(null===s)(c=r.allocUnsafe(1))[0]=192;else if(!0===s)(c=r.allocUnsafe(1))[0]=195;else if(!1===s)(c=r.allocUnsafe(1))[0]=194;else if("string"==typeof s)(l=r.byteLength(s))<32?((c=r.allocUnsafe(1+l))[0]=160|l,l>0&&c.write(s,1)):l<=255&&!i?((c=r.allocUnsafe(2+l))[0]=217,c[1]=l,c.write(s,2)):l<=65535?((c=r.allocUnsafe(3+l))[0]=218,c.writeUInt16BE(l,1),c.write(s,3)):((c=r.allocUnsafe(5+l))[0]=219,c.writeUInt32BE(l,1),c.write(s,5));else if(s&&(s.readUInt32LE||_instanceof(s,Uint8Array)))_instanceof(s,Uint8Array)&&(s=r.from(s)),s.length<=255?((c=r.allocUnsafe(2))[0]=196,c[1]=s.length):s.length<=65535?((c=r.allocUnsafe(3))[0]=197,c.writeUInt16BE(s.length,1)):((c=r.allocUnsafe(5))[0]=198,c.writeUInt32BE(s.length,1)),c=u([c,s]);else if(Array.isArray(s))s.length<16?(c=r.allocUnsafe(1))[0]=144|s.length:s.length<65536?((c=r.allocUnsafe(3))[0]=220,c.writeUInt16BE(s.length,1)):((c=r.allocUnsafe(5))[0]=221,c.writeUInt32BE(s.length,1)),c=s.reduce(function(n,t){return n.append(o(t,!0)),n},u().append(c));else{if(!e&&"function"==typeof s.getDate)return function(n){var t,f=1*n,i=Math.floor(f/1e3),e=1e6*(f-1e3*i);if(e||i>4294967295){(t=new r(10))[0]=215;t[1]=-1;var o=4*e,s=i/Math.pow(2,32),h=o+s&4294967295,c=4294967295&i;t.writeInt32BE(h,2);t.writeInt32BE(c,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(f/1e3),2);return u().append(t)}(s);if("object"==_typeof(s))c=function(t){for(var o,f,i=[],e=0;e>8),i.push(255&f)):(i.push(201),i.push(f>>24),i.push(f>>16&255),i.push(f>>8&255),i.push(255&f)),u().append(r.from(i)).append(o)):null}(s)||function(n){var t,i,f=[],e=0;for(t in n)n.hasOwnProperty(t)&&void 0!==n[t]&&"function"!=typeof n[t]&&(++e,f.push(o(t,!0)),f.push(o(n[t],!0)));return e<16?(i=r.allocUnsafe(1))[0]=128|e:((i=r.allocUnsafe(3))[0]=222,i.writeUInt16BE(e,1)),f.unshift(i),f.reduce(function(n,t){return n.append(t)},u())}(s);else if("number"==typeof s){if((a=s)!==Math.floor(a))return f(s,t);if(s>=0)if(s<128)(c=r.allocUnsafe(1))[0]=s;else if(s<256)(c=r.allocUnsafe(2))[0]=204,c[1]=s;else if(s<65536)(c=r.allocUnsafe(3))[0]=205,c.writeUInt16BE(s,1);else if(s<=4294967295)(c=r.allocUnsafe(5))[0]=206,c.writeUInt32BE(s,1);else{if(!(s<=9007199254740991))return f(s,!0);(c=r.allocUnsafe(9))[0]=207,function(n,t){for(var i=7;i>=0;i--)n[i+1]=255&t,t/=256}(c,s)}else if(s>=-32)(c=r.allocUnsafe(1))[0]=256+s;else if(s>=-128)(c=r.allocUnsafe(2))[0]=208,c.writeInt8(s,1);else if(s>=-32768)(c=r.allocUnsafe(3))[0]=209,c.writeInt16BE(s,1);else if(s>-214748365)(c=r.allocUnsafe(5))[0]=210,c.writeInt32BE(s,1);else{if(!(s>=-9007199254740991))return f(s,!0);(c=r.allocUnsafe(9))[0]=211,function(n,t,i){var e=i<0,o,s,u,r,f;if(e&&(i=Math.abs(i)),o=i%4294967296,s=i/4294967296,n.writeUInt32BE(Math.floor(s),t+0),n.writeUInt32BE(o,t+4),e)for(u=1,r=t+7;r>=t;r--)f=(255^n[r])+u,n[r]=255&f,u=f>>8}(c,1,s)}}}if(!c)throw new Error("not implemented yet");return h?c:c.slice()}return o}},function(n,t,i){"use strict";var u=this&&this.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){var t;n.done?u(n.value):(t=n.value,_instanceof(t,i)?t:new i(function(n){n(t)})).then(o,s)}e((r=r.apply(n,t||[])).next())})},f=this&&this.__generator||function(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]this.nextBatchId?this.fatalError?(this.logger.log(r.LogLevel.Debug,"Received a new batch "+n+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,i.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return f.sent(),[2];case 4:return this.logger.log(r.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+n+" not processed."),[2];case 5:return f.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(r.LogLevel.Debug,"Applying batch "+n+"."),e.renderBatch(this.browserRendererId,new o.OutOfProcessRenderBatch(t)),[4,this.completeBatch(i,n)];case 6:return f.sent(),[3,8];case 7:throw u=f.sent(),this.fatalError=u.toString(),this.logger.log(r.LogLevel.Error,"There was an error applying batch "+n+"."),i.send("OnRenderCompleted",n,u.toString()),u;case 8:return[2]}})})},n.prototype.getLastBatchid=function(){return this.nextBatchId-1},n.prototype.completeBatch=function(n,t){return u(this,void 0,void 0,function(){return f(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,n.send("OnRenderCompleted",t,null)];case 1:return i.sent(),[3,3];case 2:return i.sent(),this.logger.log(r.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},n}();t.RenderQueue=s},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(77),r=i(78),f=function(){function n(n){this.batchData=n;var t=new h(n);this.arrayRangeReader=new c(n);this.arrayBuilderSegmentReader=new l(n);this.diffReader=new e(n);this.editReader=new o(n,t);this.frameReader=new s(n,t)}return n.prototype.updatedComponents=function(){return r.readInt32LE(this.batchData,this.batchData.length-20)},n.prototype.referenceFrames=function(){return r.readInt32LE(this.batchData,this.batchData.length-16)},n.prototype.disposedComponentIds=function(){return r.readInt32LE(this.batchData,this.batchData.length-12)},n.prototype.disposedEventHandlerIds=function(){return r.readInt32LE(this.batchData,this.batchData.length-8)},n.prototype.updatedComponentsEntry=function(n,t){var i=n+4*t;return r.readInt32LE(this.batchData,i)},n.prototype.referenceFramesEntry=function(n,t){return n+20*t},n.prototype.disposedComponentIdsEntry=function(n,t){var i=n+4*t;return r.readInt32LE(this.batchData,i)},n.prototype.disposedEventHandlerIdsEntry=function(n,t){var i=n+8*t;return r.readUint64LE(this.batchData,i)},n}();t.OutOfProcessRenderBatch=f;var e=function(){function n(n){this.batchDataUint8=n}return n.prototype.componentId=function(n){return r.readInt32LE(this.batchDataUint8,n)},n.prototype.edits=function(n){return n+4},n.prototype.editsEntry=function(n,t){return n+16*t},n}(),o=function(){function n(n,t){this.batchDataUint8=n;this.stringReader=t}return n.prototype.editType=function(n){return r.readInt32LE(this.batchDataUint8,n)},n.prototype.siblingIndex=function(n){return r.readInt32LE(this.batchDataUint8,n+4)},n.prototype.newTreeIndex=function(n){return r.readInt32LE(this.batchDataUint8,n+8)},n.prototype.moveToSiblingIndex=function(n){return r.readInt32LE(this.batchDataUint8,n+8)},n.prototype.removedAttributeName=function(n){var t=r.readInt32LE(this.batchDataUint8,n+12);return this.stringReader.readString(t)},n}(),s=function(){function n(n,t){this.batchDataUint8=n;this.stringReader=t}return n.prototype.frameType=function(n){return r.readInt32LE(this.batchDataUint8,n)},n.prototype.subtreeLength=function(n){return r.readInt32LE(this.batchDataUint8,n+4)},n.prototype.elementReferenceCaptureId=function(n){var t=r.readInt32LE(this.batchDataUint8,n+4);return this.stringReader.readString(t)},n.prototype.componentId=function(n){return r.readInt32LE(this.batchDataUint8,n+8)},n.prototype.elementName=function(n){var t=r.readInt32LE(this.batchDataUint8,n+8);return this.stringReader.readString(t)},n.prototype.textContent=function(n){var t=r.readInt32LE(this.batchDataUint8,n+4);return this.stringReader.readString(t)},n.prototype.markupContent=function(n){var t=r.readInt32LE(this.batchDataUint8,n+4);return this.stringReader.readString(t)},n.prototype.attributeName=function(n){var t=r.readInt32LE(this.batchDataUint8,n+4);return this.stringReader.readString(t)},n.prototype.attributeValue=function(n){var t=r.readInt32LE(this.batchDataUint8,n+8);return this.stringReader.readString(t)},n.prototype.attributeEventHandlerId=function(n){return r.readUint64LE(this.batchDataUint8,n+12)},n}(),h=function(){function n(n){this.batchDataUint8=n;this.stringTableStartIndex=r.readInt32LE(n,n.length-4)}return n.prototype.readString=function(n){if(-1===n)return null;var t=r.readInt32LE(this.batchDataUint8,this.stringTableStartIndex+4*n),i=r.readLEB128(this.batchDataUint8,t),f=t+r.numLEB128Bytes(i),e=new Uint8Array(this.batchDataUint8.buffer,this.batchDataUint8.byteOffset+f,i);return u.decodeUtf8(e)},n}(),c=function(){function n(n){this.batchDataUint8=n}return n.prototype.count=function(n){return r.readInt32LE(this.batchDataUint8,n)},n.prototype.values=function(n){return n+4},n}(),l=function(){function n(n){this.batchDataUint8=n}return n.prototype.offset=function(){return 0},n.prototype.count=function(n){return r.readInt32LE(this.batchDataUint8,n)},n.prototype.values=function(n){return n+4},n}()},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=i?i.decode.bind(i):function(n){for(var r=0,h=n.length,i=[],o=[],t,f,e,s,u;r65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u));i.length>1024&&(o.push(String.fromCharCode.apply(null,i)),i.length=0)}return o.push(String.fromCharCode.apply(null,i)),o.join("")}},function(n,t){"use strict";function i(n,t){return n[t]+(n[t+1]<<8)+(n[t+2]<<16)+(n[t+3]<<24>>>0)}Object.defineProperty(t,"__esModule",{value:!0});var r=Math.pow(2,32),u=Math.pow(2,21)-1;t.readInt32LE=function(n,t){return n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24};t.readUint32LE=i;t.readUint64LE=function(n,t){var f=i(n,t+4);if(f>u)throw new Error("Cannot read uint64 with high order part "+f+", because the result would exceed Number.MAX_SAFE_INTEGER.");return f*r+i(n,t)};t.readLEB128=function(n,t){for(var r,u=0,f=0,i=0;i<4;i++){if(r=n[t+i],u|=(127&r)<=this.minimumLogLevel)switch(n){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[n]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[n]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[n]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[n]+": "+t)}},n}();t.ConsoleLogger=f},function(n,t,i){"use strict";var u=this&&this.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){var t;n.done?u(n.value):(t=n.value,_instanceof(t,i)?t:new i(function(n){n(t)})).then(o,s)}e((r=r.apply(n,t||[])).next())})},f=this&&this.__generator||function(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]n.MaximumFirstRetryInterval?n.MaximumFirstRetryInterval:t.retryIntervalMilliseconds,[4,this.delay(r)]):[3,7];case 2:if(f.sent(),this.isDisposed)return[3,7];f.label=3;case 3:return f.trys.push([3,5,,6]),[4,this.reconnectCallback()];case 4:return f.sent()||this.reconnectDisplay.rejected(),[2];case 5:return u=f.sent(),this.logger.log(s.LogLevel.Error,u),[3,6];case 6:return i++,[3,1];case 7:return this.reconnectDisplay.failed(),[2]}})})},n.prototype.delay=function(n){return new Promise(function(t){return setTimeout(t,n)})},n.MaximumFirstRetryInterval=3e3,n}()},function(n,t,i){"use strict";var f=this&&this.__awaiter||function(n,t,i,r){return new(i||(i=Promise))(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){var t;n.done?u(n.value):(t=n.value,_instanceof(t,i)?t:new i(function(n){n(t)})).then(o,s)}e((r=r.apply(n,t||[])).next())})},e=this&&this.__generator||function(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,(i=i.length>0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]reloading<\/a> the page if you're unable to reconnect.";this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},n.prototype.rejected=function(){this.button.style.display="none";this.reloadParagraph.style.display="none";this.loader.style.display="none";this.message.innerHTML="Could not reconnect to the server. Reload<\/a> the page to restore functionality.";this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},n.prototype.getLoader=function(){var n=this.document.createElement("div");return n.style.cssText="border: 0.3em solid #f3f3f3;border-top: 0.3em solid #3498db;border-radius: 50%;width: 2em;height: 2em;display: inline-block",n.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:2e3,iterations:1/0}),n},n}();t.DefaultReconnectDisplay=u},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(t,i,r){this.dialog=t;this.maxRetries=i;this.document=r;this.document=r;var u=this.document.getElementById(n.MaxRetriesId);u&&(u.innerText=this.maxRetries.toString())}return n.prototype.show=function(){this.removeClasses();this.dialog.classList.add(n.ShowClassName)},n.prototype.update=function(t){var i=this.document.getElementById(n.CurrentAttemptId);i&&(i.innerText=t.toString())},n.prototype.hide=function(){this.removeClasses();this.dialog.classList.add(n.HideClassName)},n.prototype.failed=function(){this.removeClasses();this.dialog.classList.add(n.FailedClassName)},n.prototype.rejected=function(){this.removeClasses();this.dialog.classList.add(n.RejectedClassName)},n.prototype.removeClasses=function(){this.dialog.classList.remove(n.ShowClassName,n.HideClassName,n.FailedClassName,n.RejectedClassName)},n.ShowClassName="components-reconnect-show",n.HideClassName="components-reconnect-hide",n.FailedClassName="components-reconnect-failed",n.RejectedClassName="components-reconnect-rejected",n.MaxRetriesId="components-reconnect-max-retries",n.CurrentAttemptId="components-reconnect-current-attempt",n}();t.UserSpecifiedDisplay=i},function(n,t,i){"use strict";i.r(t);i.d(t,"VERSION",function(){return c});i.d(t,"MessagePackHubProtocol",function(){return h});var e=i(10),f=i(11),r=i(2),u=function(){function n(){}return n.write=function(n){var t=n.byteLength||n.length,i=[],u,r;do u=127&t,(t>>=7)>0&&(u|=128),i.push(u);while(t>0);return t=n.byteLength||n.length,r=new Uint8Array(i.length+t),r.set(i,0),r.set(n,i.length),r.buffer},n.parse=function(n){for(var e=[],r=new Uint8Array(n),o=[0,7,14,21,28],i=0;i7)throw new Error("Messages bigger than 2GB are not supported.");if(!(r.byteLength>=i+t+u))throw new Error("Incomplete message.");e.push(r.slice?r.slice(i+t,i+t+u):r.subarray(i+t,i+t+u));i=i+t+u}return e},n}(),o=Object.assign||function(n){for(var r,i,t=1,u=arguments.length;t=3?n[2]:void 0,error:n[1],type:r.MessageType.Close}},n.prototype.createPingMessage=function(n){if(n.length<1)throw new Error("Invalid payload for Ping message.");return{type:r.MessageType.Ping}},n.prototype.createInvocationMessage=function(n,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var i=t[2];return i?{arguments:t[4],headers:n,invocationId:i,streamIds:[],target:t[3],type:r.MessageType.Invocation}:{arguments:t[4],headers:n,streamIds:[],target:t[3],type:r.MessageType.Invocation}},n.prototype.createStreamItemMessage=function(n,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:n,invocationId:t[2],item:t[3],type:r.MessageType.StreamItem}},n.prototype.createCompletionMessage=function(n,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var i,u,f=t[3];if(f!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(f){case this.errorResult:i=t[4];break;case this.nonVoidResult:u=t[4]}return{error:i,headers:n,invocationId:t[2],result:u,type:r.MessageType.Completion}},n.prototype.writeInvocation=function(n){var t,i=f(this.messagePackOptions);return t=n.streamIds?i.encode([r.MessageType.Invocation,n.headers||{},n.invocationId||null,n.target,n.arguments,n.streamIds]):i.encode([r.MessageType.Invocation,n.headers||{},n.invocationId||null,n.target,n.arguments]),u.write(t.slice())},n.prototype.writeStreamInvocation=function(n){var t,i=f(this.messagePackOptions);return t=n.streamIds?i.encode([r.MessageType.StreamInvocation,n.headers||{},n.invocationId,n.target,n.arguments,n.streamIds]):i.encode([r.MessageType.StreamInvocation,n.headers||{},n.invocationId,n.target,n.arguments]),u.write(t.slice())},n.prototype.writeStreamItem=function(n){var t=f(this.messagePackOptions).encode([r.MessageType.StreamItem,n.headers||{},n.invocationId,n.item]);return u.write(t.slice())},n.prototype.writeCompletion=function(n){var t,e=f(this.messagePackOptions),i=n.error?this.errorResult:n.result?this.nonVoidResult:this.voidResult;switch(i){case this.errorResult:t=e.encode([r.MessageType.Completion,n.headers||{},n.invocationId,i,n.error]);break;case this.voidResult:t=e.encode([r.MessageType.Completion,n.headers||{},n.invocationId,i]);break;case this.nonVoidResult:t=e.encode([r.MessageType.Completion,n.headers||{},n.invocationId,i,n.result])}return u.write(t.slice())},n.prototype.writeCancelInvocation=function(n){var t=f(this.messagePackOptions).encode([r.MessageType.CancelInvocation,n.headers||{},n.invocationId]);return u.write(t.slice())},n.prototype.readHeaders=function(n){var t=n[1];if("object"!=_typeof(t))throw new Error("Invalid headers.");return t},n}(),c="5.0.2"}]) \ No newline at end of file +function _possibleConstructorReturn(n,t){return t&&(_typeof(t)==="object"||typeof t=="function")?t:_assertThisInitialized(n)}function _assertThisInitialized(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _inherits(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}});t&&_setPrototypeOf(n,t)}function _wrapNativeSuper(n){var t=typeof Map=="function"?new Map:undefined;return _wrapNativeSuper=function(n){function i(){return _construct(n,arguments,_getPrototypeOf(this).constructor)}if(n===null||!_isNativeFunction(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(n))return t.get(n);t.set(n,i)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(i,n)},_wrapNativeSuper(n)}function isNativeReflectConstruct(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(n){return!1}}function _construct(){return _construct=isNativeReflectConstruct()?Reflect.construct:function(n,t,i){var r=[null],f,u;return r.push.apply(r,t),f=Function.bind.apply(n,r),u=new f,i&&_setPrototypeOf(u,i.prototype),u},_construct.apply(null,arguments)}function _isNativeFunction(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function _setPrototypeOf(n,t){return _setPrototypeOf=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n},_setPrototypeOf(n,t)}function _getPrototypeOf(n){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf(n)}function _toConsumableArray(n){return _arrayWithoutHoles(n)||_iterableToArray(n)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance");}function _iterableToArray(n){if(Symbol.iterator in Object(n)||Object.prototype.toString.call(n)==="[object Arguments]")return Array.from(n)}function _arrayWithoutHoles(n){if(Array.isArray(n)){for(var t=0,i=new Array(n.length);t0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return ft in n||(n[ft]=[]),n}function hu(n,t){var i=document.createComment("!");return ot(i,n,t),i}function ot(n,t,i){var r=n,u,f;if(_instanceof(n,Comment)&&v(r)&&v(r).length>0)throw new Error("Not implemented: inserting non-empty logical container");if(b(r))throw new Error("Not implemented: moving existing logical children");u=v(t);i0;)st(i,0);u=i;u.parentNode.removeChild(u)}function b(n){return n[hi]||null}function kt(n,t){return v(n)[t]}function cu(n){var t=lu(n);return"http://www.w3.org/2000/svg"===t.namespaceURI&&"foreignObject"!==t.tagName}function v(n){return n[ft]}function ko(n,t){var i=v(n);t.forEach(function(n){n.moveRangeStart=i[n.fromSiblingIndex];n.moveRangeEnd=vu(n.moveRangeStart)});t.forEach(function(t){var u=t.moveToBeforeMarker=document.createComment("marker"),r=i[t.toSiblingIndex+1];r?r.parentNode.insertBefore(u,r):ci(u,n)});t.forEach(function(n){for(var i=n.moveToBeforeMarker,r=i.parentNode,f=n.moveRangeStart,e=n.moveRangeEnd,t=f,u;t;){if(u=t.nextSibling,r.insertBefore(t,i),t===e)break;t=u}r.removeChild(i)});t.forEach(function(n){i[n.toSiblingIndex]=n.moveRangeStart})}function lu(n){if(_instanceof(n,Element)||_instanceof(n,DocumentFragment))return n;if(_instanceof(n,Comment))return n.parentNode;throw new Error("Not a valid logical element");}function au(n){var t=v(b(n));return t[Array.prototype.indexOf.call(t,n)+1]||null}function ci(n,t){if(_instanceof(t,Element)||_instanceof(t,DocumentFragment))t.appendChild(n);else{if(!_instanceof(t,Comment))throw new Error("Cannot append node because the parent is not a valid logical element. Parent: ".concat(t));var i=au(t);i?i.parentNode.insertBefore(n,i):ci(n,b(t))}}function vu(n){var i,t;return _instanceof(n,Element)||_instanceof(n,DocumentFragment)?n:(i=au(n),i)?i.previousSibling:(t=b(n),_instanceof(t,Element)||_instanceof(t,DocumentFragment)?t.lastChild:vu(t))}function li(n){return"function"==typeof Symbol?Symbol():n}function yu(n){return"_bl_".concat(n)}function ns(n,t){var i=n.frameReader;switch(i.frameType(t)){case s.component:case s.element:case s.region:return i.subtreeLength(t)-1;default:return 0}}function vi(n){if(n.startsWith("on"))return n.substring(2);throw new Error("Attribute should be an event name, but doesn't start with 'on'. Value: '".concat(n,"'"));}function yi(n){return"select-multiple"===n.type}function nf(n,t){n.value=t||""}function tf(n,t){_instanceof(n,HTMLSelectElement)?yi(n)?function(n,t){t||(t=[]);for(var i=0;i2&&arguments[2]!==undefined?arguments[2]:!1,r=hf(n),i=_instanceof(t,Object)?t:{forceLoad:t,replaceHistoryEntry:u};!i.forceLoad&&lf(r)?ef(r,!1,i.replaceHistoryEntry):function(n,t){if(location.href===n){var i=n+"?";history.replaceState(null,"",i);location.replace(n)}else t?location.replace(n):location.href=n}(n,i.replaceHistoryEntry)}function ef(n,t,i){wi=!0;i?history.replaceState(null,"",n):history.pushState(null,"",n);sf(t)}function sf(){return di.apply(this,arguments)}function di(){return di=_asyncToGenerator(regeneratorRuntime.mark(function n(t){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(n.t0=bi,!n.t0){n.next=4;break}return n.next=4,bi(location.href,t);case 4:case"end":return n.stop()}},n)})),di.apply(this,arguments)}function hf(n){return dt=dt||document.createElement("a"),dt.href=n,dt.href}function cf(n,t){return n?n.tagName===t?n:cf(n.parentElement,t):null}function lf(n){var i=(t=document.baseURI).substr(0,t.lastIndexOf("/")+1),t;return n.startsWith(i)}function af(n){return n?"visible"!==getComputedStyle(n).overflowY?n:af(n.parentElement):null}function pf(n,t){var i=n._blazorFilesById[t];if(!i)throw new Error("There is no file with ID ".concat(t,". The file list may have changed."));return i}function wf(){return nr.apply(this,arguments)}function nr(){return nr=_asyncToGenerator(regeneratorRuntime.mark(function n(t,i,r){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!_instanceof(t,Blob)){n.next=6;break}return n.next=3,function(){var n=_asyncToGenerator(regeneratorRuntime.mark(function t(n,i,r){var u,f;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u=n.slice(i,i+r),t.next=3,u.arrayBuffer();case 3:return f=t.sent,t.abrupt("return",new Uint8Array(f));case 5:case"end":return t.stop()}},t)}));return function(){return n.apply(this,arguments)}}()(t,i,r);case 3:n.t0=n.sent;n.next=7;break;case 6:n.t0=function(n,t,i){return new Uint8Array(n.buffer,n.byteOffset+t,i)}(t,i,r);case 7:return n.abrupt("return",n.t0);case 8:case"end":return n.stop()}},n)})),nr.apply(this,arguments)}function lt(n,t){var i="";return ur(n)?(i="Binary data of length ".concat(n.byteLength),t&&(i+=". Content: '".concat(function(n){var i=new Uint8Array(n),t="";return i.forEach(function(n){t+="0x".concat(n<16?"0":"").concat(n.toString(16)," ")}),t.substr(0,t.length-1)}(n),"'"))):"string"==typeof n&&(i="String data of length ".concat(n.length),t&&(i+=". Content: '".concat(n,"'"))),i}function ur(n){return n&&"undefined"!=typeof ArrayBuffer&&(_instanceof(n,ArrayBuffer)||n.constructor&&"ArrayBuffer"===n.constructor.name)}function kf(){return fr.apply(this,arguments)}function fr(){return fr=_asyncToGenerator(regeneratorRuntime.mark(function t(i,r,u,f,e,o,s){var h,c,a,l,v,y,p,w;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(h={},!e){t.next=6;break}return t.next=4,e();case 4:c=t.sent;c&&(h={Authorization:"Bearer ".concat(c)});case 6:return a=vt(),l=_slicedToArray(a,2),v=l[0],y=l[1],h[v]=y,i.log(n.Trace,"(".concat(r," transport) sending data. ").concat(lt(o,s.logMessageContent),".")),p=ur(o)?"arraybuffer":"text",t.next=11,u.post(f,{content:o,headers:_objectSpread({},h,{},s.headers),responseType:p,timeout:s.timeout,withCredentials:s.withCredentials});case 11:w=t.sent;i.log(n.Trace,"(".concat(r," transport) request complete. Response status: ").concat(w.statusCode,"."));case 13:case"end":return t.stop()}},t)})),fr.apply(this,arguments)}function vt(){var n="X-SignalR-User-Agent";return y.isNode&&(n="User-Agent"),[n,hs("6.0.0-rc.2.21480.10",cs(),y.isNode?"NodeJS":"Browser",ls())]}function hs(n,t,i,r){var u="Microsoft SignalR/",f=n.split(".");return u+="".concat(f[0],".").concat(f[1]),u+=" (".concat(n,"; "),u+=t&&""!==t?"".concat(t,"; "):"Unknown OS; ",u+="".concat(i),u+=r?"; ".concat(r):"; Unknown Runtime Version",u+=")",u}function cs(){if(!y.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function ls(){if(y.isNode)return process.versions.node}function gf(n){return n.stack?n.stack:n.message?n.message:"".concat(n)}function te(n,t){var i;switch(t){case"arraybuffer":i=n.arrayBuffer();break;case"text":i=n.text();break;case"blob":case"document":case"json":throw new Error("".concat(t," is not supported."));default:i=n.text()}return i}function fe(n,t,i){var r=Math.floor(i/4294967296),u=i;n.setUint32(t,r);n.setUint32(t+4,u)}function ee(n,t){return 4294967296*n.getInt32(t)+n.getUint32(t+4)}function oe(n){for(var t,u,f=n.length,r=0,i=0;i=55296&&t<=56319&&i65535&&(e-=65536,r.push(e>>>10&1023|55296),e=56320|1023&e),r.push(e)):r.push(u),r.length>=4096&&(s+=String.fromCharCode.apply(String,r),r.length=0);return r.length>0&&(s+=String.fromCharCode.apply(String,r)),s}function ii(n){return _instanceof(n,Uint8Array)?n:ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):_instanceof(n,ArrayBuffer)?new Uint8Array(n):Uint8Array.from(n)}function or(n){return(n<0?"-":"")+"0x"+Math.abs(n).toString(16).padStart(2,"0")}function ye(){return lr.apply(this,arguments)}function lr(){return lr=_asyncToGenerator(regeneratorRuntime.mark(function n(){var t;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:t=document.querySelector("#blazor-error-ui");t&&(t.style.display="block");ve||(ve=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach(function(n){n.onclick=function(n){location.reload();n.preventDefault()}}),document.querySelectorAll("#blazor-error-ui .dismiss").forEach(function(n){n.onclick=function(n){var t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none");n.preventDefault()}}));case 2:case"end":return n.stop()}},n)})),lr.apply(this,arguments)}function r(n,t){return n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24}function pe(n,t){return n[t]+(n[t+1]<<8)+(n[t+2]<<16)+(n[t+3]<<24>>>0)}function we(n,t){var i=pe(n,t+4);if(i>bh)throw new Error("Cannot read uint64 with high order part ".concat(i,", because the result would exceed Number.MAX_SAFE_INTEGER."));return i*wh+pe(n,t)}function no(n){var i,r,t,u;if(n.nodeType===Node.COMMENT_NODE){var o=n.textContent||"",f=ge.exec(o),e=f&&f[1];return e&&(null===(i=n.parentNode)||void 0===i||i.removeChild(n)),e}if(n.hasChildNodes())for(r=n.childNodes,t=0;t1)){u.next=14;break}return u.next=12,n.send("ReceiveJSDataChunk",i,o,l,null);case 12:u.next=20;break;case 14:return u.next=16,n.invoke("ReceiveJSDataChunk",i,o,l,null);case 16:if(u.sent){u.next=18;break}return u.abrupt("break",23);case 18:a=(new Date).valueOf();v=a-s;s=a;e=Math.max(1,Math.round(500/Math.max(1,v)));case 20:f+=c;o++;case 21:u.next=4;break;case 23:u.next=29;break;case 25:return u.prev=25,u.t0=u["catch"](1),u.next=29,n.send("ReceiveJSDataChunk",i,-1,null,u.t0.toString());case 29:case"end":return u.stop()}},u,null,[[1,25]])})),0)}(f,n,t,i)},n.prev=8,n.next=11,f.start();case 11:n.next=18;break;case 13:if(n.prev=13,n.t0=n["catch"](8),!(eo(f,n.t0,i),"FailedToNegotiateWithServerError"===n.t0.errorType)){n.next=17;break}throw n.t0;case 17:ye();case 18:return n.abrupt("return",(c.attachDispatcher({beginInvokeDotNetFromJS:function(n,t,i,r,u){f.send("BeginInvokeDotNetFromJS",n?n.toString():null,t,i,r||0,u)},endInvokeJSFromDotNet:function(n,t,i){f.send("EndInvokeJSFromDotNet",n,t,i)},sendByteArray:function(n,t){f.send("ReceiveByteArray",n,t)}}),f));case 19:case"end":return n.stop()}},n,null,[[8,13]])})),dr.apply(this,arguments)}function eo(n,t,i){i.log(u.Error,t);n&&n.stop()}var c,l,s,ri={},bt,fu,eu,dt,vf,yf,ht,h,k,f,y,df,at,ne,re,ue,yt,ce,be,vr,de,yr,ge,pr;ri.g=function(){if("object"==(typeof globalThis=="undefined"?"undefined":_typeof(globalThis)))return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==(typeof window=="undefined"?"undefined":_typeof(window)))return window}}(),function(n){function nt(n){b.push(n)}function y(n){if(n&&"object"==_typeof(n)){i[v]=new g(n);var t=_defineProperty({},k,v);return v++,t}throw new Error("Cannot create a JSObjectReference from the value '".concat(n,"'."));}function tt(n){var t=-1,i,r;if(_instanceof(n,ArrayBuffer)&&(n=new Uint8Array(n)),_instanceof(n,Blob))t=n.size;else{if(!_instanceof(n.buffer,ArrayBuffer))throw new Error("Supplied value is not a typed array or blob.");if(void 0===n.byteLength)throw new Error("Cannot create a JSStreamReference from the value '".concat(n,"' as it doesn't have a byteLength."));t=n.byteLength}i={__jsStreamReferenceLength:t};try{r=y(n);i.__jsObjectId=r.__jsObjectId}catch(u){throw new Error("Cannot create a JSStreamReference from the value '".concat(n,"'."));}return i}function o(n){return n?JSON.parse(n,function(n,t){return b.reduce(function(t,i){return i(n,t)},t)}):null}function it(n,t,i,r){var f=s(),e,u;if(f.invokeDotNetFromJS)return e=l(r),u=f.invokeDotNetFromJS(n,t,i,e),u?o(u):null;throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.");}function p(n,t,i,r){var u,e,o;if(n&&i)throw new Error("For instance method calls, assemblyName should be null. Received '".concat(n,"'."));u=ot++;e=new Promise(function(n,t){f[u]={resolve:n,reject:t}});try{o=l(r);s().beginInvokeDotNetFromJS(u,n,t,i,o)}catch(n){rt(u,!1,n)}return e}function s(){if(null!==e)return e;throw new Error("No .NET call dispatcher has been set.");}function rt(n,t,i){if(!f.hasOwnProperty(n))throw new Error("There is no pending async call with ID ".concat(n,"."));var r=f[n];delete f[n];t?r.resolve(i):r.reject(i)}function st(n){return _instanceof(n,Error)?"".concat(n.message,"\n").concat(n.stack):n?n.toString():"null"}function w(n,t){var r=i[t];if(r)return r.findFunction(n);throw new Error("JS object instance with ID ".concat(t," does not exist (has it been disposed?)."));}function ut(n){delete i[n]}function et(n,t){switch(t){case r.Default:return n;case r.JSObjectReference:return y(n);case r.JSStreamReference:return tt(n);case r.JSVoidResult:return null;default:throw new Error("Invalid JS call result type '".concat(t,"'."));}}function l(n){return u=0,JSON.stringify(n,ht)}function ht(n,t){if(_instanceof(t,h))return t.serializeAsArg();if(_instanceof(t,Uint8Array)){e.sendByteArray(u,t);var i=_defineProperty({},d,u);return u++,i}return t}var h,ft,c,u;window.DotNet=n;var b=[],a=new Map,t=new Map,k="__jsObjectId",d="__byte[]",g=function(){function n(t){_classCallCheck(this,n);this._jsObject=t;this._cachedFunctions=new Map}return _createClass(n,[{key:"findFunction",value:function(n){var i=this._cachedFunctions.get(n),r,t;if(i)return i;if(t=this._jsObject,n.split(".").forEach(function(i){if(!(i in t))throw new Error("Could not find '".concat(n,"' ('").concat(i,"' was undefined)."));r=t;t=t[i]}),_instanceof(t,Function))return t=t.bind(r),this._cachedFunctions.set(n,t),t;throw new Error("The value '".concat(n,"' is not a function."));}},{key:"getWrappedObject",value:function(){return this._jsObject}}]),n}(),f={},i={0:new g(window)};i[0]._cachedFunctions.set("import",function(n){return"string"==typeof n&&n.startsWith("./")&&(n=document.baseURI+n.substr(2)),Promise.resolve().then(function(){return _interopRequireWildcard(require("".concat(n)))})});var r,ot=1,v=1,e=null;n.attachDispatcher=function(n){e=n};n.attachReviver=nt;n.invokeMethod=function(n,t){for(var r=arguments.length,u=new Array(r>2?r-2:0),i=2;i2?r-2:0),i=2;i1?i-1:0),t=1;t1?i-1:0),t=1;t3&&arguments[3]!==undefined?arguments[3]:50,u=af(t),r,f,e;(u||document.documentElement).style.overflowAnchor="none";r=new IntersectionObserver(function(r){r.forEach(function(r){var u;if(r.isIntersecting){var o=t.getBoundingClientRect(),f=i.getBoundingClientRect().top-o.bottom,e=null===(u=r.rootBounds)||void 0===u?void 0:u.height;r.target===t?n.invokeMethodAsync("OnSpacerBeforeVisible",r.intersectionRect.top-r.boundingClientRect.top,f,e):r.target===i&&i.offsetHeight>0&&n.invokeMethodAsync("OnSpacerAfterVisible",r.boundingClientRect.bottom-r.intersectionRect.bottom,f,e)}})},{root:u,rootMargin:"".concat(s,"px")});r.observe(t);r.observe(i);f=o(t);e=o(i);gi[n._id]={intersectionObserver:r,mutationObserverBefore:f,mutationObserverAfter:e}},dispose:function(n){var t=gi[n._id];t&&(t.intersectionObserver.disconnect(),t.mutationObserverBefore.disconnect(),t.mutationObserverAfter.disconnect(),n.dispose(),delete gi[n._id])}},gi={};vf={getAndRemoveExistingTitle:function(){var r,u=document.getElementsByTagName("title"),t,i,n,f;if(0===u.length)return null;for(t=null,i=u.length-1;i>=0;i--)n=u[i],f=n.previousSibling,_instanceof(f,Comment)&&null!==b(f)||(null===t&&(t=n.textContent),null===(r=n.parentNode)||void 0===r||r.removeChild(n));return t}};yf={init:function(n,t){t._blazorInputFileNextFileId=0;t.addEventListener("click",function(){t.value=""});t.addEventListener("change",function(){t._blazorFilesById={};var i=Array.prototype.map.call(t.files,function(n){var i={id:++t._blazorInputFileNextFileId,lastModified:new Date(n.lastModified).toISOString(),name:n.name,size:n.size,contentType:n.type,readPromise:void 0,arrayBuffer:void 0,blob:n};return t._blazorFilesById[i.id]=i,i});n.invokeMethodAsync("NotifyChange",i)})},toImageFile:function(){function i(){return n.apply(this,arguments)}var n=_asyncToGenerator(regeneratorRuntime.mark(function t(n,i,r,u,f){var o,e,s,h;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=pf(n,i),t.next=3,new Promise(function(n){var t=new Image;t.onload=function(){URL.revokeObjectURL(t.src);n(t)};t.onerror=function(){t.onerror=null;URL.revokeObjectURL(t.src)};t.src=URL.createObjectURL(o.blob)});case 3:return e=t.sent,t.next=6,new Promise(function(n){var i,s=Math.min(1,u/e.width),h=Math.min(1,f/e.height),o=Math.min(s,h),t=document.createElement("canvas");t.width=Math.round(e.width*o);t.height=Math.round(e.height*o);null===(i=t.getContext("2d"))||void 0===i||i.drawImage(e,0,0,t.width,t.height);t.toBlob(n,r)});case 6:return s=t.sent,h={id:++n._blazorInputFileNextFileId,lastModified:o.lastModified,name:o.name,size:(null==s?void 0:s.size)||0,contentType:r,blob:s||o.blob},t.abrupt("return",(n._blazorFilesById[h.id]=h,h));case 9:case"end":return t.stop()}},t)}));return i}(),readFileData:function(){function i(){return n.apply(this,arguments)}var n=_asyncToGenerator(regeneratorRuntime.mark(function t(n,i){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",pf(n,i).blob);case 1:case"end":return t.stop()}},t)}));return i}()};ht=new Map;h={navigateTo:ff,registerCustomEventType:function(n,t){if(!t)throw new Error("The options parameter is required.");if(ut.has(n))throw new Error("The event '".concat(n,"' is already registered."));if(t.browserEventName){var i=ui.get(t.browserEventName);i?i.push(n):ui.set(t.browserEventName,[n]);gr.forEach(function(i){return i(n,t.browserEventName)})}ut.set(n,t)},rootComponents:lo,_internal:{navigationManager:ki,domWrapper:ts,Virtualize:is,PageTitle:vf,InputFile:yf,getJSDataStreamChunk:wf,receiveDotNetDataStream:function(n,t,i,r){var u=ht.get(n),f;u||(f=new ReadableStream({start:function(t){ht.set(n,t);u=t}}),c.jsCallDispatcher.supplyDotNetStream(n,f));r?(u.error(r),ht.delete(n)):0===i?(u.close(),ht.delete(n)):u.enqueue(t.length===i?t:t.subarray(0,i))},attachWebRendererInterop:function(n,t,i,r){if(bt.has(n))throw new Error("Interop methods are already registered for renderer ".concat(n));bt.set(n,t);Object.keys(i).length>0&&function(n,t,i){var r,f,u,a,o;if(wt)throw new Error("Dynamic root components have already been enabled.");for(wt=n,tu=t,r=0,f=Object.entries(i);r0&&arguments[0]!==undefined?arguments[0]:"A timeout occurred.",i;return _classCallCheck(this,t),i=(_instanceof(this,t)?this.constructor:void 0).prototype,n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,r)),n.__proto__=i,n}return _inherits(t,n),t}(_wrapNativeSuper(Error)),ct=function(n){function t(){var n,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"An abort occurred.",i;return _classCallCheck(this,t),i=(_instanceof(this,t)?this.constructor:void 0).prototype,n=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,r)),n.__proto__=i,n}return _inherits(t,n),t}(_wrapNativeSuper(Error)),us=function(n){function t(n,i){var r,u;return _classCallCheck(this,t),u=(_instanceof(this,t)?this.constructor:void 0).prototype,r=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,n)),r.transport=i,r.errorType="UnsupportedTransportError",r.__proto__=u,r}return _inherits(t,n),t}(_wrapNativeSuper(Error)),fs=function(n){function t(n,i){var r,u;return _classCallCheck(this,t),u=(_instanceof(this,t)?this.constructor:void 0).prototype,r=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,n)),r.transport=i,r.errorType="DisabledTransportError",r.__proto__=u,r}return _inherits(t,n),t}(_wrapNativeSuper(Error)),es=function(n){function t(n,i){var r,u;return _classCallCheck(this,t),u=(_instanceof(this,t)?this.constructor:void 0).prototype,r=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,n)),r.transport=i,r.errorType="FailedToStartTransportError",r.__proto__=u,r}return _inherits(t,n),t}(_wrapNativeSuper(Error)),os=function(n){function t(n){var i,r;return _classCallCheck(this,t),r=(_instanceof(this,t)?this.constructor:void 0).prototype,i=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,n)),i.errorType="FailedToNegotiateWithServerError",i.__proto__=r,i}return _inherits(t,n),t}(_wrapNativeSuper(Error)),ss=function(n){function t(n,i){var r,u;return _classCallCheck(this,t),u=(_instanceof(this,t)?this.constructor:void 0).prototype,r=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this,n)),r.innerErrors=i,r.__proto__=u,r}return _inherits(t,n),t}(_wrapNativeSuper(Error)),ir=function ir(n,t,i){_classCallCheck(this,ir);this.statusCode=n;this.statusText=t;this.content=i},rr=function(){function n(){_classCallCheck(this,n)}return _createClass(n,[{key:"get",value:function(n,t){return this.send(_objectSpread({},t,{method:"GET",url:n}))}},{key:"post",value:function(n,t){return this.send(_objectSpread({},t,{method:"POST",url:n}))}},{key:"delete",value:function(n,t){return this.send(_objectSpread({},t,{method:"DELETE",url:n}))}},{key:"getCookieString",value:function(){return""}}]),n}(),n,e,o,t,i;!function(n){n[n.Trace=0]="Trace";n[n.Debug=1]="Debug";n[n.Information=2]="Information";n[n.Warning=3]="Warning";n[n.Error=4]="Error";n[n.Critical=5]="Critical";n[n.None=6]="None"}(n||(n={}));k=function(){function n(){_classCallCheck(this,n)}return _createClass(n,[{key:"log",value:function(){}}]),n}();k.instance=new k;f=function(){function n(){_classCallCheck(this,n)}return _createClass(n,null,[{key:"isRequired",value:function(n,t){if(null==n)throw new Error("The '".concat(t,"' argument is required."));}},{key:"isNotEmpty",value:function(n,t){if(!n||n.match(/^\s*$/))throw new Error("The '".concat(t,"' argument should not be empty."));}},{key:"isIn",value:function(n,t,i){if(!(n in t))throw new Error("Unknown ".concat(i," value: ").concat(n,"."));}}]),n}();y=function(){function n(){_classCallCheck(this,n)}return _createClass(n,null,[{key:"isBrowser",get:function(){return"object"==(typeof window=="undefined"?"undefined":_typeof(window))}},{key:"isWebWorker",get:function(){return"object"==(typeof self=="undefined"?"undefined":_typeof(self))&&"importScripts"in self}},{key:"isNode",get:function(){return!this.isBrowser&&!this.isWebWorker}}]),n}();df=function(){function n(t,i){_classCallCheck(this,n);this._subject=t;this._observer=i}return _createClass(n,[{key:"dispose",value:function(){var n=this._subject.observers.indexOf(this._observer);n>-1&&this._subject.observers.splice(n,1);0===this._subject.observers.length&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(function(){})}}]),n}();at=function(){function t(n){_classCallCheck(this,t);this._minLevel=n;this.out=console}return _createClass(t,[{key:"log",value:function(t,i){if(t>=this._minLevel){var r="[".concat((new Date).toISOString(),"] ").concat(n[t],": ").concat(i);switch(t){case n.Critical:case n.Error:this.out.error(r);break;case n.Warning:this.out.warn(r);break;case n.Information:this.out.info(r);break;default:this.out.log(r)}}}}]),t}();ne=function(t){function i(n){var t,r,u;return _classCallCheck(this,i),(t=_possibleConstructorReturn(this,_getPrototypeOf(i).call(this)),t._logger=n,"undefined"==typeof fetch)?(r=require,t._jar=new(r("tough-cookie").CookieJar),t._fetchType=r("node-fetch"),t._fetchType=r("fetch-cookie")(t._fetchType,t._jar)):t._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!==ri.g)return ri.g;throw new Error("could not find global");}()),"undefined"==typeof AbortController?(u=require,t._abortControllerType=u("abort-controller")):t._abortControllerType=AbortController,_possibleConstructorReturn(t)}return _inherits(i,t),_createClass(i,[{key:"send",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t){var l=this,u,f,r,e,o,s,h,c;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!(t.abortSignal&&t.abortSignal.aborted)){i.next=2;break}throw new ct;case 2:if(t.method){i.next=4;break}throw new Error("No method defined.");case 4:if(t.url){i.next=6;break}throw new Error("No url defined.");case 6:return u=new this._abortControllerType,t.abortSignal&&(t.abortSignal.onabort=function(){u.abort();f=new ct}),e=null,t.timeout&&(o=t.timeout,e=setTimeout(function(){u.abort();l._logger.log(n.Warning,"Timeout from HTTP request.");f=new tr},o)),i.prev=10,i.next=13,this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:!0===t.withCredentials?"include":"same-origin",headers:_objectSpread({"Content-Type":"text/plain;charset=UTF-8","X-Requested-With":"XMLHttpRequest"},t.headers),method:t.method,mode:"cors",redirect:"follow",signal:u.signal});case 13:r=i.sent;i.next=21;break;case 16:if(i.prev=16,i.t0=i["catch"](10),!f){i.next=20;break}throw f;case 20:throw this._logger.log(n.Warning,"Error from HTTP request. ".concat(i.t0,".")),i.t0;case 21:return i.prev=21,e&&clearTimeout(e),t.abortSignal&&(t.abortSignal.onabort=null),i.finish(21);case 24:if(r.ok){i.next=29;break}return i.next=27,te(r,"text");case 27:s=i.sent;throw new it(s||r.statusText,r.status);case 29:return h=te(r,t.responseType),i.next=32,h;case 32:return c=i.sent,i.abrupt("return",new ir(r.status,r.statusText,c));case 34:case"end":return i.stop()}},i,this,[[10,16,21,24]])}));return r}()},{key:"getCookieString",value:function(){return""}}]),i}(rr);var as=function(t){function i(n){var t;return _classCallCheck(this,i),t=_possibleConstructorReturn(this,_getPrototypeOf(i).call(this)),t._logger=n,t}return _inherits(i,t),_createClass(i,[{key:"send",value:function(t){var i=this;return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ct):t.method?t.url?new Promise(function(r,u){var f=new XMLHttpRequest,e;f.open(t.method,t.url,!0);f.withCredentials=void 0===t.withCredentials||t.withCredentials;f.setRequestHeader("X-Requested-With","XMLHttpRequest");f.setRequestHeader("Content-Type","text/plain;charset=UTF-8");e=t.headers;e&&Object.keys(e).forEach(function(n){f.setRequestHeader(n,e[n])});t.responseType&&(f.responseType=t.responseType);t.abortSignal&&(t.abortSignal.onabort=function(){f.abort();u(new ct)});t.timeout&&(f.timeout=t.timeout);f.onload=function(){t.abortSignal&&(t.abortSignal.onabort=null);f.status>=200&&f.status<300?r(new ir(f.status,f.statusText,f.response||f.responseText)):u(new it(f.response||f.responseText||f.statusText,f.status))};f.onerror=function(){i._logger.log(n.Warning,"Error from HTTP request. ".concat(f.status,": ").concat(f.statusText,"."));u(new it(f.statusText,f.status))};f.ontimeout=function(){i._logger.log(n.Warning,"Timeout from HTTP request.");u(new tr)};f.send(t.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}]),i}(rr),vs=function(n){function t(n){var i;if(_classCallCheck(this,t),i=_possibleConstructorReturn(this,_getPrototypeOf(t).call(this)),"undefined"!=typeof fetch)i._httpClient=new ne(n);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");i._httpClient=new as(n)}return _possibleConstructorReturn(i)}return _inherits(t,n),_createClass(t,[{key:"send",value:function(n){return n.abortSignal&&n.abortSignal.aborted?Promise.reject(new ct):n.method?n.url?this._httpClient.send(n):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}},{key:"getCookieString",value:function(n){return this._httpClient.getCookieString(n)}}]),t}(rr),d=function d(){_classCallCheck(this,d)};d.Authorization="Authorization";d.Cookie="Cookie",function(n){n[n.None=0]="None";n[n.WebSockets=1]="WebSockets";n[n.ServerSentEvents=2]="ServerSentEvents";n[n.LongPolling=4]="LongPolling"}(e||(e={})),function(n){n[n.Text=1]="Text";n[n.Binary=2]="Binary"}(o||(o={}));var ys=function(){function n(){_classCallCheck(this,n);this._isAborted=!1;this.onabort=null}return _createClass(n,[{key:"abort",value:function(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}},{key:"signal",get:function(){return this}},{key:"aborted",get:function(){return this._isAborted}}]),n}(),ie=function(){function t(n,i,r,u){_classCallCheck(this,t);this._httpClient=n;this._accessTokenFactory=i;this._logger=r;this._pollAbort=new ys;this._options=u;this._running=!1;this.onreceive=null;this.onclose=null}return _createClass(t,[{key:"connect",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t,r){var c,s,l,a,v,u,y,h,e;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!(f.isRequired(t,"url"),f.isRequired(r,"transferFormat"),f.isIn(r,o,"transferFormat"),this._url=t,this._logger.log(n.Trace,"(LongPolling transport) Connecting."),r===o.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)){i.next=2;break}throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");case 2:return c=vt(),s=_slicedToArray(c,2),l=s[0],a=s[1],v=_objectSpread(_defineProperty({},l,a),this._options.headers),u={abortSignal:this._pollAbort.signal,headers:v,timeout:1e5,withCredentials:this._options.withCredentials},r===o.Binary&&(u.responseType="arraybuffer"),i.next=6,this._getAccessToken();case 6:return y=i.sent,this._updateHeaderToken(u,y),h="".concat(t,"&_=").concat(Date.now()),this._logger.log(n.Trace,"(LongPolling transport) polling: ".concat(h,".")),i.next=12,this._httpClient.get(h,u);case 12:e=i.sent;200!==e.statusCode?(this._logger.log(n.Error,"(LongPolling transport) Unexpected response code: ".concat(e.statusCode,".")),this._closeError=new it(e.statusText||"",e.statusCode),this._running=!1):this._running=!0;this._receiving=this._poll(this._url,u);case 14:case"end":return i.stop()}},i,this)}));return r}()},{key:"_getAccessToken",value:function(){function i(){return n.apply(this,arguments)}var n=_asyncToGenerator(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!this._accessTokenFactory){n.next=6;break}return n.next=3,this._accessTokenFactory();case 3:n.t0=n.sent;n.next=7;break;case 6:n.t0=null;case 7:return n.abrupt("return",n.t0);case 8:case"end":return n.stop()}},t,this)}));return i}()},{key:"_updateHeaderToken",value:function(n,t){n.headers||(n.headers={});t?n.headers[d.Authorization]="Bearer ".concat(t):n.headers[d.Authorization]&&delete n.headers[d.Authorization]}},{key:"_poll",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t,r){var e,f,u;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:i.prev=0;case 1:if(!this._running){i.next=20;break}return i.next=4,this._getAccessToken();case 4:return e=i.sent,this._updateHeaderToken(r,e),i.prev=6,f="".concat(t,"&_=").concat(Date.now()),this._logger.log(n.Trace,"(LongPolling transport) polling: ".concat(f,".")),i.next=11,this._httpClient.get(f,r);case 11:u=i.sent;204===u.statusCode?(this._logger.log(n.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):200!==u.statusCode?(this._logger.log(n.Error,"(LongPolling transport) Unexpected response code: ".concat(u.statusCode,".")),this._closeError=new it(u.statusText||"",u.statusCode),this._running=!1):u.content?(this._logger.log(n.Trace,"(LongPolling transport) data received. ".concat(lt(u.content,this._options.logMessageContent),".")),this.onreceive&&this.onreceive(u.content)):this._logger.log(n.Trace,"(LongPolling transport) Poll timed out, reissuing.");i.next=18;break;case 15:i.prev=15;i.t0=i["catch"](6);this._running?_instanceof(i.t0,tr)?this._logger.log(n.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=i.t0,this._running=!1):this._logger.log(n.Trace,"(LongPolling transport) Poll errored after shutdown: ".concat(i.t0.message));case 18:i.next=1;break;case 20:return i.prev=20,this._logger.log(n.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose(),i.finish(20);case 23:case"end":return i.stop()}},i,this,[[0,,20,23],[6,15]])}));return r}()},{key:"send",value:function(){function i(){return n.apply(this,arguments)}var n=_asyncToGenerator(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._running?kf(this._logger,"LongPolling",this._httpClient,this._url,this._accessTokenFactory,n,this._options):Promise.reject(new Error("Cannot send until the transport is connected")));case 1:case"end":return t.stop()}},t,this)}));return i}()},{key:"stop",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(){var t,f,r,e,o,u,s;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return this._logger.log(n.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort(),i.prev=1,i.next=4,this._receiving;case 4:return this._logger.log(n.Trace,"(LongPolling transport) sending DELETE request to ".concat(this._url,".")),t={},f=vt(),r=_slicedToArray(f,2),e=r[0],o=r[1],t[e]=o,u={headers:_objectSpread({},t,{},this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},i.next=10,this._getAccessToken();case 10:return s=i.sent,this._updateHeaderToken(u,s),i.next=14,this._httpClient.delete(this._url,u);case 14:this._logger.log(n.Trace,"(LongPolling transport) DELETE request sent.");case 15:return i.prev=15,this._logger.log(n.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose(),i.finish(15);case 18:case"end":return i.stop()}},i,this,[[1,,15,18]])}));return r}()},{key:"_raiseOnClose",value:function(){if(this.onclose){var t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError);this._logger.log(n.Trace,t);this.onclose(this._closeError)}}},{key:"pollAborted",get:function(){return this._pollAbort.aborted}}]),t}(),ps=function(){function t(n,i,r,u){_classCallCheck(this,t);this._httpClient=n;this._accessTokenFactory=i;this._logger=r;this._options=u;this.onreceive=null;this.onclose=null}return _createClass(t,[{key:"connect",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t,r){var u=this,e;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!(f.isRequired(t,"url"),f.isRequired(r,"transferFormat"),f.isIn(r,o,"transferFormat"),this._logger.log(n.Trace,"(SSE transport) Connecting."),this._url=t,this._accessTokenFactory)){i.next=5;break}return i.next=3,this._accessTokenFactory();case 3:e=i.sent;e&&(t+=(t.indexOf("?")<0?"?":"&")+"access_token=".concat(encodeURIComponent(e)));case 5:return i.abrupt("return",new Promise(function(i,f){var e,h=!1,c,s;if(r===o.Text){if(y.isBrowser||y.isWebWorker)e=new u._options.EventSource(t,{withCredentials:u._options.withCredentials});else{c=u._httpClient.getCookieString(t);s={};s.Cookie=c;var a=vt(),l=_slicedToArray(a,2),v=l[0],p=l[1];s[v]=p;e=new u._options.EventSource(t,{withCredentials:u._options.withCredentials,headers:_objectSpread({},s,{},u._options.headers)})}try{e.onmessage=function(t){if(u.onreceive)try{u._logger.log(n.Trace,"(SSE transport) data received. ".concat(lt(t.data,u._options.logMessageContent),"."));u.onreceive(t.data)}catch(t){return void u._close(t)}};e.onerror=function(){h?u._close():f(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."))};e.onopen=function(){u._logger.log(n.Information,"SSE connected to ".concat(u._url));u._eventSource=e;h=!0;i()}}catch(t){return void f(t)}}else f(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))}));case 6:case"end":return i.stop()}},i,this)}));return r}()},{key:"send",value:function(){function i(){return n.apply(this,arguments)}var n=_asyncToGenerator(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._eventSource?kf(this._logger,"SSE",this._httpClient,this._url,this._accessTokenFactory,n,this._options):Promise.reject(new Error("Cannot send until the transport is connected")));case 1:case"end":return t.stop()}},t,this)}));return i}()},{key:"stop",value:function(){return this._close(),Promise.resolve()}},{key:"_close",value:function(n){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(n))}}]),t}(),ws=function(){function t(n,i,r,u,f,e){_classCallCheck(this,t);this._logger=r;this._accessTokenFactory=i;this._logMessageContent=u;this._webSocketConstructor=f;this._httpClient=n;this.onreceive=null;this.onclose=null;this._headers=e}return _createClass(t,[{key:"connect",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t,r){var u=this,e;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!(f.isRequired(t,"url"),f.isRequired(r,"transferFormat"),f.isIn(r,o,"transferFormat"),this._logger.log(n.Trace,"(WebSockets transport) Connecting."),this._accessTokenFactory)){i.next=5;break}return i.next=3,this._accessTokenFactory();case 3:e=i.sent;e&&(t+=(t.indexOf("?")<0?"?":"&")+"access_token=".concat(encodeURIComponent(e)));case 5:return i.abrupt("return",new Promise(function(i,f){var e,s;t=t.replace(/^http/,"ws");u._httpClient.getCookieString(t);s=!1;e||(e=new u._webSocketConstructor(t));r===o.Binary&&(e.binaryType="arraybuffer");e.onopen=function(){u._logger.log(n.Information,"WebSocket connected to ".concat(t,"."));u._webSocket=e;s=!0;i()};e.onerror=function(t){var i=null;i="undefined"!=typeof ErrorEvent&&_instanceof(t,ErrorEvent)?t.error:"There was an error with the transport";u._logger.log(n.Information,"(WebSockets transport) ".concat(i,"."))};e.onmessage=function(t){if(u._logger.log(n.Trace,"(WebSockets transport) data received. ".concat(lt(t.data,u._logMessageContent),".")),u.onreceive)try{u.onreceive(t.data)}catch(t){return void u._close(t)}};e.onclose=function(n){if(s)u._close(n);else{var t=null;t="undefined"!=typeof ErrorEvent&&_instanceof(n,ErrorEvent)?n.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.";f(new Error(t))}}}));case 6:case"end":return i.stop()}},i,this)}));return r}()},{key:"send",value:function(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(n.Trace,"(WebSockets transport) sending data. ".concat(lt(t,this._logMessageContent),".")),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}},{key:"stop",value:function(){return this._webSocket&&this._close(void 0),Promise.resolve()}},{key:"_close",value:function(t){this._webSocket&&(this._webSocket.onclose=function(){},this._webSocket.onmessage=function(){},this._webSocket.onerror=function(){},this._webSocket.close(),this._webSocket=void 0);this._logger.log(n.Trace,"(WebSockets transport) socket closed.");this.onclose&&(!this._isCloseEvent(t)||!1!==t.wasClean&&1e3===t.code?_instanceof(t,Error)?this.onclose(t):this.onclose():this.onclose(new Error("WebSocket closed with status code: ".concat(t.code," (").concat(t.reason||"no reason given",")."))))}},{key:"_isCloseEvent",value:function(n){return n&&"boolean"==typeof n.wasClean&&"number"==typeof n.code}}]),t}(),bs=function(){function t(i){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},u;if(_classCallCheck(this,t),this._stopPromiseResolver=function(){},this.features={},this._negotiateVersion=1,f.isRequired(i,"url"),this._logger=void 0===(u=r.logger)?new at(n.Information):null===u?k.instance:void 0!==u.log?u:new at(u),this.baseUrl=this._resolveUrl(i),(r=r||{}).logMessageContent=void 0!==r.logMessageContent&&r.logMessageContent,"boolean"!=typeof r.withCredentials&&void 0!==r.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.withCredentials=void 0===r.withCredentials||r.withCredentials;r.timeout=void 0===r.timeout?1e5:r.timeout;"undefined"==typeof WebSocket||r.WebSocket||(r.WebSocket=WebSocket);"undefined"==typeof EventSource||r.EventSource||(r.EventSource=EventSource);this._httpClient=r.httpClient||new vs(this._logger);this._connectionState="Disconnected";this._connectionStarted=!1;this._options=r;this.onreceive=null;this.onclose=null}return _createClass(t,[{key:"start",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t){var r,u;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!(t=t||o.Binary,f.isIn(t,o,"transferFormat"),this._logger.log(n.Debug,"Starting connection with transfer format '".concat(o[t],"'.")),"Disconnected"!==this._connectionState)){i.next=2;break}return i.abrupt("return",Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state.")));case 2:return this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),i.next=6,this._startInternalPromise;case 6:if(!("Disconnecting"===this._connectionState)){i.next=12;break}return r="Failed to start the HttpConnection before stop() was called.",this._logger.log(n.Error,r),i.next=11,this._stopPromise;case 11:return i.abrupt("return",Promise.reject(new Error(r)));case 12:if(!("Connected"!==this._connectionState)){i.next=15;break}return u="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!",i.abrupt("return",(this._logger.log(n.Error,u),Promise.reject(new Error(u))));case 15:this._connectionStarted=!0;case 16:case"end":return i.stop()}},i,this)}));return r}()},{key:"send",value:function(n){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 ks(this.transport)),this._sendQueue.send(n))}},{key:"stop",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t){var r=this;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!("Disconnected"===this._connectionState)){i.next=4;break}i.t0=(this._logger.log(n.Debug,"Call to HttpConnection.stop(".concat(t,") ignored because the connection is already in the disconnected state.")),Promise.resolve());i.next=16;break;case 4:if(!("Disconnecting"===this._connectionState)){i.next=8;break}i.t1=(this._logger.log(n.Debug,"Call to HttpConnection.stop(".concat(t,") ignored because the connection is already in the disconnecting state.")),this._stopPromise);i.next=15;break;case 8:return this._connectionState="Disconnecting",this._stopPromise=new Promise(function(n){r._stopPromiseResolver=n}),i.next=12,this._stopInternal(t);case 12:return i.next=14,this._stopPromise;case 14:i.t1=void i.sent;case 15:i.t0=i.t1;case 16:return i.abrupt("return",i.t0);case 17:case"end":return i.stop()}},i,this)}));return r}()},{key:"_stopInternal",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t){return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return this._stopError=t,i.prev=1,i.next=4,this._startInternalPromise;case 4:i.next=8;break;case 6:i.prev=6;i.t0=i["catch"](1);case 8:if(!this.transport){i.next=20;break}return i.prev=9,i.next=12,this.transport.stop();case 12:i.next=17;break;case 14:i.prev=14;i.t1=i["catch"](9);this._logger.log(n.Error,"HttpConnection.transport.stop() threw error '".concat(i.t1,"'."));this._stopConnection();case 17:this.transport=void 0;i.next=21;break;case 20:this._logger.log(n.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.");case 21:case"end":return i.stop()}},i,this,[[1,6],[9,14]])}));return r}()},{key:"_startInternal",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t){var o=this,u,r,f;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(u=this.baseUrl,this._accessTokenFactory=this._options.accessTokenFactory,i.prev=2,!this._options.skipNegotiation){i.next=11;break}if(!(this._options.transport!==e.WebSockets)){i.next=6;break}throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");case 6:return this.transport=this._constructTransport(e.WebSockets),i.next=9,this._startTransport(u,t);case 9:i.next=28;break;case 11:r=null;f=0;case 12:return i.next=14,this._getNegotiationResponse(u);case 14:if(r=i.sent,!("Disconnecting"===this._connectionState||"Disconnected"===this._connectionState)){i.next=17;break}throw new Error("The connection was stopped during negotiation.");case 17:if(!r.error){i.next=19;break}throw new Error(r.error);case 19:if(!r.ProtocolVersion){i.next=21;break}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.");case 21:(r.url&&(u=r.url),r.accessToken)&&function(){var n=r.accessToken;o._accessTokenFactory=function(){return n}}();f++;case 23:if(r.url&&f<100){i.next=12;break}case 24:if(!(100===f&&r.url)){i.next=26;break}throw new Error("Negotiate redirection limit exceeded.");case 26:return i.next=28,this._createTransport(u,this._options.transport,r,t);case 28:_instanceof(this.transport,ie)&&(this.features.inherentKeepAlive=!0);"Connecting"===this._connectionState&&(this._logger.log(n.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected");i.next=34;break;case 31:return i.prev=31,i.t0=i["catch"](2),i.abrupt("return",(this._logger.log(n.Error,"Failed to start the connection: "+i.t0),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(i.t0)));case 34:case"end":return i.stop()}},i,this,[[2,31]])}));return r}()},{key:"_getNegotiationResponse",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t){var u,o,c,s,l,a,h,f,r,e;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(u={},!this._accessTokenFactory){i.next=6;break}return i.next=4,this._accessTokenFactory();case 4:o=i.sent;o&&(u[d.Authorization]="Bearer ".concat(o));case 6:return c=vt(),s=_slicedToArray(c,2),l=s[0],a=s[1],u[l]=a,h=this._resolveNegotiateUrl(t),this._logger.log(n.Debug,"Sending negotiation request: ".concat(h,".")),i.prev=10,i.next=13,this._httpClient.post(h,{content:"",headers:_objectSpread({},u,{},this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});case 13:if(f=i.sent,!(200!==f.statusCode)){i.next=16;break}return i.abrupt("return",Promise.reject(new Error("Unexpected status code returned from negotiate '".concat(f.statusCode,"'"))));case 16:return r=JSON.parse(f.content),i.abrupt("return",((!r.negotiateVersion||r.negotiateVersion<1)&&(r.connectionToken=r.connectionId),r));case 20:return i.prev=20,i.t0=i["catch"](10),e="Failed to complete negotiation with the server: "+i.t0,i.abrupt("return",(_instanceof(i.t0,it)&&404===i.t0.statusCode&&(e+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(n.Error,e),Promise.reject(new os(e))));case 24:case"end":return i.stop()}},i,this,[[10,20]])}));return r}()},{key:"_createConnectUrl",value:function(n,t){return t?n+(-1===n.indexOf("?")?"?":"&")+"id=".concat(t):n}},{key:"_createTransport",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(t,r,u,f){var l,o,b,s,a,y,p,v,k,h,c,w;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(l=this._createConnectUrl(t,u.connectionToken),!this._isITransport(r)){i.next=7;break}return this._logger.log(n.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,i.next=6,this._startTransport(l,f);case 6:return i.abrupt("return",void(this.connectionId=u.connectionId));case 7:o=[];b=u.availableTransports||[];s=u;a=!0;y=!1;p=undefined;i.prev=12;v=b[Symbol.iterator]();case 14:if(a=(k=v.next()).done){i.next=47;break}if(h=k.value,c=this._resolveTransportOrError(h,r,f),!_instanceof(c,Error)){i.next=21;break}o.push("".concat(h.transport," failed:"));o.push(c);i.next=44;break;case 21:if(!this._isITransport(c)){i.next=44;break}if(!(this.transport=c,!s)){i.next=33;break}return i.prev=23,i.next=26,this._getNegotiationResponse(t);case 26:s=i.sent;i.next=32;break;case 29:return i.prev=29,i.t0=i["catch"](23),i.abrupt("return",Promise.reject(i.t0));case 32:l=this._createConnectUrl(t,s.connectionToken);case 33:return i.prev=33,i.next=36,this._startTransport(l,f);case 36:return i.abrupt("return",void(this.connectionId=s.connectionId));case 39:if(i.prev=39,i.t1=i["catch"](33),!(this._logger.log(n.Error,"Failed to start the transport '".concat(h.transport,"': ").concat(i.t1)),s=void 0,o.push(new es("".concat(h.transport," failed: ").concat(i.t1),e[h.transport])),"Connecting"!==this._connectionState)){i.next=44;break}return w="Failed to select transport before stop() was called.",i.abrupt("return",(this._logger.log(n.Debug,w),Promise.reject(new Error(w))));case 44:a=!0;i.next=14;break;case 47:i.next=53;break;case 49:i.prev=49;i.t2=i["catch"](12);y=!0;p=i.t2;case 53:i.prev=53;i.prev=54;a||v.return==null||v.return();case 56:if(i.prev=56,!y){i.next=59;break}throw p;case 59:return i.finish(56);case 60:return i.finish(53);case 61:return i.abrupt("return",o.length>0?Promise.reject(new ss("Unable to connect to the server with any of the available transports. ".concat(o.join(" ")),o)):Promise.reject(new Error("None of the transports supported by the client are supported by the server.")));case 62:case"end":return i.stop()}},i,this,[[12,49,53,61],[23,29],[33,39],[54,,56,60]])}));return r}()},{key:"_constructTransport",value:function(n){switch(n){case e.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new ws(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case e.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new ps(this._httpClient,this._accessTokenFactory,this._logger,this._options);case e.LongPolling:return new ie(this._httpClient,this._accessTokenFactory,this._logger,this._options);default:throw new Error("Unknown transport: ".concat(n,"."));}}},{key:"_startTransport",value:function(n,t){var i=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(n){return i._stopConnection(n)},this.transport.connect(n,t)}},{key:"_resolveTransportOrError",value:function(t,i,r){var u=e[t.transport];if(null==u)return this._logger.log(n.Debug,"Skipping transport '".concat(t.transport,"' because it is not supported by this client.")),new Error("Skipping transport '".concat(t.transport,"' because it is not supported by this client."));if(!function(n,t){return!n||0!=(t&n)}(i,u))return this._logger.log(n.Debug,"Skipping transport '".concat(e[u],"' because it was disabled by the client.")),new fs("'".concat(e[u],"' is disabled by the client."),u);if(!(t.transferFormats.map(function(n){return o[n]}).indexOf(r)>=0))return this._logger.log(n.Debug,"Skipping transport '".concat(e[u],"' because it does not support the requested transfer format '").concat(o[r],"'.")),new Error("'".concat(e[u],"' does not support ").concat(o[r],"."));if(u===e.WebSockets&&!this._options.WebSocket||u===e.ServerSentEvents&&!this._options.EventSource)return this._logger.log(n.Debug,"Skipping transport '".concat(e[u],"' because it is not supported in your environment.'")),new us("'".concat(e[u],"' is not supported in your environment."),u);this._logger.log(n.Debug,"Selecting transport '".concat(e[u],"'."));try{return this._constructTransport(u)}catch(t){return t}}},{key:"_isITransport",value:function(n){return n&&"object"==_typeof(n)&&"connect"in n}},{key:"_stopConnection",value:function(t){var i=this;if(this._logger.log(n.Debug,"HttpConnection.stopConnection(".concat(t,") called while in state ").concat(this._connectionState,".")),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,"Disconnected"!==this._connectionState){if("Connecting"===this._connectionState)throw this._logger.log(n.Warning,"Call to HttpConnection.stopConnection(".concat(t,") was ignored because the connection is still in the connecting state.")),new Error("HttpConnection.stopConnection(".concat(t,") was called while the connection is still in the connecting state."));if("Disconnecting"===this._connectionState&&this._stopPromiseResolver(),t?this._logger.log(n.Error,"Connection disconnected with error '".concat(t,"'.")):this._logger.log(n.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(function(t){i._logger.log(n.Error,"TransportSendQueue.stop() threw error '".concat(t,"'."))}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(n.Error,"HttpConnection.onclose(".concat(t,") threw error '").concat(r,"'."))}}}else this._logger.log(n.Debug,"Call to HttpConnection.stopConnection(".concat(t,") was ignored because the connection is already in the disconnected state."))}},{key:"_resolveUrl",value:function(t){if(0===t.lastIndexOf("https://",0)||0===t.lastIndexOf("http://",0))return t;if(!y.isBrowser||!window.document)throw new Error("Cannot resolve '".concat(t,"'."));var i=window.document.createElement("a");return i.href=t,this._logger.log(n.Information,"Normalizing '".concat(t,"' to '").concat(i.href,"'.")),i.href}},{key:"_resolveNegotiateUrl",value:function(n){var i=n.indexOf("?"),t=n.substring(0,-1===i?n.length:i);return"/"!==t[t.length-1]&&(t+="/"),t+="negotiate",t+=-1===i?"":n.substring(i),-1===t.indexOf("negotiateVersion")&&(t+=-1===i?"?":"&",t+="negotiateVersion="+this._negotiateVersion),t}}]),t}(),ks=function(){function n(t){_classCallCheck(this,n);this._transport=t;this._buffer=[];this._executing=!0;this._sendBufferedData=new gt;this._transportResult=new gt;this._sendLoopPromise=this._sendLoop()}return _createClass(n,[{key:"send",value:function(n){return this._bufferData(n),this._transportResult||(this._transportResult=new gt),this._transportResult.promise}},{key:"stop",value:function(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}},{key:"_bufferData",value:function(n){if(this._buffer.length&&_typeof(this._buffer[0])!=_typeof(n))throw new Error("Expected data to be of type ".concat(_typeof(this._buffer)," but was of type ").concat(_typeof(n)));this._buffer.push(n);this._sendBufferedData.resolve()}},{key:"_sendLoop",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(){var t,r;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this._sendBufferedData.promise;case 2:if(this._executing){i.next=5;break}return this._transportResult&&this._transportResult.reject("Connection stopped."),i.abrupt("break",21);case 5:return this._sendBufferedData=new gt,t=this._transportResult,this._transportResult=void 0,r="string"==typeof this._buffer[0]?this._buffer.join(""):n._concatBuffers(this._buffer),this._buffer.length=0,i.prev=10,i.next=13,this._transport.send(r);case 13:t.resolve();i.next=19;break;case 16:i.prev=16;i.t0=i["catch"](10);t.reject(i.t0);case 19:i.next=0;break;case 21:case"end":return i.stop()}},i,this,[[10,16]])}));return r}()}],[{key:"_concatBuffers",value:function(n){var h=n.map(function(n){return n.byteLength}).reduce(function(n,t){return n+t}),u=new Uint8Array(h),f=0,i=!0,e=!1,o=undefined,t,s,r;try{for(t=n[Symbol.iterator]();!(i=(s=t.next()).done);i=!0)r=s.value,u.set(new Uint8Array(r),f),f+=r.byteLength}catch(c){e=!0;o=c}finally{try{i||t.return==null||t.return()}finally{if(e)throw o;}}return u.buffer}}]),n}(),gt=function(){function n(){var t=this;_classCallCheck(this,n);this.promise=new Promise(function(n,i){var r;return r=[n,i],t._resolver=r[0],t._rejecter=r[1],r})}return _createClass(n,[{key:"resolve",value:function(){this._resolver()}},{key:"reject",value:function(n){this._rejecter(n)}}]),n}(),w=function(){function n(){_classCallCheck(this,n)}return _createClass(n,null,[{key:"write",value:function(t){return"".concat(t).concat(n.RecordSeparator)}},{key:"parse",value:function(t){if(t[t.length-1]!==n.RecordSeparator)throw new Error("Message is incomplete.");var i=t.split(n.RecordSeparator);return i.pop(),i}}]),n}();w.RecordSeparatorCode=30;w.RecordSeparator=String.fromCharCode(w.RecordSeparatorCode);re=function(){function n(){_classCallCheck(this,n)}return _createClass(n,[{key:"writeHandshakeRequest",value:function(n){return w.write(JSON.stringify(n))}},{key:"parseHandshakeResponse",value:function(n){var f,e,t,o,r,i,s,u,c,h;if(ur(n)){if(t=new Uint8Array(n),o=t.indexOf(w.RecordSeparatorCode),-1===o)throw new Error("Message is incomplete.");r=o+1;f=String.fromCharCode.apply(null,Array.prototype.slice.call(t.slice(0,r)));e=t.byteLength>r?t.slice(r).buffer:null}else{if(i=n,s=i.indexOf(w.RecordSeparator),-1===s)throw new Error("Message is incomplete.");u=s+1;f=i.substring(0,u);e=i.length>u?i.substring(u):null}if(c=w.parse(f),h=JSON.parse(c[0]),h.type)throw new Error("Expected a handshake response from the server.");return[e,h]}}]),n}();!function(n){n[n.Invocation=1]="Invocation";n[n.StreamItem=2]="StreamItem";n[n.Completion=3]="Completion";n[n.StreamInvocation=4]="StreamInvocation";n[n.CancelInvocation=5]="CancelInvocation";n[n.Ping=6]="Ping";n[n.Close=7]="Close"}(t||(t={}));ue=function(){function n(){_classCallCheck(this,n);this.observers=[]}return _createClass(n,[{key:"next",value:function(n){var i=!0,r=!1,u=undefined,t,f,e;try{for(t=this.observers[Symbol.iterator]();!(i=(f=t.next()).done);i=!0)e=f.value,e.next(n)}catch(o){r=!0;u=o}finally{try{i||t.return==null||t.return()}finally{if(r)throw u;}}}},{key:"error",value:function(n){var i=!0,u=!1,f=undefined,t,e,r;try{for(t=this.observers[Symbol.iterator]();!(i=(e=t.next()).done);i=!0)r=e.value,r.error&&r.error(n)}catch(o){u=!0;f=o}finally{try{i||t.return==null||t.return()}finally{if(u)throw f;}}}},{key:"complete",value:function(){var t=!0,r=!1,u=undefined,n,f,i;try{for(n=this.observers[Symbol.iterator]();!(t=(f=n.next()).done);t=!0)i=f.value,i.complete&&i.complete()}catch(e){r=!0;u=e}finally{try{t||n.return==null||n.return()}finally{if(r)throw u;}}}},{key:"subscribe",value:function(n){return this.observers.push(n),new df(this,n)}}]),n}();!function(n){n.Disconnected="Disconnected";n.Connecting="Connecting";n.Connected="Connected";n.Disconnecting="Disconnecting";n.Reconnecting="Reconnecting"}(i||(i={}));var ds=function(){function r(u,e,o,s){var h=this;_classCallCheck(this,r);this._nextKeepAlive=0;this._freezeEventListener=function(){h._logger.log(n.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://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")};f.isRequired(u,"connection");f.isRequired(e,"logger");f.isRequired(o,"protocol");this.serverTimeoutInMilliseconds=3e4;this.keepAliveIntervalInMilliseconds=15e3;this._logger=e;this._protocol=o;this.connection=u;this._reconnectPolicy=s;this._handshakeProtocol=new re;this.connection.onreceive=function(n){return h._processIncomingData(n)};this.connection.onclose=function(n){return h._connectionClosed(n)};this._callbacks={};this._methods={};this._closedCallbacks=[];this._reconnectingCallbacks=[];this._reconnectedCallbacks=[];this._invocationId=0;this._receivedHandshakeResponse=!1;this._connectionState=i.Disconnected;this._connectionStarted=!1;this._cachedPingMessage=this._protocol.writeMessage({type:t.Ping})}return _createClass(r,[{key:"start",value:function(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}},{key:"_startWithStateTransitions",value:function(){function u(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function r(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._connectionState!==i.Disconnected)){t.next=2;break}return t.abrupt("return",Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state.")));case 2:return this._connectionState=i.Connecting,this._logger.log(n.Debug,"Starting HubConnection."),t.prev=3,t.next=6,this._startInternal();case 6:y.isBrowser&&document&&document.addEventListener("freeze",this._freezeEventListener);this._connectionState=i.Connected;this._connectionStarted=!0;this._logger.log(n.Debug,"HubConnection connected successfully.");t.next=15;break;case 12:return t.prev=12,t.t0=t["catch"](3),t.abrupt("return",(this._connectionState=i.Disconnected,this._logger.log(n.Debug,"HubConnection failed to start successfully because of error '".concat(t.t0,"'.")),Promise.reject(t.t0)));case 15:case"end":return t.stop()}},r,this,[[3,12]])}));return u}()},{key:"_startInternal",value:function(){function r(){return t.apply(this,arguments)}var t=_asyncToGenerator(regeneratorRuntime.mark(function i(){var t=this,r,u;return regeneratorRuntime.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1,r=new Promise(function(n,i){t._handshakeResolver=n;t._handshakeRejecter=i}),i.next=4,this.connection.start(this._protocol.transferFormat);case 4:return i.prev=4,u={protocol:this._protocol.name,version:this._protocol.version},this._logger.log(n.Debug,"Sending handshake request."),i.next=9,this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(u));case 9:return this._logger.log(n.Information,"Using HubProtocol '".concat(this._protocol.name,"'.")),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),i.next=15,r;case 15:if(!this._stopDuringStartError){i.next=17;break}throw this._stopDuringStartError;case 17:i.next=27;break;case 19:return i.prev=19,i.t0=i["catch"](4),this._logger.log(n.Debug,"Hub handshake failed with error '".concat(i.t0,"' during start(). Stopping HubConnection.")),this._cleanupTimeout(),this._cleanupPingTimer(),i.next=26,this.connection.stop(i.t0);case 26:throw i.t0;case 27:case"end":return i.stop()}},i,this,[[4,19]])}));return r}()},{key:"stop",value:function(){function i(){return n.apply(this,arguments)}var n=_asyncToGenerator(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=this._startPromise,this._stopPromise=this._stopInternal(),t.next=4,this._stopPromise;case 4:return t.prev=4,t.next=7,n;case 7:t.next=11;break;case 9:t.prev=9;t.t0=t["catch"](4);case 11:case"end":return t.stop()}},t,this,[[4,9]])}));return i}()},{key:"_stopInternal",value:function(t){return this._connectionState===i.Disconnected?(this._logger.log(n.Debug,"Call to HubConnection.stop(".concat(t,") ignored because it is already in the disconnected state.")),Promise.resolve()):this._connectionState===i.Disconnecting?(this._logger.log(n.Debug,"Call to HttpConnection.stop(".concat(t,") ignored because the connection is already in the disconnecting state.")),this._stopPromise):(this._connectionState=i.Disconnecting,this._logger.log(n.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(n.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new Error("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}},{key:"stream",value:function(n){for(var u=this,e=arguments.length,o=new Array(e>1?e-1:0),f=1;f1?i-1:0),t=1;t1?u-1:0),r=1;r=0&&u>=0&&i<=17179869183?0===u&&i<=4294967295?(t=new Uint8Array(4),(r=new DataView(t.buffer)).setUint32(0,i),t):(f=i/4294967296,e=4294967295&i,t=new Uint8Array(8),(r=new DataView(t.buffer)).setUint32(0,u<<2|3&f),r.setUint32(4,e),t):(t=new Uint8Array(12),(r=new DataView(t.buffer)).setUint32(0,u),fe(r,4,i),t)}((t=1e6*((i=n.getTime())-1e3*(r=Math.floor(i/1e3))),{sec:r+(u=Math.floor(t/1e9)),nsec:t-1e9*u})):null},decode:function(n){var t=function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength),i;switch(n.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:return i=t.getUint32(0),{sec:4294967296*(3&i)+t.getUint32(4),nsec:i>>>2};case 12:return{sec:ee(t,4),nsec:t.getUint32(0)};default:throw new p("Unrecognized data size for timestamp (expected 4, 8, or 12): "+n.length);}}(n);return new Date(1e3*t.sec+t.nsec/1e6)}},he=function(){function n(){this.builtInEncoders=[];this.builtInDecoders=[];this.encoders=[];this.decoders=[];this.register(oh)}return n.prototype.register=function(n){var t=n.type,r=n.encode,u=n.decode,i;t>=0?(this.encoders[t]=r,this.decoders[t]=u):(i=1+t,this.builtInEncoders[i]=r,this.builtInDecoders[i]=u)},n.prototype.tryToEncode=function(n,t){for(var r,u,i=0;ithis.maxDepth)throw new Error("Too deep objects in depth "+t);null==n?this.encodeNil():"boolean"==typeof n?this.encodeBoolean(n):"number"==typeof n?this.encodeNumber(n):"string"==typeof n?this.encodeString(n):this.encodeObject(n,t)},n.prototype.ensureBufferSizeToWrite=function(n){var t=this.pos+n;this.view.byteLength=0?n<128?this.writeU8(n):n<256?(this.writeU8(204),this.writeU8(n)):n<65536?(this.writeU8(205),this.writeU16(n)):n<4294967296?(this.writeU8(206),this.writeU32(n)):(this.writeU8(207),this.writeU64(n)):n>=-32?this.writeU8(224|n+32):n>=-128?(this.writeU8(208),this.writeI8(n)):n>=-32768?(this.writeU8(209),this.writeI16(n)):n>=-2147483648?(this.writeU8(210),this.writeI32(n)):(this.writeU8(211),this.writeI64(n)):this.forceFloat32?(this.writeU8(202),this.writeF32(n)):(this.writeU8(203),this.writeF64(n))},n.prototype.writeStringHeader=function(n){if(n<32)this.writeU8(160+n);else if(n<256)this.writeU8(217),this.writeU8(n);else if(n<65536)this.writeU8(218),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too long string: "+n+" bytes in UTF-8");this.writeU8(219);this.writeU32(n)}},n.prototype.encodeString=function(n){if(n.length>ih){var t=oe(n);this.ensureBufferSizeToWrite(5+t);this.writeStringHeader(t);rh(n,this.bytes,this.pos);this.pos+=t}else t=oe(n),this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(n,t,i){for(var r,e,o=n.length,u=i,f=0;f>6&31|192:(r>=55296&&r<=56319&&f>12&15|224,t[u++]=r>>6&63|128):(t[u++]=r>>18&7|240,t[u++]=r>>12&63|128,t[u++]=r>>6&63|128)),t[u++]=63&r|128):t[u++]=r}(n,this.bytes,this.pos),this.pos+=t},n.prototype.encodeObject=function(n,t){var i=this.extensionCodec.tryToEncode(n,this.context);if(null!=i)this.encodeExtension(i);else if(Array.isArray(n))this.encodeArray(n,t);else if(ArrayBuffer.isView(n))this.encodeBinary(n);else{if("object"!=_typeof(n))throw new Error("Unrecognized object: "+Object.prototype.toString.apply(n));this.encodeMap(n,t)}},n.prototype.encodeBinary=function(n){var t=n.byteLength,i;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: "+t);this.writeU8(198);this.writeU32(t)}i=ii(n);this.writeU8a(i)},n.prototype.encodeArray=function(n,t){var i=n.length,r,u,f;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else{if(!(i<4294967296))throw new Error("Too large array: "+i);this.writeU8(221);this.writeU32(i)}for(r=0,u=n;r0&&n<=this.maxKeyLength},n.prototype.find=function(n,t,i){var r,f;n:for(r=0,f=this.caches[i-1];r=this.maxLengthPerKey?i[Math.random()*i.length|0]=r:i.push(r)},n.prototype.decode=function(n,t,i){var u=this.find(n,t,i),r,f;return null!=u?(this.hit++,u):(this.miss++,r=se(n,t,i),f=Uint8Array.prototype.slice.call(n,t,t+i),this.store(f,r),r)},n}(),sr=function(n,t){function o(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,i&&(e=[2&e[0],i.value]),e[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!((i=(i=r.trys).length>0&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]1||f(n,t)})})}function f(n,t){try{_instanceof((i=o[n](t)).value,rt)?Promise.resolve(i.value.v).then(h,c):s(r[0][2],i)}catch(n){s(r[0][3],n)}var i}function h(n){f("next",n)}function c(n){f("throw",n)}function s(n,t){n(t);r.shift();r.length&&f(r[0][0],r[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u,o=i.apply(n,t||[]),r=[];return u={},e("next"),e("throw"),e("return"),u[Symbol.asyncIterator]=function(){return this},u},hr=new DataView(new ArrayBuffer(0)),ch=new Uint8Array(hr.buffer),cr=function(){try{hr.getInt8(0)}catch(n){return n.constructor}throw new Error("never reached");}(),ae=new cr("Insufficient data"),lh=new sh,ah=function(){function n(n,t,i,r,u,f,e,o){void 0===n&&(n=he.defaultCodec);void 0===t&&(t=void 0);void 0===i&&(i=g);void 0===r&&(r=g);void 0===u&&(u=g);void 0===f&&(f=g);void 0===e&&(e=g);void 0===o&&(o=lh);this.extensionCodec=n;this.context=t;this.maxStrLength=i;this.maxBinLength=r;this.maxArrayLength=u;this.maxMapLength=f;this.maxExtLength=e;this.keyDecoder=o;this.totalPos=0;this.pos=0;this.view=hr;this.bytes=ch;this.headByte=-1;this.stack=[]}return n.prototype.reinitializeState=function(){this.totalPos=0;this.headByte=-1;this.stack.length=0},n.prototype.setBuffer=function(n){this.bytes=ii(n);this.view=function(n){if(_instanceof(n,ArrayBuffer))return new DataView(n);var t=ii(n);return new DataView(t.buffer,t.byteOffset,t.byteLength)}(this.bytes);this.pos=0},n.prototype.appendBuffer=function(n){if(-1!==this.headByte||this.hasRemaining(1)){var t=this.bytes.subarray(this.pos),r=ii(n),i=new Uint8Array(t.length+r.length);i.set(t);i.set(r,t.length);this.setBuffer(i)}else this.setBuffer(n)},n.prototype.hasRemaining=function(n){return this.view.byteLength-this.pos>=n},n.prototype.createExtraByteError=function(n){var t=this.view,i=this.pos;return new RangeError("Extra "+(t.byteLength-i)+" of "+t.byteLength+" byte(s) found at buffer["+n+"]")},n.prototype.decode=function(n){this.reinitializeState();this.setBuffer(n);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},n.prototype.decodeMulti=function(n){return sr(this,function(t){switch(t.label){case 0:this.reinitializeState();this.setBuffer(n);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]}})},n.prototype.decodeAsync=function(n){var i,r,f,e,o,u,t;return o=this,void 0,t=function(){var t,o,s,h,u,c,l,a;return sr(this,function(v){switch(v.label){case 0:t=!1;v.label=1;case 1:v.trys.push([1,6,7,12]);i=le(n);v.label=2;case 2:return[4,i.next()];case 3:if((r=v.sent()).done)return[3,5];if(s=r.value,t)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s);try{o=this.doDecodeSync();t=!0}catch(n){if(!_instanceof(n,cr))throw n;}this.totalPos+=this.pos;v.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return h=v.sent(),f={error:h},[3,12];case 7:return v.trys.push([7,,10,11]),r&&!r.done&&(e=i.return)?[4,e.call(i)]:[3,9];case 8:v.sent();v.label=9;case 9:return[3,11];case 10:if(f)throw f.error;return[7];case 11:return[7];case 12:if(t){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,o]}throw c=(u=this).headByte,l=u.pos,a=u.totalPos,new RangeError("Insufficient data in parsing "+or(c)+" at "+a+" ("+l+" in the current buffer)");}})},new((u=void 0)||(u=Promise))(function(n,i){function f(n){try{r(t.next(n))}catch(n){i(n)}}function e(n){try{r(t.throw(n))}catch(n){i(n)}}function r(t){var i;t.done?n(t.value):(i=t.value,_instanceof(i,u)?i:new u(function(n){n(i)})).then(f,e)}r((t=t.apply(o,[])).next())})},n.prototype.decodeArrayStream=function(n){return this.decodeMultiAsync(n,!0)},n.prototype.decodeStream=function(n){return this.decodeMultiAsync(n,!1)},n.prototype.decodeMultiAsync=function(n,t){return hh(this,arguments,function(){var f,i,r,u,o,s,h,e,c;return sr(this,function(l){switch(l.label){case 0:f=t;i=-1;l.label=1;case 1:l.trys.push([1,13,14,19]);r=le(n);l.label=2;case 2:return[4,rt(r.next())];case 3:if((u=l.sent()).done)return[3,12];if(o=u.value,t&&0===i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(o);f&&(i=this.readArraySize(),f=!1,this.complete());l.label=4;case 4:l.trys.push([4,9,,10]);l.label=5;case 5:return[4,rt(this.doDecodeSync())];case 6:return[4,l.sent()];case 7:return l.sent(),0==--i?[3,8]:[3,5];case 8:return[3,10];case 9:if(!_instanceof(s=l.sent(),cr))throw s;return[3,10];case 10:this.totalPos+=this.pos;l.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return h=l.sent(),e={error:h},[3,19];case 14:return l.trys.push([14,,17,18]),u&&!u.done&&(c=r.return)?[4,rt(c.call(r))]:[3,16];case 15:l.sent();l.label=16;case 16:return[3,18];case 17:if(e)throw e.error;return[7];case 18:return[7];case 19:return[2]}})})},n.prototype.doDecodeSync=function(){var t,n,u,i,f,r,e;n:for(;;){if(t=this.readHeadByte(),n=void 0,t>=224)n=t-256;else if(t<192)if(t<128)n=t;else if(t<144){if(0!=(i=t-128)){this.pushMapState(i);this.complete();continue n}n={}}else if(t<160){if(0!=(i=t-144)){this.pushArrayState(i);this.complete();continue n}n=[]}else u=t-160,n=this.decodeUtf8String(u,0);else if(192===t)n=null;else if(194===t)n=!1;else if(195===t)n=!0;else if(202===t)n=this.readF32();else if(203===t)n=this.readF64();else if(204===t)n=this.readU8();else if(205===t)n=this.readU16();else if(206===t)n=this.readU32();else if(207===t)n=this.readU64();else if(208===t)n=this.readI8();else if(209===t)n=this.readI16();else if(210===t)n=this.readI32();else if(211===t)n=this.readI64();else if(217===t)u=this.lookU8(),n=this.decodeUtf8String(u,1);else if(218===t)u=this.lookU16(),n=this.decodeUtf8String(u,2);else if(219===t)u=this.lookU32(),n=this.decodeUtf8String(u,4);else if(220===t){if(0!==(i=this.readU16())){this.pushArrayState(i);this.complete();continue n}n=[]}else if(221===t){if(0!==(i=this.readU32())){this.pushArrayState(i);this.complete();continue n}n=[]}else if(222===t){if(0!==(i=this.readU16())){this.pushMapState(i);this.complete();continue n}n={}}else if(223===t){if(0!==(i=this.readU32())){this.pushMapState(i);this.complete();continue n}n={}}else if(196===t)i=this.lookU8(),n=this.decodeBinary(i,1);else if(197===t)i=this.lookU16(),n=this.decodeBinary(i,2);else if(198===t)i=this.lookU32(),n=this.decodeBinary(i,4);else if(212===t)n=this.decodeExtension(1,0);else if(213===t)n=this.decodeExtension(2,0);else if(214===t)n=this.decodeExtension(4,0);else if(215===t)n=this.decodeExtension(8,0);else if(216===t)n=this.decodeExtension(16,0);else if(199===t)i=this.lookU8(),n=this.decodeExtension(i,1);else if(200===t)i=this.lookU16(),n=this.decodeExtension(i,2);else{if(201!==t)throw new p("Unrecognized type byte: "+or(t));i=this.lookU32();n=this.decodeExtension(i,4)}for(this.complete(),f=this.stack;f.length>0;)if(r=f[f.length-1],0===r.type){if(r.array[r.position]=n,r.position++,r.position!==r.size)continue n;f.pop();n=r.array}else{if(1===r.type){if("string"!=(e=_typeof(n))&&"number"!==e)throw new p("The type of key must be string or number but "+_typeof(n));if("__proto__"===n)throw new p("The key __proto__ is not allowed");r.key=n;r.type=2;continue n}if(r.map[r.key]=n,r.readCount++,r.readCount!==r.size){r.key=null;r.type=1;continue n}f.pop();n=r.map}return n}},n.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},n.prototype.complete=function(){this.headByte=-1},n.prototype.readArraySize=function(){var n=this.readHeadByte();switch(n){case 220:return this.readU16();case 221:return this.readU32();default:if(n<160)return n-144;throw new p("Unrecognized array type byte: "+or(n));}},n.prototype.pushMapState=function(n){if(n>this.maxMapLength)throw new p("Max length exceeded: map length ("+n+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:n,key:null,readCount:0,map:{}})},n.prototype.pushArrayState=function(n){if(n>this.maxArrayLength)throw new p("Max length exceeded: array length ("+n+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:n,array:new Array(n),position:0})},n.prototype.decodeUtf8String=function(n,t){var r,u,i;if(n>this.maxStrLength)throw new p("Max length exceeded: UTF-8 byte length ("+n+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLengthfh?function(n,t,i){var r=n.subarray(t,t+i);return uh.decode(r)}(this.bytes,i,n):se(this.bytes,i,n),this.pos+=t+n,u},n.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},n.prototype.decodeBinary=function(n,t){if(n>this.maxBinLength)throw new p("Max length exceeded: bin length ("+n+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(n+t))throw ae;var i=this.pos+t,r=this.bytes.subarray(i,i+n);return this.pos+=t+n,r},n.prototype.decodeExtension=function(n,t){if(n>this.maxExtLength)throw new p("Max length exceeded: ext length ("+n+") > maxExtLength ("+this.maxExtLength+")");var i=this.view.getInt8(this.pos+t),r=this.decodeBinary(n,t+1);return this.extensionCodec.decode(r,i,this.context)},n.prototype.lookU8=function(){return this.view.getUint8(this.pos)},n.prototype.lookU16=function(){return this.view.getUint16(this.pos)},n.prototype.lookU32=function(){return this.view.getUint32(this.pos)},n.prototype.readU8=function(){var n=this.view.getUint8(this.pos);return this.pos++,n},n.prototype.readI8=function(){var n=this.view.getInt8(this.pos);return this.pos++,n},n.prototype.readU16=function(){var n=this.view.getUint16(this.pos);return this.pos+=2,n},n.prototype.readI16=function(){var n=this.view.getInt16(this.pos);return this.pos+=2,n},n.prototype.readU32=function(){var n=this.view.getUint32(this.pos);return this.pos+=4,n},n.prototype.readI32=function(){var n=this.view.getInt32(this.pos);return this.pos+=4,n},n.prototype.readU64=function(){var n,t,i=(n=this.view,t=this.pos,4294967296*n.getUint32(t)+n.getUint32(t+4));return this.pos+=8,i},n.prototype.readI64=function(){var n=ee(this.view,this.pos);return this.pos+=8,n},n.prototype.readF32=function(){var n=this.view.getFloat32(this.pos);return this.pos+=4,n},n.prototype.readF64=function(){var n=this.view.getFloat64(this.pos);return this.pos+=8,n},n}(),nt=function(){function n(){_classCallCheck(this,n)}return _createClass(n,null,[{key:"write",value:function(n){var t=n.byteLength||n.length,i=[],u,r;do u=127&t,t>>=7,t>0&&(u|=128),i.push(u);while(t>0);return t=n.byteLength||n.length,r=new Uint8Array(i.length+t),r.set(i,0),r.set(n,i.length),r.buffer}},{key:"parse",value:function(n){for(var e=[],r=new Uint8Array(n),o=[0,7,14,21,28],i=0;i7)throw new Error("Messages bigger than 2GB are not supported.");if(!(r.byteLength>=i+t+f))throw new Error("Incomplete message.");e.push(r.slice?r.slice(i+t,i+t+f):r.subarray(i+t,i+t+f));i=i+t+f}return e}}]),n}(),vh=new Uint8Array([145,t.Ping]),yh=function(){function i(n){_classCallCheck(this,i);this.name="messagepack";this.version=1;this.transferFormat=o.Binary;this._errorResult=1;this._voidResult=2;this._nonVoidResult=3;n=n||{};this._encoder=new ce(n.extensionCodec,n.context,n.maxDepth,n.initialBufferSize,n.sortKeys,n.forceFloat32,n.ignoreUndefined,n.forceIntegerToFloat);this._decoder=new ah(n.extensionCodec,n.context,n.maxStrLength,n.maxBinLength,n.maxArrayLength,n.maxMapLength,n.maxExtLength)}return _createClass(i,[{key:"parseMessages",value:function(n,t){var i,r,h,c,f;if(!(i=n)||"undefined"==typeof ArrayBuffer||!(_instanceof(i,ArrayBuffer)||i.constructor&&"ArrayBuffer"===i.constructor.name))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer.");null===t&&(t=k.instance);var l=nt.parse(n),e=[],u=!0,o=!1,s=undefined;try{for(r=l[Symbol.iterator]();!(u=(h=r.next()).done);u=!0)c=h.value,f=this._parseMessage(c,t),f&&e.push(f)}catch(a){o=!0;s=a}finally{try{u||r.return==null||r.return()}finally{if(o)throw s;}}return e}},{key:"writeMessage",value:function(n){switch(n.type){case t.Invocation:return this._writeInvocation(n);case t.StreamInvocation:return this._writeStreamInvocation(n);case t.StreamItem:return this._writeStreamItem(n);case t.Completion:return this._writeCompletion(n);case t.Ping:return nt.write(vh);case t.CancelInvocation:return this._writeCancelInvocation(n);default:throw new Error("Invalid message type.");}}},{key:"_parseMessage",value:function(i,r){var u,f;if(0===i.length)throw new Error("Invalid payload.");if(u=this._decoder.decode(i),0===u.length||!_instanceof(u,Array))throw new Error("Invalid payload.");f=u[0];switch(f){case t.Invocation:return this._createInvocationMessage(this._readHeaders(u),u);case t.StreamItem:return this._createStreamItemMessage(this._readHeaders(u),u);case t.Completion:return this._createCompletionMessage(this._readHeaders(u),u);case t.Ping:return this._createPingMessage(u);case t.Close:return this._createCloseMessage(u);default:return r.log(n.Information,"Unknown message type '"+f+"' ignored."),null}}},{key:"_createCloseMessage",value:function(n){if(n.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:n.length>=3?n[2]:void 0,error:n[1],type:t.Close}}},{key:"_createPingMessage",value:function(n){if(n.length<1)throw new Error("Invalid payload for Ping message.");return{type:t.Ping}}},{key:"_createInvocationMessage",value:function(n,i){if(i.length<5)throw new Error("Invalid payload for Invocation message.");var r=i[2];return r?{arguments:i[4],headers:n,invocationId:r,streamIds:[],target:i[3],type:t.Invocation}:{arguments:i[4],headers:n,streamIds:[],target:i[3],type:t.Invocation}}},{key:"_createStreamItemMessage",value:function(n,i){if(i.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:n,invocationId:i[2],item:i[3],type:t.StreamItem}}},{key:"_createCompletionMessage",value:function(n,i){var r,u,f;if(i.length<4)throw new Error("Invalid payload for Completion message.");if(r=i[3],r!==this._voidResult&&i.length<5)throw new Error("Invalid payload for Completion message.");switch(r){case this._errorResult:u=i[4];break;case this._nonVoidResult:f=i[4]}return{error:u,headers:n,invocationId:i[2],result:f,type:t.Completion}}},{key:"_writeInvocation",value:function(n){var i;return i=n.streamIds?this._encoder.encode([t.Invocation,n.headers||{},n.invocationId||null,n.target,n.arguments,n.streamIds]):this._encoder.encode([t.Invocation,n.headers||{},n.invocationId||null,n.target,n.arguments]),nt.write(i.slice())}},{key:"_writeStreamInvocation",value:function(n){var i;return i=n.streamIds?this._encoder.encode([t.StreamInvocation,n.headers||{},n.invocationId,n.target,n.arguments,n.streamIds]):this._encoder.encode([t.StreamInvocation,n.headers||{},n.invocationId,n.target,n.arguments]),nt.write(i.slice())}},{key:"_writeStreamItem",value:function(n){var i=this._encoder.encode([t.StreamItem,n.headers||{},n.invocationId,n.item]);return nt.write(i.slice())}},{key:"_writeCompletion",value:function(n){var i=n.error?this._errorResult:n.result?this._nonVoidResult:this._voidResult,r;switch(i){case this._errorResult:r=this._encoder.encode([t.Completion,n.headers||{},n.invocationId,i,n.error]);break;case this._voidResult:r=this._encoder.encode([t.Completion,n.headers||{},n.invocationId,i]);break;case this._nonVoidResult:r=this._encoder.encode([t.Completion,n.headers||{},n.invocationId,i,n.result])}return nt.write(r.slice())}},{key:"_writeCancelInvocation",value:function(n){var i=this._encoder.encode([t.CancelInvocation,n.headers||{},n.invocationId]);return nt.write(i.slice())}},{key:"_readHeaders",value:function(n){var t=n[1];if("object"!=_typeof(t))throw new Error("Invalid headers.");return t}}]),i}(),ve=!1;var ar="function"==typeof TextDecoder?new TextDecoder("utf-8"):null,ph=ar?ar.decode.bind(ar):function(n){for(var r=0,h=n.length,i=[],f=[],t,e,o,s,u;r65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u));i.length>1024&&(f.push(String.fromCharCode.apply(null,i)),i.length=0)}return f.push(String.fromCharCode.apply(null,i)),f.join("")},wh=Math.pow(2,32),bh=Math.pow(2,21)-1;var kh=function(){function n(t){_classCallCheck(this,n);this.batchData=t;var i=new tc(t);this.arrayRangeReader=new ic(t);this.arrayBuilderSegmentReader=new rc(t);this.diffReader=new dh(t);this.editReader=new gh(t,i);this.frameReader=new nc(t,i)}return _createClass(n,[{key:"updatedComponents",value:function(){return r(this.batchData,this.batchData.length-20)}},{key:"referenceFrames",value:function(){return r(this.batchData,this.batchData.length-16)}},{key:"disposedComponentIds",value:function(){return r(this.batchData,this.batchData.length-12)}},{key:"disposedEventHandlerIds",value:function(){return r(this.batchData,this.batchData.length-8)}},{key:"updatedComponentsEntry",value:function(n,t){var i=n+4*t;return r(this.batchData,i)}},{key:"referenceFramesEntry",value:function(n,t){return n+20*t}},{key:"disposedComponentIdsEntry",value:function(n,t){var i=n+4*t;return r(this.batchData,i)}},{key:"disposedEventHandlerIdsEntry",value:function(n,t){var i=n+8*t;return we(this.batchData,i)}}]),n}(),dh=function(){function n(t){_classCallCheck(this,n);this.batchDataUint8=t}return _createClass(n,[{key:"componentId",value:function(n){return r(this.batchDataUint8,n)}},{key:"edits",value:function(n){return n+4}},{key:"editsEntry",value:function(n,t){return n+16*t}}]),n}(),gh=function(){function n(t,i){_classCallCheck(this,n);this.batchDataUint8=t;this.stringReader=i}return _createClass(n,[{key:"editType",value:function(n){return r(this.batchDataUint8,n)}},{key:"siblingIndex",value:function(n){return r(this.batchDataUint8,n+4)}},{key:"newTreeIndex",value:function(n){return r(this.batchDataUint8,n+8)}},{key:"moveToSiblingIndex",value:function(n){return r(this.batchDataUint8,n+8)}},{key:"removedAttributeName",value:function(n){var t=r(this.batchDataUint8,n+12);return this.stringReader.readString(t)}}]),n}(),nc=function(){function n(t,i){_classCallCheck(this,n);this.batchDataUint8=t;this.stringReader=i}return _createClass(n,[{key:"frameType",value:function(n){return r(this.batchDataUint8,n)}},{key:"subtreeLength",value:function(n){return r(this.batchDataUint8,n+4)}},{key:"elementReferenceCaptureId",value:function(n){var t=r(this.batchDataUint8,n+4);return this.stringReader.readString(t)}},{key:"componentId",value:function(n){return r(this.batchDataUint8,n+8)}},{key:"elementName",value:function(n){var t=r(this.batchDataUint8,n+8);return this.stringReader.readString(t)}},{key:"textContent",value:function(n){var t=r(this.batchDataUint8,n+4);return this.stringReader.readString(t)}},{key:"markupContent",value:function(n){var t=r(this.batchDataUint8,n+4);return this.stringReader.readString(t)}},{key:"attributeName",value:function(n){var t=r(this.batchDataUint8,n+4);return this.stringReader.readString(t)}},{key:"attributeValue",value:function(n){var t=r(this.batchDataUint8,n+8);return this.stringReader.readString(t)}},{key:"attributeEventHandlerId",value:function(n){return we(this.batchDataUint8,n+12)}}]),n}(),tc=function(){function n(t){_classCallCheck(this,n);this.batchDataUint8=t;this.stringTableStartIndex=r(t,t.length-4)}return _createClass(n,[{key:"readString",value:function(n){var t;if(-1===n)return null;var i=r(this.batchDataUint8,this.stringTableStartIndex+4*n),u=function(n,t){for(var r,u=0,f=0,i=0;i<4;i++){if(r=n[t+i],u|=(127&r)<this.nextBatchId)){t.next=14;break}if(!this.fatalError){t.next=12;break}return this.logger.log(u.Debug,"Received a new batch ".concat(n," but errored out on a previous batch ").concat(this.nextBatchId-1)),t.next=9,r.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString());case 9:t.t0=void t.sent;t.next=13;break;case 12:t.t0=void this.logger.log(u.Debug,"Waiting for batch ".concat(this.nextBatchId,". Batch ").concat(n," not processed."));case 13:return t.abrupt("return",t.t0);case 14:return t.prev=14,this.nextBatchId++,this.logger.log(u.Debug,"Applying batch ".concat(n,".")),function(n,t){var r=pi[n],u,f,l,e,v;if(!r)throw new Error("There is no browser renderer with ID ".concat(n,"."));var i=t.arrayRangeReader,o=t.updatedComponents(),y=i.values(o),p=i.count(o),w=t.referenceFrames(),b=i.values(w),s=t.diffReader;for(u=0;u=this.minLevel){var i="[".concat((new Date).toISOString(),"] ").concat(u[n],": ").concat(t);switch(n){case u.Critical:case u.Error:console.error(i);break;case u.Warning:console.warn(i);break;case u.Information:console.info(i);break;default:console.log(i)}}}}]),n}(),fc=function(){function n(t,i){_classCallCheck(this,n);this.circuitId=void 0;this.components=t;this.applicationState=i}return _createClass(n,[{key:"reconnect",value:function(n){if(!this.circuitId)throw new Error("Circuit host not initialized.");return n.state!==i.Connected?Promise.resolve(!1):n.invoke("ConnectCircuit",this.circuitId)}},{key:"initialize",value:function(n){if(this.circuitId)throw new Error("Circuit host '".concat(this.circuitId,"' already initialized."));this.circuitId=n}},{key:"startCircuit",value:function(){function r(){return n.apply(this,arguments)}var n=_asyncToGenerator(regeneratorRuntime.mark(function t(n){var r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n.state!==i.Connected)){t.next=2;break}return t.abrupt("return",!1);case 2:return t.next=4,n.invoke("StartCircuit",ki.getBaseURI(),ki.getLocationHref(),JSON.stringify(this.components.map(function(n){return n.toRecord()})),this.applicationState||"");case 4:return r=t.sent,t.abrupt("return",!!r&&(this.initialize(r),!0));case 6:case"end":return t.stop()}},t,this)}));return r}()},{key:"resolveElement",value:function(n){var i=function(n){var t=oi.get(n);if(t)return oi.delete(n),t}(n),t;if(i)return et(i,!0);if(t=Number.parseInt(n),!Number.isNaN(t))return function(n,t){if(!n.parentNode)throw new Error("Comment not connected to the DOM ".concat(n.textContent));var i=n.parentNode,r=et(i,!0),u=v(r);return Array.from(i.childNodes).forEach(function(n){return u.push(n)}),n[hi]=r,t&&(n[su]=t,et(t)),et(n)}(this.components[t].start,this.components[t].end);throw new Error("Invalid sequence number or identifier '".concat(n,"'."));}}]),n}(),ke={configureSignalR:function(){},logLevel:u.Warning,reconnectionOptions:{maxRetries:8,retryIntervalMilliseconds:2e4,dialogId:"components-reconnect-modal"}},ec=function(){function n(t,i,r,f){var e=this;_classCallCheck(this,n);this.maxRetries=i;this.document=r;this.logger=f;this.addedToDom=!1;this.modal=this.document.createElement("div");this.modal.id=t;this.maxRetries=i;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";this.modal.innerHTML='
<\/h5>