{"version":3,"sources":["node_modules/@angular/animations/fesm2022/animations.mjs","node_modules/ngx-toastr/fesm2022/ngx-toastr.mjs","node_modules/@microsoft/signalr/dist/esm/Errors.js","node_modules/@microsoft/signalr/dist/esm/HttpClient.js","node_modules/@microsoft/signalr/dist/esm/ILogger.js","node_modules/@microsoft/signalr/dist/esm/Loggers.js","node_modules/@microsoft/signalr/dist/esm/Utils.js","node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js","node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js","node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js","node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js","node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js","node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js","node_modules/@microsoft/signalr/dist/esm/Subject.js","node_modules/@microsoft/signalr/dist/esm/HubConnection.js","node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js","node_modules/@microsoft/signalr/src/HeaderNames.ts","node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js","node_modules/@microsoft/signalr/dist/esm/ITransport.js","node_modules/@microsoft/signalr/dist/esm/AbortController.js","node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js","node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js","node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js","node_modules/@microsoft/signalr/dist/esm/HttpConnection.js","node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js","node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js","src/app/_services/message-hub.service.ts","src/app/shared/confirm-dialog/confirm-dialog.component.ts","src/app/shared/confirm-dialog/confirm-dialog.component.html","src/app/shared/confirm-dialog/_models/confirm-config.ts","src/app/shared/confirm.service.ts","src/app/_models/preferences/site-theme.ts","src/app/_services/theme.service.ts","src/app/_services/account.service.ts"],"sourcesContent":["/**\n * @license Angular v17.0.6\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, Injectable, ANIMATION_MODULE_TYPE, ViewEncapsulation, ɵRuntimeError, Inject } from '@angular/core';\n\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nconst AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of [`state()`](api/animations/state)\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of\n * [`state()`](api/animations/state) and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * \n *
[AnimationBuilder.build](api/animations/AnimationBuilder#build)()
method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nlet AnimationBuilder = /*#__PURE__*/(() => {\n class AnimationBuilder {\n static {\n this.ɵfac = function AnimationBuilder_Factory(t) {\n return new (t || AnimationBuilder)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AnimationBuilder,\n factory: () => (() => inject(BrowserAnimationBuilder))(),\n providedIn: 'root'\n });\n }\n }\n return AnimationBuilder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * A factory object returned from the\n * [AnimationBuilder.build](api/animations/AnimationBuilder#build)()
\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {}\nlet BrowserAnimationBuilder = /*#__PURE__*/(() => {\n class BrowserAnimationBuilder extends AnimationBuilder {\n constructor(rootRenderer, doc) {\n super();\n this.animationModuleType = inject(ANIMATION_MODULE_TYPE, {\n optional: true\n });\n this._nextAnimationId = 0;\n const typeData = {\n id: '0',\n encapsulation: ViewEncapsulation.None,\n styles: [],\n data: {\n animation: []\n }\n };\n this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n if (this.animationModuleType === null && !isAnimationRenderer(this._renderer)) {\n // We only support AnimationRenderer & DynamicDelegationRenderer for this AnimationBuilder\n throw new ɵRuntimeError(3600 /* RuntimeErrorCode.BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Angular detected that the `AnimationBuilder` was injected, but animation support was not enabled. ' + 'Please make sure that you enable animations in your application by calling `provideAnimations()` or `provideAnimationsAsync()` function.');\n }\n }\n build(animation) {\n const id = this._nextAnimationId;\n this._nextAnimationId++;\n const entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n }\n static {\n this.ɵfac = function BrowserAnimationBuilder_Factory(t) {\n return new (t || BrowserAnimationBuilder)(i0.ɵɵinject(i0.RendererFactory2), i0.ɵɵinject(DOCUMENT));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: BrowserAnimationBuilder,\n factory: BrowserAnimationBuilder.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return BrowserAnimationBuilder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass BrowserAnimationFactory extends AnimationFactory {\n constructor(_id, _renderer) {\n super();\n this._id = _id;\n this._renderer = _renderer;\n }\n create(element, options) {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n }\n}\nclass RendererAnimationPlayer {\n constructor(id, element, options, _renderer) {\n this.id = id;\n this.element = element;\n this._renderer = _renderer;\n this.parentPlayer = null;\n this._started = false;\n this.totalTime = 0;\n this._command('create', options);\n }\n _listen(eventName, callback) {\n return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n }\n _command(command, ...args) {\n issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n }\n onDone(fn) {\n this._listen('done', fn);\n }\n onStart(fn) {\n this._listen('start', fn);\n }\n onDestroy(fn) {\n this._listen('destroy', fn);\n }\n init() {\n this._command('init');\n }\n hasStarted() {\n return this._started;\n }\n play() {\n this._command('play');\n this._started = true;\n }\n pause() {\n this._command('pause');\n }\n restart() {\n this._command('restart');\n }\n finish() {\n this._command('finish');\n }\n destroy() {\n this._command('destroy');\n }\n reset() {\n this._command('reset');\n this._started = false;\n }\n setPosition(p) {\n this._command('setPosition', p);\n }\n getPosition() {\n return unwrapAnimationRenderer(this._renderer)?.engine?.players[this.id]?.getPosition() ?? 0;\n }\n}\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n/**\n * The following 2 methods cannot reference their correct types (AnimationRenderer &\n * DynamicDelegationRenderer) since this would introduce a import cycle.\n */\nfunction unwrapAnimationRenderer(renderer) {\n const type = renderer.ɵtype;\n if (type === 0 /* AnimationRendererType.Regular */) {\n return renderer;\n } else if (type === 1 /* AnimationRendererType.Delegated */) {\n return renderer.animationRenderer;\n }\n return null;\n}\nfunction isAnimationRenderer(renderer) {\n const type = renderer.ɵtype;\n return type === 0 /* AnimationRendererType.Regular */ || type === 1 /* AnimationRendererType.Delegated */;\n}\n\n/**\n * An empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see {@link animate}\n * @see {@link AnimationPlayer}\n * @see {@link ɵAnimationGroupPlayer AnimationGroupPlayer}\n *\n * @publicApi\n */\nclass NoopAnimationPlayer {\n constructor(duration = 0, delay = 0) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this._started = false;\n this._destroyed = false;\n this._finished = false;\n this._position = 0;\n this.parentPlayer = null;\n this.totalTime = duration + delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n init() {}\n play() {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n }\n /** @internal */\n triggerMicrotask() {\n queueMicrotask(() => this._onFinish());\n }\n _onStart() {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n pause() {}\n restart() {}\n finish() {\n this._onFinish();\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this._started = false;\n this._finished = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n setPosition(position) {\n this._position = this.totalTime ? position * this.totalTime : 1;\n }\n getPosition() {\n return this.totalTime ? this._position / this.totalTime : 1;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see {@link AnimationPlayer}\n * @see {@link animations/group group}\n *\n */\nclass AnimationGroupPlayer {\n constructor(_players) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this._onDestroyFns = [];\n this.parentPlayer = null;\n this.totalTime = 0;\n this.players = _players;\n let doneCount = 0;\n let destroyCount = 0;\n let startCount = 0;\n const total = this.players.length;\n if (total == 0) {\n queueMicrotask(() => this._onFinish());\n } else {\n this.players.forEach(player => {\n player.onDone(() => {\n if (++doneCount == total) {\n this._onFinish();\n }\n });\n player.onDestroy(() => {\n if (++destroyCount == total) {\n this._onDestroy();\n }\n });\n player.onStart(() => {\n if (++startCount == total) {\n this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this.players.forEach(player => player.init());\n }\n onStart(fn) {\n this._onStartFns.push(fn);\n }\n _onStart() {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n }\n onDone(fn) {\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n play() {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach(player => player.play());\n }\n pause() {\n this.players.forEach(player => player.pause());\n }\n restart() {\n this.players.forEach(player => player.restart());\n }\n finish() {\n this._onFinish();\n this.players.forEach(player => player.finish());\n }\n destroy() {\n this._onDestroy();\n }\n _onDestroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach(player => player.destroy());\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this.players.forEach(player => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n setPosition(p) {\n const timeAtPosition = p * this.totalTime;\n this.players.forEach(player => {\n const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n }\n getPosition() {\n const longestPlayer = this.players.reduce((longestSoFar, player) => {\n const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime;\n return newPlayerIsLongest ? player : longestSoFar;\n }, null);\n return longestPlayer != null ? longestPlayer.getPosition() : 0;\n }\n beforeDestroy() {\n this.players.forEach(player => {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\nconst ɵPRE_STYLE = '!';\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AUTO_STYLE, AnimationBuilder, AnimationFactory, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, ɵPRE_STYLE };\n","import * as i0 from '@angular/core';\nimport { Directive, InjectionToken, inject, Injectable, ComponentFactoryResolver, ApplicationRef, SecurityContext, Injector, Inject, Component, HostBinding, HostListener, makeEnvironmentProviders, NgModule } from '@angular/core';\nimport { style, state, animate, transition, trigger } from '@angular/animations';\nimport { DOCUMENT, NgIf } from '@angular/common';\nimport { Subject } from 'rxjs';\nimport * as i2 from '@angular/platform-browser';\nconst _c0 = [\"toast-component\", \"\"];\nfunction Toast_button_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 5);\n i0.ɵɵlistener(\"click\", function Toast_button_0_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r5 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r5.remove());\n });\n i0.ɵɵelementStart(1, \"span\", 6);\n i0.ɵɵtext(2, \"\\xD7\");\n i0.ɵɵelementEnd()();\n }\n}\nfunction Toast_div_1_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r7 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\"[\", ctx_r7.duplicatesCount + 1, \"]\");\n }\n}\nfunction Toast_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtext(1);\n i0.ɵɵtemplate(2, Toast_div_1_ng_container_2_Template, 2, 1, \"ng-container\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r1.options.titleClass);\n i0.ɵɵattribute(\"aria-label\", ctx_r1.title);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.title, \" \");\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.duplicatesCount);\n }\n}\nfunction Toast_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 7);\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r2.options.messageClass);\n i0.ɵɵproperty(\"innerHTML\", ctx_r2.message, i0.ɵɵsanitizeHtml);\n }\n}\nfunction Toast_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 8);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r3.options.messageClass);\n i0.ɵɵattribute(\"aria-label\", ctx_r3.message);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx_r3.message, \" \");\n }\n}\nfunction Toast_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵelement(1, \"div\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵstyleProp(\"width\", ctx_r4.width + \"%\");\n }\n}\nfunction ToastNoAnimation_button_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 5);\n i0.ɵɵlistener(\"click\", function ToastNoAnimation_button_0_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r5 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r5.remove());\n });\n i0.ɵɵelementStart(1, \"span\", 6);\n i0.ɵɵtext(2, \"\\xD7\");\n i0.ɵɵelementEnd()();\n }\n}\nfunction ToastNoAnimation_div_1_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r7 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\"[\", ctx_r7.duplicatesCount + 1, \"]\");\n }\n}\nfunction ToastNoAnimation_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtext(1);\n i0.ɵɵtemplate(2, ToastNoAnimation_div_1_ng_container_2_Template, 2, 1, \"ng-container\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r1.options.titleClass);\n i0.ɵɵattribute(\"aria-label\", ctx_r1.title);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.title, \" \");\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.duplicatesCount);\n }\n}\nfunction ToastNoAnimation_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 7);\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r2.options.messageClass);\n i0.ɵɵproperty(\"innerHTML\", ctx_r2.message, i0.ɵɵsanitizeHtml);\n }\n}\nfunction ToastNoAnimation_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 8);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵclassMap(ctx_r3.options.messageClass);\n i0.ɵɵattribute(\"aria-label\", ctx_r3.message);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" \", ctx_r3.message, \" \");\n }\n}\nfunction ToastNoAnimation_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵelement(1, \"div\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵstyleProp(\"width\", ctx_r4.width + \"%\");\n }\n}\nlet ToastContainerDirective = /*#__PURE__*/(() => {\n class ToastContainerDirective {\n el;\n constructor(el) {\n this.el = el;\n }\n getContainerElement() {\n return this.el.nativeElement;\n }\n static ɵfac = function ToastContainerDirective_Factory(t) {\n return new (t || ToastContainerDirective)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n static ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: ToastContainerDirective,\n selectors: [[\"\", \"toastContainer\", \"\"]],\n exportAs: [\"toastContainer\"],\n standalone: true\n });\n }\n return ToastContainerDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nclass ComponentPortal {\n _attachedHost;\n /** The type of the component that will be instantiated for attachment. */\n component;\n /**\n * [Optional] Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalHost.\n * The origin necessary when the host is outside of the Angular application context.\n */\n viewContainerRef;\n /** Injector used for the instantiation of the component. */\n injector;\n constructor(component, injector) {\n this.component = component;\n this.injector = injector;\n }\n /** Attach this portal to a host. */\n attach(host, newestOnTop) {\n this._attachedHost = host;\n return host.attach(this, newestOnTop);\n }\n /** Detach this portal from its host */\n detach() {\n const host = this._attachedHost;\n if (host) {\n this._attachedHost = undefined;\n return host.detach();\n }\n }\n /** Whether this portal is attached to a host. */\n get isAttached() {\n return this._attachedHost != null;\n }\n /**\n * Sets the PortalHost reference without performing `attach()`. This is used directly by\n * the PortalHost when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host) {\n this._attachedHost = host;\n }\n}\n/**\n * Partial implementation of PortalHost that only deals with attaching a\n * ComponentPortal\n */\nclass BasePortalHost {\n /** The portal currently attached to the host. */\n _attachedPortal;\n /** A function that will permanently dispose this host. */\n _disposeFn;\n attach(portal, newestOnTop) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal, newestOnTop);\n }\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost();\n }\n this._attachedPortal = undefined;\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = undefined;\n }\n }\n setDisposeFn(fn) {\n this._disposeFn = fn;\n }\n}\n\n/**\n * Reference to a toast opened via the Toastr service.\n */\nclass ToastRef {\n _overlayRef;\n /** The instance of component opened into the toast. */\n componentInstance;\n /** Count of duplicates of this toast */\n duplicatesCount = 0;\n /** Subject for notifying the user that the toast has finished closing. */\n _afterClosed = new Subject();\n /** triggered when toast is activated */\n _activate = new Subject();\n /** notifies the toast that it should close before the timeout */\n _manualClose = new Subject();\n /** notifies the toast that it should reset the timeouts */\n _resetTimeout = new Subject();\n /** notifies the toast that it should count a duplicate toast */\n _countDuplicate = new Subject();\n constructor(_overlayRef) {\n this._overlayRef = _overlayRef;\n }\n manualClose() {\n this._manualClose.next();\n this._manualClose.complete();\n }\n manualClosed() {\n return this._manualClose.asObservable();\n }\n timeoutReset() {\n return this._resetTimeout.asObservable();\n }\n countDuplicate() {\n return this._countDuplicate.asObservable();\n }\n /**\n * Close the toast.\n */\n close() {\n this._overlayRef.detach();\n this._afterClosed.next();\n this._manualClose.next();\n this._afterClosed.complete();\n this._manualClose.complete();\n this._activate.complete();\n this._resetTimeout.complete();\n this._countDuplicate.complete();\n }\n /** Gets an observable that is notified when the toast is finished closing. */\n afterClosed() {\n return this._afterClosed.asObservable();\n }\n isInactive() {\n return this._activate.isStopped;\n }\n activate() {\n this._activate.next();\n this._activate.complete();\n }\n /** Gets an observable that is notified when the toast has started opening. */\n afterActivate() {\n return this._activate.asObservable();\n }\n /** Reset the toast timouts and count duplicates */\n onDuplicate(resetTimeout, countDuplicate) {\n if (resetTimeout) {\n this._resetTimeout.next();\n }\n if (countDuplicate) {\n this._countDuplicate.next(++this.duplicatesCount);\n }\n }\n}\n\n/**\n * Everything a toast needs to launch\n */\nclass ToastPackage {\n toastId;\n config;\n message;\n title;\n toastType;\n toastRef;\n _onTap = new Subject();\n _onAction = new Subject();\n constructor(toastId, config, message, title, toastType, toastRef) {\n this.toastId = toastId;\n this.config = config;\n this.message = message;\n this.title = title;\n this.toastType = toastType;\n this.toastRef = toastRef;\n this.toastRef.afterClosed().subscribe(() => {\n this._onAction.complete();\n this._onTap.complete();\n });\n }\n /** Fired on click */\n triggerTap() {\n this._onTap.next();\n if (this.config.tapToDismiss) {\n this._onTap.complete();\n }\n }\n onTap() {\n return this._onTap.asObservable();\n }\n /** available for use in custom toast */\n triggerAction(action) {\n this._onAction.next(action);\n }\n onAction() {\n return this._onAction.asObservable();\n }\n}\nconst DefaultNoComponentGlobalConfig = {\n maxOpened: 0,\n autoDismiss: false,\n newestOnTop: true,\n preventDuplicates: false,\n countDuplicates: false,\n resetTimeoutOnDuplicate: false,\n includeTitleDuplicates: false,\n iconClasses: {\n error: 'toast-error',\n info: 'toast-info',\n success: 'toast-success',\n warning: 'toast-warning'\n },\n // Individual\n closeButton: false,\n disableTimeOut: false,\n timeOut: 5000,\n extendedTimeOut: 1000,\n enableHtml: false,\n progressBar: false,\n toastClass: 'ngx-toastr',\n positionClass: 'toast-top-right',\n titleClass: 'toast-title',\n messageClass: 'toast-message',\n easing: 'ease-in',\n easeTime: 300,\n tapToDismiss: true,\n onActivateTick: false,\n progressAnimation: 'decreasing'\n};\nconst TOAST_CONFIG = new InjectionToken('ToastConfig');\n\n/**\n * A PortalHost for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n *\n * This is the only part of the portal core that directly touches the DOM.\n */\nclass DomPortalHost extends BasePortalHost {\n _hostDomElement;\n _componentFactoryResolver;\n _appRef;\n constructor(_hostDomElement, _componentFactoryResolver, _appRef) {\n super();\n this._hostDomElement = _hostDomElement;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n */\n attachComponentPortal(portal, newestOnTop) {\n const componentFactory = this._componentFactoryResolver.resolveComponentFactory(portal.component);\n let componentRef;\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the ChangeDetector for that component to the application (which\n // happens automatically when using a ViewContainer).\n componentRef = componentFactory.create(portal.injector);\n // When creating a component outside of a ViewContainer, we need to manually register\n // its ChangeDetector with the application. This API is unfortunately not yet published\n // in Angular core. The change detector must also be deregistered when the component\n // is destroyed to prevent memory leaks.\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n if (newestOnTop) {\n this._hostDomElement.insertBefore(this._getComponentRootNode(componentRef), this._hostDomElement.firstChild);\n } else {\n this._hostDomElement.appendChild(this._getComponentRootNode(componentRef));\n }\n return componentRef;\n }\n /** Gets the root HTMLElement for an instantiated component. */\n _getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }\n}\n\n/** Container inside which all toasts will render. */\nlet OverlayContainer = /*#__PURE__*/(() => {\n class OverlayContainer {\n _document = inject(DOCUMENT);\n _containerElement;\n ngOnDestroy() {\n if (this._containerElement && this._containerElement.parentNode) {\n this._containerElement.parentNode.removeChild(this._containerElement);\n }\n }\n /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @returns the container element\n */\n getContainerElement() {\n if (!this._containerElement) {\n this._createContainer();\n }\n return this._containerElement;\n }\n /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body\n * and 'aria-live=\"polite\"'\n */\n _createContainer() {\n const container = this._document.createElement('div');\n container.classList.add('overlay-container');\n container.setAttribute('aria-live', 'polite');\n this._document.body.appendChild(container);\n this._containerElement = container;\n }\n static ɵfac = function OverlayContainer_Factory(t) {\n return new (t || OverlayContainer)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: OverlayContainer,\n factory: OverlayContainer.ɵfac,\n providedIn: 'root'\n });\n }\n return OverlayContainer;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nclass OverlayRef {\n _portalHost;\n constructor(_portalHost) {\n this._portalHost = _portalHost;\n }\n attach(portal, newestOnTop = true) {\n return this._portalHost.attach(portal, newestOnTop);\n }\n /**\n * Detaches an overlay from a portal.\n * @returns Resolves when the overlay has been detached.\n */\n detach() {\n return this._portalHost.detach();\n }\n}\n\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalHost, so any kind of Portal can be loaded into one.\n */\nlet Overlay = /*#__PURE__*/(() => {\n class Overlay {\n _overlayContainer = inject(OverlayContainer);\n _componentFactoryResolver = inject(ComponentFactoryResolver);\n _appRef = inject(ApplicationRef);\n _document = inject(DOCUMENT);\n // Namespace panes by overlay container\n _paneElements = new Map();\n /**\n * Creates an overlay.\n * @returns A reference to the created overlay.\n */\n create(positionClass, overlayContainer) {\n // get existing pane if possible\n return this._createOverlayRef(this.getPaneElement(positionClass, overlayContainer));\n }\n getPaneElement(positionClass = '', overlayContainer) {\n if (!this._paneElements.get(overlayContainer)) {\n this._paneElements.set(overlayContainer, {});\n }\n if (!this._paneElements.get(overlayContainer)[positionClass]) {\n this._paneElements.get(overlayContainer)[positionClass] = this._createPaneElement(positionClass, overlayContainer);\n }\n return this._paneElements.get(overlayContainer)[positionClass];\n }\n /**\n * Creates the DOM element for an overlay and appends it to the overlay container.\n * @returns Newly-created pane element\n */\n _createPaneElement(positionClass, overlayContainer) {\n const pane = this._document.createElement('div');\n pane.id = 'toast-container';\n pane.classList.add(positionClass);\n pane.classList.add('toast-container');\n if (!overlayContainer) {\n this._overlayContainer.getContainerElement().appendChild(pane);\n } else {\n overlayContainer.getContainerElement().appendChild(pane);\n }\n return pane;\n }\n /**\n * Create a DomPortalHost into which the overlay content can be loaded.\n * @param pane The DOM element to turn into a portal host.\n * @returns A portal host for the given DOM element.\n */\n _createPortalHost(pane) {\n return new DomPortalHost(pane, this._componentFactoryResolver, this._appRef);\n }\n /**\n * Creates an OverlayRef for an overlay in the given DOM element.\n * @param pane DOM element for the overlay\n */\n _createOverlayRef(pane) {\n return new OverlayRef(this._createPortalHost(pane));\n }\n static ɵfac = function Overlay_Factory(t) {\n return new (t || Overlay)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Overlay,\n factory: Overlay.ɵfac,\n providedIn: 'root'\n });\n }\n return Overlay;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ToastrService = /*#__PURE__*/(() => {\n class ToastrService {\n overlay;\n _injector;\n sanitizer;\n ngZone;\n toastrConfig;\n currentlyActive = 0;\n toasts = [];\n overlayContainer;\n previousToastMessage;\n index = 0;\n constructor(token, overlay, _injector, sanitizer, ngZone) {\n this.overlay = overlay;\n this._injector = _injector;\n this.sanitizer = sanitizer;\n this.ngZone = ngZone;\n this.toastrConfig = {\n ...token.default,\n ...token.config\n };\n if (token.config.iconClasses) {\n this.toastrConfig.iconClasses = {\n ...token.default.iconClasses,\n ...token.config.iconClasses\n };\n }\n }\n /** show toast */\n show(message, title, override = {}, type = '') {\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show successful toast */\n success(message, title, override = {}) {\n const type = this.toastrConfig.iconClasses.success || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show error toast */\n error(message, title, override = {}) {\n const type = this.toastrConfig.iconClasses.error || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show info toast */\n info(message, title, override = {}) {\n const type = this.toastrConfig.iconClasses.info || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show warning toast */\n warning(message, title, override = {}) {\n const type = this.toastrConfig.iconClasses.warning || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /**\n * Remove all or a single toast by id\n */\n clear(toastId) {\n // Call every toastRef manualClose function\n for (const toast of this.toasts) {\n if (toastId !== undefined) {\n if (toast.toastId === toastId) {\n toast.toastRef.manualClose();\n return;\n }\n } else {\n toast.toastRef.manualClose();\n }\n }\n }\n /**\n * Remove and destroy a single toast by id\n */\n remove(toastId) {\n const found = this._findToast(toastId);\n if (!found) {\n return false;\n }\n found.activeToast.toastRef.close();\n this.toasts.splice(found.index, 1);\n this.currentlyActive = this.currentlyActive - 1;\n if (!this.toastrConfig.maxOpened || !this.toasts.length) {\n return false;\n }\n if (this.currentlyActive < this.toastrConfig.maxOpened && this.toasts[this.currentlyActive]) {\n const p = this.toasts[this.currentlyActive].toastRef;\n if (!p.isInactive()) {\n this.currentlyActive = this.currentlyActive + 1;\n p.activate();\n }\n }\n return true;\n }\n /**\n * Determines if toast message is already shown\n */\n findDuplicate(title = '', message = '', resetOnDuplicate, countDuplicates) {\n const {\n includeTitleDuplicates\n } = this.toastrConfig;\n for (const toast of this.toasts) {\n const hasDuplicateTitle = includeTitleDuplicates && toast.title === title;\n if ((!includeTitleDuplicates || hasDuplicateTitle) && toast.message === message) {\n toast.toastRef.onDuplicate(resetOnDuplicate, countDuplicates);\n return toast;\n }\n }\n return null;\n }\n /** create a clone of global config and apply individual settings */\n applyConfig(override = {}) {\n return {\n ...this.toastrConfig,\n ...override\n };\n }\n /**\n * Find toast object by id\n */\n _findToast(toastId) {\n for (let i = 0; i < this.toasts.length; i++) {\n if (this.toasts[i].toastId === toastId) {\n return {\n index: i,\n activeToast: this.toasts[i]\n };\n }\n }\n return null;\n }\n /**\n * Determines the need to run inside angular's zone then builds the toast\n */\n _preBuildNotification(toastType, message, title, config) {\n if (config.onActivateTick) {\n return this.ngZone.run(() => this._buildNotification(toastType, message, title, config));\n }\n return this._buildNotification(toastType, message, title, config);\n }\n /**\n * Creates and attaches toast data to component\n * returns the active toast, or in case preventDuplicates is enabled the original/non-duplicate active toast.\n */\n _buildNotification(toastType, message, title, config) {\n if (!config.toastComponent) {\n throw new Error('toastComponent required');\n }\n // max opened and auto dismiss = true\n // if timeout = 0 resetting it would result in setting this.hideTime = Date.now(). Hence, we only want to reset timeout if there is\n // a timeout at all\n const duplicate = this.findDuplicate(title, message, this.toastrConfig.resetTimeoutOnDuplicate && config.timeOut > 0, this.toastrConfig.countDuplicates);\n if ((this.toastrConfig.includeTitleDuplicates && title || message) && this.toastrConfig.preventDuplicates && duplicate !== null) {\n return duplicate;\n }\n this.previousToastMessage = message;\n let keepInactive = false;\n if (this.toastrConfig.maxOpened && this.currentlyActive >= this.toastrConfig.maxOpened) {\n keepInactive = true;\n if (this.toastrConfig.autoDismiss) {\n this.clear(this.toasts[0].toastId);\n }\n }\n const overlayRef = this.overlay.create(config.positionClass, this.overlayContainer);\n this.index = this.index + 1;\n let sanitizedMessage = message;\n if (message && config.enableHtml) {\n sanitizedMessage = this.sanitizer.sanitize(SecurityContext.HTML, message);\n }\n const toastRef = new ToastRef(overlayRef);\n const toastPackage = new ToastPackage(this.index, config, sanitizedMessage, title, toastType, toastRef);\n /** New injector that contains an instance of `ToastPackage`. */\n const providers = [{\n provide: ToastPackage,\n useValue: toastPackage\n }];\n const toastInjector = Injector.create({\n providers,\n parent: this._injector\n });\n const component = new ComponentPortal(config.toastComponent, toastInjector);\n const portal = overlayRef.attach(component, config.newestOnTop);\n toastRef.componentInstance = portal.instance;\n const ins = {\n toastId: this.index,\n title: title || '',\n message: message || '',\n toastRef,\n onShown: toastRef.afterActivate(),\n onHidden: toastRef.afterClosed(),\n onTap: toastPackage.onTap(),\n onAction: toastPackage.onAction(),\n portal\n };\n if (!keepInactive) {\n this.currentlyActive = this.currentlyActive + 1;\n setTimeout(() => {\n ins.toastRef.activate();\n });\n }\n this.toasts.push(ins);\n return ins;\n }\n static ɵfac = function ToastrService_Factory(t) {\n return new (t || ToastrService)(i0.ɵɵinject(TOAST_CONFIG), i0.ɵɵinject(Overlay), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i2.DomSanitizer), i0.ɵɵinject(i0.NgZone));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ToastrService,\n factory: ToastrService.ɵfac,\n providedIn: 'root'\n });\n }\n return ToastrService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet Toast = /*#__PURE__*/(() => {\n class Toast {\n toastrService;\n toastPackage;\n ngZone;\n message;\n title;\n options;\n duplicatesCount;\n originalTimeout;\n /** width of progress bar */\n width = -1;\n /** a combination of toast type and options.toastClass */\n toastClasses = '';\n /** controls animation */\n state;\n /** hides component when waiting to be displayed */\n get displayStyle() {\n if (this.state.value === 'inactive') {\n return 'none';\n }\n return;\n }\n timeout;\n intervalId;\n hideTime;\n sub;\n sub1;\n sub2;\n sub3;\n constructor(toastrService, toastPackage, ngZone) {\n this.toastrService = toastrService;\n this.toastPackage = toastPackage;\n this.ngZone = ngZone;\n this.message = toastPackage.message;\n this.title = toastPackage.title;\n this.options = toastPackage.config;\n this.originalTimeout = toastPackage.config.timeOut;\n this.toastClasses = `${toastPackage.toastType} ${toastPackage.config.toastClass}`;\n this.sub = toastPackage.toastRef.afterActivate().subscribe(() => {\n this.activateToast();\n });\n this.sub1 = toastPackage.toastRef.manualClosed().subscribe(() => {\n this.remove();\n });\n this.sub2 = toastPackage.toastRef.timeoutReset().subscribe(() => {\n this.resetTimeout();\n });\n this.sub3 = toastPackage.toastRef.countDuplicate().subscribe(count => {\n this.duplicatesCount = count;\n });\n this.state = {\n value: 'inactive',\n params: {\n easeTime: this.toastPackage.config.easeTime,\n easing: 'ease-in'\n }\n };\n }\n ngOnDestroy() {\n this.sub.unsubscribe();\n this.sub1.unsubscribe();\n this.sub2.unsubscribe();\n this.sub3.unsubscribe();\n clearInterval(this.intervalId);\n clearTimeout(this.timeout);\n }\n /**\n * activates toast and sets timeout\n */\n activateToast() {\n this.state = {\n ...this.state,\n value: 'active'\n };\n if (!(this.options.disableTimeOut === true || this.options.disableTimeOut === 'timeOut') && this.options.timeOut) {\n this.outsideTimeout(() => this.remove(), this.options.timeOut);\n this.hideTime = new Date().getTime() + this.options.timeOut;\n if (this.options.progressBar) {\n this.outsideInterval(() => this.updateProgress(), 10);\n }\n }\n }\n /**\n * updates progress bar width\n */\n updateProgress() {\n if (this.width === 0 || this.width === 100 || !this.options.timeOut) {\n return;\n }\n const now = new Date().getTime();\n const remaining = this.hideTime - now;\n this.width = remaining / this.options.timeOut * 100;\n if (this.options.progressAnimation === 'increasing') {\n this.width = 100 - this.width;\n }\n if (this.width <= 0) {\n this.width = 0;\n }\n if (this.width >= 100) {\n this.width = 100;\n }\n }\n resetTimeout() {\n clearTimeout(this.timeout);\n clearInterval(this.intervalId);\n this.state = {\n ...this.state,\n value: 'active'\n };\n this.outsideTimeout(() => this.remove(), this.originalTimeout);\n this.options.timeOut = this.originalTimeout;\n this.hideTime = new Date().getTime() + (this.options.timeOut || 0);\n this.width = -1;\n if (this.options.progressBar) {\n this.outsideInterval(() => this.updateProgress(), 10);\n }\n }\n /**\n * tells toastrService to remove this toast after animation time\n */\n remove() {\n if (this.state.value === 'removed') {\n return;\n }\n clearTimeout(this.timeout);\n this.state = {\n ...this.state,\n value: 'removed'\n };\n this.outsideTimeout(() => this.toastrService.remove(this.toastPackage.toastId), +this.toastPackage.config.easeTime);\n }\n tapToast() {\n if (this.state.value === 'removed') {\n return;\n }\n this.toastPackage.triggerTap();\n if (this.options.tapToDismiss) {\n this.remove();\n }\n }\n stickAround() {\n if (this.state.value === 'removed') {\n return;\n }\n if (this.options.disableTimeOut !== 'extendedTimeOut') {\n clearTimeout(this.timeout);\n this.options.timeOut = 0;\n this.hideTime = 0;\n // disable progressBar\n clearInterval(this.intervalId);\n this.width = 0;\n }\n }\n delayedHideToast() {\n if (this.options.disableTimeOut === true || this.options.disableTimeOut === 'extendedTimeOut' || this.options.extendedTimeOut === 0 || this.state.value === 'removed') {\n return;\n }\n this.outsideTimeout(() => this.remove(), this.options.extendedTimeOut);\n this.options.timeOut = this.options.extendedTimeOut;\n this.hideTime = new Date().getTime() + (this.options.timeOut || 0);\n this.width = -1;\n if (this.options.progressBar) {\n this.outsideInterval(() => this.updateProgress(), 10);\n }\n }\n outsideTimeout(func, timeout) {\n if (this.ngZone) {\n this.ngZone.runOutsideAngular(() => this.timeout = setTimeout(() => this.runInsideAngular(func), timeout));\n } else {\n this.timeout = setTimeout(() => func(), timeout);\n }\n }\n outsideInterval(func, timeout) {\n if (this.ngZone) {\n this.ngZone.runOutsideAngular(() => this.intervalId = setInterval(() => this.runInsideAngular(func), timeout));\n } else {\n this.intervalId = setInterval(() => func(), timeout);\n }\n }\n runInsideAngular(func) {\n if (this.ngZone) {\n this.ngZone.run(() => func());\n } else {\n func();\n }\n }\n static ɵfac = function Toast_Factory(t) {\n return new (t || Toast)(i0.ɵɵdirectiveInject(ToastrService), i0.ɵɵdirectiveInject(ToastPackage), i0.ɵɵdirectiveInject(i0.NgZone));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: Toast,\n selectors: [[\"\", \"toast-component\", \"\"]],\n hostVars: 5,\n hostBindings: function Toast_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function Toast_click_HostBindingHandler() {\n return ctx.tapToast();\n })(\"mouseenter\", function Toast_mouseenter_HostBindingHandler() {\n return ctx.stickAround();\n })(\"mouseleave\", function Toast_mouseleave_HostBindingHandler() {\n return ctx.delayedHideToast();\n });\n }\n if (rf & 2) {\n i0.ɵɵsyntheticHostProperty(\"@flyInOut\", ctx.state);\n i0.ɵɵclassMap(ctx.toastClasses);\n i0.ɵɵstyleProp(\"display\", ctx.displayStyle);\n }\n },\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n attrs: _c0,\n decls: 5,\n vars: 5,\n consts: [[\"type\", \"button\", \"class\", \"toast-close-button\", \"aria-label\", \"Close\", 3, \"click\", 4, \"ngIf\"], [3, \"class\", 4, \"ngIf\"], [\"role\", \"alert\", 3, \"class\", \"innerHTML\", 4, \"ngIf\"], [\"role\", \"alert\", 3, \"class\", 4, \"ngIf\"], [4, \"ngIf\"], [\"type\", \"button\", \"aria-label\", \"Close\", 1, \"toast-close-button\", 3, \"click\"], [\"aria-hidden\", \"true\"], [\"role\", \"alert\", 3, \"innerHTML\"], [\"role\", \"alert\"], [1, \"toast-progress\"]],\n template: function Toast_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, Toast_button_0_Template, 3, 0, \"button\", 0)(1, Toast_div_1_Template, 3, 5, \"div\", 1)(2, Toast_div_2_Template, 1, 3, \"div\", 2)(3, Toast_div_3_Template, 2, 4, \"div\", 3)(4, Toast_div_4_Template, 2, 2, \"div\", 4);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.options.closeButton);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.title);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.message && ctx.options.enableHtml);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.message && !ctx.options.enableHtml);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.options.progressBar);\n }\n },\n dependencies: [NgIf],\n encapsulation: 2,\n data: {\n animation: [trigger('flyInOut', [state('inactive', style({\n opacity: 0\n })), state('active', style({\n opacity: 1\n })), state('removed', style({\n opacity: 0\n })), transition('inactive => active', animate('{{ easeTime }}ms {{ easing }}')), transition('active => removed', animate('{{ easeTime }}ms {{ easing }}'))])]\n }\n });\n }\n return Toast;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DefaultGlobalConfig = {\n ...DefaultNoComponentGlobalConfig,\n toastComponent: Toast\n};\n/**\n * @description\n * Provides the `TOAST_CONFIG` token with the given config.\n *\n * @param config The config to configure toastr.\n * @returns The environment providers.\n *\n * @example\n * ```ts\n * import { provideToastr } from 'ngx-toastr';\n *\n * bootstrap(AppComponent, {\n * providers: [\n * provideToastr({\n * timeOut: 2000,\n * positionClass: 'toast-top-right',\n * }),\n * ],\n * })\n */\nconst provideToastr = (config = {}) => {\n const providers = [{\n provide: TOAST_CONFIG,\n useValue: {\n default: DefaultGlobalConfig,\n config\n }\n }];\n return makeEnvironmentProviders(providers);\n};\nlet ToastrModule = /*#__PURE__*/(() => {\n class ToastrModule {\n static forRoot(config = {}) {\n return {\n ngModule: ToastrModule,\n providers: [provideToastr(config)]\n };\n }\n static ɵfac = function ToastrModule_Factory(t) {\n return new (t || ToastrModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ToastrModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n return ToastrModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ToastrComponentlessModule = /*#__PURE__*/(() => {\n class ToastrComponentlessModule {\n static forRoot(config = {}) {\n return {\n ngModule: ToastrModule,\n providers: [{\n provide: TOAST_CONFIG,\n useValue: {\n default: DefaultNoComponentGlobalConfig,\n config\n }\n }]\n };\n }\n static ɵfac = function ToastrComponentlessModule_Factory(t) {\n return new (t || ToastrComponentlessModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ToastrComponentlessModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n return ToastrComponentlessModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ToastNoAnimation = /*#__PURE__*/(() => {\n class ToastNoAnimation {\n toastrService;\n toastPackage;\n appRef;\n message;\n title;\n options;\n duplicatesCount;\n originalTimeout;\n /** width of progress bar */\n width = -1;\n /** a combination of toast type and options.toastClass */\n toastClasses = '';\n /** hides component when waiting to be displayed */\n get displayStyle() {\n if (this.state === 'inactive') {\n return 'none';\n }\n return null;\n }\n /** controls animation */\n state = 'inactive';\n timeout;\n intervalId;\n hideTime;\n sub;\n sub1;\n sub2;\n sub3;\n constructor(toastrService, toastPackage, appRef) {\n this.toastrService = toastrService;\n this.toastPackage = toastPackage;\n this.appRef = appRef;\n this.message = toastPackage.message;\n this.title = toastPackage.title;\n this.options = toastPackage.config;\n this.originalTimeout = toastPackage.config.timeOut;\n this.toastClasses = `${toastPackage.toastType} ${toastPackage.config.toastClass}`;\n this.sub = toastPackage.toastRef.afterActivate().subscribe(() => {\n this.activateToast();\n });\n this.sub1 = toastPackage.toastRef.manualClosed().subscribe(() => {\n this.remove();\n });\n this.sub2 = toastPackage.toastRef.timeoutReset().subscribe(() => {\n this.resetTimeout();\n });\n this.sub3 = toastPackage.toastRef.countDuplicate().subscribe(count => {\n this.duplicatesCount = count;\n });\n }\n ngOnDestroy() {\n this.sub.unsubscribe();\n this.sub1.unsubscribe();\n this.sub2.unsubscribe();\n this.sub3.unsubscribe();\n clearInterval(this.intervalId);\n clearTimeout(this.timeout);\n }\n /**\n * activates toast and sets timeout\n */\n activateToast() {\n this.state = 'active';\n if (!(this.options.disableTimeOut === true || this.options.disableTimeOut === 'timeOut') && this.options.timeOut) {\n this.timeout = setTimeout(() => {\n this.remove();\n }, this.options.timeOut);\n this.hideTime = new Date().getTime() + this.options.timeOut;\n if (this.options.progressBar) {\n this.intervalId = setInterval(() => this.updateProgress(), 10);\n }\n }\n if (this.options.onActivateTick) {\n this.appRef.tick();\n }\n }\n /**\n * updates progress bar width\n */\n updateProgress() {\n if (this.width === 0 || this.width === 100 || !this.options.timeOut) {\n return;\n }\n const now = new Date().getTime();\n const remaining = this.hideTime - now;\n this.width = remaining / this.options.timeOut * 100;\n if (this.options.progressAnimation === 'increasing') {\n this.width = 100 - this.width;\n }\n if (this.width <= 0) {\n this.width = 0;\n }\n if (this.width >= 100) {\n this.width = 100;\n }\n }\n resetTimeout() {\n clearTimeout(this.timeout);\n clearInterval(this.intervalId);\n this.state = 'active';\n this.options.timeOut = this.originalTimeout;\n this.timeout = setTimeout(() => this.remove(), this.originalTimeout);\n this.hideTime = new Date().getTime() + (this.originalTimeout || 0);\n this.width = -1;\n if (this.options.progressBar) {\n this.intervalId = setInterval(() => this.updateProgress(), 10);\n }\n }\n /**\n * tells toastrService to remove this toast after animation time\n */\n remove() {\n if (this.state === 'removed') {\n return;\n }\n clearTimeout(this.timeout);\n this.state = 'removed';\n this.timeout = setTimeout(() => this.toastrService.remove(this.toastPackage.toastId));\n }\n tapToast() {\n if (this.state === 'removed') {\n return;\n }\n this.toastPackage.triggerTap();\n if (this.options.tapToDismiss) {\n this.remove();\n }\n }\n stickAround() {\n if (this.state === 'removed') {\n return;\n }\n clearTimeout(this.timeout);\n this.options.timeOut = 0;\n this.hideTime = 0;\n // disable progressBar\n clearInterval(this.intervalId);\n this.width = 0;\n }\n delayedHideToast() {\n if (this.options.disableTimeOut === true || this.options.disableTimeOut === 'extendedTimeOut' || this.options.extendedTimeOut === 0 || this.state === 'removed') {\n return;\n }\n this.timeout = setTimeout(() => this.remove(), this.options.extendedTimeOut);\n this.options.timeOut = this.options.extendedTimeOut;\n this.hideTime = new Date().getTime() + (this.options.timeOut || 0);\n this.width = -1;\n if (this.options.progressBar) {\n this.intervalId = setInterval(() => this.updateProgress(), 10);\n }\n }\n static ɵfac = function ToastNoAnimation_Factory(t) {\n return new (t || ToastNoAnimation)(i0.ɵɵdirectiveInject(ToastrService), i0.ɵɵdirectiveInject(ToastPackage), i0.ɵɵdirectiveInject(i0.ApplicationRef));\n };\n static ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ToastNoAnimation,\n selectors: [[\"\", \"toast-component\", \"\"]],\n hostVars: 4,\n hostBindings: function ToastNoAnimation_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function ToastNoAnimation_click_HostBindingHandler() {\n return ctx.tapToast();\n })(\"mouseenter\", function ToastNoAnimation_mouseenter_HostBindingHandler() {\n return ctx.stickAround();\n })(\"mouseleave\", function ToastNoAnimation_mouseleave_HostBindingHandler() {\n return ctx.delayedHideToast();\n });\n }\n if (rf & 2) {\n i0.ɵɵclassMap(ctx.toastClasses);\n i0.ɵɵstyleProp(\"display\", ctx.displayStyle);\n }\n },\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n attrs: _c0,\n decls: 5,\n vars: 5,\n consts: [[\"type\", \"button\", \"class\", \"toast-close-button\", \"aria-label\", \"Close\", 3, \"click\", 4, \"ngIf\"], [3, \"class\", 4, \"ngIf\"], [\"role\", \"alert\", 3, \"class\", \"innerHTML\", 4, \"ngIf\"], [\"role\", \"alert\", 3, \"class\", 4, \"ngIf\"], [4, \"ngIf\"], [\"type\", \"button\", \"aria-label\", \"Close\", 1, \"toast-close-button\", 3, \"click\"], [\"aria-hidden\", \"true\"], [\"role\", \"alert\", 3, \"innerHTML\"], [\"role\", \"alert\"], [1, \"toast-progress\"]],\n template: function ToastNoAnimation_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, ToastNoAnimation_button_0_Template, 3, 0, \"button\", 0)(1, ToastNoAnimation_div_1_Template, 3, 5, \"div\", 1)(2, ToastNoAnimation_div_2_Template, 1, 3, \"div\", 2)(3, ToastNoAnimation_div_3_Template, 2, 4, \"div\", 3)(4, ToastNoAnimation_div_4_Template, 2, 2, \"div\", 4);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.options.closeButton);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.title);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.message && ctx.options.enableHtml);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.message && !ctx.options.enableHtml);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.options.progressBar);\n }\n },\n dependencies: [NgIf],\n encapsulation: 2\n });\n }\n return ToastNoAnimation;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DefaultNoAnimationsGlobalConfig = {\n ...DefaultNoComponentGlobalConfig,\n toastComponent: ToastNoAnimation\n};\nlet ToastNoAnimationModule = /*#__PURE__*/(() => {\n class ToastNoAnimationModule {\n static forRoot(config = {}) {\n return {\n ngModule: ToastNoAnimationModule,\n providers: [{\n provide: TOAST_CONFIG,\n useValue: {\n default: DefaultNoAnimationsGlobalConfig,\n config\n }\n }]\n };\n }\n static ɵfac = function ToastNoAnimationModule_Factory(t) {\n return new (t || ToastNoAnimationModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ToastNoAnimationModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n return ToastNoAnimationModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BasePortalHost, ComponentPortal, DefaultGlobalConfig, DefaultNoAnimationsGlobalConfig, DefaultNoComponentGlobalConfig, Overlay, OverlayContainer, OverlayRef, TOAST_CONFIG, Toast, ToastContainerDirective, ToastNoAnimation, ToastNoAnimationModule, ToastPackage, ToastRef, ToastrComponentlessModule, ToastrModule, ToastrService, provideToastr };\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n/** Error thrown when an HTTP request fails. */\nexport class HttpError extends Error {\n /** Constructs a new instance of {@link @microsoft/signalr.HttpError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n * @param {number} statusCode The HTTP status code represented by this error.\r\n */\n constructor(errorMessage, statusCode) {\n const trueProto = new.target.prototype;\n super(`${errorMessage}: Status code '${statusCode}'`);\n this.statusCode = statusCode;\n // Workaround issue in Typescript compiler\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\n this.__proto__ = trueProto;\n }\n}\n/** Error thrown when a timeout elapses. */\nexport class TimeoutError extends Error {\n /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\n constructor(errorMessage = \"A timeout occurred.\") {\n const trueProto = new.target.prototype;\n super(errorMessage);\n // Workaround issue in Typescript compiler\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\n this.__proto__ = trueProto;\n }\n}\n/** Error thrown when an action is aborted. */\nexport class AbortError extends Error {\n /** Constructs a new instance of {@link AbortError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\n constructor(errorMessage = \"An abort occurred.\") {\n const trueProto = new.target.prototype;\n super(errorMessage);\n // Workaround issue in Typescript compiler\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\n this.__proto__ = trueProto;\n }\n}\n/** Error thrown when the selected transport is unsupported by the browser. */\n/** @private */\nexport class UnsupportedTransportError extends Error {\n /** Constructs a new instance of {@link @microsoft/signalr.UnsupportedTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\n constructor(message, transport) {\n const trueProto = new.target.prototype;\n super(message);\n this.transport = transport;\n this.errorType = 'UnsupportedTransportError';\n // Workaround issue in Typescript compiler\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\n this.__proto__ = trueProto;\n }\n}\n/** Error thrown when the selected transport is disabled by the browser. */\n/** @private */\nexport class DisabledTransportError extends Error {\n /** Constructs a new instance of {@link @microsoft/signalr.DisabledTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\n constructor(message, transport) {\n const trueProto = new.target.prototype;\n super(message);\n this.transport = transport;\n this.errorType = 'DisabledTransportError';\n // Workaround issue in Typescript compiler\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\n this.__proto__ = trueProto;\n }\n}\n/** Error thrown when the selected transport cannot be started. */\n/** @private */\nexport class FailedToStartTransportError extends Error {\n /** Constructs a new instance of {@link @microsoft/signalr.FailedToStartTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\n constructor(message, transport) {\n const trueProto = new.target.prototype;\n super(message);\n this.transport = transport;\n this.errorType = 'FailedToStartTransportError';\n // Workaround issue in Typescript compiler\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\n this.__proto__ = trueProto;\n }\n}\n/** Error thrown when the negotiation with the server failed to complete. */\n/** @private */\nexport class FailedToNegotiateWithServerError extends Error {\n /** Constructs a new instance of {@link @microsoft/signalr.FailedToNegotiateWithServerError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n */\n constructor(message) {\n const trueProto = new.target.prototype;\n super(message);\n this.errorType = 'FailedToNegotiateWithServerError';\n // Workaround issue in Typescript compiler\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\n this.__proto__ = trueProto;\n }\n}\n/** Error thrown when multiple errors have occurred. */\n/** @private */\nexport class AggregateErrors extends Error {\n /** Constructs a new instance of {@link @microsoft/signalr.AggregateErrors}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {Error[]} innerErrors The collection of errors this error is aggregating.\r\n */\n constructor(message, innerErrors) {\n const trueProto = new.target.prototype;\n super(message);\n this.innerErrors = innerErrors;\n // Workaround issue in Typescript compiler\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\n this.__proto__ = trueProto;\n }\n}\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n/** Represents an HTTP response. */\nexport class HttpResponse {\n constructor(statusCode, statusText, content) {\n this.statusCode = statusCode;\n this.statusText = statusText;\n this.content = content;\n }\n}\n/** Abstraction over an HTTP client.\r\n *\r\n * This class provides an abstraction over an HTTP client so that a different implementation can be provided on different platforms.\r\n */\nexport class HttpClient {\n get(url, options) {\n return this.send({\n ...options,\n method: \"GET\",\n url\n });\n }\n post(url, options) {\n return this.send({\n ...options,\n method: \"POST\",\n url\n });\n }\n delete(url, options) {\n return this.send({\n ...options,\n method: \"DELETE\",\n url\n });\n }\n /** Gets all cookies that apply to the specified URL.\r\n *\r\n * @param url The URL that the cookies are valid for.\r\n * @returns {string} A string containing all the key-value cookie pairs for the specified URL.\r\n */\n // @ts-ignore\n getCookieString(url) {\n return \"\";\n }\n}\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n// These values are designed to match the ASP.NET Log Levels since that's the pattern we're emulating here.\n/** Indicates the severity of a log message.\r\n *\r\n * Log Levels are ordered in increasing severity. So `Debug` is more severe than `Trace`, etc.\r\n */\nexport var LogLevel = /*#__PURE__*/function (LogLevel) {\n /** Log level for very low severity diagnostic messages. */\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\n /** Log level for low severity diagnostic messages. */\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\n /** Log level for informational diagnostic messages. */\n LogLevel[LogLevel[\"Information\"] = 2] = \"Information\";\n /** Log level for diagnostic messages that indicate a non-fatal problem. */\n LogLevel[LogLevel[\"Warning\"] = 3] = \"Warning\";\n /** Log level for diagnostic messages that indicate a failure in the current operation. */\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\n /** Log level for diagnostic messages that indicate a failure that will terminate the entire application. */\n LogLevel[LogLevel[\"Critical\"] = 5] = \"Critical\";\n /** The highest possible log level. Used when configuring logging to indicate that no log messages should be emitted. */\n LogLevel[LogLevel[\"None\"] = 6] = \"None\";\n return LogLevel;\n}(LogLevel || {});\n\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n/** A logger that does nothing when log messages are sent to it. */\nexport class NullLogger {\n constructor() {}\n /** @inheritDoc */\n // eslint-disable-next-line\n log(_logLevel, _message) {}\n}\n/** The singleton instance of the {@link @microsoft/signalr.NullLogger}. */\nNullLogger.instance = new NullLogger();\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\nimport { LogLevel } from \"./ILogger\";\nimport { NullLogger } from \"./Loggers\";\n// Version token that will be replaced by the prepack command\n/** The version of the SignalR client. */\nexport const VERSION = \"7.0.12\";\n/** @private */\nexport class Arg {\n static isRequired(val, name) {\n if (val === null || val === undefined) {\n throw new Error(`The '${name}' argument is required.`);\n }\n }\n static isNotEmpty(val, name) {\n if (!val || val.match(/^\\s*$/)) {\n throw new Error(`The '${name}' argument should not be empty.`);\n }\n }\n static isIn(val, values, name) {\n // TypeScript enums have keys for **both** the name and the value of each enum member on the type itself.\n if (!(val in values)) {\n throw new Error(`Unknown ${name} value: ${val}.`);\n }\n }\n}\n/** @private */\nexport class Platform {\n // react-native has a window but no document so we should check both\n static get isBrowser() {\n return typeof window === \"object\" && typeof window.document === \"object\";\n }\n // WebWorkers don't have a window object so the isBrowser check would fail\n static get isWebWorker() {\n return typeof self === \"object\" && \"importScripts\" in self;\n }\n // react-native has a window but no document\n static get isReactNative() {\n return typeof window === \"object\" && typeof window.document === \"undefined\";\n }\n // Node apps shouldn't have a window object, but WebWorkers don't either\n // so we need to check for both WebWorker and window\n static get isNode() {\n return !this.isBrowser && !this.isWebWorker && !this.isReactNative;\n }\n}\n/** @private */\nexport function getDataDetail(data, includeContent) {\n let detail = \"\";\n if (isArrayBuffer(data)) {\n detail = `Binary data of length ${data.byteLength}`;\n if (includeContent) {\n detail += `. Content: '${formatArrayBuffer(data)}'`;\n }\n } else if (typeof data === \"string\") {\n detail = `String data of length ${data.length}`;\n if (includeContent) {\n detail += `. Content: '${data}'`;\n }\n }\n return detail;\n}\n/** @private */\nexport function formatArrayBuffer(data) {\n const view = new Uint8Array(data);\n // Uint8Array.map only supports returning another Uint8Array?\n let str = \"\";\n view.forEach(num => {\n const pad = num < 16 ? \"0\" : \"\";\n str += `0x${pad}${num.toString(16)} `;\n });\n // Trim of trailing space.\n return str.substr(0, str.length - 1);\n}\n// Also in signalr-protocol-msgpack/Utils.ts\n/** @private */\nexport function isArrayBuffer(val) {\n return val && typeof ArrayBuffer !== \"undefined\" && (val instanceof ArrayBuffer ||\n // Sometimes we get an ArrayBuffer that doesn't satisfy instanceof\n val.constructor && val.constructor.name === \"ArrayBuffer\");\n}\n/** @private */\nexport async function sendMessage(logger, transportName, httpClient, url, content, options) {\n const headers = {};\n const [name, value] = getUserAgentHeader();\n headers[name] = value;\n logger.log(LogLevel.Trace, `(${transportName} transport) sending data. ${getDataDetail(content, options.logMessageContent)}.`);\n const responseType = isArrayBuffer(content) ? \"arraybuffer\" : \"text\";\n const response = await httpClient.post(url, {\n content,\n headers: {\n ...headers,\n ...options.headers\n },\n responseType,\n timeout: options.timeout,\n withCredentials: options.withCredentials\n });\n logger.log(LogLevel.Trace, `(${transportName} transport) request complete. Response status: ${response.statusCode}.`);\n}\n/** @private */\nexport function createLogger(logger) {\n if (logger === undefined) {\n return new ConsoleLogger(LogLevel.Information);\n }\n if (logger === null) {\n return NullLogger.instance;\n }\n if (logger.log !== undefined) {\n return logger;\n }\n return new ConsoleLogger(logger);\n}\n/** @private */\nexport class SubjectSubscription {\n constructor(subject, observer) {\n this._subject = subject;\n this._observer = observer;\n }\n dispose() {\n const index = this._subject.observers.indexOf(this._observer);\n if (index > -1) {\n this._subject.observers.splice(index, 1);\n }\n if (this._subject.observers.length === 0 && this._subject.cancelCallback) {\n this._subject.cancelCallback().catch(_ => {});\n }\n }\n}\n/** @private */\nexport class ConsoleLogger {\n constructor(minimumLogLevel) {\n this._minLevel = minimumLogLevel;\n this.out = console;\n }\n log(logLevel, message) {\n if (logLevel >= this._minLevel) {\n const msg = `[${new Date().toISOString()}] ${LogLevel[logLevel]}: ${message}`;\n switch (logLevel) {\n case LogLevel.Critical:\n case LogLevel.Error:\n this.out.error(msg);\n break;\n case LogLevel.Warning:\n this.out.warn(msg);\n break;\n case LogLevel.Information:\n this.out.info(msg);\n break;\n default:\n // console.debug only goes to attached debuggers in Node, so we use console.log for Trace and Debug\n this.out.log(msg);\n break;\n }\n }\n }\n}\n/** @private */\nexport function getUserAgentHeader() {\n let userAgentHeaderName = \"X-SignalR-User-Agent\";\n if (Platform.isNode) {\n userAgentHeaderName = \"User-Agent\";\n }\n return [userAgentHeaderName, constructUserAgent(VERSION, getOsName(), getRuntime(), getRuntimeVersion())];\n}\n/** @private */\nexport function constructUserAgent(version, os, runtime, runtimeVersion) {\n // Microsoft SignalR/[Version] ([Detailed Version]; [Operating System]; [Runtime]; [Runtime Version])\n let userAgent = \"Microsoft SignalR/\";\n const majorAndMinor = version.split(\".\");\n userAgent += `${majorAndMinor[0]}.${majorAndMinor[1]}`;\n userAgent += ` (${version}; `;\n if (os && os !== \"\") {\n userAgent += `${os}; `;\n } else {\n userAgent += \"Unknown OS; \";\n }\n userAgent += `${runtime}`;\n if (runtimeVersion) {\n userAgent += `; ${runtimeVersion}`;\n } else {\n userAgent += \"; Unknown Runtime Version\";\n }\n userAgent += \")\";\n return userAgent;\n}\n// eslint-disable-next-line spaced-comment\n/*#__PURE__*/\nfunction getOsName() {\n if (Platform.isNode) {\n switch (process.platform) {\n case \"win32\":\n return \"Windows NT\";\n case \"darwin\":\n return \"macOS\";\n case \"linux\":\n return \"Linux\";\n default:\n return process.platform;\n }\n } else {\n return \"\";\n }\n}\n// eslint-disable-next-line spaced-comment\n/*#__PURE__*/\nfunction getRuntimeVersion() {\n if (Platform.isNode) {\n return process.versions.node;\n }\n return undefined;\n}\nfunction getRuntime() {\n if (Platform.isNode) {\n return \"NodeJS\";\n } else {\n return \"Browser\";\n }\n}\n/** @private */\nexport function getErrorString(e) {\n if (e.stack) {\n return e.stack;\n } else if (e.message) {\n return e.message;\n }\n return `${e}`;\n}\n/** @private */\nexport function getGlobalThis() {\n // globalThis is semi-new and not available in Node until v12\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw new Error(\"could not find global\");\n}\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\nimport { AbortError, HttpError, TimeoutError } from \"./Errors\";\nimport { HttpClient, HttpResponse } from \"./HttpClient\";\nimport { LogLevel } from \"./ILogger\";\nimport { Platform, getGlobalThis, isArrayBuffer } from \"./Utils\";\nexport class FetchHttpClient extends HttpClient {\n constructor(logger) {\n super();\n this._logger = logger;\n if (typeof fetch === \"undefined\") {\n // In order to ignore the dynamic require in webpack builds we need to do this magic\n // @ts-ignore: TS doesn't know about these names\n const requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\n // Cookies aren't automatically handled in Node so we need to add a CookieJar to preserve cookies across requests\n this._jar = new (requireFunc(\"tough-cookie\").CookieJar)();\n this._fetchType = requireFunc(\"node-fetch\");\n // node-fetch doesn't have a nice API for getting and setting cookies\n // fetch-cookie will wrap a fetch implementation with a default CookieJar or a provided one\n this._fetchType = requireFunc(\"fetch-cookie\")(this._fetchType, this._jar);\n } else {\n this._fetchType = fetch.bind(getGlobalThis());\n }\n if (typeof AbortController === \"undefined\") {\n // In order to ignore the dynamic require in webpack builds we need to do this magic\n // @ts-ignore: TS doesn't know about these names\n const requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\n // Node needs EventListener methods on AbortController which our custom polyfill doesn't provide\n this._abortControllerType = requireFunc(\"abort-controller\");\n } else {\n this._abortControllerType = AbortController;\n }\n }\n /** @inheritDoc */\n async send(request) {\n // Check that abort was not signaled before calling send\n if (request.abortSignal && request.abortSignal.aborted) {\n throw new AbortError();\n }\n if (!request.method) {\n throw new Error(\"No method defined.\");\n }\n if (!request.url) {\n throw new Error(\"No url defined.\");\n }\n const abortController = new this._abortControllerType();\n let error;\n // Hook our abortSignal into the abort controller\n if (request.abortSignal) {\n request.abortSignal.onabort = () => {\n abortController.abort();\n error = new AbortError();\n };\n }\n // If a timeout has been passed in, setup a timeout to call abort\n // Type needs to be any to fit window.setTimeout and NodeJS.setTimeout\n let timeoutId = null;\n if (request.timeout) {\n const msTimeout = request.timeout;\n timeoutId = setTimeout(() => {\n abortController.abort();\n this._logger.log(LogLevel.Warning, `Timeout from HTTP request.`);\n error = new TimeoutError();\n }, msTimeout);\n }\n if (request.content === \"\") {\n request.content = undefined;\n }\n if (request.content) {\n // Explicitly setting the Content-Type header for React Native on Android platform.\n request.headers = request.headers || {};\n if (isArrayBuffer(request.content)) {\n request.headers[\"Content-Type\"] = \"application/octet-stream\";\n } else {\n request.headers[\"Content-Type\"] = \"text/plain;charset=UTF-8\";\n }\n }\n let response;\n try {\n response = await this._fetchType(request.url, {\n body: request.content,\n cache: \"no-cache\",\n credentials: request.withCredentials === true ? \"include\" : \"same-origin\",\n headers: {\n \"X-Requested-With\": \"XMLHttpRequest\",\n ...request.headers\n },\n method: request.method,\n mode: \"cors\",\n redirect: \"follow\",\n signal: abortController.signal\n });\n } catch (e) {\n if (error) {\n throw error;\n }\n this._logger.log(LogLevel.Warning, `Error from HTTP request. ${e}.`);\n throw e;\n } finally {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (request.abortSignal) {\n request.abortSignal.onabort = null;\n }\n }\n if (!response.ok) {\n const errorMessage = await deserializeContent(response, \"text\");\n throw new HttpError(errorMessage || response.statusText, response.status);\n }\n const content = deserializeContent(response, request.responseType);\n const payload = await content;\n return new HttpResponse(response.status, response.statusText, payload);\n }\n getCookieString(url) {\n let cookies = \"\";\n if (Platform.isNode && this._jar) {\n // @ts-ignore: unused variable\n this._jar.getCookies(url, (e, c) => cookies = c.join(\"; \"));\n }\n return cookies;\n }\n}\nfunction deserializeContent(response, responseType) {\n let content;\n switch (responseType) {\n case \"arraybuffer\":\n content = response.arrayBuffer();\n break;\n case \"text\":\n content = response.text();\n break;\n case \"blob\":\n case \"document\":\n case \"json\":\n throw new Error(`${responseType} is not supported.`);\n default:\n content = response.text();\n break;\n }\n return content;\n}\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\nimport { AbortError, HttpError, TimeoutError } from \"./Errors\";\nimport { HttpClient, HttpResponse } from \"./HttpClient\";\nimport { LogLevel } from \"./ILogger\";\nimport { isArrayBuffer } from \"./Utils\";\nexport class XhrHttpClient extends HttpClient {\n constructor(logger) {\n super();\n this._logger = logger;\n }\n /** @inheritDoc */\n send(request) {\n // Check that abort was not signaled before calling send\n if (request.abortSignal && request.abortSignal.aborted) {\n return Promise.reject(new AbortError());\n }\n if (!request.method) {\n return Promise.reject(new Error(\"No method defined.\"));\n }\n if (!request.url) {\n return Promise.reject(new Error(\"No url defined.\"));\n }\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open(request.method, request.url, true);\n xhr.withCredentials = request.withCredentials === undefined ? true : request.withCredentials;\n xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n if (request.content === \"\") {\n request.content = undefined;\n }\n if (request.content) {\n // Explicitly setting the Content-Type header for React Native on Android platform.\n if (isArrayBuffer(request.content)) {\n xhr.setRequestHeader(\"Content-Type\", \"application/octet-stream\");\n } else {\n xhr.setRequestHeader(\"Content-Type\", \"text/plain;charset=UTF-8\");\n }\n }\n const headers = request.headers;\n if (headers) {\n Object.keys(headers).forEach(header => {\n xhr.setRequestHeader(header, headers[header]);\n });\n }\n if (request.responseType) {\n xhr.responseType = request.responseType;\n }\n if (request.abortSignal) {\n request.abortSignal.onabort = () => {\n xhr.abort();\n reject(new AbortError());\n };\n }\n if (request.timeout) {\n xhr.timeout = request.timeout;\n }\n xhr.onload = () => {\n if (request.abortSignal) {\n request.abortSignal.onabort = null;\n }\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve(new HttpResponse(xhr.status, xhr.statusText, xhr.response || xhr.responseText));\n } else {\n reject(new HttpError(xhr.response || xhr.responseText || xhr.statusText, xhr.status));\n }\n };\n xhr.onerror = () => {\n this._logger.log(LogLevel.Warning, `Error from HTTP request. ${xhr.status}: ${xhr.statusText}.`);\n reject(new HttpError(xhr.statusText, xhr.status));\n };\n xhr.ontimeout = () => {\n this._logger.log(LogLevel.Warning, `Timeout from HTTP request.`);\n reject(new TimeoutError());\n };\n xhr.send(request.content);\n });\n }\n}\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\nimport { AbortError } from \"./Errors\";\nimport { FetchHttpClient } from \"./FetchHttpClient\";\nimport { HttpClient } from \"./HttpClient\";\nimport { Platform } from \"./Utils\";\nimport { XhrHttpClient } from \"./XhrHttpClient\";\n/** Default implementation of {@link @microsoft/signalr.HttpClient}. */\nexport class DefaultHttpClient extends HttpClient {\n /** Creates a new instance of the {@link @microsoft/signalr.DefaultHttpClient}, using the provided {@link @microsoft/signalr.ILogger} to log messages. */\n constructor(logger) {\n super();\n if (typeof fetch !== \"undefined\" || Platform.isNode) {\n this._httpClient = new FetchHttpClient(logger);\n } else if (typeof XMLHttpRequest !== \"undefined\") {\n this._httpClient = new XhrHttpClient(logger);\n } else {\n throw new Error(\"No usable HttpClient found.\");\n }\n }\n /** @inheritDoc */\n send(request) {\n // Check that abort was not signaled before calling send\n if (request.abortSignal && request.abortSignal.aborted) {\n return Promise.reject(new AbortError());\n }\n if (!request.method) {\n return Promise.reject(new Error(\"No method defined.\"));\n }\n if (!request.url) {\n return Promise.reject(new Error(\"No url defined.\"));\n }\n return this._httpClient.send(request);\n }\n getCookieString(url) {\n return this._httpClient.getCookieString(url);\n }\n}\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n// Not exported from index\n/** @private */\nexport class TextMessageFormat {\n static write(output) {\n return `${output}${TextMessageFormat.RecordSeparator}`;\n }\n static parse(input) {\n if (input[input.length - 1] !== TextMessageFormat.RecordSeparator) {\n throw new Error(\"Message is incomplete.\");\n }\n const messages = input.split(TextMessageFormat.RecordSeparator);\n messages.pop();\n return messages;\n }\n}\nTextMessageFormat.RecordSeparatorCode = 0x1e;\nTextMessageFormat.RecordSeparator = String.fromCharCode(TextMessageFormat.RecordSeparatorCode);\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\nimport { TextMessageFormat } from \"./TextMessageFormat\";\nimport { isArrayBuffer } from \"./Utils\";\n/** @private */\nexport class HandshakeProtocol {\n // Handshake request is always JSON\n writeHandshakeRequest(handshakeRequest) {\n return TextMessageFormat.write(JSON.stringify(handshakeRequest));\n }\n parseHandshakeResponse(data) {\n let messageData;\n let remainingData;\n if (isArrayBuffer(data)) {\n // Format is binary but still need to read JSON text from handshake response\n const binaryData = new Uint8Array(data);\n const separatorIndex = binaryData.indexOf(TextMessageFormat.RecordSeparatorCode);\n if (separatorIndex === -1) {\n throw new Error(\"Message is incomplete.\");\n }\n // content before separator is handshake response\n // optional content after is additional messages\n const responseLength = separatorIndex + 1;\n messageData = String.fromCharCode.apply(null, Array.prototype.slice.call(binaryData.slice(0, responseLength)));\n remainingData = binaryData.byteLength > responseLength ? binaryData.slice(responseLength).buffer : null;\n } else {\n const textData = data;\n const separatorIndex = textData.indexOf(TextMessageFormat.RecordSeparator);\n if (separatorIndex === -1) {\n throw new Error(\"Message is incomplete.\");\n }\n // content before separator is handshake response\n // optional content after is additional messages\n const responseLength = separatorIndex + 1;\n messageData = textData.substring(0, responseLength);\n remainingData = textData.length > responseLength ? textData.substring(responseLength) : null;\n }\n // At this point we should have just the single handshake message\n const messages = TextMessageFormat.parse(messageData);\n const response = JSON.parse(messages[0]);\n if (response.type) {\n throw new Error(\"Expected a handshake response from the server.\");\n }\n const responseMessage = response;\n // multiple messages could have arrived with handshake\n // return additional data to be parsed as usual, or null if all parsed\n return [remainingData, responseMessage];\n }\n}\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\n/** Defines the type of a Hub Message. */\nexport var MessageType = /*#__PURE__*/function (MessageType) {\n /** Indicates the message is an Invocation message and implements the {@link @microsoft/signalr.InvocationMessage} interface. */\n MessageType[MessageType[\"Invocation\"] = 1] = \"Invocation\";\n /** Indicates the message is a StreamItem message and implements the {@link @microsoft/signalr.StreamItemMessage} interface. */\n MessageType[MessageType[\"StreamItem\"] = 2] = \"StreamItem\";\n /** Indicates the message is a Completion message and implements the {@link @microsoft/signalr.CompletionMessage} interface. */\n MessageType[MessageType[\"Completion\"] = 3] = \"Completion\";\n /** Indicates the message is a Stream Invocation message and implements the {@link @microsoft/signalr.StreamInvocationMessage} interface. */\n MessageType[MessageType[\"StreamInvocation\"] = 4] = \"StreamInvocation\";\n /** Indicates the message is a Cancel Invocation message and implements the {@link @microsoft/signalr.CancelInvocationMessage} interface. */\n MessageType[MessageType[\"CancelInvocation\"] = 5] = \"CancelInvocation\";\n /** Indicates the message is a Ping message and implements the {@link @microsoft/signalr.PingMessage} interface. */\n MessageType[MessageType[\"Ping\"] = 6] = \"Ping\";\n /** Indicates the message is a Close message and implements the {@link @microsoft/signalr.CloseMessage} interface. */\n MessageType[MessageType[\"Close\"] = 7] = \"Close\";\n return MessageType;\n}(MessageType || {});\n\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\nimport { SubjectSubscription } from \"./Utils\";\n/** Stream implementation to stream items to the server. */\nexport class Subject {\n constructor() {\n this.observers = [];\n }\n next(item) {\n for (const observer of this.observers) {\n observer.next(item);\n }\n }\n error(err) {\n for (const observer of this.observers) {\n if (observer.error) {\n observer.error(err);\n }\n }\n }\n complete() {\n for (const observer of this.observers) {\n if (observer.complete) {\n observer.complete();\n }\n }\n }\n subscribe(observer) {\n this.observers.push(observer);\n return new SubjectSubscription(this, observer);\n }\n}\n","// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under the MIT license.\nimport { HandshakeProtocol } from \"./HandshakeProtocol\";\nimport { AbortError } from \"./Errors\";\nimport { MessageType } from \"./IHubProtocol\";\nimport { LogLevel } from \"./ILogger\";\nimport { Subject } from \"./Subject\";\nimport { Arg, getErrorString, Platform } from \"./Utils\";\nconst DEFAULT_TIMEOUT_IN_MS = 30 * 1000;\nconst DEFAULT_PING_INTERVAL_IN_MS = 15 * 1000;\n/** Describes the current state of the {@link HubConnection} to the server. */\nexport var HubConnectionState = /*#__PURE__*/function (HubConnectionState) {\n /** The hub connection is disconnected. */\n HubConnectionState[\"Disconnected\"] = \"Disconnected\";\n /** The hub connection is connecting. */\n HubConnectionState[\"Connecting\"] = \"Connecting\";\n /** The hub connection is connected. */\n HubConnectionState[\"Connected\"] = \"Connected\";\n /** The hub connection is disconnecting. */\n HubConnectionState[\"Disconnecting\"] = \"Disconnecting\";\n /** The hub connection is reconnecting. */\n HubConnectionState[\"Reconnecting\"] = \"Reconnecting\";\n return HubConnectionState;\n}(HubConnectionState || {});\n/** Represents a connection to a SignalR Hub. */\nexport class HubConnection {\n constructor(connection, logger, protocol, reconnectPolicy) {\n this._nextKeepAlive = 0;\n this._freezeEventListener = () => {\n this._logger.log(LogLevel.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\");\n };\n Arg.isRequired(connection, \"connection\");\n Arg.isRequired(logger, \"logger\");\n Arg.isRequired(protocol, \"protocol\");\n this.serverTimeoutInMilliseconds = DEFAULT_TIMEOUT_IN_MS;\n this.keepAliveIntervalInMilliseconds = DEFAULT_PING_INTERVAL_IN_MS;\n this._logger = logger;\n this._protocol = protocol;\n this.connection = connection;\n this._reconnectPolicy = reconnectPolicy;\n this._handshakeProtocol = new HandshakeProtocol();\n this.connection.onreceive = data => this._processIncomingData(data);\n this.connection.onclose = error => this._connectionClosed(error);\n this._callbacks = {};\n this._methods = {};\n this._closedCallbacks = [];\n this._reconnectingCallbacks = [];\n this._reconnectedCallbacks = [];\n this._invocationId = 0;\n this._receivedHandshakeResponse = false;\n this._connectionState = HubConnectionState.Disconnected;\n this._connectionStarted = false;\n this._cachedPingMessage = this._protocol.writeMessage({\n type: MessageType.Ping\n });\n }\n /** @internal */\n // Using a public static factory method means we can have a private constructor and an _internal_\n // create method that can be used by HubConnectionBuilder. An \"internal\" constructor would just\n // be stripped away and the '.d.ts' file would have no constructor, which is interpreted as a\n // public parameter-less constructor.\n static create(connection, logger, protocol, reconnectPolicy) {\n return new HubConnection(connection, logger, protocol, reconnectPolicy);\n }\n /** Indicates the state of the {@link HubConnection} to the server. */\n get state() {\n return this._connectionState;\n }\n /** Represents the connection id of the {@link HubConnection} on the server. The connection id will be null when the connection is either\r\n * in the disconnected state or if the negotiation step was skipped.\r\n */\n get connectionId() {\n return this.connection ? this.connection.connectionId || null : null;\n }\n /** Indicates the url of the {@link HubConnection} to the server. */\n get baseUrl() {\n return this.connection.baseUrl || \"\";\n }\n /**\r\n * Sets a new url for the HubConnection. Note that the url can only be changed when the connection is in either the Disconnected or\r\n * Reconnecting states.\r\n * @param {string} url The url to connect to.\r\n */\n set baseUrl(url) {\n if (this._connectionState !== HubConnectionState.Disconnected && this._connectionState !== HubConnectionState.Reconnecting) {\n throw new Error(\"The HubConnection must be in the Disconnected or Reconnecting state to change the url.\");\n }\n if (!url) {\n throw new Error(\"The HubConnection url must be a valid url.\");\n }\n this.connection.baseUrl = url;\n }\n /** Starts the connection.\r\n *\r\n * @returns {Promise