`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n if (this.hasAttached()) {\n _super.prototype.detach.call(this);\n }\n if (portal) {\n _super.prototype.attach.call(this, portal);\n }\n this._attachedPortal = portal;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CdkPortalOutlet.prototype, \"attachedRef\", {\n /** Component or view reference that is attached to the portal. */\n get: function () {\n return this._attachedRef;\n },\n enumerable: true,\n configurable: true\n });\n CdkPortalOutlet.prototype.ngOnInit = function () {\n this._isInitialized = true;\n };\n CdkPortalOutlet.prototype.ngOnDestroy = function () {\n _super.prototype.dispose.call(this);\n this._attachedPortal = null;\n this._attachedRef = null;\n };\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n CdkPortalOutlet.prototype.attachComponentPortal = function (portal) {\n portal.setAttachedHost(this);\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n var viewContainerRef = portal.viewContainerRef != null ?\n portal.viewContainerRef :\n this._viewContainerRef;\n var resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n var componentFactory = resolver.resolveComponentFactory(portal.component);\n var ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector);\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild(ref.hostView.rootNodes[0]);\n }\n _super.prototype.setDisposeFn.call(this, function () { return ref.destroy(); });\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n return ref;\n };\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n CdkPortalOutlet.prototype.attachTemplatePortal = function (portal) {\n var _this = this;\n portal.setAttachedHost(this);\n var viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n _super.prototype.setDisposeFn.call(this, function () { return _this._viewContainerRef.clear(); });\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n return viewRef;\n };\n /** Gets the root node of the portal outlet. */\n CdkPortalOutlet.prototype._getRootNode = function () {\n var nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE ?\n nativeElement : nativeElement.parentNode);\n };\n /** @nocollapse */\n CdkPortalOutlet.ctorParameters = function () { return [\n { type: ComponentFactoryResolver },\n { type: ViewContainerRef },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n ]; };\n CdkPortalOutlet.propDecorators = {\n attached: [{ type: Output }]\n };\nCdkPortalOutlet.ɵfac = function CdkPortalOutlet_Factory(t) { return new (t || CdkPortalOutlet)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(DOCUMENT)); };\nCdkPortalOutlet.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: CdkPortalOutlet, selectors: [[\"\", \"cdkPortalOutlet\", \"\"]], inputs: { portal: [\"cdkPortalOutlet\", \"portal\"] }, outputs: { attached: \"attached\" }, exportAs: [\"cdkPortalOutlet\"], features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(CdkPortalOutlet, [{\n type: Directive,\n args: [{\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n inputs: ['portal: cdkPortalOutlet']\n }]\n }], function () { return [{ type: ɵngcc0.ComponentFactoryResolver }, { type: ɵngcc0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, { attached: [{\n type: Output\n }] }); })();\n return CdkPortalOutlet;\n}(BasePortalOutlet));\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nvar PortalHostDirective = /** @class */ (function (_super) {\n __extends(PortalHostDirective, _super);\n function PortalHostDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\nPortalHostDirective.ɵfac = function PortalHostDirective_Factory(t) { return ɵPortalHostDirective_BaseFactory(t || PortalHostDirective); };\nPortalHostDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: PortalHostDirective, selectors: [[\"\", \"cdkPortalHost\", \"\"], [\"\", \"portalHost\", \"\"]], inputs: { portal: [\"cdkPortalHost\", \"portal\"] }, exportAs: [\"cdkPortalHost\"], features: [ɵngcc0.ɵɵProvidersFeature([{\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective\n }]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nvar ɵPortalHostDirective_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(PortalHostDirective);\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(PortalHostDirective, [{\n type: Directive,\n args: [{\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: ['portal: cdkPortalHost'],\n providers: [{\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective\n }]\n }]\n }], null, null); })();\n return PortalHostDirective;\n}(CdkPortalOutlet));\nvar PortalModule = /** @class */ (function () {\n function PortalModule() {\n }\nPortalModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: PortalModule });\nPortalModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function PortalModule_Factory(t) { return new (t || PortalModule)(); } });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(PortalModule, { declarations: [CdkPortal,\n CdkPortalOutlet,\n TemplatePortalDirective,\n PortalHostDirective], exports: [CdkPortal,\n CdkPortalOutlet,\n TemplatePortalDirective,\n PortalHostDirective] }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(PortalModule, [{\n type: NgModule,\n args: [{\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective]\n }]\n }], function () { return []; }, null); })();\n return PortalModule;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n */\nvar PortalInjector = /** @class */ (function () {\n function PortalInjector(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n PortalInjector.prototype.get = function (token, notFoundValue) {\n var value = this._customTokens.get(token);\n if (typeof value !== 'undefined') {\n return value;\n }\n return this._parentInjector.get(token, notFoundValue);\n };\n return PortalInjector;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };\n\n//# sourceMappingURL=portal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar Subscription_1 = require(\"../Subscription\");\nvar observable_1 = require(\"../symbol/observable\");\nfunction scheduleObservable(input, scheduler) {\n return new Observable_1.Observable(function (subscriber) {\n var sub = new Subscription_1.Subscription();\n sub.add(scheduler.schedule(function () {\n var observable = input[observable_1.observable]();\n sub.add(observable.subscribe({\n next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },\n error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },\n complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },\n }));\n }));\n return sub;\n });\n}\nexports.scheduleObservable = scheduleObservable;\n//# sourceMappingURL=scheduleObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar map_1 = require(\"./map\");\nfunction timestamp(scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return map_1.map(function (value) { return new Timestamp(value, scheduler.now()); });\n}\nexports.timestamp = timestamp;\nvar Timestamp = (function () {\n function Timestamp(value, timestamp) {\n this.value = value;\n this.timestamp = timestamp;\n }\n return Timestamp;\n}());\nexports.Timestamp = Timestamp;\n//# sourceMappingURL=timestamp.js.map","/**\n * @license Angular v9.0.7\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the `build()` method to create a programmatic animation using the\n * `animate()` function. 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 */\nvar AnimationBuilder = /** @class */ (function () {\n function AnimationBuilder() {\n }\n return AnimationBuilder;\n}());\n/**\n * A factory object returned from the `AnimationBuilder`.`build()` method.\n *\n * @publicApi\n */\nvar AnimationFactory = /** @class */ (function () {\n function AnimationFactory() {\n }\n return AnimationFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nvar AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of `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 `state()`\n * 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 *
...
\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n * // notice that `element` and `params` are also available here\n * return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger('myAnimationTrigger', [\n * transition(myInlineMatcherFn, [\n * // the animation sequence code\n * ]),\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * template: `\n *
\n * `,\n * animations: [\n * trigger(\"childAnimation\", [\n * // ...\n * ])\n * ]\n * })\n * class MyComponent {\n * isDisabled = true;\n * exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n * selector: 'app-component',\n * templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n * @HostBinding('@.disabled')\n * public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nfunction trigger(name, definitions) {\n return { type: 7 /* Trigger */, name: name, definitions: definitions, options: {} };\n}\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n * - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n * - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n * [\n * style({ background: \"blue\" })),\n * style({ background: \"red\" }))\n * ])\n * ```\n *\n * @publicApi\n */\nfunction animate(timings, styles) {\n if (styles === void 0) { styles = null; }\n return { type: 4 /* Animate */, styles: styles, timings: timings };\n}\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n * animate(\"1s\", style({ background: \"black\" })),\n * animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nfunction group(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 3 /* Group */, steps: steps, options: options };\n}\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n * as specified by the timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 }),\n * animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nfunction sequence(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 2 /* Sequence */, steps: steps, options: options };\n}\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation `state`, within an animation `sequence`,\n * or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow a component to animate from\n * a height of 0 up to the height of the parent element:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nfunction style(tokens) {\n return { type: 6 /* Style */, styles: tokens, offset: null };\n}\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n * - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nfunction state(name, styles, options) {\n return { type: 0 /* State */, name: name, styles: styles, options: options };\n}\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nfunction keyframes(steps) {\n return { type: 5 /* Keyframes */, steps: steps };\n}\n/**\n * Declares an animation transition as a sequence of animation steps to run when a given\n * condition is satisfied. The condition is a Boolean expression or function that compares\n * the previous and current animation states, and returns true if this transition should occur.\n * When the state criteria of a defined transition are met, the associated animation is\n * triggered.\n *\n * @param stateChangeExpr A Boolean expression or function that compares the previous and current\n * animation states, and returns true if this transition should occur. Note that \"true\" and \"false\"\n * match 1 and 0, respectively. An expression is evaluated each time a state change occurs in the\n * animation trigger element.\n * The animation steps run when the expression evaluates to true.\n *\n * - A state-change string takes the form \"state1 => state2\", where each side is a defined animation\n * state, or an asterix (*) to refer to a dynamic start or end state.\n * - The expression string can contain multiple comma-separated statements;\n * for example \"state1 => state2, state3 => state4\".\n * - Special values `:enter` and `:leave` initiate a transition on the entry and exit states,\n * equivalent to \"void => *\" and \"* => void\".\n * - Special values `:increment` and `:decrement` initiate a transition when a numeric value has\n * increased or decreased in value.\n * - A function is executed each time a state change occurs in the animation trigger element.\n * The animation steps run when the function returns true.\n *\n * @param steps One or more animation objects, as returned by the `animate()` or\n * `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the animation,\n * and additional developer-defined parameters. Provided values for additional parameters are used\n * as defaults, and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n * The template associated with a component binds an animation trigger to an element.\n *\n * ```HTML\n * \n *
...
\n * ```\n *\n * All transitions are defined within an animation trigger,\n * along with named states that the transitions change to and from.\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * // define states\n * state(\"on\", style({ background: \"green\" })),\n * state(\"off\", style({ background: \"grey\" })),\n * ...]\n * ```\n *\n * Note that when you call the `sequence()` function within a `{@link animations/group group()}`\n * or a `transition()` call, execution does not continue to the next instruction\n * until each of the inner animation steps have completed.\n *\n * ### Syntax examples\n *\n * The following examples define transitions between the two defined states (and default states),\n * using various options:\n *\n * ```typescript\n * // Transition occurs when the state value\n * // bound to \"myAnimationTrigger\" changes from \"on\" to \"off\"\n * transition(\"on => off\", animate(500))\n * // Run the same animation for both directions\n * transition(\"on <=> off\", animate(500))\n * // Define multiple state-change pairs separated by commas\n * transition(\"on => off, off => void\", animate(500))\n * ```\n *\n * ### Special values for state-change expressions\n *\n * - Catch-all state change for when an element is inserted into the page and the\n * destination state is unknown:\n *\n * ```typescript\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ])\n * ```\n *\n * - Capture a state change between any states:\n *\n * `transition(\"* => *\", animate(\"1s 0s\"))`\n *\n * - Entry and exit transitions:\n *\n * ```typescript\n * transition(\":enter\", [\n * style({ opacity: 0 }),\n * animate(500, style({ opacity: 1 }))\n * ]),\n * transition(\":leave\", [\n * animate(500, style({ opacity: 0 }))\n * ])\n * ```\n *\n * - Use `:increment` and `:decrement` to initiate transitions:\n *\n * ```typescript\n * transition(\":increment\", group([\n * query(':enter', [\n * style({ left: '100%' }),\n * animate('0.5s ease-out', style('*'))\n * ]),\n * query(':leave', [\n * animate('0.5s ease-out', style({ left: '-100%' }))\n * ])\n * ]))\n *\n * transition(\":decrement\", group([\n * query(':enter', [\n * style({ left: '100%' }),\n * animate('0.5s ease-out', style('*'))\n * ]),\n * query(':leave', [\n * animate('0.5s ease-out', style({ left: '-100%' }))\n * ])\n * ]))\n * ```\n *\n * ### State-change functions\n *\n * Here is an example of a `fromState` specified as a state-change function that invokes an\n * animation when true:\n *\n * ```typescript\n * transition((fromState, toState) =>\n * {\n * return fromState == \"off\" && toState == \"on\";\n * },\n * animate(\"1s 0s\"))\n * ```\n *\n * ### Animating to the final state\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no style data, that step is automatically considered the final animation arc,\n * for the element to reach the final state. Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n * The following example defines a transition that starts by hiding the element,\n * then makes sure that it animates properly to whatever state is currently active for trigger:\n *\n * ```typescript\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ])\n * ```\n * ### Boolean value matching\n * If a trigger binding value is a Boolean, it can be matched using a transition expression\n * that compares true and false or 1 and 0. For example:\n *\n * ```\n * // in the template\n *
...
\n * // in the component metadata\n * trigger('openClose', [\n * state('true', style({ height: '*' })),\n * state('false', style({ height: '0px' })),\n * transition('false <=> true', animate(500))\n * ])\n * ```\n *\n * @publicApi\n **/\nfunction transition(stateChangeExpr, steps, options) {\n if (options === void 0) { options = null; }\n return { type: 1 /* Transition */, expr: stateChangeExpr, animation: steps, options: options };\n}\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ],\n * { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nfunction animation(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 8 /* Reference */, animation: steps, options: options };\n}\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nfunction animateChild(options) {\n if (options === void 0) { options = null; }\n return { type: 9 /* AnimateChild */, options: options };\n}\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nfunction useAnimation(animation, options) {\n if (options === void 0) { options = null; }\n return { type: 10 /* AnimateRef */, animation: animation, options: options };\n}\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n * - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements.\n * - `query(\":animating\")` : Query all currently animating elements.\n * - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n * - `query(\"@*\")` : Query all elements that contain an animation triggers.\n * - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n * selector: 'inner',\n * template: `\n *
\n *
Title
\n *
\n * Blah blah blah\n *
\n *
\n * `,\n * animations: [\n * trigger('queryAnimation', [\n * transition('* => goAnimate', [\n * // hide the inner elements\n * query('h1', style({ opacity: 0 })),\n * query('.content', style({ opacity: 0 })),\n *\n * // animate the inner elements in, one by one\n * query('h1', animate(1000, style({ opacity: 1 }))),\n * query('.content', animate(1000, style({ opacity: 1 }))),\n * ])\n * ])\n * ]\n * })\n * class Cmp {\n * exp = '';\n *\n * goAnimate() {\n * this.exp = 'goAnimate';\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction query(selector, animation, options) {\n if (options === void 0) { options = null; }\n return { type: 11 /* Query */, selector: selector, animation: animation, options: options };\n}\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * \n *
\n *
\n *
\n *
\n * {{ item }}\n *
\n *
\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n * templateUrl: 'list.component.html',\n * animations: [\n * trigger('listAnimation', [\n * ...\n * ])\n * ]\n * })\n * class ListComponent {\n * items = [];\n *\n * showItems() {\n * this.items = [0,1,2,3,4];\n * }\n *\n * hideItems() {\n * this.items = [];\n * }\n *\n * toggle() {\n * this.items.length ? this.hideItems() : this.showItems();\n * }\n * }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n * transition('* => *', [ // each time the binding value changes\n * query(':leave', [\n * stagger(100, [\n * animate('0.5s', style({ opacity: 0 }))\n * ])\n * ]),\n * query(':enter', [\n * style({ opacity: 0 }),\n * stagger(100, [\n * animate('0.5s', style({ opacity: 1 }))\n * ])\n * ])\n * ])\n * ])\n * ```\n *\n * @publicApi\n */\nfunction stagger(timings, animation) {\n return { type: 12 /* Stagger */, timings: timings, animation: animation };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction scheduleMicroTask(cb) {\n Promise.resolve(null).then(cb);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\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 `animate()`\n * @see `AnimationPlayer`\n * @see `GroupPlayer`\n *\n * @publicApi\n */\nvar NoopAnimationPlayer = /** @class */ (function () {\n function NoopAnimationPlayer(duration, delay) {\n if (duration === void 0) { duration = 0; }\n if (delay === void 0) { delay = 0; }\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._started = false;\n this._destroyed = false;\n this._finished = false;\n this.parentPlayer = null;\n this.totalTime = duration + delay;\n }\n NoopAnimationPlayer.prototype._onFinish = function () {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n }\n };\n NoopAnimationPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };\n NoopAnimationPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };\n NoopAnimationPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };\n NoopAnimationPlayer.prototype.hasStarted = function () { return this._started; };\n NoopAnimationPlayer.prototype.init = function () { };\n NoopAnimationPlayer.prototype.play = function () {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n };\n /** @internal */\n NoopAnimationPlayer.prototype.triggerMicrotask = function () {\n var _this = this;\n scheduleMicroTask(function () { return _this._onFinish(); });\n };\n NoopAnimationPlayer.prototype._onStart = function () {\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n };\n NoopAnimationPlayer.prototype.pause = function () { };\n NoopAnimationPlayer.prototype.restart = function () { };\n NoopAnimationPlayer.prototype.finish = function () { this._onFinish(); };\n NoopAnimationPlayer.prototype.destroy = function () {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n }\n };\n NoopAnimationPlayer.prototype.reset = function () { };\n NoopAnimationPlayer.prototype.setPosition = function (position) { };\n NoopAnimationPlayer.prototype.getPosition = function () { return 0; };\n /** @internal */\n NoopAnimationPlayer.prototype.triggerCallback = function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n return NoopAnimationPlayer;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see `AnimationPlayer`\n * @see `{@link animations/group group()}`\n *\n */\nvar AnimationGroupPlayer = /** @class */ (function () {\n function AnimationGroupPlayer(_players) {\n var _this = this;\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 var doneCount = 0;\n var destroyCount = 0;\n var startCount = 0;\n var total = this.players.length;\n if (total == 0) {\n scheduleMicroTask(function () { return _this._onFinish(); });\n }\n else {\n this.players.forEach(function (player) {\n player.onDone(function () {\n if (++doneCount == total) {\n _this._onFinish();\n }\n });\n player.onDestroy(function () {\n if (++destroyCount == total) {\n _this._onDestroy();\n }\n });\n player.onStart(function () {\n if (++startCount == total) {\n _this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce(function (time, player) { return Math.max(time, player.totalTime); }, 0);\n }\n AnimationGroupPlayer.prototype._onFinish = function () {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n }\n };\n AnimationGroupPlayer.prototype.init = function () { this.players.forEach(function (player) { return player.init(); }); };\n AnimationGroupPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };\n AnimationGroupPlayer.prototype._onStart = function () {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n }\n };\n AnimationGroupPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };\n AnimationGroupPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };\n AnimationGroupPlayer.prototype.hasStarted = function () { return this._started; };\n AnimationGroupPlayer.prototype.play = function () {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach(function (player) { return player.play(); });\n };\n AnimationGroupPlayer.prototype.pause = function () { this.players.forEach(function (player) { return player.pause(); }); };\n AnimationGroupPlayer.prototype.restart = function () { this.players.forEach(function (player) { return player.restart(); }); };\n AnimationGroupPlayer.prototype.finish = function () {\n this._onFinish();\n this.players.forEach(function (player) { return player.finish(); });\n };\n AnimationGroupPlayer.prototype.destroy = function () { this._onDestroy(); };\n AnimationGroupPlayer.prototype._onDestroy = function () {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach(function (player) { return player.destroy(); });\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n }\n };\n AnimationGroupPlayer.prototype.reset = function () {\n this.players.forEach(function (player) { return player.reset(); });\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n };\n AnimationGroupPlayer.prototype.setPosition = function (p) {\n var timeAtPosition = p * this.totalTime;\n this.players.forEach(function (player) {\n var position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n };\n AnimationGroupPlayer.prototype.getPosition = function () {\n var min = 0;\n this.players.forEach(function (player) {\n var p = player.getPosition();\n min = Math.min(p, min);\n });\n return min;\n };\n AnimationGroupPlayer.prototype.beforeDestroy = function () {\n this.players.forEach(function (player) {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n };\n /** @internal */\n AnimationGroupPlayer.prototype.triggerCallback = function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n return AnimationGroupPlayer;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ɵPRE_STYLE = '!';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\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, ɵPRE_STYLE };\n\n//# sourceMappingURL=animations.js.map","/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nexport function finalize(callback) {\n return function (source) { return source.lift(new FinallyOperator(callback)); };\n}\nvar FinallyOperator = /*@__PURE__*/ (function () {\n function FinallyOperator(callback) {\n this.callback = callback;\n }\n FinallyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n };\n return FinallyOperator;\n}());\nvar FinallySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FinallySubscriber, _super);\n function FinallySubscriber(destination, callback) {\n var _this = _super.call(this, destination) || this;\n _this.add(new Subscription(callback));\n return _this;\n }\n return FinallySubscriber;\n}(Subscriber));\n//# sourceMappingURL=finalize.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction withLatestFrom() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return function (source) {\n var project;\n if (typeof args[args.length - 1] === 'function') {\n project = args.pop();\n }\n var observables = args;\n return source.lift(new WithLatestFromOperator(observables, project));\n };\n}\nexports.withLatestFrom = withLatestFrom;\nvar WithLatestFromOperator = (function () {\n function WithLatestFromOperator(observables, project) {\n this.observables = observables;\n this.project = project;\n }\n WithLatestFromOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n };\n return WithLatestFromOperator;\n}());\nvar WithLatestFromSubscriber = (function (_super) {\n __extends(WithLatestFromSubscriber, _super);\n function WithLatestFromSubscriber(destination, observables, project) {\n var _this = _super.call(this, destination) || this;\n _this.observables = observables;\n _this.project = project;\n _this.toRespond = [];\n var len = observables.length;\n _this.values = new Array(len);\n for (var i = 0; i < len; i++) {\n _this.toRespond.push(i);\n }\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n _this.add(subscribeToResult_1.subscribeToResult(_this, observable, observable, i));\n }\n return _this;\n }\n WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values[outerIndex] = innerValue;\n var toRespond = this.toRespond;\n if (toRespond.length > 0) {\n var found = toRespond.indexOf(outerIndex);\n if (found !== -1) {\n toRespond.splice(found, 1);\n }\n }\n };\n WithLatestFromSubscriber.prototype.notifyComplete = function () {\n };\n WithLatestFromSubscriber.prototype._next = function (value) {\n if (this.toRespond.length === 0) {\n var args = [value].concat(this.values);\n if (this.project) {\n this._tryProject(args);\n }\n else {\n this.destination.next(args);\n }\n }\n };\n WithLatestFromSubscriber.prototype._tryProject = function (args) {\n var result;\n try {\n result = this.project.apply(this, args);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return WithLatestFromSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=withLatestFrom.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar Subscription_1 = require(\"../Subscription\");\nfunction scheduleArray(input, scheduler) {\n return new Observable_1.Observable(function (subscriber) {\n var sub = new Subscription_1.Subscription();\n var i = 0;\n sub.add(scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n return;\n }\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n sub.add(this.schedule());\n }\n }));\n return sub;\n });\n}\nexports.scheduleArray = scheduleArray;\n//# sourceMappingURL=scheduleArray.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Action_1 = require(\"./Action\");\nvar AsyncAction = (function (_super) {\n __extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (this.closed) {\n return this;\n }\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n return setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && this.delay === delay && this.pending === false) {\n return id;\n }\n clearInterval(id);\n return undefined;\n };\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, delay) {\n var errored = false;\n var errorValue = undefined;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = !!e && e || new Error(e);\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype._unsubscribe = function () {\n var id = this.id;\n var scheduler = this.scheduler;\n var actions = scheduler.actions;\n var index = actions.indexOf(this);\n this.work = null;\n this.state = null;\n this.pending = false;\n this.scheduler = null;\n if (index !== -1) {\n actions.splice(index, 1);\n }\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n };\n return AsyncAction;\n}(Action_1.Action));\nexports.AsyncAction = AsyncAction;\n//# sourceMappingURL=AsyncAction.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nfunction debounce(durationSelector) {\n return function (source) { return source.lift(new DebounceOperator(durationSelector)); };\n}\nexports.debounce = debounce;\nvar DebounceOperator = (function () {\n function DebounceOperator(durationSelector) {\n this.durationSelector = durationSelector;\n }\n DebounceOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));\n };\n return DebounceOperator;\n}());\nvar DebounceSubscriber = (function (_super) {\n __extends(DebounceSubscriber, _super);\n function DebounceSubscriber(destination, durationSelector) {\n var _this = _super.call(this, destination) || this;\n _this.durationSelector = durationSelector;\n _this.hasValue = false;\n _this.durationSubscription = null;\n return _this;\n }\n DebounceSubscriber.prototype._next = function (value) {\n try {\n var result = this.durationSelector.call(this, value);\n if (result) {\n this._tryNext(value, result);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n DebounceSubscriber.prototype._complete = function () {\n this.emitValue();\n this.destination.complete();\n };\n DebounceSubscriber.prototype._tryNext = function (value, duration) {\n var subscription = this.durationSubscription;\n this.value = value;\n this.hasValue = true;\n if (subscription) {\n subscription.unsubscribe();\n this.remove(subscription);\n }\n subscription = subscribeToResult_1.subscribeToResult(this, duration);\n if (subscription && !subscription.closed) {\n this.add(this.durationSubscription = subscription);\n }\n };\n DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.emitValue();\n };\n DebounceSubscriber.prototype.notifyComplete = function () {\n this.emitValue();\n };\n DebounceSubscriber.prototype.emitValue = function () {\n if (this.hasValue) {\n var value = this.value;\n var subscription = this.durationSubscription;\n if (subscription) {\n this.durationSubscription = null;\n subscription.unsubscribe();\n this.remove(subscription);\n }\n this.value = null;\n this.hasValue = false;\n _super.prototype._next.call(this, value);\n }\n };\n return DebounceSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=debounce.js.map","import { ElementRef } from '@angular/core';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Coerces a data-bound value (typically a string) to a boolean. */\nfunction coerceBooleanProperty(value) {\n return value != null && \"\" + value !== 'false';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction coerceNumberProperty(value, fallbackValue) {\n if (fallbackValue === void 0) { fallbackValue = 0; }\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nfunction _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction coerceArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Coerces a value to a CSS pixel value. */\nfunction coerceCssPixelValue(value) {\n if (value == null) {\n return '';\n }\n return typeof value === 'string' ? value : value + \"px\";\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nfunction coerceElement(elementOrRef) {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport { _isNumberValue, coerceArray, coerceBooleanProperty, coerceCssPixelValue, coerceElement, coerceNumberProperty };\n//# sourceMappingURL=coercion.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar async_1 = require(\"../scheduler/async\");\nvar TimeoutError_1 = require(\"../util/TimeoutError\");\nvar timeoutWith_1 = require(\"./timeoutWith\");\nvar throwError_1 = require(\"../observable/throwError\");\nfunction timeout(due, scheduler) {\n if (scheduler === void 0) { scheduler = async_1.async; }\n return timeoutWith_1.timeoutWith(due, throwError_1.throwError(new TimeoutError_1.TimeoutError()), scheduler);\n}\nexports.timeout = timeout;\n//# sourceMappingURL=timeout.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar Subscription_1 = require(\"../Subscription\");\nfunction finalize(callback) {\n return function (source) { return source.lift(new FinallyOperator(callback)); };\n}\nexports.finalize = finalize;\nvar FinallyOperator = (function () {\n function FinallyOperator(callback) {\n this.callback = callback;\n }\n FinallyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n };\n return FinallyOperator;\n}());\nvar FinallySubscriber = (function (_super) {\n __extends(FinallySubscriber, _super);\n function FinallySubscriber(destination, callback) {\n var _this = _super.call(this, destination) || this;\n _this.add(new Subscription_1.Subscription(callback));\n return _this;\n }\n return FinallySubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=finalize.js.map","import { Role } from \"@app/core/auth\";\nimport { Profile } from \"@app/core/auth/Profile.model\";\nimport { createSelector } from \"@ngrx/store\";\nimport { AppState } from \"../../app.state\";\nimport { AuthState } from \"./auth.state\";\n\nexport const authObj = (appState: AppState) => appState.auth;\n\nexport const isLogged = createSelector(\n authObj,\n (state: AuthState) => !!getTokenValue(state),\n);\nexport const isAuthLoading = createSelector(\n authObj,\n (state: AuthState) => state.loading,\n);\nexport const getToken = createSelector(authObj, (state: AuthState) =>\n getTokenValue(state),\n);\nexport const getRefreshToken = createSelector(authObj, (state: AuthState) =>\n getRefreshTokenValue(state),\n);\n\nexport const getUser = createSelector(\n authObj,\n (state: AuthState) => new Profile(state.user),\n);\n\n// export const hasPermission = (permission: string) => createSelector(authObj, (state: AuthState) => {\n// if (!state.user) {\n// return false;\n// }\n// const permissionScope = state.permissions;\n// return permissionScope.findIndex(x => x === permission) >= 0;\n// });\n\nconst getTokenValue = (state: AuthState) => state.accessToken;\nconst getRefreshTokenValue = (state: AuthState) => state.refreshToken;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ExposeMetadata = /** @class */ (function () {\n function ExposeMetadata(target, propertyName, options) {\n this.target = target;\n this.propertyName = propertyName;\n this.options = options;\n }\n return ExposeMetadata;\n}());\nexports.ExposeMetadata = ExposeMetadata;\n\n//# sourceMappingURL=ExposeMetadata.js.map\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\nexports.filter = filter;\nvar FilterOperator = (function () {\n function FilterOperator(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n FilterOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n };\n return FilterOperator;\n}());\nvar FilterSubscriber = (function (_super) {\n __extends(FilterSubscriber, _super);\n function FilterSubscriber(destination, predicate, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.count = 0;\n return _this;\n }\n FilterSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.destination.next(value);\n }\n };\n return FilterSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=filter.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nfunction refCount() {\n return function refCountOperatorFunction(source) {\n return source.lift(new RefCountOperator(source));\n };\n}\nexports.refCount = refCount;\nvar RefCountOperator = (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = (function (_super) {\n __extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=refCount.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar SubscribeOnObservable_1 = require(\"../observable/SubscribeOnObservable\");\nfunction subscribeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return function subscribeOnOperatorFunction(source) {\n return source.lift(new SubscribeOnOperator(scheduler, delay));\n };\n}\nexports.subscribeOn = subscribeOn;\nvar SubscribeOnOperator = (function () {\n function SubscribeOnOperator(scheduler, delay) {\n this.scheduler = scheduler;\n this.delay = delay;\n }\n SubscribeOnOperator.prototype.call = function (subscriber, source) {\n return new SubscribeOnObservable_1.SubscribeOnObservable(source, this.delay, this.scheduler).subscribe(subscriber);\n };\n return SubscribeOnOperator;\n}());\n//# sourceMappingURL=subscribeOn.js.map","import { OverlayModule, OverlayConfig, Overlay } from '@angular/cdk/overlay';\nimport { CdkPortalOutlet, BasePortalOutlet, PortalModule, PortalInjector, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { InjectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, NgZone, ElementRef, ChangeDetectorRef, ViewChild, NgModule, TemplateRef, Injectable, Injector, Optional, SkipSelf, ɵɵdefineInjectable, ɵɵinject, INJECTOR } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { Subject } from 'rxjs';\nimport { __extends, __assign } from 'tslib';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { Breakpoints, BreakpointObserver } from '@angular/cdk/layout';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Maximum amount of milliseconds that can be passed into setTimeout. */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\nimport * as ɵngcc2 from '@angular/material/button';\nimport * as ɵngcc3 from '@angular/cdk/portal';\nimport * as ɵngcc4 from '@angular/cdk/overlay';\nimport * as ɵngcc5 from '@angular/cdk/a11y';\nimport * as ɵngcc6 from '@angular/cdk/layout';\n\nfunction SimpleSnackBar_div_2_Template(rf, ctx) { if (rf & 1) {\n var _r5 = ɵngcc0.ɵɵgetCurrentView();\n ɵngcc0.ɵɵelementStart(0, \"div\", 1);\n ɵngcc0.ɵɵelementStart(1, \"button\", 2);\n ɵngcc0.ɵɵlistener(\"click\", function SimpleSnackBar_div_2_Template_button_click_1_listener() { ɵngcc0.ɵɵrestoreView(_r5); var ctx_r4 = ɵngcc0.ɵɵnextContext(); return ctx_r4.action(); });\n ɵngcc0.ɵɵtext(2);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementEnd();\n} if (rf & 2) {\n var ctx_r3 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵtextInterpolate(ctx_r3.data.action);\n} }\nfunction MatSnackBarContainer_ng_template_0_Template(rf, ctx) { }\nvar MAX_TIMEOUT = Math.pow(2, 31) - 1;\n/**\n * Reference to a snack bar dispatched from the snack bar service.\n */\nvar MatSnackBarRef = /** @class */ (function () {\n function MatSnackBarRef(containerInstance, _overlayRef) {\n var _this = this;\n this._overlayRef = _overlayRef;\n /** Subject for notifying the user that the snack bar has been dismissed. */\n this._afterDismissed = new Subject();\n /** Subject for notifying the user that the snack bar has opened and appeared. */\n this._afterOpened = new Subject();\n /** Subject for notifying the user that the snack bar action was called. */\n this._onAction = new Subject();\n /** Whether the snack bar was dismissed using the action button. */\n this._dismissedByAction = false;\n this.containerInstance = containerInstance;\n // Dismiss snackbar on action.\n this.onAction().subscribe(function () { return _this.dismiss(); });\n containerInstance._onExit.subscribe(function () { return _this._finishDismiss(); });\n }\n /** Dismisses the snack bar. */\n MatSnackBarRef.prototype.dismiss = function () {\n if (!this._afterDismissed.closed) {\n this.containerInstance.exit();\n }\n clearTimeout(this._durationTimeoutId);\n };\n /** Marks the snackbar action clicked. */\n MatSnackBarRef.prototype.dismissWithAction = function () {\n if (!this._onAction.closed) {\n this._dismissedByAction = true;\n this._onAction.next();\n this._onAction.complete();\n }\n };\n /**\n * Marks the snackbar action clicked.\n * @deprecated Use `dismissWithAction` instead.\n * @breaking-change 8.0.0\n */\n MatSnackBarRef.prototype.closeWithAction = function () {\n this.dismissWithAction();\n };\n /** Dismisses the snack bar after some duration */\n MatSnackBarRef.prototype._dismissAfter = function (duration) {\n var _this = this;\n // Note that we need to cap the duration to the maximum value for setTimeout, because\n // it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.\n this._durationTimeoutId = setTimeout(function () { return _this.dismiss(); }, Math.min(duration, MAX_TIMEOUT));\n };\n /** Marks the snackbar as opened */\n MatSnackBarRef.prototype._open = function () {\n if (!this._afterOpened.closed) {\n this._afterOpened.next();\n this._afterOpened.complete();\n }\n };\n /** Cleans up the DOM after closing. */\n MatSnackBarRef.prototype._finishDismiss = function () {\n this._overlayRef.dispose();\n if (!this._onAction.closed) {\n this._onAction.complete();\n }\n this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });\n this._afterDismissed.complete();\n this._dismissedByAction = false;\n };\n /** Gets an observable that is notified when the snack bar is finished closing. */\n MatSnackBarRef.prototype.afterDismissed = function () {\n return this._afterDismissed.asObservable();\n };\n /** Gets an observable that is notified when the snack bar has opened and appeared. */\n MatSnackBarRef.prototype.afterOpened = function () {\n return this.containerInstance._onEnter;\n };\n /** Gets an observable that is notified when the snack bar action is called. */\n MatSnackBarRef.prototype.onAction = function () {\n return this._onAction.asObservable();\n };\n return MatSnackBarRef;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that can be used to access the data that was passed in to a snack bar. */\nvar MAT_SNACK_BAR_DATA = new InjectionToken('MatSnackBarData');\n/**\n * Configuration used when opening a snack-bar.\n */\nvar MatSnackBarConfig = /** @class */ (function () {\n function MatSnackBarConfig() {\n /** The politeness level for the MatAriaLiveAnnouncer announcement. */\n this.politeness = 'assertive';\n /**\n * Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom\n * component or template, the announcement message will default to the specified message.\n */\n this.announcementMessage = '';\n /** The length of time in milliseconds to wait before automatically dismissing the snack bar. */\n this.duration = 0;\n /** Data being injected into the child component. */\n this.data = null;\n /** The horizontal position to place the snack bar. */\n this.horizontalPosition = 'center';\n /** The vertical position to place the snack bar. */\n this.verticalPosition = 'bottom';\n }\n return MatSnackBarConfig;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A component used to open as the default snack bar, matching material spec.\n * This should only be used internally by the snack bar service.\n */\nvar SimpleSnackBar = /** @class */ (function () {\n function SimpleSnackBar(snackBarRef, data) {\n this.snackBarRef = snackBarRef;\n this.data = data;\n }\n /** Performs the action on the snack bar. */\n SimpleSnackBar.prototype.action = function () {\n this.snackBarRef.dismissWithAction();\n };\n Object.defineProperty(SimpleSnackBar.prototype, \"hasAction\", {\n /** If the action button should be shown. */\n get: function () {\n return !!this.data.action;\n },\n enumerable: true,\n configurable: true\n });\n /** @nocollapse */\n SimpleSnackBar.ctorParameters = function () { return [\n { type: MatSnackBarRef },\n { type: undefined, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DATA,] }] }\n ]; };\nSimpleSnackBar.ɵfac = function SimpleSnackBar_Factory(t) { return new (t || SimpleSnackBar)(ɵngcc0.ɵɵdirectiveInject(MatSnackBarRef), ɵngcc0.ɵɵdirectiveInject(MAT_SNACK_BAR_DATA)); };\nSimpleSnackBar.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: SimpleSnackBar, selectors: [[\"simple-snack-bar\"]], hostAttrs: [1, \"mat-simple-snackbar\"], decls: 3, vars: 2, consts: [[\"class\", \"mat-simple-snackbar-action\", 4, \"ngIf\"], [1, \"mat-simple-snackbar-action\"], [\"mat-button\", \"\", 3, \"click\"]], template: function SimpleSnackBar_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelementStart(0, \"span\");\n ɵngcc0.ɵɵtext(1);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵtemplate(2, SimpleSnackBar_div_2_Template, 3, 1, \"div\", 0);\n } if (rf & 2) {\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵtextInterpolate(ctx.data.message);\n ɵngcc0.ɵɵadvance(1);\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.hasAction);\n } }, directives: [ɵngcc1.NgIf, ɵngcc2.MatButton], styles: [\".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\\n\"], encapsulation: 2, changeDetection: 0 });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(SimpleSnackBar, [{\n type: Component,\n args: [{\n selector: 'simple-snack-bar',\n template: \"
{{data.message}}\\n
\\n \\n
\\n\",\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'mat-simple-snackbar'\n },\n styles: [\".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\\n\"]\n }]\n }], function () { return [{ type: MatSnackBarRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_SNACK_BAR_DATA]\n }] }]; }, null); })();\n return SimpleSnackBar;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Animations used by the Material snack bar.\n * @docs-private\n */\nvar matSnackBarAnimations = {\n /** Animation that shows and hides a snack bar. */\n snackBarState: trigger('state', [\n state('void, hidden', style({\n transform: 'scale(0.8)',\n opacity: 0,\n })),\n state('visible', style({\n transform: 'scale(1)',\n opacity: 1,\n })),\n transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n transition('* => void, * => hidden', animate('75ms cubic-bezier(0.4, 0.0, 1, 1)', style({\n opacity: 0\n }))),\n ])\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Internal component that wraps user-provided snack bar content.\n * @docs-private\n */\nvar MatSnackBarContainer = /** @class */ (function (_super) {\n __extends(MatSnackBarContainer, _super);\n function MatSnackBarContainer(_ngZone, _elementRef, _changeDetectorRef, \n /** The snack bar configuration. */\n snackBarConfig) {\n var _this = _super.call(this) || this;\n _this._ngZone = _ngZone;\n _this._elementRef = _elementRef;\n _this._changeDetectorRef = _changeDetectorRef;\n _this.snackBarConfig = snackBarConfig;\n /** Whether the component has been destroyed. */\n _this._destroyed = false;\n /** Subject for notifying that the snack bar has exited from view. */\n _this._onExit = new Subject();\n /** Subject for notifying that the snack bar has finished entering the view. */\n _this._onEnter = new Subject();\n /** The state of the snack bar animations. */\n _this._animationState = 'void';\n /**\n * Attaches a DOM portal to the snack bar container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n _this.attachDomPortal = function (portal) {\n _this._assertNotAttached();\n _this._applySnackBarClasses();\n return _this._portalOutlet.attachDomPortal(portal);\n };\n // Based on the ARIA spec, `alert` and `status` roles have an\n // implicit `assertive` and `polite` politeness respectively.\n if (snackBarConfig.politeness === 'assertive' && !snackBarConfig.announcementMessage) {\n _this._role = 'alert';\n }\n else if (snackBarConfig.politeness === 'off') {\n _this._role = null;\n }\n else {\n _this._role = 'status';\n }\n return _this;\n }\n /** Attach a component portal as content to this snack bar container. */\n MatSnackBarContainer.prototype.attachComponentPortal = function (portal) {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachComponentPortal(portal);\n };\n /** Attach a template portal as content to this snack bar container. */\n MatSnackBarContainer.prototype.attachTemplatePortal = function (portal) {\n this._assertNotAttached();\n this._applySnackBarClasses();\n return this._portalOutlet.attachTemplatePortal(portal);\n };\n /** Handle end of animations, updating the state of the snackbar. */\n MatSnackBarContainer.prototype.onAnimationEnd = function (event) {\n var fromState = event.fromState, toState = event.toState;\n if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {\n this._completeExit();\n }\n if (toState === 'visible') {\n // Note: we shouldn't use `this` inside the zone callback,\n // because it can cause a memory leak.\n var onEnter_1 = this._onEnter;\n this._ngZone.run(function () {\n onEnter_1.next();\n onEnter_1.complete();\n });\n }\n };\n /** Begin animation of snack bar entrance into view. */\n MatSnackBarContainer.prototype.enter = function () {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.detectChanges();\n }\n };\n /** Begin animation of the snack bar exiting from view. */\n MatSnackBarContainer.prototype.exit = function () {\n // Note: this one transitions to `hidden`, rather than `void`, in order to handle the case\n // where multiple snack bars are opened in quick succession (e.g. two consecutive calls to\n // `MatSnackBar.open`).\n this._animationState = 'hidden';\n // Mark this element with an 'exit' attribute to indicate that the snackbar has\n // been dismissed and will soon be removed from the DOM. This is used by the snackbar\n // test harness.\n this._elementRef.nativeElement.setAttribute('mat-exit', '');\n return this._onExit;\n };\n /** Makes sure the exit callbacks have been invoked when the element is destroyed. */\n MatSnackBarContainer.prototype.ngOnDestroy = function () {\n this._destroyed = true;\n this._completeExit();\n };\n /**\n * Waits for the zone to settle before removing the element. Helps prevent\n * errors where we end up removing an element which is in the middle of an animation.\n */\n MatSnackBarContainer.prototype._completeExit = function () {\n var _this = this;\n this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe(function () {\n _this._onExit.next();\n _this._onExit.complete();\n });\n };\n /** Applies the various positioning and user-configured CSS classes to the snack bar. */\n MatSnackBarContainer.prototype._applySnackBarClasses = function () {\n var element = this._elementRef.nativeElement;\n var panelClasses = this.snackBarConfig.panelClass;\n if (panelClasses) {\n if (Array.isArray(panelClasses)) {\n // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n panelClasses.forEach(function (cssClass) { return element.classList.add(cssClass); });\n }\n else {\n element.classList.add(panelClasses);\n }\n }\n if (this.snackBarConfig.horizontalPosition === 'center') {\n element.classList.add('mat-snack-bar-center');\n }\n if (this.snackBarConfig.verticalPosition === 'top') {\n element.classList.add('mat-snack-bar-top');\n }\n };\n /** Asserts that no content is already attached to the container. */\n MatSnackBarContainer.prototype._assertNotAttached = function () {\n if (this._portalOutlet.hasAttached()) {\n throw Error('Attempting to attach snack bar content after content is already attached');\n }\n };\n /** @nocollapse */\n MatSnackBarContainer.ctorParameters = function () { return [\n { type: NgZone },\n { type: ElementRef },\n { type: ChangeDetectorRef },\n { type: MatSnackBarConfig }\n ]; };\n MatSnackBarContainer.propDecorators = {\n _portalOutlet: [{ type: ViewChild, args: [CdkPortalOutlet, { static: true },] }]\n };\nMatSnackBarContainer.ɵfac = function MatSnackBarContainer_Factory(t) { return new (t || MatSnackBarContainer)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.NgZone), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(MatSnackBarConfig)); };\nMatSnackBarContainer.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: MatSnackBarContainer, selectors: [[\"snack-bar-container\"]], viewQuery: function MatSnackBarContainer_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵstaticViewQuery(CdkPortalOutlet, true);\n } if (rf & 2) {\n var _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._portalOutlet = _t.first);\n } }, hostAttrs: [1, \"mat-snack-bar-container\"], hostVars: 2, hostBindings: function MatSnackBarContainer_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵcomponentHostSyntheticListener(\"@state.done\", function MatSnackBarContainer_animation_state_done_HostBindingHandler($event) { return ctx.onAnimationEnd($event); });\n } if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"role\", ctx._role);\n ɵngcc0.ɵɵupdateSyntheticHostBinding(\"@state\", ctx._animationState);\n } }, features: [ɵngcc0.ɵɵInheritDefinitionFeature], decls: 1, vars: 0, consts: [[\"cdkPortalOutlet\", \"\"]], template: function MatSnackBarContainer_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵtemplate(0, MatSnackBarContainer_ng_template_0_Template, 0, 0, \"ng-template\", 0);\n } }, directives: [ɵngcc3.CdkPortalOutlet], styles: [\".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\\n\"], encapsulation: 2, data: { animation: [matSnackBarAnimations.snackBarState] } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(MatSnackBarContainer, [{\n type: Component,\n args: [{\n selector: 'snack-bar-container',\n template: \"
\\n\",\n // In Ivy embedded views will be change detected from their declaration place, rather than\n // where they were stamped out. This means that we can't have the snack bar container be OnPush,\n // because it might cause snack bars that were opened from a template not to be out of date.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n animations: [matSnackBarAnimations.snackBarState],\n host: {\n '[attr.role]': '_role',\n 'class': 'mat-snack-bar-container',\n '[@state]': '_animationState',\n '(@state.done)': 'onAnimationEnd($event)'\n },\n styles: [\".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\\n\"]\n }]\n }], function () { return [{ type: ɵngcc0.NgZone }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ChangeDetectorRef }, { type: MatSnackBarConfig }]; }, { _portalOutlet: [{\n type: ViewChild,\n args: [CdkPortalOutlet, { static: true }]\n }] }); })();\n return MatSnackBarContainer;\n}(BasePortalOutlet));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar MatSnackBarModule = /** @class */ (function () {\n function MatSnackBarModule() {\n }\nMatSnackBarModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: MatSnackBarModule });\nMatSnackBarModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function MatSnackBarModule_Factory(t) { return new (t || MatSnackBarModule)(); }, imports: [[\n OverlayModule,\n PortalModule,\n CommonModule,\n MatButtonModule,\n MatCommonModule,\n ],\n MatCommonModule] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(MatSnackBarModule, { declarations: function () { return [MatSnackBarContainer,\n SimpleSnackBar]; }, imports: function () { return [OverlayModule,\n PortalModule,\n CommonModule,\n MatButtonModule,\n MatCommonModule]; }, exports: function () { return [MatSnackBarContainer,\n MatCommonModule]; } }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(MatSnackBarModule, [{\n type: NgModule,\n args: [{\n imports: [\n OverlayModule,\n PortalModule,\n CommonModule,\n MatButtonModule,\n MatCommonModule,\n ],\n exports: [MatSnackBarContainer, MatCommonModule],\n declarations: [MatSnackBarContainer, SimpleSnackBar],\n entryComponents: [MatSnackBarContainer, SimpleSnackBar]\n }]\n }], function () { return []; }, null); })();\n return MatSnackBarModule;\n}());\n\n/** Injection token that can be used to specify default snack bar. */\nvar MAT_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('mat-snack-bar-default-options', {\n providedIn: 'root',\n factory: MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY() {\n return new MatSnackBarConfig();\n}\n/**\n * Service to dispatch Material Design snack bar messages.\n */\nvar MatSnackBar = /** @class */ (function () {\n function MatSnackBar(_overlay, _live, _injector, _breakpointObserver, _parentSnackBar, _defaultConfig) {\n this._overlay = _overlay;\n this._live = _live;\n this._injector = _injector;\n this._breakpointObserver = _breakpointObserver;\n this._parentSnackBar = _parentSnackBar;\n this._defaultConfig = _defaultConfig;\n /**\n * Reference to the current snack bar in the view *at this level* (in the Angular injector tree).\n * If there is a parent snack-bar service, all operations should delegate to that parent\n * via `_openedSnackBarRef`.\n */\n this._snackBarRefAtThisLevel = null;\n }\n Object.defineProperty(MatSnackBar.prototype, \"_openedSnackBarRef\", {\n /** Reference to the currently opened snackbar at *any* level. */\n get: function () {\n var parent = this._parentSnackBar;\n return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;\n },\n set: function (value) {\n if (this._parentSnackBar) {\n this._parentSnackBar._openedSnackBarRef = value;\n }\n else {\n this._snackBarRefAtThisLevel = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates and dispatches a snack bar with a custom component for the content, removing any\n * currently opened snack bars.\n *\n * @param component Component to be instantiated.\n * @param config Extra configuration for the snack bar.\n */\n MatSnackBar.prototype.openFromComponent = function (component, config) {\n return this._attach(component, config);\n };\n /**\n * Creates and dispatches a snack bar with a custom template for the content, removing any\n * currently opened snack bars.\n *\n * @param template Template to be instantiated.\n * @param config Extra configuration for the snack bar.\n */\n MatSnackBar.prototype.openFromTemplate = function (template, config) {\n return this._attach(template, config);\n };\n /**\n * Opens a snackbar with a message and an optional action.\n * @param message The message to show in the snackbar.\n * @param action The label for the snackbar action.\n * @param config Additional configuration options for the snackbar.\n */\n MatSnackBar.prototype.open = function (message, action, config) {\n if (action === void 0) { action = ''; }\n var _config = __assign(__assign({}, this._defaultConfig), config);\n // Since the user doesn't have access to the component, we can\n // override the data to pass in our own message and action.\n _config.data = { message: message, action: action };\n if (!_config.announcementMessage) {\n _config.announcementMessage = message;\n }\n return this.openFromComponent(SimpleSnackBar, _config);\n };\n /**\n * Dismisses the currently-visible snack bar.\n */\n MatSnackBar.prototype.dismiss = function () {\n if (this._openedSnackBarRef) {\n this._openedSnackBarRef.dismiss();\n }\n };\n MatSnackBar.prototype.ngOnDestroy = function () {\n // Only dismiss the snack bar at the current level on destroy.\n if (this._snackBarRefAtThisLevel) {\n this._snackBarRefAtThisLevel.dismiss();\n }\n };\n /**\n * Attaches the snack bar container component to the overlay.\n */\n MatSnackBar.prototype._attachSnackBarContainer = function (overlayRef, config) {\n var userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n var injector = new PortalInjector(userInjector || this._injector, new WeakMap([\n [MatSnackBarConfig, config]\n ]));\n var containerPortal = new ComponentPortal(MatSnackBarContainer, config.viewContainerRef, injector);\n var containerRef = overlayRef.attach(containerPortal);\n containerRef.instance.snackBarConfig = config;\n return containerRef.instance;\n };\n /**\n * Places a new component or a template as the content of the snack bar container.\n */\n MatSnackBar.prototype._attach = function (content, userConfig) {\n var config = __assign(__assign(__assign({}, new MatSnackBarConfig()), this._defaultConfig), userConfig);\n var overlayRef = this._createOverlay(config);\n var container = this._attachSnackBarContainer(overlayRef, config);\n var snackBarRef = new MatSnackBarRef(container, overlayRef);\n if (content instanceof TemplateRef) {\n var portal = new TemplatePortal(content, null, {\n $implicit: config.data,\n snackBarRef: snackBarRef\n });\n snackBarRef.instance = container.attachTemplatePortal(portal);\n }\n else {\n var injector = this._createInjector(config, snackBarRef);\n var portal = new ComponentPortal(content, undefined, injector);\n var contentRef = container.attachComponentPortal(portal);\n // We can't pass this via the injector, because the injector is created earlier.\n snackBarRef.instance = contentRef.instance;\n }\n // Subscribe to the breakpoint observer and attach the mat-snack-bar-handset class as\n // appropriate. This class is applied to the overlay element because the overlay must expand to\n // fill the width of the screen for full width snackbars.\n this._breakpointObserver.observe(Breakpoints.HandsetPortrait).pipe(takeUntil(overlayRef.detachments())).subscribe(function (state) {\n var classList = overlayRef.overlayElement.classList;\n var className = 'mat-snack-bar-handset';\n state.matches ? classList.add(className) : classList.remove(className);\n });\n this._animateSnackBar(snackBarRef, config);\n this._openedSnackBarRef = snackBarRef;\n return this._openedSnackBarRef;\n };\n /** Animates the old snack bar out and the new one in. */\n MatSnackBar.prototype._animateSnackBar = function (snackBarRef, config) {\n var _this = this;\n // When the snackbar is dismissed, clear the reference to it.\n snackBarRef.afterDismissed().subscribe(function () {\n // Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.\n if (_this._openedSnackBarRef == snackBarRef) {\n _this._openedSnackBarRef = null;\n }\n if (config.announcementMessage) {\n _this._live.clear();\n }\n });\n if (this._openedSnackBarRef) {\n // If a snack bar is already in view, dismiss it and enter the\n // new snack bar after exit animation is complete.\n this._openedSnackBarRef.afterDismissed().subscribe(function () {\n snackBarRef.containerInstance.enter();\n });\n this._openedSnackBarRef.dismiss();\n }\n else {\n // If no snack bar is in view, enter the new snack bar.\n snackBarRef.containerInstance.enter();\n }\n // If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.\n if (config.duration && config.duration > 0) {\n snackBarRef.afterOpened().subscribe(function () { return snackBarRef._dismissAfter(config.duration); });\n }\n if (config.announcementMessage) {\n this._live.announce(config.announcementMessage, config.politeness);\n }\n };\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified snack bar config.\n */\n MatSnackBar.prototype._createOverlay = function (config) {\n var overlayConfig = new OverlayConfig();\n overlayConfig.direction = config.direction;\n var positionStrategy = this._overlay.position().global();\n // Set horizontal position.\n var isRtl = config.direction === 'rtl';\n var isLeft = (config.horizontalPosition === 'left' ||\n (config.horizontalPosition === 'start' && !isRtl) ||\n (config.horizontalPosition === 'end' && isRtl));\n var isRight = !isLeft && config.horizontalPosition !== 'center';\n if (isLeft) {\n positionStrategy.left('0');\n }\n else if (isRight) {\n positionStrategy.right('0');\n }\n else {\n positionStrategy.centerHorizontally();\n }\n // Set horizontal position.\n if (config.verticalPosition === 'top') {\n positionStrategy.top('0');\n }\n else {\n positionStrategy.bottom('0');\n }\n overlayConfig.positionStrategy = positionStrategy;\n return this._overlay.create(overlayConfig);\n };\n /**\n * Creates an injector to be used inside of a snack bar component.\n * @param config Config that was used to create the snack bar.\n * @param snackBarRef Reference to the snack bar.\n */\n MatSnackBar.prototype._createInjector = function (config, snackBarRef) {\n var userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n return new PortalInjector(userInjector || this._injector, new WeakMap([\n [MatSnackBarRef, snackBarRef],\n [MAT_SNACK_BAR_DATA, config.data]\n ]));\n };\n /** @nocollapse */\n MatSnackBar.ctorParameters = function () { return [\n { type: Overlay },\n { type: LiveAnnouncer },\n { type: Injector },\n { type: BreakpointObserver },\n { type: MatSnackBar, decorators: [{ type: Optional }, { type: SkipSelf }] },\n { type: MatSnackBarConfig, decorators: [{ type: Inject, args: [MAT_SNACK_BAR_DEFAULT_OPTIONS,] }] }\n ]; };\n MatSnackBar.ɵprov = ɵɵdefineInjectable({ factory: function MatSnackBar_Factory() { return new MatSnackBar(ɵɵinject(Overlay), ɵɵinject(LiveAnnouncer), ɵɵinject(INJECTOR), ɵɵinject(BreakpointObserver), ɵɵinject(MatSnackBar, 12), ɵɵinject(MAT_SNACK_BAR_DEFAULT_OPTIONS)); }, token: MatSnackBar, providedIn: MatSnackBarModule });\nMatSnackBar.ɵfac = function MatSnackBar_Factory(t) { return new (t || MatSnackBar)(ɵngcc0.ɵɵinject(ɵngcc4.Overlay), ɵngcc0.ɵɵinject(ɵngcc5.LiveAnnouncer), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(ɵngcc6.BreakpointObserver), ɵngcc0.ɵɵinject(MatSnackBar, 12), ɵngcc0.ɵɵinject(MAT_SNACK_BAR_DEFAULT_OPTIONS)); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(MatSnackBar, [{\n type: Injectable,\n args: [{ providedIn: MatSnackBarModule }]\n }], function () { return [{ type: ɵngcc4.Overlay }, { type: ɵngcc5.LiveAnnouncer }, { type: ɵngcc0.Injector }, { type: ɵngcc6.BreakpointObserver }, { type: MatSnackBar, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: MatSnackBarConfig, decorators: [{\n type: Inject,\n args: [MAT_SNACK_BAR_DEFAULT_OPTIONS]\n }] }]; }, null); })();\n return MatSnackBar;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SNACK_BAR_DATA, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBar, MatSnackBarConfig, MatSnackBarContainer, MatSnackBarModule, MatSnackBarRef, SimpleSnackBar, matSnackBarAnimations };\n\n//# sourceMappingURL=snack-bar.js.map","/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */\nimport { empty } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nexport var NotificationKind;\n/*@__PURE__*/ (function (NotificationKind) {\n NotificationKind[\"NEXT\"] = \"N\";\n NotificationKind[\"ERROR\"] = \"E\";\n NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nvar Notification = /*@__PURE__*/ (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n Notification.prototype.observe = function (observer) {\n switch (this.kind) {\n case 'N':\n return observer.next && observer.next(this.value);\n case 'E':\n return observer.error && observer.error(this.error);\n case 'C':\n return observer.complete && observer.complete();\n }\n };\n Notification.prototype.do = function (next, error, complete) {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return next && next(this.value);\n case 'E':\n return error && error(this.error);\n case 'C':\n return complete && complete();\n }\n };\n Notification.prototype.accept = function (nextOrObserver, error, complete) {\n if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n return this.observe(nextOrObserver);\n }\n else {\n return this.do(nextOrObserver, error, complete);\n }\n };\n Notification.prototype.toObservable = function () {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return of(this.value);\n case 'E':\n return throwError(this.error);\n case 'C':\n return empty();\n }\n throw new Error('unexpected notification kind value');\n };\n Notification.createNext = function (value) {\n if (typeof value !== 'undefined') {\n return new Notification('N', value);\n }\n return Notification.undefinedValueNotification;\n };\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n Notification.undefinedValueNotification = new Notification('N', undefined);\n return Notification;\n}());\nexport { Notification };\n//# sourceMappingURL=Notification.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function map(project, thisArg) {\n return function mapOperation(source) {\n if (typeof project !== 'function') {\n throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n }\n return source.lift(new MapOperator(project, thisArg));\n };\n}\nvar MapOperator = /*@__PURE__*/ (function () {\n function MapOperator(project, thisArg) {\n this.project = project;\n this.thisArg = thisArg;\n }\n MapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n };\n return MapOperator;\n}());\nexport { MapOperator };\nvar MapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MapSubscriber, _super);\n function MapSubscriber(destination, project, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.count = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n MapSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.project.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return MapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=map.js.map\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar OuterSubscriber_1 = require(\"../OuterSubscriber\");\nvar InnerSubscriber_1 = require(\"../InnerSubscriber\");\nvar subscribeToResult_1 = require(\"../util/subscribeToResult\");\nvar map_1 = require(\"./map\");\nvar from_1 = require(\"../observable/from\");\nfunction switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(switchMap(function (a, i) { return from_1.from(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n }\n return function (source) { return source.lift(new SwitchMapOperator(project)); };\n}\nexports.switchMap = switchMap;\nvar SwitchMapOperator = (function () {\n function SwitchMapOperator(project) {\n this.project = project;\n }\n SwitchMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n };\n return SwitchMapOperator;\n}());\nvar SwitchMapSubscriber = (function (_super) {\n __extends(SwitchMapSubscriber, _super);\n function SwitchMapSubscriber(destination, project) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.index = 0;\n return _this;\n }\n SwitchMapSubscriber.prototype._next = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result, value, index);\n };\n SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {\n var innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n var innerSubscriber = new InnerSubscriber_1.InnerSubscriber(this, value, index);\n var destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = subscribeToResult_1.subscribeToResult(this, result, undefined, undefined, innerSubscriber);\n if (this.innerSubscription !== innerSubscriber) {\n destination.add(this.innerSubscription);\n }\n };\n SwitchMapSubscriber.prototype._complete = function () {\n var innerSubscription = this.innerSubscription;\n if (!innerSubscription || innerSubscription.closed) {\n _super.prototype._complete.call(this);\n }\n this.unsubscribe();\n };\n SwitchMapSubscriber.prototype._unsubscribe = function () {\n this.innerSubscription = null;\n };\n SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var destination = this.destination;\n destination.remove(innerSub);\n this.innerSubscription = null;\n if (this.isStopped) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n return SwitchMapSubscriber;\n}(OuterSubscriber_1.OuterSubscriber));\n//# sourceMappingURL=switchMap.js.map","/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport var empty = {\n closed: true,\n next: function (value) { },\n error: function (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n },\n complete: function () { }\n};\n//# sourceMappingURL=Observer.js.map\n","/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */\nimport { canReportError } from './util/canReportError';\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nvar Observable = /*@__PURE__*/ (function () {\n function Observable(subscribe) {\n this._isScalar = false;\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var operator = this.operator;\n var sink = toSubscriber(observerOrNext, error, complete);\n if (operator) {\n sink.add(operator.call(sink, this.source));\n }\n else {\n sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n this._subscribe(sink) :\n this._trySubscribe(sink));\n }\n if (config.useDeprecatedSynchronousErrorHandling) {\n if (sink.syncErrorThrowable) {\n sink.syncErrorThrowable = false;\n if (sink.syncErrorThrown) {\n throw sink.syncErrorValue;\n }\n }\n }\n return sink;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n sink.syncErrorThrown = true;\n sink.syncErrorValue = err;\n }\n if (canReportError(sink)) {\n sink.error(err);\n }\n else {\n console.warn(err);\n }\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscription;\n subscription = _this.subscribe(function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n if (subscription) {\n subscription.unsubscribe();\n }\n }\n }, reject, resolve);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var source = this.source;\n return source && source.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n if (operations.length === 0) {\n return this;\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n if (!promiseCtor) {\n promiseCtor = config.Promise || Promise;\n }\n if (!promiseCtor) {\n throw new Error('no Promise impl found');\n }\n return promiseCtor;\n}\n//# sourceMappingURL=Observable.js.map\n","/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { empty as emptyObserver } from '../Observer';\nexport function toSubscriber(nextOrObserver, error, complete) {\n if (nextOrObserver) {\n if (nextOrObserver instanceof Subscriber) {\n return nextOrObserver;\n }\n if (nextOrObserver[rxSubscriberSymbol]) {\n return nextOrObserver[rxSubscriberSymbol]();\n }\n }\n if (!nextOrObserver && !error && !complete) {\n return new Subscriber(emptyObserver);\n }\n return new Subscriber(nextOrObserver, error, complete);\n}\n//# sourceMappingURL=toSubscriber.js.map\n","/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nexport function canReportError(observer) {\n while (observer) {\n var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;\n if (closed_1 || isStopped) {\n return false;\n }\n else if (destination && destination instanceof Subscriber) {\n observer = destination;\n }\n else {\n observer = null;\n }\n }\n return true;\n}\n//# sourceMappingURL=canReportError.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Observable_1 = require(\"../Observable\");\nvar isScheduler_1 = require(\"../util/isScheduler\");\nvar mergeAll_1 = require(\"../operators/mergeAll\");\nvar fromArray_1 = require(\"./fromArray\");\nfunction merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var concurrent = Number.POSITIVE_INFINITY;\n var scheduler = null;\n var last = observables[observables.length - 1];\n if (isScheduler_1.isScheduler(last)) {\n scheduler = observables.pop();\n if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n concurrent = observables.pop();\n }\n }\n else if (typeof last === 'number') {\n concurrent = observables.pop();\n }\n if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable_1.Observable) {\n return observables[0];\n }\n return mergeAll_1.mergeAll(concurrent)(fromArray_1.fromArray(observables, scheduler));\n}\nexports.merge = merge;\n//# sourceMappingURL=merge.js.map","/**\n * @license NgRx 9.1.2\n * (c) 2015-2018 Brandon Roberts, Mike Ryan, Rob Wormald, Victor Savkin\n * License: MIT\n */\nimport { __assign, __spread, __extends, __decorate, __metadata, __param, __read, __values } from 'tslib';\nimport { Injectable, InjectionToken, Inject, isDevMode, NgZone, NgModule, Optional, SkipSelf, Injector } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject, queueScheduler } from 'rxjs';\nimport { observeOn, withLatestFrom, scan, pluck, map, distinctUntilChanged } from 'rxjs/operators';\n\n/**\n * @description\n * Creates a configured `Creator` function that, when called, returns an object in the shape of the `Action` interface.\n *\n * Action creators reduce the explicitness of class-based action creators.\n *\n * @param type Describes the action that will be dispatched\n * @param config Additional metadata needed for the handling of the action. See {@link createAction#usage-notes Usage Notes}.\n *\n * @usageNotes\n *\n * **Declaring an action creator**\n *\n * Without additional metadata:\n * ```ts\n * export const increment = createAction('[Counter] Increment');\n * ```\n * With additional metadata:\n * ```ts\n * export const loginSuccess = createAction(\n * '[Auth/API] Login Success',\n * props<{ user: User }>()\n * );\n * ```\n * With a function:\n * ```ts\n * export const loginSuccess = createAction(\n * '[Auth/API] Login Success',\n * (response: Response) => response.user\n * );\n * ```\n *\n * **Dispatching an action**\n *\n * Without additional metadata:\n * ```ts\n * store.dispatch(increment());\n * ```\n * With additional metadata:\n * ```ts\n * store.dispatch(loginSuccess({ user: newUser }));\n * ```\n *\n * **Referencing an action in a reducer**\n *\n * Using a switch statement:\n * ```ts\n * switch (action.type) {\n * // ...\n * case AuthApiActions.loginSuccess.type: {\n * return {\n * ...state,\n * user: action.user\n * };\n * }\n * }\n * ```\n * Using a reducer creator:\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n *\n * **Referencing an action in an effect**\n * ```ts\n * effectName$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(AuthApiActions.loginSuccess),\n * // ...\n * )\n * );\n * ```\n */\nimport * as ɵngcc0 from '@angular/core';\nfunction createAction(type, config) {\n if (typeof config === 'function') {\n return defineType(type, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return (__assign(__assign({}, config.apply(void 0, __spread(args))), { type: type }));\n });\n }\n var as = config ? config._as : 'empty';\n switch (as) {\n case 'empty':\n return defineType(type, function () { return ({ type: type }); });\n case 'props':\n return defineType(type, function (props) { return (__assign(__assign({}, props), { type: type })); });\n default:\n throw new Error('Unexpected config.');\n }\n}\nfunction props() {\n return { _as: 'props', _p: undefined };\n}\nfunction union(creators) {\n return undefined;\n}\nfunction defineType(type, creator) {\n return Object.defineProperty(creator, 'type', {\n value: type,\n writable: false,\n });\n}\n\nvar INIT = '@ngrx/store/init';\nvar ActionsSubject = /** @class */ (function (_super) {\n __extends(ActionsSubject, _super);\n function ActionsSubject() {\n return _super.call(this, { type: INIT }) || this;\n }\n ActionsSubject.prototype.next = function (action) {\n if (typeof action === 'function') {\n throw new TypeError(\"\\n Dispatch expected an object, instead it received a function.\\n If you're using the createAction function, make sure to invoke the function\\n before dispatching the action. For example, someAction should be someAction().\");\n }\n else if (typeof action === 'undefined') {\n throw new TypeError(\"Actions must be objects\");\n }\n else if (typeof action.type === 'undefined') {\n throw new TypeError(\"Actions must have a type property\");\n }\n _super.prototype.next.call(this, action);\n };\n ActionsSubject.prototype.complete = function () {\n /* noop */\n };\n ActionsSubject.prototype.ngOnDestroy = function () {\n _super.prototype.complete.call(this);\n };\n ActionsSubject = __decorate([ __metadata(\"design:paramtypes\", [])\n ], ActionsSubject);\nActionsSubject.ɵfac = function ActionsSubject_Factory(t) { return new (t || ActionsSubject)(); };\nActionsSubject.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: ActionsSubject, factory: function (t) { return ActionsSubject.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(ActionsSubject, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return ActionsSubject;\n}(BehaviorSubject));\nvar ACTIONS_SUBJECT_PROVIDERS = [ActionsSubject];\n\nvar _ROOT_STORE_GUARD = new InjectionToken('@ngrx/store Internal Root Guard');\nvar _INITIAL_STATE = new InjectionToken('@ngrx/store Internal Initial State');\nvar INITIAL_STATE = new InjectionToken('@ngrx/store Initial State');\nvar REDUCER_FACTORY = new InjectionToken('@ngrx/store Reducer Factory');\nvar _REDUCER_FACTORY = new InjectionToken('@ngrx/store Internal Reducer Factory Provider');\nvar INITIAL_REDUCERS = new InjectionToken('@ngrx/store Initial Reducers');\nvar _INITIAL_REDUCERS = new InjectionToken('@ngrx/store Internal Initial Reducers');\nvar STORE_FEATURES = new InjectionToken('@ngrx/store Store Features');\nvar _STORE_REDUCERS = new InjectionToken('@ngrx/store Internal Store Reducers');\nvar _FEATURE_REDUCERS = new InjectionToken('@ngrx/store Internal Feature Reducers');\nvar _FEATURE_CONFIGS = new InjectionToken('@ngrx/store Internal Feature Configs');\nvar _STORE_FEATURES = new InjectionToken('@ngrx/store Internal Store Features');\nvar _FEATURE_REDUCERS_TOKEN = new InjectionToken('@ngrx/store Internal Feature Reducers Token');\nvar FEATURE_REDUCERS = new InjectionToken('@ngrx/store Feature Reducers');\n/**\n * User-defined meta reducers from StoreModule.forRoot()\n */\nvar USER_PROVIDED_META_REDUCERS = new InjectionToken('@ngrx/store User Provided Meta Reducers');\n/**\n * Meta reducers defined either internally by @ngrx/store or by library authors\n */\nvar META_REDUCERS = new InjectionToken('@ngrx/store Meta Reducers');\n/**\n * Concats the user provided meta reducers and the meta reducers provided on the multi\n * injection token\n */\nvar _RESOLVED_META_REDUCERS = new InjectionToken('@ngrx/store Internal Resolved Meta Reducers');\n/**\n * Runtime checks defined by the user via an InjectionToken\n * Defaults to `_USER_RUNTIME_CHECKS`\n */\nvar USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store User Runtime Checks Config');\n/**\n * Runtime checks defined by the user via forRoot()\n */\nvar _USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal User Runtime Checks Config');\n/**\n * Runtime checks currently in use\n */\nvar _ACTIVE_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal Runtime Checks');\n\nfunction combineReducers(reducers, initialState) {\n if (initialState === void 0) { initialState = {}; }\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n return function combination(state, action) {\n state = state === undefined ? initialState : state;\n var hasChanged = false;\n var nextState = {};\n for (var i = 0; i < finalReducerKeys.length; i++) {\n var key = finalReducerKeys[i];\n var reducer = finalReducers[key];\n var previousStateForKey = state[key];\n var nextStateForKey = reducer(previousStateForKey, action);\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\nfunction omit(object, keyToRemove) {\n return Object.keys(object)\n .filter(function (key) { return key !== keyToRemove; })\n .reduce(function (result, key) {\n var _a;\n return Object.assign(result, (_a = {}, _a[key] = object[key], _a));\n }, {});\n}\nfunction compose() {\n var functions = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n functions[_i] = arguments[_i];\n }\n return function (arg) {\n if (functions.length === 0) {\n return arg;\n }\n var last = functions[functions.length - 1];\n var rest = functions.slice(0, -1);\n return rest.reduceRight(function (composed, fn) { return fn(composed); }, last(arg));\n };\n}\nfunction createReducerFactory(reducerFactory, metaReducers) {\n if (Array.isArray(metaReducers) && metaReducers.length > 0) {\n reducerFactory = compose.apply(null, __spread(metaReducers, [\n reducerFactory,\n ]));\n }\n return function (reducers, initialState) {\n var reducer = reducerFactory(reducers);\n return function (state, action) {\n state = state === undefined ? initialState : state;\n return reducer(state, action);\n };\n };\n}\nfunction createFeatureReducerFactory(metaReducers) {\n var reducerFactory = Array.isArray(metaReducers) && metaReducers.length > 0\n ? compose.apply(void 0, __spread(metaReducers)) : function (r) { return r; };\n return function (reducer, initialState) {\n reducer = reducerFactory(reducer);\n return function (state, action) {\n state = state === undefined ? initialState : state;\n return reducer(state, action);\n };\n };\n}\n\nvar ReducerObservable = /** @class */ (function (_super) {\n __extends(ReducerObservable, _super);\n function ReducerObservable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ReducerObservable;\n}(Observable));\nvar ReducerManagerDispatcher = /** @class */ (function (_super) {\n __extends(ReducerManagerDispatcher, _super);\n function ReducerManagerDispatcher() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ReducerManagerDispatcher;\n}(ActionsSubject));\nvar UPDATE = '@ngrx/store/update-reducers';\nvar ReducerManager = /** @class */ (function (_super) {\n __extends(ReducerManager, _super);\n function ReducerManager(dispatcher, initialState, reducers, reducerFactory) {\n var _this = _super.call(this, reducerFactory(reducers, initialState)) || this;\n _this.dispatcher = dispatcher;\n _this.initialState = initialState;\n _this.reducers = reducers;\n _this.reducerFactory = reducerFactory;\n return _this;\n }\n ReducerManager.prototype.addFeature = function (feature) {\n this.addFeatures([feature]);\n };\n ReducerManager.prototype.addFeatures = function (features) {\n var reducers = features.reduce(function (reducerDict, _a) {\n var reducers = _a.reducers, reducerFactory = _a.reducerFactory, metaReducers = _a.metaReducers, initialState = _a.initialState, key = _a.key;\n var reducer = typeof reducers === 'function'\n ? createFeatureReducerFactory(metaReducers)(reducers, initialState)\n : createReducerFactory(reducerFactory, metaReducers)(reducers, initialState);\n reducerDict[key] = reducer;\n return reducerDict;\n }, {});\n this.addReducers(reducers);\n };\n ReducerManager.prototype.removeFeature = function (feature) {\n this.removeFeatures([feature]);\n };\n ReducerManager.prototype.removeFeatures = function (features) {\n this.removeReducers(features.map(function (p) { return p.key; }));\n };\n ReducerManager.prototype.addReducer = function (key, reducer) {\n var _a;\n this.addReducers((_a = {}, _a[key] = reducer, _a));\n };\n ReducerManager.prototype.addReducers = function (reducers) {\n this.reducers = __assign(__assign({}, this.reducers), reducers);\n this.updateReducers(Object.keys(reducers));\n };\n ReducerManager.prototype.removeReducer = function (featureKey) {\n this.removeReducers([featureKey]);\n };\n ReducerManager.prototype.removeReducers = function (featureKeys) {\n var _this = this;\n featureKeys.forEach(function (key) {\n _this.reducers = omit(_this.reducers, key) /*TODO(#823)*/;\n });\n this.updateReducers(featureKeys);\n };\n ReducerManager.prototype.updateReducers = function (featureKeys) {\n this.next(this.reducerFactory(this.reducers, this.initialState));\n this.dispatcher.next({\n type: UPDATE,\n features: featureKeys,\n });\n };\n ReducerManager.prototype.ngOnDestroy = function () {\n this.complete();\n };\n ReducerManager = __decorate([ __param(1, Inject(INITIAL_STATE)),\n __param(2, Inject(INITIAL_REDUCERS)),\n __param(3, Inject(REDUCER_FACTORY)),\n __metadata(\"design:paramtypes\", [ReducerManagerDispatcher, Object, Object, Function])\n ], ReducerManager);\nReducerManager.ɵfac = function ReducerManager_Factory(t) { return new (t || ReducerManager)(ɵngcc0.ɵɵinject(ReducerManagerDispatcher), ɵngcc0.ɵɵinject(INITIAL_STATE), ɵngcc0.ɵɵinject(INITIAL_REDUCERS), ɵngcc0.ɵɵinject(REDUCER_FACTORY)); };\nReducerManager.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: ReducerManager, factory: function (t) { return ReducerManager.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(ReducerManager, [{\n type: Injectable\n }], function () { return [{ type: ReducerManagerDispatcher }, { type: Object, decorators: [{\n type: Inject,\n args: [INITIAL_STATE]\n }] }, { type: Object, decorators: [{\n type: Inject,\n args: [INITIAL_REDUCERS]\n }] }, { type: Function, decorators: [{\n type: Inject,\n args: [REDUCER_FACTORY]\n }] }]; }, null); })();\n return ReducerManager;\n}(BehaviorSubject));\nvar REDUCER_MANAGER_PROVIDERS = [\n ReducerManager,\n { provide: ReducerObservable, useExisting: ReducerManager },\n { provide: ReducerManagerDispatcher, useExisting: ActionsSubject },\n];\n\nvar ScannedActionsSubject = /** @class */ (function (_super) {\n __extends(ScannedActionsSubject, _super);\n function ScannedActionsSubject() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ScannedActionsSubject.prototype.ngOnDestroy = function () {\n this.complete();\n };\nScannedActionsSubject.ɵfac = function ScannedActionsSubject_Factory(t) { return ɵScannedActionsSubject_BaseFactory(t || ScannedActionsSubject); };\nScannedActionsSubject.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: ScannedActionsSubject, factory: function (t) { return ScannedActionsSubject.ɵfac(t); } });\nvar ɵScannedActionsSubject_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(ScannedActionsSubject);\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(ScannedActionsSubject, [{\n type: Injectable\n }], null, null); })();\n return ScannedActionsSubject;\n}(Subject));\nvar SCANNED_ACTIONS_SUBJECT_PROVIDERS = [\n ScannedActionsSubject,\n];\n\nvar StateObservable = /** @class */ (function (_super) {\n __extends(StateObservable, _super);\n function StateObservable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return StateObservable;\n}(Observable));\nvar State = /** @class */ (function (_super) {\n __extends(State, _super);\n function State(actions$, reducer$, scannedActions, initialState) {\n var _this = _super.call(this, initialState) || this;\n var actionsOnQueue$ = actions$.pipe(observeOn(queueScheduler));\n var withLatestReducer$ = actionsOnQueue$.pipe(withLatestFrom(reducer$));\n var seed = { state: initialState };\n var stateAndAction$ = withLatestReducer$.pipe(scan(reduceState, seed));\n _this.stateSubscription = stateAndAction$.subscribe(function (_a) {\n var state = _a.state, action = _a.action;\n _this.next(state);\n scannedActions.next(action);\n });\n return _this;\n }\n State.prototype.ngOnDestroy = function () {\n this.stateSubscription.unsubscribe();\n this.complete();\n };\n State.INIT = INIT;\n State = __decorate([ __param(3, Inject(INITIAL_STATE)),\n __metadata(\"design:paramtypes\", [ActionsSubject,\n ReducerObservable,\n ScannedActionsSubject, Object])\n ], State);\nState.ɵfac = function State_Factory(t) { return new (t || State)(ɵngcc0.ɵɵinject(ActionsSubject), ɵngcc0.ɵɵinject(ReducerObservable), ɵngcc0.ɵɵinject(ScannedActionsSubject), ɵngcc0.ɵɵinject(INITIAL_STATE)); };\nState.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: State, factory: function (t) { return State.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(State, [{\n type: Injectable\n }], function () { return [{ type: ActionsSubject }, { type: ReducerObservable }, { type: ScannedActionsSubject }, { type: Object, decorators: [{\n type: Inject,\n args: [INITIAL_STATE]\n }] }]; }, null); })();\n return State;\n}(BehaviorSubject));\nfunction reduceState(stateActionPair, _a) {\n if (stateActionPair === void 0) { stateActionPair = { state: undefined }; }\n var _b = __read(_a, 2), action = _b[0], reducer = _b[1];\n var state = stateActionPair.state;\n return { state: reducer(state, action), action: action };\n}\nvar STATE_PROVIDERS = [\n State,\n { provide: StateObservable, useExisting: State },\n];\n\nvar Store = /** @class */ (function (_super) {\n __extends(Store, _super);\n function Store(state$, actionsObserver, reducerManager) {\n var _this = _super.call(this) || this;\n _this.actionsObserver = actionsObserver;\n _this.reducerManager = reducerManager;\n _this.source = state$;\n return _this;\n }\n Store_1 = Store;\n Store.prototype.select = function (pathOrMapFn) {\n var _a;\n var paths = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n paths[_i - 1] = arguments[_i];\n }\n return (_a = select).call.apply(_a, __spread([null, pathOrMapFn], paths))(this);\n };\n Store.prototype.lift = function (operator) {\n var store = new Store_1(this, this.actionsObserver, this.reducerManager);\n store.operator = operator;\n return store;\n };\n Store.prototype.dispatch = function (action) {\n this.actionsObserver.next(action);\n };\n Store.prototype.next = function (action) {\n this.actionsObserver.next(action);\n };\n Store.prototype.error = function (err) {\n this.actionsObserver.error(err);\n };\n Store.prototype.complete = function () {\n this.actionsObserver.complete();\n };\n Store.prototype.addReducer = function (key, reducer) {\n this.reducerManager.addReducer(key, reducer);\n };\n Store.prototype.removeReducer = function (key) {\n this.reducerManager.removeReducer(key);\n };\n var Store_1;\n Store = Store_1 = __decorate([ __metadata(\"design:paramtypes\", [StateObservable,\n ActionsSubject,\n ReducerManager])\n ], Store);\nStore.ɵfac = function Store_Factory(t) { return new (t || Store)(ɵngcc0.ɵɵinject(StateObservable), ɵngcc0.ɵɵinject(ActionsSubject), ɵngcc0.ɵɵinject(ReducerManager)); };\nStore.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: Store, factory: function (t) { return Store.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Store, [{\n type: Injectable\n }], function () { return [{ type: StateObservable }, { type: ActionsSubject }, { type: ReducerManager }]; }, null); })();\n return Store;\n}(Observable));\nvar STORE_PROVIDERS = [Store];\nfunction select(pathOrMapFn, propsOrPath) {\n var paths = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n paths[_i - 2] = arguments[_i];\n }\n return function selectOperator(source$) {\n var mapped$;\n if (typeof pathOrMapFn === 'string') {\n var pathSlices = __spread([propsOrPath], paths).filter(Boolean);\n mapped$ = source$.pipe(pluck.apply(void 0, __spread([pathOrMapFn], pathSlices)));\n }\n else if (typeof pathOrMapFn === 'function') {\n mapped$ = source$.pipe(map(function (source) { return pathOrMapFn(source, propsOrPath); }));\n }\n else {\n throw new TypeError(\"Unexpected type '\" + typeof pathOrMapFn + \"' in select operator,\" +\n \" expected 'string' or 'function'\");\n }\n return mapped$.pipe(distinctUntilChanged());\n };\n}\n\nfunction isEqualCheck(a, b) {\n return a === b;\n}\nfunction isArgumentsChanged(args, lastArguments, comparator) {\n for (var i = 0; i < args.length; i++) {\n if (!comparator(args[i], lastArguments[i])) {\n return true;\n }\n }\n return false;\n}\nfunction resultMemoize(projectionFn, isResultEqual) {\n return defaultMemoize(projectionFn, isEqualCheck, isResultEqual);\n}\nfunction defaultMemoize(projectionFn, isArgumentsEqual, isResultEqual) {\n if (isArgumentsEqual === void 0) { isArgumentsEqual = isEqualCheck; }\n if (isResultEqual === void 0) { isResultEqual = isEqualCheck; }\n var lastArguments = null;\n // tslint:disable-next-line:no-any anything could be the result.\n var lastResult = null;\n var overrideResult;\n function reset() {\n lastArguments = null;\n lastResult = null;\n }\n function setResult(result) {\n if (result === void 0) { result = undefined; }\n overrideResult = { result: result };\n }\n function clearResult() {\n overrideResult = undefined;\n }\n // tslint:disable-next-line:no-any anything could be the result.\n function memoized() {\n if (overrideResult !== undefined) {\n return overrideResult.result;\n }\n if (!lastArguments) {\n lastResult = projectionFn.apply(null, arguments);\n lastArguments = arguments;\n return lastResult;\n }\n if (!isArgumentsChanged(arguments, lastArguments, isArgumentsEqual)) {\n return lastResult;\n }\n var newResult = projectionFn.apply(null, arguments);\n lastArguments = arguments;\n if (isResultEqual(lastResult, newResult)) {\n return lastResult;\n }\n lastResult = newResult;\n return newResult;\n }\n return { memoized: memoized, reset: reset, setResult: setResult, clearResult: clearResult };\n}\nfunction createSelector() {\n var input = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n input[_i] = arguments[_i];\n }\n return createSelectorFactory(defaultMemoize).apply(void 0, __spread(input));\n}\nfunction defaultStateFn(state, selectors, props, memoizedProjector) {\n if (props === undefined) {\n var args_1 = selectors.map(function (fn) { return fn(state); });\n return memoizedProjector.memoized.apply(null, args_1);\n }\n var args = selectors.map(function (fn) {\n return fn(state, props);\n });\n return memoizedProjector.memoized.apply(null, __spread(args, [props]));\n}\nfunction createSelectorFactory(memoize, options) {\n if (options === void 0) { options = {\n stateFn: defaultStateFn,\n }; }\n return function () {\n var input = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n input[_i] = arguments[_i];\n }\n var args = input;\n if (Array.isArray(args[0])) {\n var _a = __read(args), head_1 = _a[0], tail_1 = _a.slice(1);\n args = __spread(head_1, tail_1);\n }\n var selectors = args.slice(0, args.length - 1);\n var projector = args[args.length - 1];\n var memoizedSelectors = selectors.filter(function (selector) {\n return selector.release && typeof selector.release === 'function';\n });\n var memoizedProjector = memoize(function () {\n var selectors = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n selectors[_i] = arguments[_i];\n }\n return projector.apply(null, selectors);\n });\n var memoizedState = defaultMemoize(function (state, props) {\n return options.stateFn.apply(null, [\n state,\n selectors,\n props,\n memoizedProjector,\n ]);\n });\n function release() {\n memoizedState.reset();\n memoizedProjector.reset();\n memoizedSelectors.forEach(function (selector) { return selector.release(); });\n }\n return Object.assign(memoizedState.memoized, {\n release: release,\n projector: memoizedProjector.memoized,\n setResult: memoizedState.setResult,\n clearResult: memoizedState.clearResult,\n });\n };\n}\nfunction createFeatureSelector(featureName) {\n return createSelector(function (state) {\n var featureState = state[featureName];\n if (isDevMode() && !(featureName in state)) {\n console.warn(\"@ngrx/store: The feature name \\\"\" + featureName + \"\\\" does \" +\n 'not exist in the state, therefore createFeatureSelector ' +\n 'cannot access it. Be sure it is imported in a loaded module ' +\n (\"using StoreModule.forRoot('\" + featureName + \"', ...) or \") +\n (\"StoreModule.forFeature('\" + featureName + \"', ...). If the default \") +\n 'state is intended to be undefined, as is the case with router ' +\n 'state, this development-only warning message can be ignored.');\n }\n return featureState;\n }, function (featureState) { return featureState; });\n}\n\nvar RUNTIME_CHECK_URL = 'https://ngrx.io/guide/store/configuration/runtime-checks';\nfunction isUndefined(target) {\n return target === undefined;\n}\nfunction isNull(target) {\n return target === null;\n}\nfunction isArray(target) {\n return Array.isArray(target);\n}\nfunction isString(target) {\n return typeof target === 'string';\n}\nfunction isBoolean(target) {\n return typeof target === 'boolean';\n}\nfunction isNumber(target) {\n return typeof target === 'number';\n}\nfunction isObjectLike(target) {\n return typeof target === 'object' && target !== null;\n}\nfunction isObject(target) {\n return isObjectLike(target) && !isArray(target);\n}\nfunction isPlainObject(target) {\n if (!isObject(target)) {\n return false;\n }\n var targetPrototype = Object.getPrototypeOf(target);\n return targetPrototype === Object.prototype || targetPrototype === null;\n}\nfunction isFunction(target) {\n return typeof target === 'function';\n}\nfunction isComponent(target) {\n return isFunction(target) && target.hasOwnProperty('ɵcmp');\n}\nfunction hasOwnProperty(target, propertyName) {\n return Object.prototype.hasOwnProperty.call(target, propertyName);\n}\n\nfunction immutabilityCheckMetaReducer(reducer, checks) {\n return function (state, action) {\n var act = checks.action(action) ? freeze(action) : action;\n var nextState = reducer(state, act);\n return checks.state() ? freeze(nextState) : nextState;\n };\n}\nfunction freeze(target) {\n Object.freeze(target);\n var targetIsFunction = isFunction(target);\n Object.getOwnPropertyNames(target).forEach(function (prop) {\n // Ignore Ivy properties, ref: https://github.com/ngrx/platform/issues/2109#issuecomment-582689060\n if (prop.startsWith('ɵ')) {\n return;\n }\n if (hasOwnProperty(target, prop) &&\n (targetIsFunction\n ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'\n : true)) {\n var propValue = target[prop];\n if ((isObjectLike(propValue) || isFunction(propValue)) &&\n !Object.isFrozen(propValue)) {\n freeze(propValue);\n }\n }\n });\n return target;\n}\n\nfunction serializationCheckMetaReducer(reducer, checks) {\n return function (state, action) {\n if (checks.action(action)) {\n var unserializableAction = getUnserializable(action);\n throwIfUnserializable(unserializableAction, 'action');\n }\n var nextState = reducer(state, action);\n if (checks.state()) {\n var unserializableState = getUnserializable(nextState);\n throwIfUnserializable(unserializableState, 'state');\n }\n return nextState;\n };\n}\nfunction getUnserializable(target, path) {\n if (path === void 0) { path = []; }\n // Guard against undefined and null, e.g. a reducer that returns undefined\n if ((isUndefined(target) || isNull(target)) && path.length === 0) {\n return {\n path: ['root'],\n value: target,\n };\n }\n var keys = Object.keys(target);\n return keys.reduce(function (result, key) {\n if (result) {\n return result;\n }\n var value = target[key];\n // Ignore Ivy components\n if (isComponent(value)) {\n return result;\n }\n if (isUndefined(value) ||\n isNull(value) ||\n isNumber(value) ||\n isBoolean(value) ||\n isString(value) ||\n isArray(value)) {\n return false;\n }\n if (isPlainObject(value)) {\n return getUnserializable(value, __spread(path, [key]));\n }\n return {\n path: __spread(path, [key]),\n value: value,\n };\n }, false);\n}\nfunction throwIfUnserializable(unserializable, context) {\n if (unserializable === false) {\n return;\n }\n var unserializablePath = unserializable.path.join('.');\n var error = new Error(\"Detected unserializable \" + context + \" at \\\"\" + unserializablePath + \"\\\". \" + RUNTIME_CHECK_URL + \"#strict\" + context + \"serializability\");\n error.value = unserializable.value;\n error.unserializablePath = unserializablePath;\n throw error;\n}\n\nfunction inNgZoneAssertMetaReducer(reducer, checks) {\n return function (state, action) {\n if (checks.action(action) && !NgZone.isInAngularZone()) {\n throw new Error(\"Action '\" + action.type + \"' running outside NgZone. \" + RUNTIME_CHECK_URL + \"#strictactionwithinngzone\");\n }\n return reducer(state, action);\n };\n}\n\nfunction createActiveRuntimeChecks(runtimeChecks) {\n if (isDevMode()) {\n return __assign({ strictStateSerializability: false, strictActionSerializability: false, strictStateImmutability: true, strictActionImmutability: true, strictActionWithinNgZone: false }, runtimeChecks);\n }\n return {\n strictStateSerializability: false,\n strictActionSerializability: false,\n strictStateImmutability: false,\n strictActionImmutability: false,\n strictActionWithinNgZone: false,\n };\n}\nfunction createSerializationCheckMetaReducer(_a) {\n var strictActionSerializability = _a.strictActionSerializability, strictStateSerializability = _a.strictStateSerializability;\n return function (reducer) {\n return strictActionSerializability || strictStateSerializability\n ? serializationCheckMetaReducer(reducer, {\n action: function (action) {\n return strictActionSerializability && !ignoreNgrxAction(action);\n },\n state: function () { return strictStateSerializability; },\n })\n : reducer;\n };\n}\nfunction createImmutabilityCheckMetaReducer(_a) {\n var strictActionImmutability = _a.strictActionImmutability, strictStateImmutability = _a.strictStateImmutability;\n return function (reducer) {\n return strictActionImmutability || strictStateImmutability\n ? immutabilityCheckMetaReducer(reducer, {\n action: function (action) {\n return strictActionImmutability && !ignoreNgrxAction(action);\n },\n state: function () { return strictStateImmutability; },\n })\n : reducer;\n };\n}\nfunction ignoreNgrxAction(action) {\n return action.type.startsWith('@ngrx');\n}\nfunction createInNgZoneCheckMetaReducer(_a) {\n var strictActionWithinNgZone = _a.strictActionWithinNgZone;\n return function (reducer) {\n return strictActionWithinNgZone\n ? inNgZoneAssertMetaReducer(reducer, {\n action: function (action) {\n return strictActionWithinNgZone && !ignoreNgrxAction(action);\n },\n })\n : reducer;\n };\n}\nfunction provideRuntimeChecks(runtimeChecks) {\n return [\n {\n provide: _USER_RUNTIME_CHECKS,\n useValue: runtimeChecks,\n },\n {\n provide: USER_RUNTIME_CHECKS,\n useFactory: _runtimeChecksFactory,\n deps: [_USER_RUNTIME_CHECKS],\n },\n {\n provide: _ACTIVE_RUNTIME_CHECKS,\n deps: [USER_RUNTIME_CHECKS],\n useFactory: createActiveRuntimeChecks,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [_ACTIVE_RUNTIME_CHECKS],\n useFactory: createImmutabilityCheckMetaReducer,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [_ACTIVE_RUNTIME_CHECKS],\n useFactory: createSerializationCheckMetaReducer,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [_ACTIVE_RUNTIME_CHECKS],\n useFactory: createInNgZoneCheckMetaReducer,\n },\n ];\n}\nfunction _runtimeChecksFactory(runtimeChecks) {\n return runtimeChecks;\n}\n\nvar StoreRootModule = /** @class */ (function () {\n function StoreRootModule(actions$, reducer$, scannedActions$, store, guard) {\n }\n StoreRootModule = __decorate([ __param(4, Optional()),\n __param(4, Inject(_ROOT_STORE_GUARD)),\n __metadata(\"design:paramtypes\", [ActionsSubject,\n ReducerObservable,\n ScannedActionsSubject,\n Store, Object])\n ], StoreRootModule);\nStoreRootModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: StoreRootModule });\nStoreRootModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function StoreRootModule_Factory(t) { return new (t || StoreRootModule)(ɵngcc0.ɵɵinject(ActionsSubject), ɵngcc0.ɵɵinject(ReducerObservable), ɵngcc0.ɵɵinject(ScannedActionsSubject), ɵngcc0.ɵɵinject(Store), ɵngcc0.ɵɵinject(_ROOT_STORE_GUARD, 8)); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(StoreRootModule, [{\n type: NgModule,\n args: [{}]\n }], function () { return [{ type: ActionsSubject }, { type: ReducerObservable }, { type: ScannedActionsSubject }, { type: Store }, { type: Object, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [_ROOT_STORE_GUARD]\n }] }]; }, null); })();\n return StoreRootModule;\n}());\nvar StoreFeatureModule = /** @class */ (function () {\n function StoreFeatureModule(features, featureReducers, reducerManager, root) {\n this.features = features;\n this.featureReducers = featureReducers;\n this.reducerManager = reducerManager;\n var feats = features.map(function (feature, index) {\n var featureReducerCollection = featureReducers.shift();\n var reducers = featureReducerCollection /*TODO(#823)*/[index];\n return __assign(__assign({}, feature), { reducers: reducers, initialState: _initialStateFactory(feature.initialState) });\n });\n reducerManager.addFeatures(feats);\n }\n StoreFeatureModule.prototype.ngOnDestroy = function () {\n this.reducerManager.removeFeatures(this.features);\n };\n StoreFeatureModule = __decorate([ __param(0, Inject(_STORE_FEATURES)),\n __param(1, Inject(FEATURE_REDUCERS)),\n __metadata(\"design:paramtypes\", [Array, Array, ReducerManager,\n StoreRootModule])\n ], StoreFeatureModule);\nStoreFeatureModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: StoreFeatureModule });\nStoreFeatureModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function StoreFeatureModule_Factory(t) { return new (t || StoreFeatureModule)(ɵngcc0.ɵɵinject(_STORE_FEATURES), ɵngcc0.ɵɵinject(FEATURE_REDUCERS), ɵngcc0.ɵɵinject(ReducerManager), ɵngcc0.ɵɵinject(StoreRootModule)); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(StoreFeatureModule, [{\n type: NgModule,\n args: [{}]\n }], function () { return [{ type: Array, decorators: [{\n type: Inject,\n args: [_STORE_FEATURES]\n }] }, { type: Array, decorators: [{\n type: Inject,\n args: [FEATURE_REDUCERS]\n }] }, { type: ReducerManager }, { type: StoreRootModule }]; }, null); })();\n return StoreFeatureModule;\n}());\nvar StoreModule = /** @class */ (function () {\n function StoreModule() {\n }\n StoreModule.forRoot = function (reducers, config) {\n if (config === void 0) { config = {}; }\n return {\n ngModule: StoreRootModule,\n providers: [\n {\n provide: _ROOT_STORE_GUARD,\n useFactory: _provideForRootGuard,\n deps: [[Store, new Optional(), new SkipSelf()]],\n },\n { provide: _INITIAL_STATE, useValue: config.initialState },\n {\n provide: INITIAL_STATE,\n useFactory: _initialStateFactory,\n deps: [_INITIAL_STATE],\n },\n { provide: _INITIAL_REDUCERS, useValue: reducers },\n {\n provide: _STORE_REDUCERS,\n useExisting: reducers instanceof InjectionToken ? reducers : _INITIAL_REDUCERS,\n },\n {\n provide: INITIAL_REDUCERS,\n deps: [Injector, _INITIAL_REDUCERS, [new Inject(_STORE_REDUCERS)]],\n useFactory: _createStoreReducers,\n },\n {\n provide: USER_PROVIDED_META_REDUCERS,\n useValue: config.metaReducers ? config.metaReducers : [],\n },\n {\n provide: _RESOLVED_META_REDUCERS,\n deps: [META_REDUCERS, USER_PROVIDED_META_REDUCERS],\n useFactory: _concatMetaReducers,\n },\n {\n provide: _REDUCER_FACTORY,\n useValue: config.reducerFactory\n ? config.reducerFactory\n : combineReducers,\n },\n {\n provide: REDUCER_FACTORY,\n deps: [_REDUCER_FACTORY, _RESOLVED_META_REDUCERS],\n useFactory: createReducerFactory,\n },\n ACTIONS_SUBJECT_PROVIDERS,\n REDUCER_MANAGER_PROVIDERS,\n SCANNED_ACTIONS_SUBJECT_PROVIDERS,\n STATE_PROVIDERS,\n STORE_PROVIDERS,\n provideRuntimeChecks(config.runtimeChecks),\n ],\n };\n };\n StoreModule.forFeature = function (featureName, reducers, config) {\n if (config === void 0) { config = {}; }\n return {\n ngModule: StoreFeatureModule,\n providers: [\n {\n provide: _FEATURE_CONFIGS,\n multi: true,\n useValue: config,\n },\n {\n provide: STORE_FEATURES,\n multi: true,\n useValue: {\n key: featureName,\n reducerFactory: !(config instanceof InjectionToken) && config.reducerFactory\n ? config.reducerFactory\n : combineReducers,\n metaReducers: !(config instanceof InjectionToken) && config.metaReducers\n ? config.metaReducers\n : [],\n initialState: !(config instanceof InjectionToken) && config.initialState\n ? config.initialState\n : undefined,\n },\n },\n {\n provide: _STORE_FEATURES,\n deps: [Injector, _FEATURE_CONFIGS, STORE_FEATURES],\n useFactory: _createFeatureStore,\n },\n { provide: _FEATURE_REDUCERS, multi: true, useValue: reducers },\n {\n provide: _FEATURE_REDUCERS_TOKEN,\n multi: true,\n useExisting: reducers instanceof InjectionToken ? reducers : _FEATURE_REDUCERS,\n },\n {\n provide: FEATURE_REDUCERS,\n multi: true,\n deps: [\n Injector,\n _FEATURE_REDUCERS,\n [new Inject(_FEATURE_REDUCERS_TOKEN)],\n ],\n useFactory: _createFeatureReducers,\n },\n ],\n };\n };\nStoreModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: StoreModule });\nStoreModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function StoreModule_Factory(t) { return new (t || StoreModule)(); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(StoreModule, [{\n type: NgModule,\n args: [{}]\n }], function () { return []; }, null); })();\n return StoreModule;\n}());\nfunction _createStoreReducers(injector, reducers) {\n return reducers instanceof InjectionToken ? injector.get(reducers) : reducers;\n}\nfunction _createFeatureStore(injector, configs, featureStores) {\n return featureStores.map(function (feat, index) {\n if (configs[index] instanceof InjectionToken) {\n var conf = injector.get(configs[index]);\n return {\n key: feat.key,\n reducerFactory: conf.reducerFactory\n ? conf.reducerFactory\n : combineReducers,\n metaReducers: conf.metaReducers ? conf.metaReducers : [],\n initialState: conf.initialState,\n };\n }\n return feat;\n });\n}\nfunction _createFeatureReducers(injector, reducerCollection) {\n var reducers = reducerCollection.map(function (reducer) {\n return reducer instanceof InjectionToken ? injector.get(reducer) : reducer;\n });\n return reducers;\n}\nfunction _initialStateFactory(initialState) {\n if (typeof initialState === 'function') {\n return initialState();\n }\n return initialState;\n}\nfunction _concatMetaReducers(metaReducers, userProvidedMetaReducers) {\n return metaReducers.concat(userProvidedMetaReducers);\n}\nfunction _provideForRootGuard(store) {\n if (store) {\n throw new TypeError(\"StoreModule.forRoot() called twice. Feature modules should use StoreModule.forFeature() instead.\");\n }\n return 'guarded';\n}\n\n/**\n * @description\n * Associates actions with a given state change function.\n * A state change function must be provided as the last parameter.\n *\n * @param args `ActionCreator`'s followed by a state change function.\n *\n * **To maintain type-safety**: pass 10 or less `ActionCreator`'s.\n * @returns an association of action types with a state change function.\n */\nfunction on() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var reducer = args.pop();\n var types = args.reduce(function (result, creator) { return __spread(result, [creator.type]); }, []);\n return { reducer: reducer, types: types };\n}\n/**\n * @description\n * Creates a reducer function to handle state transitions.\n *\n * Reducer creators reduce the explicitness of reducer functions with switch statements.\n *\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @param ons Associations between actions and state changes.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * - Must be used with `ActionCreator`'s (returned by `createAction`). Cannot be used with class-based action creators.\n * - An action can be associated with multiple state change functions. In this case the functions will be executed in the specified order.\n * - The returned `ActionReducer` should additionally be returned from an exported `reducer` function.\n * This is because [function calls are not supported](https://angular.io/guide/aot-compiler#function-calls-are-not-supported) by the AOT compiler.\n *\n * **Declaring a reducer creator with an exported reducer function**\n *\n * ```ts\n * const featureReducer = createReducer(\n * initialState,\n * on(\n * featureActions.actionOne,\n * featureActions.actionTwo,\n * (state, { updatedValue }) => ({ ...state, prop: updatedValue })\n * ),\n * on(featureActions.actionThree, () => initialState);\n * );\n *\n * export function reducer(state: State | undefined, action: Action) {\n * return featureReducer(state, action);\n * }\n * ```\n */\nfunction createReducer(initialState) {\n var e_1, _a;\n var ons = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n ons[_i - 1] = arguments[_i];\n }\n var map = new Map();\n var _loop_1 = function (on_1) {\n var e_2, _a;\n var _loop_2 = function (type) {\n if (map.has(type)) {\n var existingReducer_1 = map.get(type);\n var newReducer = function (state, action) {\n return on_1.reducer(existingReducer_1(state, action), action);\n };\n map.set(type, newReducer);\n }\n else {\n map.set(type, on_1.reducer);\n }\n };\n try {\n for (var _b = (e_2 = void 0, __values(on_1.types)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var type = _c.value;\n _loop_2(type);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n };\n try {\n for (var ons_1 = __values(ons), ons_1_1 = ons_1.next(); !ons_1_1.done; ons_1_1 = ons_1.next()) {\n var on_1 = ons_1_1.value;\n _loop_1(on_1);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (ons_1_1 && !ons_1_1.done && (_a = ons_1.return)) _a.call(ons_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return function (state, action) {\n if (state === void 0) { state = initialState; }\n var reducer = map.get(action.type);\n return reducer ? reducer(state, action) : state;\n };\n}\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActionsSubject, FEATURE_REDUCERS, INIT, INITIAL_REDUCERS, INITIAL_STATE, META_REDUCERS, REDUCER_FACTORY, ReducerManager, ReducerManagerDispatcher, ReducerObservable, STORE_FEATURES, ScannedActionsSubject, State, StateObservable, Store, StoreFeatureModule, StoreModule, StoreRootModule, UPDATE, USER_PROVIDED_META_REDUCERS, USER_RUNTIME_CHECKS, combineReducers, compose, createAction, createFeatureSelector, createReducer, createReducerFactory, createSelector, createSelectorFactory, defaultMemoize, defaultStateFn, on, props, reduceState, resultMemoize, select, union, STORE_PROVIDERS as ɵngrx_modules_store_store_b, createSerializationCheckMetaReducer as ɵngrx_modules_store_store_ba, createImmutabilityCheckMetaReducer as ɵngrx_modules_store_store_bb, createInNgZoneCheckMetaReducer as ɵngrx_modules_store_store_bc, provideRuntimeChecks as ɵngrx_modules_store_store_bd, _runtimeChecksFactory as ɵngrx_modules_store_store_be, ACTIONS_SUBJECT_PROVIDERS as ɵngrx_modules_store_store_c, REDUCER_MANAGER_PROVIDERS as ɵngrx_modules_store_store_d, SCANNED_ACTIONS_SUBJECT_PROVIDERS as ɵngrx_modules_store_store_e, isEqualCheck as ɵngrx_modules_store_store_f, STATE_PROVIDERS as ɵngrx_modules_store_store_g, _ROOT_STORE_GUARD as ɵngrx_modules_store_store_h, _INITIAL_STATE as ɵngrx_modules_store_store_i, _REDUCER_FACTORY as ɵngrx_modules_store_store_j, _INITIAL_REDUCERS as ɵngrx_modules_store_store_k, _STORE_REDUCERS as ɵngrx_modules_store_store_l, _FEATURE_REDUCERS as ɵngrx_modules_store_store_m, _FEATURE_CONFIGS as ɵngrx_modules_store_store_n, _STORE_FEATURES as ɵngrx_modules_store_store_o, _FEATURE_REDUCERS_TOKEN as ɵngrx_modules_store_store_p, _RESOLVED_META_REDUCERS as ɵngrx_modules_store_store_q, _USER_RUNTIME_CHECKS as ɵngrx_modules_store_store_r, _ACTIVE_RUNTIME_CHECKS as ɵngrx_modules_store_store_s, _createStoreReducers as ɵngrx_modules_store_store_t, _createFeatureStore as ɵngrx_modules_store_store_u, _createFeatureReducers as ɵngrx_modules_store_store_v, _initialStateFactory as ɵngrx_modules_store_store_w, _concatMetaReducers as ɵngrx_modules_store_store_x, _provideForRootGuard as ɵngrx_modules_store_store_y, createActiveRuntimeChecks as ɵngrx_modules_store_store_z };\n\n//# sourceMappingURL=store.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar subscribeToArray_1 = require(\"./subscribeToArray\");\nvar subscribeToPromise_1 = require(\"./subscribeToPromise\");\nvar subscribeToIterable_1 = require(\"./subscribeToIterable\");\nvar subscribeToObservable_1 = require(\"./subscribeToObservable\");\nvar isArrayLike_1 = require(\"./isArrayLike\");\nvar isPromise_1 = require(\"./isPromise\");\nvar isObject_1 = require(\"./isObject\");\nvar iterator_1 = require(\"../symbol/iterator\");\nvar observable_1 = require(\"../symbol/observable\");\nexports.subscribeTo = function (result) {\n if (!!result && typeof result[observable_1.observable] === 'function') {\n return subscribeToObservable_1.subscribeToObservable(result);\n }\n else if (isArrayLike_1.isArrayLike(result)) {\n return subscribeToArray_1.subscribeToArray(result);\n }\n else if (isPromise_1.isPromise(result)) {\n return subscribeToPromise_1.subscribeToPromise(result);\n }\n else if (!!result && typeof result[iterator_1.iterator] === 'function') {\n return subscribeToIterable_1.subscribeToIterable(result);\n }\n else {\n var value = isObject_1.isObject(result) ? 'an invalid object' : \"'\" + result + \"'\";\n var msg = \"You provided \" + value + \" where a stream was expected.\"\n + ' You can provide an Observable, Promise, Array, or Iterable.';\n throw new TypeError(msg);\n }\n};\n//# sourceMappingURL=subscribeTo.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subscriber_1 = require(\"../Subscriber\");\nvar ArgumentOutOfRangeError_1 = require(\"../util/ArgumentOutOfRangeError\");\nvar empty_1 = require(\"../observable/empty\");\nfunction takeLast(count) {\n return function takeLastOperatorFunction(source) {\n if (count === 0) {\n return empty_1.empty();\n }\n else {\n return source.lift(new TakeLastOperator(count));\n }\n };\n}\nexports.takeLast = takeLast;\nvar TakeLastOperator = (function () {\n function TakeLastOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError;\n }\n }\n TakeLastOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n };\n return TakeLastOperator;\n}());\nvar TakeLastSubscriber = (function (_super) {\n __extends(TakeLastSubscriber, _super);\n function TakeLastSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.ring = new Array();\n _this.count = 0;\n return _this;\n }\n TakeLastSubscriber.prototype._next = function (value) {\n var ring = this.ring;\n var total = this.total;\n var count = this.count++;\n if (ring.length < total) {\n ring.push(value);\n }\n else {\n var index = count % total;\n ring[index] = value;\n }\n };\n TakeLastSubscriber.prototype._complete = function () {\n var destination = this.destination;\n var count = this.count;\n if (count > 0) {\n var total = this.count >= this.total ? this.total : this.count;\n var ring = this.ring;\n for (var i = 0; i < total; i++) {\n var idx = (count++) % total;\n destination.next(ring[idx]);\n }\n }\n destination.complete();\n };\n return TakeLastSubscriber;\n}(Subscriber_1.Subscriber));\n//# sourceMappingURL=takeLast.js.map","import { Injectable, Optional, Inject, PLATFORM_ID, ɵɵdefineInjectable, ɵɵinject, NgModule } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nimport * as ɵngcc0 from '@angular/core';\nvar hasV8BreakIterator;\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = (typeof Intl !== 'undefined' && Intl.v8BreakIterator);\n}\ncatch (_a) {\n hasV8BreakIterator = false;\n}\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\nvar Platform = /** @class */ (function () {\n /**\n * @breaking-change 8.0.0 remove optional decorator\n */\n function Platform(_platformId) {\n this._platformId = _platformId;\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n this.isBrowser = this._platformId ?\n isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;\n /** Whether the current browser is Microsoft Edge. */\n this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n /** Whether the current rendering engine is Microsoft Trident. */\n this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n this.BLINK = this.isBrowser && (!!(window.chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n this.WEBKIT = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n /** Whether the current platform is Apple iOS. */\n this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&\n !('MSStream' in window);\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n }\n /** @nocollapse */\n Platform.ctorParameters = function () { return [\n { type: Object, decorators: [{ type: Optional }, { type: Inject, args: [PLATFORM_ID,] }] }\n ]; };\n Platform.ɵprov = ɵɵdefineInjectable({ factory: function Platform_Factory() { return new Platform(ɵɵinject(PLATFORM_ID, 8)); }, token: Platform, providedIn: \"root\" });\nPlatform.ɵfac = function Platform_Factory(t) { return new (t || Platform)(ɵngcc0.ɵɵinject(PLATFORM_ID, 8)); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Platform, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: Object, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [PLATFORM_ID]\n }] }]; }, null); })();\n return Platform;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar PlatformModule = /** @class */ (function () {\n function PlatformModule() {\n }\nPlatformModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: PlatformModule });\nPlatformModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function PlatformModule_Factory(t) { return new (t || PlatformModule)(); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(PlatformModule, [{\n type: NgModule,\n args: [{}]\n }], function () { return []; }, null); })();\n return PlatformModule;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result Set of input types support by the current browser. */\nvar supportedInputTypes;\n/** Types of `
` that *might* be supported. */\nvar candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n/** @returns The input types supported by this browser. */\nfunction getSupportedInputTypes() {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n var featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(function (value) {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n return supportedInputTypes;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result of whether the user's browser supports passive event listeners. */\nvar supportsPassiveEvents;\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nfunction supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: function () { return supportsPassiveEvents = true; }\n }));\n }\n finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n return supportsPassiveEvents;\n}\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nfunction normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nvar rtlScrollAxisType;\n/** Check whether the browser supports scroll behaviors. */\nfunction supportsScrollBehavior() {\n return !!(typeof document == 'object' && 'scrollBehavior' in document.documentElement.style);\n}\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nfunction getRtlScrollAxisType() {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return 0 /* NORMAL */;\n }\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n var scrollContainer = document.createElement('div');\n var containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.height = '1px';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n var content = document.createElement('div');\n var contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n rtlScrollAxisType = 0 /* NORMAL */;\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? 1 /* NEGATED */ : 2 /* INVERTED */;\n }\n scrollContainer.parentNode.removeChild(scrollContainer);\n }\n return rtlScrollAxisType;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar shadowDomIsSupported;\n/** Checks whether the user's browser support Shadow DOM. */\nfunction _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n var head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n return shadowDomIsSupported;\n}\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nfunction _getShadowRoot(element) {\n if (_supportsShadowDom()) {\n var rootNode = element.getRootNode ? element.getRootNode() : null;\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Platform, PlatformModule, _getShadowRoot, _supportsShadowDom, getRtlScrollAxisType, getSupportedInputTypes, normalizePassiveListenerOptions, supportsPassiveEventListeners, supportsScrollBehavior };\n\n//# sourceMappingURL=platform.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ConnectableObservable_1 = require(\"../observable/ConnectableObservable\");\nfunction multicast(subjectOrSubjectFactory, selector) {\n return function multicastOperatorFunction(source) {\n var subjectFactory;\n if (typeof subjectOrSubjectFactory === 'function') {\n subjectFactory = subjectOrSubjectFactory;\n }\n else {\n subjectFactory = function subjectFactory() {\n return subjectOrSubjectFactory;\n };\n }\n if (typeof selector === 'function') {\n return source.lift(new MulticastOperator(subjectFactory, selector));\n }\n var connectable = Object.create(source, ConnectableObservable_1.connectableObservableDescriptor);\n connectable.source = source;\n connectable.subjectFactory = subjectFactory;\n return connectable;\n };\n}\nexports.multicast = multicast;\nvar MulticastOperator = (function () {\n function MulticastOperator(subjectFactory, selector) {\n this.subjectFactory = subjectFactory;\n this.selector = selector;\n }\n MulticastOperator.prototype.call = function (subscriber, source) {\n var selector = this.selector;\n var subject = this.subjectFactory();\n var subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n };\n return MulticastOperator;\n}());\nexports.MulticastOperator = MulticastOperator;\n//# sourceMappingURL=multicast.js.map","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n }\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"./Subject\");\nvar ObjectUnsubscribedError_1 = require(\"./util/ObjectUnsubscribedError\");\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: true,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n if (subscription && !subscription.closed) {\n subscriber.next(this._value);\n }\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n if (this.hasError) {\n throw this.thrownError;\n }\n else if (this.closed) {\n throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError();\n }\n else {\n return this._value;\n }\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, this._value = value);\n };\n return BehaviorSubject;\n}(Subject_1.Subject));\nexports.BehaviorSubject = BehaviorSubject;\n//# sourceMappingURL=BehaviorSubject.js.map","import { Injectable } from \"@angular/core\";\nimport { PendingStartingLicence, PendingStartingLicences, RawPendingStartingLicence, ServerResponse } from \"@app/core/types\";\nimport { StartingLicenceService } from \"@app/core/user/starting-licence/starting-licence.service\";\nimport { ApiService } from \"@app/shared/api.service\";\nimport { BehaviorSubject, Observable } from \"rxjs\";\nimport { map, share } from \"rxjs/operators\";\n\n@Injectable()\nexport class PendingLicenceService {\n constructor(\n private api: ApiService,\n private startingLicenceService: StartingLicenceService,\n ) {}\n\n private _pendingLicences = new BehaviorSubject
(\n [],\n );\n\n public get pendingLicences(): Observable {\n return this._pendingLicences.pipe(\n map((data) => this.groupPendingLicences(data)),\n );\n }\n\n getPendingLicencesForClubForCurrentGymnast(): Observable {\n return this.startingLicenceService.licencesForMyClub.pipe(\n map((licences) =>\n (licences || []).filter((licence) => licence.status === \"APPLIED\"),\n ),\n map((pendingLicences) => {\n if (pendingLicences.length === 0) {\n return null;\n }\n return pendingLicences.reduce((acc, pendingLicence) => {\n const disciplines = acc.disciplines ? acc.disciplines : [];\n return {\n clubName: pendingLicence.clubName,\n clubId: pendingLicence.clubId,\n disciplines: disciplines.concat([pendingLicence.discipline]),\n };\n }, {} as PendingStartingLicences);\n }),\n );\n }\n\n getPendingLicencesForClub(\n clubId: string,\n ): Observable {\n return this.api.get(`list/own/pending/${clubId}`);\n }\n\n refusePendingLicences(\n clubId: string,\n adminId: string,\n ): Observable {\n return this.api.post(`refuse/for/${clubId}?adminId=${adminId}`);\n }\n\n refusePendingLicencesByUuid(licencesUuid: string[]): Observable {\n return this.api.post(`refuse/licences/byUuid`, {licencesUuid});\n }\n\n refreshPendingLicences() {\n const request = this.api.get(\"list/own/pending\").pipe(\n map((response) => {\n let data: RawPendingStartingLicence[] = [];\n data = response;\n return data;\n }),\n share(),\n );\n request.subscribe((data) => {\n this._pendingLicences.next(data);\n });\n return request;\n }\n\n public confirmStartingLicences(clubId: string): Observable {\n return this.api.post(\"confirm/for/\" + clubId, null);\n }\n\n public refuseStartingLicences(clubId: string): Observable {\n return this.api.post(\"refuse/for/\" + clubId, null);\n }\n\n public applySubmittedLicences(clubIdsToDelete: string[]) {\n const currentValues = this._pendingLicences.value;\n const newValues = currentValues.filter(\n (licence) => clubIdsToDelete.indexOf(licence.club.id) < 0,\n );\n this._pendingLicences.next(newValues);\n }\n\n cleanUp() {\n this._pendingLicences.next([]);\n }\n\n private groupPendingLicences(\n data: RawPendingStartingLicence[],\n ): RawPendingStartingLicence[] {\n const result = data.reduce(\n (\n accumulator: RawPendingStartingLicence,\n current: RawPendingStartingLicence,\n ) => {\n const { startingLicences, ...club } = current;\n if (accumulator[current.club.id]) {\n accumulator[current.club.id].startingLicences.push(startingLicences);\n } else {\n accumulator[current.club.id] = club;\n accumulator[current.club.id].startingLicences = startingLicences;\n }\n return accumulator;\n },\n {} as RawPendingStartingLicence,\n );\n return Object.keys(result).map((key) => result[key]);\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar concatMap_1 = require(\"./concatMap\");\nfunction concatMapTo(innerObservable, resultSelector) {\n return concatMap_1.concatMap(function () { return innerObservable; }, resultSelector);\n}\nexports.concatMapTo = concatMapTo;\n//# sourceMappingURL=concatMapTo.js.map","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {\n function ObjectUnsubscribedErrorImpl() {\n Error.call(this);\n this.message = 'object unsubscribed';\n this.name = 'ObjectUnsubscribedError';\n return this;\n }\n ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return ObjectUnsubscribedErrorImpl;\n})();\nexport var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n//# sourceMappingURL=ObjectUnsubscribedError.js.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction isPromise(value) {\n return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\nexports.isPromise = isPromise;\n//# sourceMappingURL=isPromise.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar identity_1 = require(\"./identity\");\nfunction pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexports.pipe = pipe;\nfunction pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity_1.identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\nexports.pipeFromArray = pipeFromArray;\n//# sourceMappingURL=pipe.js.map","import { DOCUMENT } from '@angular/common';\nimport { Injectable, Inject, ɵɵdefineInjectable, ɵɵinject, QueryList, isDevMode, NgZone, Directive, ElementRef, Input, InjectionToken, Optional, EventEmitter, Output, NgModule } from '@angular/core';\nimport { __extends, __read } from 'tslib';\nimport { Subject, Subscription, of } from 'rxjs';\nimport { hasModifierKey, A, Z, ZERO, NINE, LEFT_ARROW, RIGHT_ARROW, UP_ARROW, DOWN_ARROW, TAB } from '@angular/cdk/keycodes';\nimport { tap, debounceTime, filter, map, take } from 'rxjs/operators';\nimport { coerceBooleanProperty, coerceElement } from '@angular/cdk/coercion';\nimport { Platform, normalizePassiveListenerOptions, _getShadowRoot, PlatformModule } from '@angular/cdk/platform';\nimport { ContentObserver, ObserversModule } from '@angular/cdk/observers';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** IDs are delimited by an empty space, as per the spec. */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/cdk/platform';\nimport * as ɵngcc2 from '@angular/cdk/observers';\nvar ID_DELIMITER = ' ';\n/**\n * Adds the given ID to the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction addAriaReferencedId(el, attr, id) {\n var ids = getAriaReferenceIds(el, attr);\n if (ids.some(function (existingId) { return existingId.trim() == id.trim(); })) {\n return;\n }\n ids.push(id.trim());\n el.setAttribute(attr, ids.join(ID_DELIMITER));\n}\n/**\n * Removes the given ID from the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction removeAriaReferencedId(el, attr, id) {\n var ids = getAriaReferenceIds(el, attr);\n var filteredIds = ids.filter(function (val) { return val != id.trim(); });\n if (filteredIds.length) {\n el.setAttribute(attr, filteredIds.join(ID_DELIMITER));\n }\n else {\n el.removeAttribute(attr);\n }\n}\n/**\n * Gets the list of IDs referenced by the given ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction getAriaReferenceIds(el, attr) {\n // Get string array of all individual ids (whitespace delimited) in the attribute value\n return (el.getAttribute(attr) || '').match(/\\S+/g) || [];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** ID used for the body container where all messages are appended. */\nvar MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';\n/** ID prefix used for each created message element. */\nvar CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n/** Attribute given to each host element that is described by a message element. */\nvar CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';\n/** Global incremental identifier for each registered message element. */\nvar nextId = 0;\n/** Global map of all registered message elements that have been placed into the document. */\nvar messageRegistry = new Map();\n/** Container for all registered messages. */\nvar messagesContainer = null;\n/**\n * Utility that creates visually hidden elements with a message content. Useful for elements that\n * want to use aria-describedby to further describe themselves without adding additional visual\n * content.\n */\nvar AriaDescriber = /** @class */ (function () {\n function AriaDescriber(_document) {\n this._document = _document;\n }\n /**\n * Adds to the host element an aria-describedby reference to a hidden element that contains\n * the message. If the same message has already been registered, then it will reuse the created\n * message element.\n */\n AriaDescriber.prototype.describe = function (hostElement, message) {\n if (!this._canBeDescribed(hostElement, message)) {\n return;\n }\n if (typeof message !== 'string') {\n // We need to ensure that the element has an ID.\n this._setMessageId(message);\n messageRegistry.set(message, { messageElement: message, referenceCount: 0 });\n }\n else if (!messageRegistry.has(message)) {\n this._createMessageElement(message);\n }\n if (!this._isElementDescribedByMessage(hostElement, message)) {\n this._addMessageReference(hostElement, message);\n }\n };\n /** Removes the host element's aria-describedby reference to the message element. */\n AriaDescriber.prototype.removeDescription = function (hostElement, message) {\n if (!this._isElementNode(hostElement)) {\n return;\n }\n if (this._isElementDescribedByMessage(hostElement, message)) {\n this._removeMessageReference(hostElement, message);\n }\n // If the message is a string, it means that it's one that we created for the\n // consumer so we can remove it safely, otherwise we should leave it in place.\n if (typeof message === 'string') {\n var registeredMessage = messageRegistry.get(message);\n if (registeredMessage && registeredMessage.referenceCount === 0) {\n this._deleteMessageElement(message);\n }\n }\n if (messagesContainer && messagesContainer.childNodes.length === 0) {\n this._deleteMessagesContainer();\n }\n };\n /** Unregisters all created message elements and removes the message container. */\n AriaDescriber.prototype.ngOnDestroy = function () {\n var describedElements = this._document.querySelectorAll(\"[\" + CDK_DESCRIBEDBY_HOST_ATTRIBUTE + \"]\");\n for (var i = 0; i < describedElements.length; i++) {\n this._removeCdkDescribedByReferenceIds(describedElements[i]);\n describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n if (messagesContainer) {\n this._deleteMessagesContainer();\n }\n messageRegistry.clear();\n };\n /**\n * Creates a new element in the visually hidden message container element with the message\n * as its content and adds it to the message registry.\n */\n AriaDescriber.prototype._createMessageElement = function (message) {\n var messageElement = this._document.createElement('div');\n this._setMessageId(messageElement);\n messageElement.textContent = message;\n this._createMessagesContainer();\n messagesContainer.appendChild(messageElement);\n messageRegistry.set(message, { messageElement: messageElement, referenceCount: 0 });\n };\n /** Assigns a unique ID to an element, if it doesn't have one already. */\n AriaDescriber.prototype._setMessageId = function (element) {\n if (!element.id) {\n element.id = CDK_DESCRIBEDBY_ID_PREFIX + \"-\" + nextId++;\n }\n };\n /** Deletes the message element from the global messages container. */\n AriaDescriber.prototype._deleteMessageElement = function (message) {\n var registeredMessage = messageRegistry.get(message);\n var messageElement = registeredMessage && registeredMessage.messageElement;\n if (messagesContainer && messageElement) {\n messagesContainer.removeChild(messageElement);\n }\n messageRegistry.delete(message);\n };\n /** Creates the global container for all aria-describedby messages. */\n AriaDescriber.prototype._createMessagesContainer = function () {\n if (!messagesContainer) {\n var preExistingContainer = this._document.getElementById(MESSAGES_CONTAINER_ID);\n // When going from the server to the client, we may end up in a situation where there's\n // already a container on the page, but we don't have a reference to it. Clear the\n // old container so we don't get duplicates. Doing this, instead of emptying the previous\n // container, should be slightly faster.\n if (preExistingContainer) {\n preExistingContainer.parentNode.removeChild(preExistingContainer);\n }\n messagesContainer = this._document.createElement('div');\n messagesContainer.id = MESSAGES_CONTAINER_ID;\n messagesContainer.setAttribute('aria-hidden', 'true');\n messagesContainer.style.display = 'none';\n this._document.body.appendChild(messagesContainer);\n }\n };\n /** Deletes the global messages container. */\n AriaDescriber.prototype._deleteMessagesContainer = function () {\n if (messagesContainer && messagesContainer.parentNode) {\n messagesContainer.parentNode.removeChild(messagesContainer);\n messagesContainer = null;\n }\n };\n /** Removes all cdk-describedby messages that are hosted through the element. */\n AriaDescriber.prototype._removeCdkDescribedByReferenceIds = function (element) {\n // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX\n var originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby')\n .filter(function (id) { return id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0; });\n element.setAttribute('aria-describedby', originalReferenceIds.join(' '));\n };\n /**\n * Adds a message reference to the element using aria-describedby and increments the registered\n * message's reference count.\n */\n AriaDescriber.prototype._addMessageReference = function (element, message) {\n var registeredMessage = messageRegistry.get(message);\n // Add the aria-describedby reference and set the\n // describedby_host attribute to mark the element.\n addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, '');\n registeredMessage.referenceCount++;\n };\n /**\n * Removes a message reference from the element using aria-describedby\n * and decrements the registered message's reference count.\n */\n AriaDescriber.prototype._removeMessageReference = function (element, message) {\n var registeredMessage = messageRegistry.get(message);\n registeredMessage.referenceCount--;\n removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n };\n /** Returns true if the element has been described by the provided message ID. */\n AriaDescriber.prototype._isElementDescribedByMessage = function (element, message) {\n var referenceIds = getAriaReferenceIds(element, 'aria-describedby');\n var registeredMessage = messageRegistry.get(message);\n var messageId = registeredMessage && registeredMessage.messageElement.id;\n return !!messageId && referenceIds.indexOf(messageId) != -1;\n };\n /** Determines whether a message can be described on a particular element. */\n AriaDescriber.prototype._canBeDescribed = function (element, message) {\n if (!this._isElementNode(element)) {\n return false;\n }\n if (message && typeof message === 'object') {\n // We'd have to make some assumptions about the description element's text, if the consumer\n // passed in an element. Assume that if an element is passed in, the consumer has verified\n // that it can be used as a description.\n return true;\n }\n var trimmedMessage = message == null ? '' : (\"\" + message).trim();\n var ariaLabel = element.getAttribute('aria-label');\n // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the\n // element, because screen readers will end up reading out the same text twice in a row.\n return trimmedMessage ? (!ariaLabel || ariaLabel.trim() !== trimmedMessage) : false;\n };\n /** Checks whether a node is an Element node. */\n AriaDescriber.prototype._isElementNode = function (element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n };\n /** @nocollapse */\n AriaDescriber.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }\n ]; };\n AriaDescriber.ɵprov = ɵɵdefineInjectable({ factory: function AriaDescriber_Factory() { return new AriaDescriber(ɵɵinject(DOCUMENT)); }, token: AriaDescriber, providedIn: \"root\" });\nAriaDescriber.ɵfac = function AriaDescriber_Factory(t) { return new (t || AriaDescriber)(ɵngcc0.ɵɵinject(DOCUMENT)); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(AriaDescriber, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return AriaDescriber;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This class manages keyboard events for selectable lists. If you pass it a query list\n * of items, it will set the active item correctly when arrow events occur.\n */\nvar ListKeyManager = /** @class */ (function () {\n function ListKeyManager(_items) {\n var _this = this;\n this._items = _items;\n this._activeItemIndex = -1;\n this._activeItem = null;\n this._wrap = false;\n this._letterKeyStream = new Subject();\n this._typeaheadSubscription = Subscription.EMPTY;\n this._vertical = true;\n this._allowedModifierKeys = [];\n /**\n * Predicate function that can be used to check whether an item should be skipped\n * by the key manager. By default, disabled items are skipped.\n */\n this._skipPredicateFn = function (item) { return item.disabled; };\n // Buffer for the letters that the user has pressed when the typeahead option is turned on.\n this._pressedLetters = [];\n /**\n * Stream that emits any time the TAB key is pressed, so components can react\n * when focus is shifted off of the list.\n */\n this.tabOut = new Subject();\n /** Stream that emits whenever the active item of the list manager changes. */\n this.change = new Subject();\n // We allow for the items to be an array because, in some cases, the consumer may\n // not have access to a QueryList of the items they want to manage (e.g. when the\n // items aren't being collected via `ViewChildren` or `ContentChildren`).\n if (_items instanceof QueryList) {\n _items.changes.subscribe(function (newItems) {\n if (_this._activeItem) {\n var itemArray = newItems.toArray();\n var newIndex = itemArray.indexOf(_this._activeItem);\n if (newIndex > -1 && newIndex !== _this._activeItemIndex) {\n _this._activeItemIndex = newIndex;\n }\n }\n });\n }\n }\n /**\n * Sets the predicate function that determines which items should be skipped by the\n * list key manager.\n * @param predicate Function that determines whether the given item should be skipped.\n */\n ListKeyManager.prototype.skipPredicate = function (predicate) {\n this._skipPredicateFn = predicate;\n return this;\n };\n /**\n * Configures wrapping mode, which determines whether the active item will wrap to\n * the other end of list when there are no more items in the given direction.\n * @param shouldWrap Whether the list should wrap when reaching the end.\n */\n ListKeyManager.prototype.withWrap = function (shouldWrap) {\n if (shouldWrap === void 0) { shouldWrap = true; }\n this._wrap = shouldWrap;\n return this;\n };\n /**\n * Configures whether the key manager should be able to move the selection vertically.\n * @param enabled Whether vertical selection should be enabled.\n */\n ListKeyManager.prototype.withVerticalOrientation = function (enabled) {\n if (enabled === void 0) { enabled = true; }\n this._vertical = enabled;\n return this;\n };\n /**\n * Configures the key manager to move the selection horizontally.\n * Passing in `null` will disable horizontal movement.\n * @param direction Direction in which the selection can be moved.\n */\n ListKeyManager.prototype.withHorizontalOrientation = function (direction) {\n this._horizontal = direction;\n return this;\n };\n /**\n * Modifier keys which are allowed to be held down and whose default actions will be prevented\n * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys.\n */\n ListKeyManager.prototype.withAllowedModifierKeys = function (keys) {\n this._allowedModifierKeys = keys;\n return this;\n };\n /**\n * Turns on typeahead mode which allows users to set the active item by typing.\n * @param debounceInterval Time to wait after the last keystroke before setting the active item.\n */\n ListKeyManager.prototype.withTypeAhead = function (debounceInterval) {\n var _this = this;\n if (debounceInterval === void 0) { debounceInterval = 200; }\n if (this._items.length && this._items.some(function (item) { return typeof item.getLabel !== 'function'; })) {\n throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');\n }\n this._typeaheadSubscription.unsubscribe();\n // Debounce the presses of non-navigational keys, collect the ones that correspond to letters\n // and convert those letters back into a string. Afterwards find the first item that starts\n // with that string and select it.\n this._typeaheadSubscription = this._letterKeyStream.pipe(tap(function (letter) { return _this._pressedLetters.push(letter); }), debounceTime(debounceInterval), filter(function () { return _this._pressedLetters.length > 0; }), map(function () { return _this._pressedLetters.join(''); })).subscribe(function (inputString) {\n var items = _this._getItemsArray();\n // Start at 1 because we want to start searching at the item immediately\n // following the current active item.\n for (var i = 1; i < items.length + 1; i++) {\n var index = (_this._activeItemIndex + i) % items.length;\n var item = items[index];\n if (!_this._skipPredicateFn(item) &&\n item.getLabel().toUpperCase().trim().indexOf(inputString) === 0) {\n _this.setActiveItem(index);\n break;\n }\n }\n _this._pressedLetters = [];\n });\n return this;\n };\n ListKeyManager.prototype.setActiveItem = function (item) {\n var previousIndex = this._activeItemIndex;\n this.updateActiveItem(item);\n if (this._activeItemIndex !== previousIndex) {\n this.change.next(this._activeItemIndex);\n }\n };\n /**\n * Sets the active item depending on the key event passed in.\n * @param event Keyboard event to be used for determining which element should be active.\n */\n ListKeyManager.prototype.onKeydown = function (event) {\n var _this = this;\n var keyCode = event.keyCode;\n var modifiers = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'];\n var isModifierAllowed = modifiers.every(function (modifier) {\n return !event[modifier] || _this._allowedModifierKeys.indexOf(modifier) > -1;\n });\n switch (keyCode) {\n case TAB:\n this.tabOut.next();\n return;\n case DOWN_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setNextItemActive();\n break;\n }\n else {\n return;\n }\n case UP_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setPreviousItemActive();\n break;\n }\n else {\n return;\n }\n case RIGHT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setPreviousItemActive() : this.setNextItemActive();\n break;\n }\n else {\n return;\n }\n case LEFT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setNextItemActive() : this.setPreviousItemActive();\n break;\n }\n else {\n return;\n }\n default:\n if (isModifierAllowed || hasModifierKey(event, 'shiftKey')) {\n // Attempt to use the `event.key` which also maps it to the user's keyboard language,\n // otherwise fall back to resolving alphanumeric characters via the keyCode.\n if (event.key && event.key.length === 1) {\n this._letterKeyStream.next(event.key.toLocaleUpperCase());\n }\n else if ((keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE)) {\n this._letterKeyStream.next(String.fromCharCode(keyCode));\n }\n }\n // Note that we return here, in order to avoid preventing\n // the default action of non-navigational keys.\n return;\n }\n this._pressedLetters = [];\n event.preventDefault();\n };\n Object.defineProperty(ListKeyManager.prototype, \"activeItemIndex\", {\n /** Index of the currently active item. */\n get: function () {\n return this._activeItemIndex;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ListKeyManager.prototype, \"activeItem\", {\n /** The active item. */\n get: function () {\n return this._activeItem;\n },\n enumerable: true,\n configurable: true\n });\n /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n ListKeyManager.prototype.isTyping = function () {\n return this._pressedLetters.length > 0;\n };\n /** Sets the active item to the first enabled item in the list. */\n ListKeyManager.prototype.setFirstItemActive = function () {\n this._setActiveItemByIndex(0, 1);\n };\n /** Sets the active item to the last enabled item in the list. */\n ListKeyManager.prototype.setLastItemActive = function () {\n this._setActiveItemByIndex(this._items.length - 1, -1);\n };\n /** Sets the active item to the next enabled item in the list. */\n ListKeyManager.prototype.setNextItemActive = function () {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n };\n /** Sets the active item to a previous enabled item in the list. */\n ListKeyManager.prototype.setPreviousItemActive = function () {\n this._activeItemIndex < 0 && this._wrap ? this.setLastItemActive()\n : this._setActiveItemByDelta(-1);\n };\n ListKeyManager.prototype.updateActiveItem = function (item) {\n var itemArray = this._getItemsArray();\n var index = typeof item === 'number' ? item : itemArray.indexOf(item);\n var activeItem = itemArray[index];\n // Explicitly check for `null` and `undefined` because other falsy values are valid.\n this._activeItem = activeItem == null ? null : activeItem;\n this._activeItemIndex = index;\n };\n /**\n * This method sets the active item, given a list of items and the delta between the\n * currently active item and the new active item. It will calculate differently\n * depending on whether wrap mode is turned on.\n */\n ListKeyManager.prototype._setActiveItemByDelta = function (delta) {\n this._wrap ? this._setActiveInWrapMode(delta) : this._setActiveInDefaultMode(delta);\n };\n /**\n * Sets the active item properly given \"wrap\" mode. In other words, it will continue to move\n * down the list until it finds an item that is not disabled, and it will wrap if it\n * encounters either end of the list.\n */\n ListKeyManager.prototype._setActiveInWrapMode = function (delta) {\n var items = this._getItemsArray();\n for (var i = 1; i <= items.length; i++) {\n var index = (this._activeItemIndex + (delta * i) + items.length) % items.length;\n var item = items[index];\n if (!this._skipPredicateFn(item)) {\n this.setActiveItem(index);\n return;\n }\n }\n };\n /**\n * Sets the active item properly given the default mode. In other words, it will\n * continue to move down the list until it finds an item that is not disabled. If\n * it encounters either end of the list, it will stop and not wrap.\n */\n ListKeyManager.prototype._setActiveInDefaultMode = function (delta) {\n this._setActiveItemByIndex(this._activeItemIndex + delta, delta);\n };\n /**\n * Sets the active item to the first enabled item starting at the index specified. If the\n * item is disabled, it will move in the fallbackDelta direction until it either\n * finds an enabled item or encounters the end of the list.\n */\n ListKeyManager.prototype._setActiveItemByIndex = function (index, fallbackDelta) {\n var items = this._getItemsArray();\n if (!items[index]) {\n return;\n }\n while (this._skipPredicateFn(items[index])) {\n index += fallbackDelta;\n if (!items[index]) {\n return;\n }\n }\n this.setActiveItem(index);\n };\n /** Returns the items as an array. */\n ListKeyManager.prototype._getItemsArray = function () {\n return this._items instanceof QueryList ? this._items.toArray() : this._items;\n };\n return ListKeyManager;\n}());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar ActiveDescendantKeyManager = /** @class */ (function (_super) {\n __extends(ActiveDescendantKeyManager, _super);\n function ActiveDescendantKeyManager() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ActiveDescendantKeyManager.prototype.setActiveItem = function (index) {\n if (this.activeItem) {\n this.activeItem.setInactiveStyles();\n }\n _super.prototype.setActiveItem.call(this, index);\n if (this.activeItem) {\n this.activeItem.setActiveStyles();\n }\n };\n return ActiveDescendantKeyManager;\n}(ListKeyManager));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar FocusKeyManager = /** @class */ (function (_super) {\n __extends(FocusKeyManager, _super);\n function FocusKeyManager() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._origin = 'program';\n return _this;\n }\n /**\n * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.\n * @param origin Focus origin to be used when focusing items.\n */\n FocusKeyManager.prototype.setFocusOrigin = function (origin) {\n this._origin = origin;\n return this;\n };\n FocusKeyManager.prototype.setActiveItem = function (item) {\n _super.prototype.setActiveItem.call(this, item);\n if (this.activeItem) {\n this.activeItem.focus(this._origin);\n }\n };\n return FocusKeyManager;\n}(ListKeyManager));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// The InteractivityChecker leans heavily on the ally.js accessibility utilities.\n// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are\n// supported.\n/**\n * Utility for checking the interactivity of an element, such as whether is is focusable or\n * tabbable.\n */\nvar InteractivityChecker = /** @class */ (function () {\n function InteractivityChecker(_platform) {\n this._platform = _platform;\n }\n /**\n * Gets whether an element is disabled.\n *\n * @param element Element to be checked.\n * @returns Whether the element is disabled.\n */\n InteractivityChecker.prototype.isDisabled = function (element) {\n // This does not capture some cases, such as a non-form control with a disabled attribute or\n // a form control inside of a disabled form, but should capture the most common cases.\n return element.hasAttribute('disabled');\n };\n /**\n * Gets whether an element is visible for the purposes of interactivity.\n *\n * This will capture states like `display: none` and `visibility: hidden`, but not things like\n * being clipped by an `overflow: hidden` parent or being outside the viewport.\n *\n * @returns Whether the element is visible.\n */\n InteractivityChecker.prototype.isVisible = function (element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n };\n /**\n * Gets whether an element can be reached via Tab key.\n * Assumes that the element has already been checked with isFocusable.\n *\n * @param element Element to be checked.\n * @returns Whether the element is tabbable.\n */\n InteractivityChecker.prototype.isTabbable = function (element) {\n // Nothing is tabbable on the server 😎\n if (!this._platform.isBrowser) {\n return false;\n }\n var frameElement = getFrameElement(getWindow(element));\n if (frameElement) {\n var frameType = frameElement && frameElement.nodeName.toLowerCase();\n // Frame elements inherit their tabindex onto all child elements.\n if (getTabIndexValue(frameElement) === -1) {\n return false;\n }\n // Webkit and Blink consider anything inside of an